idx int64 0 41.2k | question stringlengths 74 4.04k | target stringlengths 7 750 |
|---|---|---|
33,500 | private Object convertStrToObjTree ( String s ) { Object contentObj = null ; if ( s != null ) { s = s . trim ( ) ; try { if ( s . startsWith ( "{" ) ) { contentObj = Config . getInstance ( ) . getMapper ( ) . readValue ( s , new TypeReference < HashMap < String , Object > > ( ) { } ) ; } else if ( s . startsWith ( "[" ... | try to convert a string with json style to a structured object . |
33,501 | private OpenApiOperation getOpenApiOperation ( String uri , String httpMethod ) throws URISyntaxException { String uriWithoutQuery = new URI ( uri ) . getPath ( ) ; NormalisedPath requestPath = new ApiNormalisedPath ( uriWithoutQuery ) ; Optional < NormalisedPath > maybeApiPath = OpenApiHelper . findMatchingApiPath ( r... | locate operation based on uri and httpMethod |
33,502 | public FilterStreamParameters follow ( long follow ) { if ( this . follow . length ( ) > 0 ) { this . follow . append ( ',' ) ; } this . follow . append ( follow ) ; return this ; } | Add a user to follow in the stream . Does not replace any existing follows in the filter . |
33,503 | public AbstractStreamParameters track ( String track ) { if ( this . track . length ( ) > 0 ) { this . track . append ( ',' ) ; } this . track . append ( track ) ; return this ; } | Add tracking keywords to the filter . Does not replace any existing tracking keywords in the filter . |
33,504 | public AbstractStreamParameters addLocation ( float west , float south , float east , float north ) { if ( locations . length ( ) > 0 ) { locations . append ( ',' ) ; } locations . append ( west ) . append ( ',' ) . append ( south ) . append ( ',' ) ; locations . append ( east ) . append ( ',' ) . append ( north ) . ap... | Add a location to the filter Does not replace any existing locations in the filter . |
33,505 | private Entities toEntities ( final JsonNode node , String text ) throws IOException { if ( null == node || node . isNull ( ) || node . isMissingNode ( ) ) { return null ; } final ObjectMapper mapper = this . createMapper ( ) ; Entities entities = mapper . readerFor ( Entities . class ) . readValue ( node ) ; extractTi... | passing in text to fetch ticker symbol pseudo - entities |
33,506 | public UserStateResult getUserState ( String username ) throws APIConnectionException , APIRequestException { StringUtils . checkUsername ( username ) ; ResponseWrapper response = _httpClient . sendGet ( _baseUrl + userPath + "/" + username + "/userstat" ) ; return UserStateResult . fromResponse ( response , UserStateR... | Get user state |
33,507 | public UserStateListResult [ ] getUsersState ( String ... users ) throws APIConnectionException , APIRequestException { JsonArray jsonArray = new JsonArray ( ) ; for ( String username : users ) { StringUtils . checkUsername ( username ) ; jsonArray . add ( new JsonPrimitive ( username ) ) ; } ResponseWrapper response =... | Get users state |
33,508 | public UserInfoResult [ ] getBlackList ( String username ) throws APIConnectionException , APIRequestException { StringUtils . checkUsername ( username ) ; ResponseWrapper response = _httpClient . sendGet ( _baseUrl + userPath + "/" + username + "/blacklist" ) ; return _gson . fromJson ( response . responseContent , Us... | Get a user s all black list |
33,509 | public UserGroupsResult getGroupList ( String username ) throws APIConnectionException , APIRequestException { StringUtils . checkUsername ( username ) ; ResponseWrapper response = _httpClient . sendGet ( _baseUrl + userPath + "/" + username + "/groups" ) ; return UserGroupsResult . fromResponse ( response ) ; } | Get all groups of a user |
33,510 | public ResponseWrapper addBlackList ( String username , String ... users ) throws APIConnectionException , APIRequestException { return _userClient . addBlackList ( username , users ) ; } | Add Users to black list |
33,511 | public ResponseWrapper setNoDisturb ( String username , NoDisturbPayload payload ) throws APIConnectionException , APIRequestException { return _userClient . setNoDisturb ( username , payload ) ; } | Set don t disturb service while receiving messages . You can Add or remove single conversation or group conversation |
33,512 | public void addOrRemoveMembers ( long gid , String [ ] addList , String [ ] removeList ) throws APIConnectionException , APIRequestException { Members add = Members . newBuilder ( ) . addMember ( addList ) . build ( ) ; Members remove = Members . newBuilder ( ) . addMember ( removeList ) . build ( ) ; _groupClient . ad... | Add or remove members from a group |
33,513 | public SendMessageResult sendSingleTextByAdmin ( String targetId , String fromId , MessageBody body ) throws APIConnectionException , APIRequestException { return sendMessage ( _sendVersion , "single" , targetId , "admin" , fromId , MessageType . TEXT , body ) ; } | Send single text message by admin |
33,514 | public ResponseWrapper addCrossBlacklist ( String username , CrossBlacklist [ ] blacklists ) throws APIConnectionException , APIRequestException { return _crossAppClient . addCrossBlacklist ( username , blacklists ) ; } | Add blacklist whose users belong to another app to a given user . |
33,515 | public CreateChatRoomResult createChatRoom ( ChatRoomPayload payload ) throws APIConnectionException , APIRequestException { Preconditions . checkArgument ( null != payload , "ChatRoomPayload should not be null" ) ; ResponseWrapper responseWrapper = _httpClient . sendPost ( _baseUrl + mChatRoomPath , payload . toString... | Create chat room |
33,516 | public ChatRoomListResult getBatchChatRoomInfo ( long ... roomIds ) throws APIConnectionException , APIRequestException { Preconditions . checkArgument ( roomIds != null && roomIds . length > 0 , "Room ids should not be null" ) ; JsonArray array = new JsonArray ( ) ; for ( long id : roomIds ) { array . add ( new JsonPr... | Get chat room information by room ids |
33,517 | public ChatRoomListResult getUserChatRoomInfo ( String username ) throws APIConnectionException , APIRequestException { StringUtils . checkUsername ( username ) ; ResponseWrapper responseWrapper = _httpClient . sendGet ( _baseUrl + mUserPath + "/" + username + "/chatroom" ) ; return ChatRoomListResult . fromResponse ( ... | Get user s whole chat room information |
33,518 | public ResponseWrapper deleteChatRoom ( long roomId ) throws APIConnectionException , APIRequestException { Preconditions . checkArgument ( roomId > 0 , "room id is invalid" ) ; return _httpClient . sendDelete ( _baseUrl + mChatRoomPath + "/" + roomId ) ; } | Delete chat room by id |
33,519 | public DownloadResult downloadFile ( String mediaId ) throws APIConnectionException , APIRequestException { Preconditions . checkArgument ( null != mediaId , "mediaId is necessary" ) ; ResponseWrapper response = _httpClient . sendGet ( _baseUrl + resourcePath + "?mediaId=" + mediaId ) ; return DownloadResult . fromResp... | Download file with mediaId will return DownloadResult which include url . |
33,520 | public MessageListResult v2GetMessageListByCursor ( String cursor ) throws APIConnectionException , APIRequestException { if ( null != cursor ) { String requestUrl = mBaseReportPath + mV2MessagePath + "?cursor=" + cursor ; ResponseWrapper response = _httpClient . sendGet ( requestUrl ) ; return MessageListResult . from... | Get message list with cursor the cursor will effective in 120 seconds . And will return same count of messages as first request . |
33,521 | public MemberListResult getCrossGroupMembers ( long gid ) throws APIConnectionException , APIRequestException { Preconditions . checkArgument ( 0 != gid , "gid must not be empty" ) ; ResponseWrapper response = _httpClient . sendGet ( _baseUrl + crossGroupPath + "/" + gid + "/members/" ) ; return MemberListResult . from... | Get members info from cross group |
33,522 | public ResponseWrapper deleteCrossBlacklist ( String username , CrossBlacklist [ ] blacklists ) throws APIConnectionException , APIRequestException { StringUtils . checkUsername ( username ) ; CrossBlacklistPayload payload = new CrossBlacklistPayload . Builder ( ) . setCrossBlacklists ( blacklists ) . build ( ) ; retur... | Delete blacklist whose users belong to another app from a given user . |
33,523 | public ResponseWrapper deleteSensitiveWord ( String word ) throws APIConnectionException , APIRequestException { Preconditions . checkArgument ( word . length ( ) <= 10 , "one word's max length is 10" ) ; JsonObject jsonObject = new JsonObject ( ) ; jsonObject . addProperty ( "word" , word ) ; return _httpClient . send... | Delete sensitive word |
33,524 | public ResponseWrapper updateSensitiveWordStatus ( int status ) throws APIConnectionException , APIRequestException { Preconditions . checkArgument ( status == 0 || status == 1 , "status should be 0 or 1" ) ; return _httpClient . sendPut ( _baseUrl + sensitiveWordPath + "/status?status=" + status , null ) ; } | Update sensitive word status |
33,525 | public SensitiveWordStatusResult getSensitiveWordStatus ( ) throws APIConnectionException , APIRequestException { ResponseWrapper responseWrapper = _httpClient . sendGet ( _baseUrl + sensitiveWordPath + "/status" ) ; return _gson . fromJson ( responseWrapper . responseContent , SensitiveWordStatusResult . class ) ; } | Get sensitive word status |
33,526 | public void setAction ( final Action fromAction , final Action toAction , final int rotation , long delay ) { setAction ( fromAction , false , ROTATE_CLOCKWISE ) ; postDelayed ( new Runnable ( ) { public void run ( ) { if ( ! isAttachedToWindow ( ) ) { return ; } setAction ( toAction , true , rotation ) ; } } , delay )... | Sets a new action transition . |
33,527 | private float calculateScale ( int x , int y ) { final float centerX = getWidth ( ) / 2f ; final float centerY = getHeight ( ) / 2f ; final float maxDistance = ( float ) Math . sqrt ( centerX * centerX + centerY * centerY ) ; final float deltaX = centerX - x ; final float deltaY = centerY - y ; final float distance = (... | calculates the required scale of the ink - view to fill the whole view |
33,528 | public static boolean validOptions ( String [ ] [ ] options , DocErrorReporter reporter ) { return SARL_DOCLET . configuration . validOptions ( options , reporter ) ; } | Validate the given options . |
33,529 | public List < UUID > spawn ( int nbAgents , Class < ? extends Agent > agent , Object ... params ) { return this . spawnService . spawn ( nbAgents , null , this . janusContext , null , agent , params ) ; } | Spawn agents of the given type and pass the parameters to its initialization function . |
33,530 | public UUID spawn ( UUID agentID , Class < ? extends Agent > agent , Object ... params ) { final List < UUID > ids = this . spawnService . spawn ( 1 , null , this . janusContext , agentID , agent , params ) ; if ( ids . isEmpty ( ) ) { return null ; } return ids . get ( 0 ) ; } | Spawn an agent of the given type and pass the parameters to its initialization function . |
33,531 | public < S extends Service > S getService ( Class < S > type ) { for ( final Service serv : this . serviceManager . servicesByState ( ) . values ( ) ) { if ( serv . isRunning ( ) && type . isInstance ( serv ) ) { return type . cast ( serv ) ; } } return null ; } | Replies a kernel service that is alive . |
33,532 | public void setCodeminingEnabled ( Boolean enable ) { final IPreferenceStore store = getWritablePreferenceStore ( null ) ; if ( enable == null ) { store . setToDefault ( CODEMINING_PROPERTY ) ; } else { store . setValue ( CODEMINING_PROPERTY , enable . booleanValue ( ) ) ; } } | Enable or disable the codemining feature into the SARL editor . |
33,533 | public static void addFormalParameter ( ExecutableMemberDoc member , Parameter param , boolean isVarArg , Content htmlTree , SarlConfiguration configuration , SubWriterHolderWriter writer ) { final ProxyInstaller proxyInstaller = configuration . getProxyInstaller ( ) ; final ExecutableMemberDoc omember = proxyInstaller... | Add a parameter to the given executable member . |
33,534 | public String getKeyString ( ) { if ( ! Strings . isEmpty ( getAnnotatedWith ( ) ) ) { return MessageFormat . format ( "@{1} {0}" , getBind ( ) , getAnnotatedWith ( ) ) ; } if ( ! Strings . isEmpty ( getAnnotatedWithName ( ) ) ) { return MessageFormat . format ( "@Named({1}) {0}" , getBind ( ) , getAnnotatedWithName ( ... | Replies the string representation of the binding key . |
33,535 | protected void refreshSREListUI ( ) { final Display display = Display . getDefault ( ) ; if ( display . getThread ( ) . equals ( Thread . currentThread ( ) ) ) { if ( ! this . sresList . isBusy ( ) ) { this . sresList . refresh ( ) ; } } else { display . syncExec ( new Runnable ( ) { @ SuppressWarnings ( "synthetic-acc... | Refresh the UI list of SRE . |
33,536 | public void setErrorMessage ( Throwable exception ) { if ( exception != null ) { String message = exception . getLocalizedMessage ( ) ; if ( Strings . isNullOrEmpty ( message ) ) { message = exception . getMessage ( ) ; } if ( Strings . isNullOrEmpty ( message ) ) { message = MessageFormat . format ( Messages . SREsPre... | Set the error message from the given exception . |
33,537 | protected void setSREs ( ISREInstall [ ] sres ) { this . sreArray . clear ( ) ; for ( final ISREInstall sre : sres ) { this . sreArray . add ( sre ) ; } this . sresList . setInput ( this . sreArray ) ; refreshSREListUI ( ) ; updateUI ( ) ; } | Sets the SREs to be displayed in this block . |
33,538 | public String createUniqueName ( String name ) { if ( ! isDuplicateName ( name ) ) { return name ; } if ( name . matches ( ".*\\(\\d*\\)" ) ) { final int start = name . lastIndexOf ( '(' ) ; final int end = name . lastIndexOf ( ')' ) ; final String stringInt = name . substring ( start + 1 , end ) ; final int numericVal... | Compares the given name against current names and adds the appropriate numerical suffix to ensure that it is unique . |
33,539 | protected void addSRE ( ) { final AddSREInstallWizard wizard = new AddSREInstallWizard ( createUniqueIdentifier ( ) , this . sreArray . toArray ( new ISREInstall [ this . sreArray . size ( ) ] ) ) ; final WizardDialog dialog = new WizardDialog ( getShell ( ) , wizard ) ; if ( dialog . open ( ) == Window . OK ) { final ... | Add a SRE . |
33,540 | protected void editSRE ( ) { final IStructuredSelection selection = ( IStructuredSelection ) this . sresList . getSelection ( ) ; final ISREInstall sre = ( ISREInstall ) selection . getFirstElement ( ) ; if ( sre == null ) { return ; } final EditSREInstallWizard wizard = new EditSREInstallWizard ( sre , this . sreArray... | Edit the selected SRE . |
33,541 | @ SuppressWarnings ( "unchecked" ) protected void copySRE ( ) { final IStructuredSelection selection = ( IStructuredSelection ) this . sresList . getSelection ( ) ; final Iterator < ISREInstall > it = selection . iterator ( ) ; final List < ISREInstall > newEntries = new ArrayList < > ( ) ; while ( it . hasNext ( ) ) {... | Copy the selected SRE . |
33,542 | @ SuppressWarnings ( "unchecked" ) protected void removeSREs ( ) { final IStructuredSelection selection = ( IStructuredSelection ) this . sresList . getSelection ( ) ; final ISREInstall [ ] vms = new ISREInstall [ selection . size ( ) ] ; final Iterator < ISREInstall > iter = selection . iterator ( ) ; int i = 0 ; whil... | Remove the selected SREs . |
33,543 | @ SuppressWarnings ( "checkstyle:npathcomplexity" ) public void removeSREs ( ISREInstall ... sres ) { final ISREInstall defaultSRE = getDefaultSRE ( ) ; final String defaultId = defaultSRE == null ? null : defaultSRE . getId ( ) ; int defaultIndex = - 1 ; if ( defaultId != null ) { for ( int i = 0 ; defaultIndex == - 1... | Removes the given SREs from the table . |
33,544 | @ SuppressWarnings ( "unchecked" ) private void enableButtons ( ) { final IStructuredSelection selection = ( IStructuredSelection ) this . sresList . getSelection ( ) ; final int selectionCount = selection . size ( ) ; this . editButton . setEnabled ( selectionCount == 1 ) ; this . copyButton . setEnabled ( selectionCo... | Enables the buttons based on selected items counts in the viewer . |
33,545 | private void sortByName ( ) { this . sresList . setComparator ( new ViewerComparator ( ) { public int compare ( Viewer viewer , Object e1 , Object e2 ) { if ( ( e1 instanceof ISREInstall ) && ( e2 instanceof ISREInstall ) ) { final ISREInstall left = ( ISREInstall ) e1 ; final ISREInstall right = ( ISREInstall ) e2 ; r... | Sorts by SRE name . |
33,546 | private void sortByLocation ( ) { this . sresList . setComparator ( new ViewerComparator ( ) { public int compare ( Viewer viewer , Object e1 , Object e2 ) { if ( ( e1 instanceof ISREInstall ) && ( e2 instanceof ISREInstall ) ) { final ISREInstall left = ( ISREInstall ) e1 ; final ISREInstall right = ( ISREInstall ) e2... | Sorts by VM location . |
33,547 | @ SuppressWarnings ( "static-method" ) protected Collection < AbstractSubCodeBuilderFragment > initializeSubGenerators ( Injector injector ) { final Collection < AbstractSubCodeBuilderFragment > fragments = new ArrayList < > ( ) ; fragments . add ( injector . getInstance ( BuilderFactoryFragment . class ) ) ; fragments... | Initialize the sub generators . |
33,548 | protected BindingFactory createRuntimeBindings ( ) { final BindingFactory factory = new BindingFactory ( getClass ( ) . getName ( ) ) ; for ( final AbstractSubCodeBuilderFragment subFragment : this . subFragments ) { subFragment . generateRuntimeBindings ( factory ) ; } return factory ; } | Create the runtime bindings for the builders . |
33,549 | protected BindingFactory createEclipseBindings ( ) { final BindingFactory factory = new BindingFactory ( getClass ( ) . getName ( ) ) ; for ( final AbstractSubCodeBuilderFragment subFragment : this . subFragments ) { subFragment . generateEclipseBindings ( factory ) ; } return factory ; } | Create the Eclipse bindings for the builders . |
33,550 | protected BindingFactory createIdeaBindings ( ) { final BindingFactory factory = new BindingFactory ( getClass ( ) . getName ( ) ) ; for ( final AbstractSubCodeBuilderFragment subFragment : this . subFragments ) { subFragment . generateIdeaBindings ( factory ) ; } return factory ; } | Create the IDEA bindings for the builders . |
33,551 | protected BindingFactory createWebBindings ( ) { final BindingFactory factory = new BindingFactory ( getClass ( ) . getName ( ) ) ; for ( final AbstractSubCodeBuilderFragment subFragment : this . subFragments ) { subFragment . generateWebBindings ( factory ) ; } return factory ; } | Create the Web - interface bindings for the builders . |
33,552 | public int compareTo ( Address address ) { if ( address == null ) { return 1 ; } return this . agentId . compareTo ( address . getUUID ( ) ) ; } | Compares this object with the specified object for order . Returns a negative integer zero or a positive integer as this object is less than equal to or greater than the specified object . |
33,553 | public static void main ( String [ ] args ) { final int retCode = createMainObject ( ) . runCompiler ( args ) ; System . exit ( retCode ) ; } | Main program of the batch compiler . |
33,554 | public void setFromString ( String sectionNumber , int level ) { assert level >= 1 ; final String [ ] numbers = sectionNumber . split ( "[^0-9]+" ) ; final int len = Math . max ( 0 , this . numbers . size ( ) - numbers . length ) ; for ( int i = 0 ; i < len ; ++ i ) { this . numbers . removeLast ( ) ; } for ( int i = 0... | Change this version number from the given string representation . |
33,555 | public void increment ( int level ) { assert level >= 1 ; if ( this . numbers . size ( ) < level ) { do { this . numbers . addLast ( 0 ) ; } while ( this . numbers . size ( ) < level ) ; } else if ( this . numbers . size ( ) > level ) { do { this . numbers . removeLast ( ) ; } while ( this . numbers . size ( ) > level ... | Change this version number by incrementing the number for the given level . |
33,556 | @ Fix ( "*" ) public void fixSuppressWarnings ( Issue issue , IssueResolutionAcceptor acceptor ) { if ( isIgnorable ( issue . getCode ( ) ) ) { SuppressWarningsAddModification . accept ( this , issue , acceptor ) ; } } | Add the fixes with suppress - warning annotations . |
33,557 | public List < JvmOperation > getJvmOperationsFromURIs ( XtendTypeDeclaration container , String ... operationUris ) { final List < JvmOperation > operations = new ArrayList < > ( ) ; final ResourceSet resourceSet = container . eResource ( ) . getResourceSet ( ) ; for ( final String operationUriAsString : operationUris ... | Replies the JVM operations that correspond to the given URIs . |
33,558 | public boolean removeToPreviousSeparator ( Issue issue , IXtextDocument document , String separator ) throws BadLocationException { return removeToPreviousSeparator ( issue . getOffset ( ) , issue . getLength ( ) , document , separator ) ; } | Remove the element related to the issue and the whitespaces before the element until the given separator . |
33,559 | public boolean removeToPreviousSeparator ( int offset , int length , IXtextDocument document , String separator ) throws BadLocationException { int index = offset - 1 ; char c = document . getChar ( index ) ; while ( Character . isWhitespace ( c ) ) { index -- ; c = document . getChar ( index ) ; } final boolean foundS... | Remove the portion of text and the whitespaces before the text until the given separator . |
33,560 | public int getImportInsertOffset ( SarlScript script ) { final ICompositeNode node = NodeModelUtils . findActualNodeFor ( script . getImportSection ( ) ) ; if ( node == null ) { final List < INode > children = NodeModelUtils . findNodesForFeature ( script , XtendPackage . eINSTANCE . getXtendFile_Package ( ) ) ; if ( c... | Replies the index where import declaration could be inserted into the given container . |
33,561 | public boolean removeToNextSeparator ( Issue issue , IXtextDocument document , String separator ) throws BadLocationException { int index = issue . getOffset ( ) + issue . getLength ( ) ; char c = document . getChar ( index ) ; while ( Character . isWhitespace ( c ) ) { index ++ ; c = document . getChar ( index ) ; } f... | Remove the element related to the issue and the whitespaces after the element until the given separator . |
33,562 | public boolean removeToPreviousKeyword ( Issue issue , IXtextDocument document , String keyword1 , String ... otherKeywords ) throws BadLocationException { int index = issue . getOffset ( ) - 1 ; char c = document . getChar ( index ) ; while ( Character . isWhitespace ( c ) ) { index -- ; c = document . getChar ( index... | Remove the element related to the issue and the whitespaces before the element until one of the given keywords is encountered . |
33,563 | public boolean removeBetweenSeparators ( Issue issue , IXtextDocument document , String beginSeparator , String endSeparator ) throws BadLocationException { int offset = issue . getOffset ( ) ; int length = issue . getLength ( ) ; int index = offset - 1 ; char c = document . getChar ( index ) ; while ( Character . isWh... | Remove the element related to the issue and the whitespaces before the element until the begin separator and the whitespaces after the element until the end separator . |
33,564 | public int getInsertOffset ( XtendTypeDeclaration container ) { if ( container . getMembers ( ) . isEmpty ( ) ) { final ICompositeNode node = NodeModelUtils . findActualNodeFor ( container ) ; final ILeafNode openingBraceNode = IterableExtensions . findFirst ( node . getLeafNodes ( ) , lnode -> "{" . equals ( lnode . g... | Replies the index where elements could be inserted into the given container . |
33,565 | public int getSpaceSize ( IXtextDocument document , int offset ) throws BadLocationException { int size = 0 ; char c = document . getChar ( offset + size ) ; while ( Character . isWhitespace ( c ) ) { size ++ ; c = document . getChar ( offset + size ) ; } return size ; } | Replies the size of a sequence of whitespaces . |
33,566 | public int getOffsetForPattern ( IXtextDocument document , int startOffset , String pattern ) { final Pattern compiledPattern = Pattern . compile ( pattern ) ; final Matcher matcher = compiledPattern . matcher ( document . get ( ) ) ; if ( matcher . find ( startOffset ) ) { final int end = matcher . end ( ) ; return en... | Replies the offset that corresponds to the given regular expression pattern . |
33,567 | public QualifiedName qualifiedName ( String name ) { if ( ! com . google . common . base . Strings . isNullOrEmpty ( name ) ) { final List < String > segments = Strings . split ( name , "." ) ; return QualifiedName . create ( segments ) ; } return QualifiedName . create ( ) ; } | Replies the qualified name for the given name . |
33,568 | public void removeExecutableFeature ( EObject element , IModificationContext context ) throws BadLocationException { final ICompositeNode node ; final SarlAction action = EcoreUtil2 . getContainerOfType ( element , SarlAction . class ) ; if ( action == null ) { final XtendMember feature = EcoreUtil2 . getContainerOfTyp... | Remove the exectuable feature . |
33,569 | @ Fix ( IssueCodes . DUPLICATE_TYPE_NAME ) public void fixDuplicateTopElements ( Issue issue , IssueResolutionAcceptor acceptor ) { MemberRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Duplicate type . |
33,570 | @ Fix ( IssueCodes . DUPLICATE_FIELD ) public void fixDuplicateAttribute ( Issue issue , IssueResolutionAcceptor acceptor ) { MemberRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Duplicate field . |
33,571 | @ Fix ( IssueCodes . DUPLICATE_METHOD ) public void fixDuplicateMethod ( Issue issue , IssueResolutionAcceptor acceptor ) { MemberRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Duplicate method . |
33,572 | @ Fix ( IssueCodes . INVALID_MEMBER_NAME ) public void fixMemberName ( final Issue issue , IssueResolutionAcceptor acceptor ) { MemberRenameModification . accept ( this , issue , acceptor ) ; MemberRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Invalid member name . |
33,573 | @ Fix ( io . sarl . lang . validation . IssueCodes . REDUNDANT_INTERFACE_IMPLEMENTATION ) public void fixRedundantInterface ( final Issue issue , IssueResolutionAcceptor acceptor ) { ImplementedTypeRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Redundant interface implementation . |
33,574 | @ Fix ( org . eclipse . xtext . xbase . validation . IssueCodes . VARIABLE_NAME_SHADOWING ) public void fixVariableNameShadowing ( final Issue issue , IssueResolutionAcceptor acceptor ) { MemberRemoveModification . accept ( this , issue , acceptor ) ; MemberRenameModification . accept ( this , issue , acceptor ) ; } | Quick fix for Variable name shadowing . |
33,575 | @ Fix ( IssueCodes . OVERRIDDEN_FINAL ) public void fixOverriddenFinal ( Issue issue , IssueResolutionAcceptor acceptor ) { final MultiModification modifications = new MultiModification ( this , issue , acceptor , Messages . SARLQuickfixProvider_0 , Messages . SARLQuickfixProvider_1 ) ; modifications . bind ( XtendType... | Quick fix for Override final operation . |
33,576 | @ Fix ( io . sarl . lang . validation . IssueCodes . DISCOURAGED_BOOLEAN_EXPRESSION ) public void fixDiscouragedBooleanExpression ( final Issue issue , IssueResolutionAcceptor acceptor ) { BehaviorUnitGuardRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Discouraged boolean expression . |
33,577 | @ Fix ( io . sarl . lang . validation . IssueCodes . UNREACHABLE_BEHAVIOR_UNIT ) public void fixUnreachableBehaviorUnit ( Issue issue , IssueResolutionAcceptor acceptor ) { MemberRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Unreachable behavior unit . |
33,578 | @ Fix ( io . sarl . lang . validation . IssueCodes . INVALID_CAPACITY_TYPE ) public void fixInvalidCapacityType ( final Issue issue , IssueResolutionAcceptor acceptor ) { CapacityReferenceRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Invalid capacity type . |
33,579 | @ Fix ( io . sarl . lang . validation . IssueCodes . INVALID_FIRING_EVENT_TYPE ) public void fixInvalidFiringEventType ( final Issue issue , IssueResolutionAcceptor acceptor ) { FiredEventRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Invalid firing event type . |
33,580 | @ Fix ( io . sarl . lang . validation . IssueCodes . INVALID_IMPLEMENTED_TYPE ) public void fixInvalidImplementedType ( final Issue issue , IssueResolutionAcceptor acceptor ) { ImplementedTypeRemoveModification . accept ( this , issue , acceptor , RemovalType . OTHER ) ; } | Quick fix for Invalid implemented type . |
33,581 | @ Fix ( io . sarl . lang . validation . IssueCodes . INVALID_EXTENDED_TYPE ) public void fixInvalidExtendedType ( final Issue issue , IssueResolutionAcceptor acceptor ) { ExtendedTypeRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Invalid extended type . |
33,582 | @ Fix ( IssueCodes . CYCLIC_INHERITANCE ) public void fixCyclicInheritance ( final Issue issue , IssueResolutionAcceptor acceptor ) { ExtendedTypeRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Cyclic hierarchy . |
33,583 | @ Fix ( IssueCodes . INTERFACE_EXPECTED ) public void fixInteraceExpected ( final Issue issue , IssueResolutionAcceptor acceptor ) { ExtendedTypeRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Interface expected . |
33,584 | @ Fix ( IssueCodes . CLASS_EXPECTED ) public void fixClassExpected ( final Issue issue , IssueResolutionAcceptor acceptor ) { ExtendedTypeRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Class expected . |
33,585 | @ Fix ( io . sarl . lang . validation . IssueCodes . DISCOURAGED_CAPACITY_DEFINITION ) public void fixDiscouragedCapacityDefinition ( Issue issue , IssueResolutionAcceptor acceptor ) { MemberRemoveModification . accept ( this , issue , acceptor , SarlCapacity . class ) ; ActionAddModification . accept ( this , issue , ... | Quick fix for Discouraged capacity definition . |
33,586 | @ Fix ( org . eclipse . xtext . xbase . validation . IssueCodes . INCOMPATIBLE_RETURN_TYPE ) public void fixIncompatibleReturnType ( final Issue issue , IssueResolutionAcceptor acceptor ) { ReturnTypeReplaceModification . accept ( this , issue , acceptor ) ; } | Quick fix for Incompatible return type . |
33,587 | @ Fix ( io . sarl . lang . validation . IssueCodes . RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED ) public void fixReturnTypeRecommended ( final Issue issue , IssueResolutionAcceptor acceptor ) { ReturnTypeAddModification . accept ( this , issue , acceptor ) ; } | Quick fix for Return type is recommended . |
33,588 | @ Fix ( io . sarl . lang . validation . IssueCodes . UNUSED_AGENT_CAPACITY ) public void fixUnusedAgentCapacity ( final Issue issue , IssueResolutionAcceptor acceptor ) { CapacityReferenceRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Unused agent capacity . |
33,589 | @ Fix ( io . sarl . lang . validation . IssueCodes . REDUNDANT_CAPACITY_USE ) public void fixRedundantAgentCapacityUse ( final Issue issue , IssueResolutionAcceptor acceptor ) { CapacityReferenceRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for Redundant capacity use . |
33,590 | @ Fix ( SyntaxIssueCodes . USED_RESERVED_KEYWORD ) public void fixNoViableAlternativeAtKeyword ( final Issue issue , IssueResolutionAcceptor acceptor ) { ProtectKeywordModification . accept ( this , issue , acceptor ) ; } | Quick fix for the no viable alternative at an input that is a SARL keyword . |
33,591 | @ Fix ( io . sarl . lang . validation . IssueCodes . USED_RESERVED_SARL_ANNOTATION ) public void fixDiscouragedAnnotationUse ( final Issue issue , IssueResolutionAcceptor acceptor ) { AnnotationRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for the discouraged annotation uses . |
33,592 | @ Fix ( io . sarl . lang . validation . IssueCodes . MANUAL_INLINE_DEFINITION ) public void fixManualInlineDefinition ( final Issue issue , IssueResolutionAcceptor acceptor ) { AnnotationRemoveModification . accept ( this , issue , acceptor ) ; } | Quick fix for the manual definition of inline statements . |
33,593 | public IDialogSettings getDialogSettingsSection ( String name ) { final IDialogSettings dialogSettings = getDialogSettings ( ) ; IDialogSettings section = dialogSettings . getSection ( name ) ; if ( section == null ) { section = dialogSettings . addNewSection ( name ) ; } return section ; } | Returns a section in the SARL Eclipse plugin s dialog settings . If the section doesn t exist yet it is created . |
33,594 | public PyGeneratorConfiguration install ( ResourceSet resourceSet , PyGeneratorConfiguration config ) { assert config != null ; PyGeneratorConfigAdapter adapter = PyGeneratorConfigAdapter . findInEmfObject ( resourceSet ) ; if ( adapter == null ) { adapter = new PyGeneratorConfigAdapter ( ) ; } adapter . attachToEmfObj... | Install the given configuration into the context . |
33,595 | protected void generatePythonSetup ( IStyleAppendable it , String basename ) { it . appendNl ( "# -*- coding: {0} -*-" , getCodeConfig ( ) . getEncoding ( ) . toLowerCase ( ) ) ; it . appendHeader ( ) ; it . newLine ( ) ; it . append ( "from setuptools import setup" ) ; it . newLine ( ) . newLine ( ) ; it . append ( "s... | Create the content of the setup . py file . |
33,596 | public JvmParameterizedTypeReference newTypeRef ( Notifier context , String typeName ) { return this . builder . newTypeRef ( context , typeName ) ; } | Find the reference to the type with the given name . |
33,597 | protected LightweightTypeReference getLightweightType ( XExpression expr ) { final IResolvedTypes resolvedTypes = getResolvedTypes ( expr ) ; final LightweightTypeReference expressionType = resolvedTypes . getActualType ( expr ) ; if ( expr instanceof AnonymousClass ) { final List < LightweightTypeReference > superType... | Replies the inferred type for the given expression . |
33,598 | private void createImplicitVariableType ( XtextResource resource , IAcceptor < ? super ICodeMining > acceptor ) { createImplicitVarValType ( resource , acceptor , XtendVariableDeclaration . class , it -> it . getType ( ) , it -> { LightweightTypeReference type = getLightweightType ( it . getRight ( ) ) ; if ( type . is... | Add an annotation when the variable s type is implicit and inferred by the SARL compiler . |
33,599 | private void createImplicitFieldType ( XtextResource resource , IAcceptor < ? super ICodeMining > acceptor ) { createImplicitVarValType ( resource , acceptor , XtendField . class , it -> it . getType ( ) , it -> { final JvmField inferredField = ( JvmField ) this . jvmModelAssocitions . getPrimaryJvmElement ( it ) ; if ... | Add an annotation when the field s type is implicit and inferred by the SARL compiler . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.