idx
int64
0
41.2k
question
stringlengths
74
4.04k
target
stringlengths
7
750
34,300
private static String getXtextKey ( String preferenceContainerID , String preferenceName ) { return GENERATOR_PREFERENCE_TAG + PreferenceConstants . SEPARATOR + preferenceContainerID + PreferenceConstants . SEPARATOR + preferenceName ; }
Create a preference key according to the Xtext option block standards .
34,301
public static String getPrefixedKey ( String preferenceContainerID , String preferenceName ) { return getXtextKey ( getPropertyPrefix ( preferenceContainerID ) , preferenceName ) ; }
Create a preference key .
34,302
public boolean hasProjectSpecificOptions ( String preferenceContainerID , IProject project ) { final IPreferenceStore store = getWritablePreferenceStore ( project ) ; String key = IS_PROJECT_SPECIFIC ; if ( preferenceContainerID != null ) { key = getPropertyPrefix ( preferenceContainerID ) + "." + IS_PROJECT_SPECIFIC ;...
Replies if the project has specific configuration for extra language generation provided by the given container .
34,303
public IProject ifSpecificConfiguration ( String preferenceContainerID , IProject project ) { if ( project != null && hasProjectSpecificOptions ( preferenceContainerID , project ) ) { return project ; } return null ; }
Filter the project according to the specific configuration .
34,304
public static boolean parseConverterPreferenceValue ( String input , Procedure2 < ? super String , ? super String > output ) { final StringTokenizer tokenizer = new StringTokenizer ( input , PREFERENCE_SEPARATOR ) ; String key = null ; boolean foundValue = false ; while ( tokenizer . hasMoreTokens ( ) ) { final String ...
Parse the given input which is the preference string representation .
34,305
private boolean markAsDeadCode ( XExpression expression ) { if ( expression instanceof XBlockExpression ) { final XBlockExpression block = ( XBlockExpression ) expression ; final EList < XExpression > expressions = block . getExpressions ( ) ; if ( ! expressions . isEmpty ( ) ) { markAsDeadCode ( expressions . get ( 0 ...
This code is copied from the super type
34,306
public void addForbiddenInjectionPrefix ( String prefix ) { if ( ! Strings . isEmpty ( prefix ) ) { final String real = prefix . endsWith ( "." ) ? prefix . substring ( 0 , prefix . length ( ) - 1 ) : prefix ; this . forbiddenInjectionPrefixes . add ( real ) ; } }
Add a prefix of typenames that should not be considered for injection overriding .
34,307
public void addForbiddenInjectionPostfixes ( String postfix ) { if ( ! Strings . isEmpty ( postfix ) ) { final String real = postfix . startsWith ( "." ) ? postfix . substring ( 1 ) : postfix ; this . forbiddenInjectionPrefixes . add ( real ) ; } }
Add a postfix of typenames that should not be considered for injection overriding .
34,308
public void addModifier ( Modifier modifier ) { if ( modifier != null ) { final String ruleName = modifier . getType ( ) ; if ( ! Strings . isEmpty ( ruleName ) ) { List < String > modifiers = this . modifiers . get ( ruleName ) ; if ( modifiers == null ) { modifiers = new ArrayList < > ( ) ; this . modifiers . put ( r...
Add a modifier for a rule .
34,309
public void addDefaultSuper ( SuperTypeMapping mapping ) { if ( mapping != null ) { this . superTypeMapping . put ( mapping . getType ( ) , mapping . getSuper ( ) ) ; } }
Add a default super type .
34,310
public static < T > T getField ( Object obj , String string , Class < ? > clazz , Class < T > fieldType ) { try { final Field field = clazz . getDeclaredField ( string ) ; field . setAccessible ( true ) ; final Object value = field . get ( obj ) ; return fieldType . cast ( value ) ; } catch ( Exception exception ) { th...
Replies the value of the field .
34,311
public static < T > void copyFields ( Class < T > type , T dest , T source ) { Class < ? > clazz = type ; while ( clazz != null && ! Object . class . equals ( clazz ) ) { for ( final Field field : clazz . getDeclaredFields ( ) ) { if ( ! Modifier . isStatic ( field . getModifiers ( ) ) ) { field . setAccessible ( true ...
Clone the fields .
34,312
public Control createControl ( Composite parent ) { this . control = SWTFactory . createComposite ( parent , parent . getFont ( ) , 1 , 1 , GridData . FILL_HORIZONTAL ) ; final int nbColumns = this . enableSystemWideSelector ? 3 : 2 ; final Group group = SWTFactory . createGroup ( this . control , MoreObjects . firstNo...
Creates this block s control in the given control .
34,313
public void updateExternalSREButtonLabels ( ) { if ( this . enableSystemWideSelector ) { final ISREInstall wideSystemSRE = SARLRuntime . getDefaultSREInstall ( ) ; final String wideSystemSRELabel ; if ( wideSystemSRE == null ) { wideSystemSRELabel = Messages . SREConfigurationBlock_0 ; } else { wideSystemSRELabel = wid...
Update the label of the system - wide and project configuration buttons .
34,314
@ SuppressWarnings ( "checkstyle:npathcomplexity" ) public boolean selectSpecificSRE ( ISREInstall sre ) { ISREInstall theSRE = sre ; if ( theSRE == null ) { theSRE = SARLRuntime . getDefaultSREInstall ( ) ; } if ( theSRE != null ) { boolean changed = false ; final boolean oldNotify = this . notify ; try { this . notif...
Select a specific SRE .
34,315
public ISREInstall getSelectedSRE ( ) { if ( this . enableSystemWideSelector && this . systemSREButton . getSelection ( ) ) { return SARLRuntime . getDefaultSREInstall ( ) ; } if ( ! this . projectProviderFactories . isEmpty ( ) && this . projectSREButton . getSelection ( ) ) { return retreiveProjectSRE ( ) ; } return ...
Replies the selected SARL runtime environment .
34,316
public ISREInstall getSpecificSRE ( ) { final int index = this . runtimeEnvironmentCombo . getSelectionIndex ( ) ; if ( index >= 0 && index < this . runtimeEnvironments . size ( ) ) { return this . runtimeEnvironments . get ( index ) ; } return null ; }
Replies the specific SARL runtime environment .
34,317
public void updateEnableState ( ) { boolean comboEnabled = ! this . runtimeEnvironments . isEmpty ( ) ; boolean searchEnabled = true ; if ( isSystemWideDefaultSRE ( ) || isProjectSRE ( ) ) { comboEnabled = false ; searchEnabled = false ; } this . runtimeEnvironmentCombo . setEnabled ( comboEnabled ) ; this . runtimeEnv...
Update the enable state of the block .
34,318
public void initialize ( ) { this . runtimeEnvironments . clear ( ) ; final ISREInstall [ ] sres = SARLRuntime . getSREInstalls ( ) ; Arrays . sort ( sres , new Comparator < ISREInstall > ( ) { public int compare ( ISREInstall o1 , ISREInstall o2 ) { return o1 . getName ( ) . compareTo ( o2 . getName ( ) ) ; } } ) ; fi...
Initialize the block with the installed JREs . The selection and the components states are not updated by this function .
34,319
protected void handleInstalledSREsButtonSelected ( ) { PreferencesUtil . createPreferenceDialogOn ( getControl ( ) . getShell ( ) , SREsPreferencePage . ID , new String [ ] { SREsPreferencePage . ID } , null ) . open ( ) ; }
Invoked when the user want to search for a SARL runtime environment .
34,320
public IStatus validate ( ISREInstall sre ) { final IStatus status ; if ( this . enableSystemWideSelector && this . systemSREButton . getSelection ( ) ) { if ( SARLRuntime . getDefaultSREInstall ( ) == null ) { status = SARLEclipsePlugin . getDefault ( ) . createStatus ( IStatus . ERROR , Messages . SREConfigurationBlo...
Validate that the given SRE is valid in the context of the SRE configuration .
34,321
protected static void closeWelcomePage ( ) { final IIntroManager introManager = PlatformUI . getWorkbench ( ) . getIntroManager ( ) ; if ( introManager != null ) { final IIntroPart intro = introManager . getIntro ( ) ; if ( intro != null ) { introManager . closeIntro ( intro ) ; } } }
Close the welcome page .
34,322
public void destroy ( ) { synchronized ( getSpaceIDsMutex ( ) ) { if ( this . internalListener != null ) { this . spaceIDs . removeDMapListener ( this . internalListener ) ; } final List < SpaceID > ids = new ArrayList < > ( this . spaceIDs . keySet ( ) ) ; this . spaceIDs . clear ( ) ; for ( final SpaceID spaceId : id...
Destroy this repository and releaqse all the resources .
34,323
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) protected void ensureLocalSpaceDefinition ( SpaceID id , Object [ ] initializationParameters ) { synchronized ( getSpaceRepositoryMutex ( ) ) { if ( ! this . spaces . containsKey ( id ) ) { createSpaceInstance ( ( Class ) id . getSpaceSpecification ( ) , id , false , ...
Add the existing but not yet known spaces into this repository .
34,324
protected void removeLocalSpaceDefinition ( SpaceID id , boolean isLocalDestruction ) { final Space space ; synchronized ( getSpaceRepositoryMutex ( ) ) { space = this . spaces . remove ( id ) ; if ( space != null ) { this . spacesBySpec . remove ( id . getSpaceSpecification ( ) , id ) ; } } if ( space != null ) { fire...
Remove a remote space .
34,325
protected void removeLocalSpaceDefinitions ( boolean isLocalDestruction ) { List < Space > removedSpaces = null ; synchronized ( getSpaceRepositoryMutex ( ) ) { if ( ! this . spaces . isEmpty ( ) ) { removedSpaces = new ArrayList < > ( this . spaces . size ( ) ) ; final Iterator < Entry < SpaceID , Space > > iterator =...
Remove all the remote spaces .
34,326
public < S extends io . sarl . lang . core . Space > S createSpace ( SpaceID spaceID , Class < ? extends SpaceSpecification < S > > spec , Object ... creationParams ) { synchronized ( getSpaceRepositoryMutex ( ) ) { if ( ! this . spaces . containsKey ( spaceID ) ) { return createSpaceInstance ( spec , spaceID , true , ...
Create a space .
34,327
@ SuppressWarnings ( "unchecked" ) public < S extends io . sarl . lang . core . Space > S getOrCreateSpaceWithSpec ( SpaceID spaceID , Class < ? extends SpaceSpecification < S > > spec , Object ... creationParams ) { synchronized ( getSpaceRepositoryMutex ( ) ) { final Collection < SpaceID > ispaces = this . spacesBySp...
Retrieve the first space of the given specification or create a space if none .
34,328
@ SuppressWarnings ( "unchecked" ) public < S extends io . sarl . lang . core . Space > S getOrCreateSpaceWithID ( SpaceID spaceID , Class < ? extends SpaceSpecification < S > > spec , Object ... creationParams ) { synchronized ( getSpaceRepositoryMutex ( ) ) { Space space = this . spaces . get ( spaceID ) ; if ( space...
Retrieve the first space of the given identifier or create a space if none .
34,329
public SynchronizedCollection < ? extends Space > getSpaces ( ) { synchronized ( getSpaceRepositoryMutex ( ) ) { return Collections3 . synchronizedCollection ( Collections . unmodifiableCollection ( this . spaces . values ( ) ) , getSpaceRepositoryMutex ( ) ) ; } }
Returns the collection of all spaces stored in this repository .
34,330
protected IStatus revalidate ( int ignoreCauses ) { try { setDirty ( false ) ; resolveDirtyFields ( false ) ; return getValidity ( ignoreCauses ) ; } catch ( Throwable e ) { if ( ( ignoreCauses & CODE_GENERAL ) == 0 ) { return SARLEclipsePlugin . getDefault ( ) . createStatus ( IStatus . ERROR , CODE_GENERAL , e ) ; } ...
Force the computation of the installation validity .
34,331
public void setClassPathEntries ( List < IRuntimeClasspathEntry > libraries ) { if ( isDirty ( ) ) { setDirty ( false ) ; resolveDirtyFields ( true ) ; } if ( ( libraries == null && this . classPathEntries != null ) || ( libraries != null && ( this . classPathEntries == null || libraries != this . classPathEntries ) ) ...
Change the library locations of this ISREInstall .
34,332
protected static String formatCommandLineOption ( String name , String value ) { final StringBuilder str = new StringBuilder ( ) ; str . append ( "--" ) ; if ( ! Strings . isNullOrEmpty ( name ) ) { str . append ( name ) ; if ( ! Strings . isNullOrEmpty ( value ) ) { str . append ( "=" ) ; str . append ( value ) ; } } ...
Replies the string representation of a command - line option .
34,333
public boolean isCastOperatorLinkingEnabled ( SarlCastedExpression cast ) { final LightweightTypeReference sourceType = getStackedResolvedTypes ( ) . getReturnType ( cast . getTarget ( ) ) ; final LightweightTypeReference destinationType = getReferenceOwner ( ) . toLightweightTypeReference ( cast . getType ( ) ) ; if (...
Replies if the linking to the cast operator functions is enabled .
34,334
public List < ? extends ILinkingCandidate > getLinkingCandidates ( SarlCastedExpression cast ) { final StackedResolvedTypes demandComputedTypes = pushTypes ( ) ; final AbstractTypeComputationState forked = withNonVoidExpectation ( demandComputedTypes ) ; final ForwardingResolvedTypes demandResolvedTypes = new Forwardin...
Compute the best candidates for the feature behind the cast operator .
34,335
protected ILinkingCandidate createCandidate ( SarlCastedExpression cast , ExpressionTypeComputationState state , IIdentifiableElementDescription description ) { return new CastOperatorLinkingCandidate ( cast , description , getSingleExpectation ( state ) , state ) ; }
Create a candidate from the given description .
34,336
@ SuppressWarnings ( "static-method" ) public void resetFeature ( SarlCastedExpression object ) { setStructuralFeature ( object , SarlPackage . Literals . SARL_CASTED_EXPRESSION__FEATURE , null ) ; setStructuralFeature ( object , SarlPackage . Literals . SARL_CASTED_EXPRESSION__RECEIVER , null ) ; setStructuralFeature ...
Reset the properties of the given feature in order to have casted expression that is not linked to an operation .
34,337
public IDocumentAutoFormatter getDocumentAutoFormatter ( ) { final IDocument document = getDocument ( ) ; if ( document instanceof IXtextDocument ) { final IDocumentAutoFormatter formatter = this . autoFormatterProvider . get ( ) ; formatter . bind ( ( IXtextDocument ) document , this . fContentFormatter ) ; return for...
Replies the document auto - formatter .
34,338
public IExpressionBuilder getInitialValue ( ) { IExpressionBuilder exprBuilder = this . expressionProvider . get ( ) ; exprBuilder . eInit ( getSarlField ( ) , new Procedures . Procedure1 < XExpression > ( ) { public void apply ( XExpression expr ) { getSarlField ( ) . setInitialValue ( expr ) ; } } , getTypeResolution...
Change the initialValue .
34,339
public void setOutlineEntryFormat ( String formatWithoutNumbers , String formatWithNumbers ) { if ( ! Strings . isEmpty ( formatWithoutNumbers ) ) { this . outlineEntryWithoutNumberFormat = formatWithoutNumbers ; } if ( ! Strings . isEmpty ( formatWithNumbers ) ) { this . outlineEntryWithNumberFormat = formatWithNumber...
Change the formats to be applied to the outline entries .
34,340
public void setOutlineDepthRange ( IntegerRange level ) { if ( level == null ) { this . outlineDepthRange = new IntegerRange ( DEFAULT_OUTLINE_TOP_LEVEL , DEFAULT_OUTLINE_TOP_LEVEL ) ; } else { this . outlineDepthRange = level ; } }
Change the level at which the titles may appear in the outline .
34,341
@ SuppressWarnings ( "static-method" ) protected ReferenceContext extractReferencableElements ( String text ) { final ReferenceContext context = new ReferenceContext ( ) ; final MutableDataSet options = new MutableDataSet ( ) ; final Parser parser = Parser . builder ( options ) . build ( ) ; final Node document = parse...
Extract all the referencable objects from the given content .
34,342
protected String transformHtmlLinks ( String content , ReferenceContext references ) { if ( ! isPureHtmlReferenceTransformation ( ) ) { return content ; } final Map < String , String > replacements = new TreeMap < > ( ) ; final org . jsoup . select . NodeVisitor visitor = new org . jsoup . select . NodeVisitor ( ) { pu...
Apply link transformation on the HTML links .
34,343
protected String transformMardownLinks ( String content , ReferenceContext references ) { if ( ! isMarkdownToHtmlReferenceTransformation ( ) ) { return content ; } final Map < BasedSequence , String > replacements = new TreeMap < > ( ( cmp1 , cmp2 ) -> { final int cmp = Integer . compare ( cmp2 . getStartOffset ( ) , c...
Apply link transformation on the Markdown links .
34,344
static String convertURLToString ( URL url ) { if ( URISchemeType . FILE . isURL ( url ) ) { final StringBuilder externalForm = new StringBuilder ( ) ; externalForm . append ( url . getPath ( ) ) ; final String ref = url . getRef ( ) ; if ( ! Strings . isEmpty ( ref ) ) { externalForm . append ( "#" ) . append ( ref ) ...
Convert the given URL to its string representation that is compatible with Markdown document linking mechanism .
34,345
protected URL transformURL ( URL link , ReferenceContext references ) { if ( URISchemeType . FILE . isURL ( link ) ) { File filename = FileSystem . convertURLToFile ( link ) ; if ( Strings . isEmpty ( filename . getName ( ) ) ) { final String anchor = transformURLAnchor ( filename , link . getRef ( ) , references ) ; f...
Transform an URL from Markdown format to HTML format .
34,346
@ SuppressWarnings ( "static-method" ) protected String transformURLAnchor ( File file , String anchor , ReferenceContext references ) { String anc = anchor ; if ( references != null ) { anc = references . validateAnchor ( anc ) ; } return anc ; }
Transform the anchor of an URL from Markdown format to HTML format .
34,347
public static boolean isMarkdownFileExtension ( String extension ) { for ( final String ext : MARKDOWN_FILE_EXTENSIONS ) { if ( Strings . equal ( ext , extension ) ) { return true ; } } return false ; }
Replies if the given extension is for Markdown file .
34,348
protected void addOutlineEntry ( StringBuilder outline , int level , String sectionNumber , String title , String sectionId , boolean htmlOutput ) { if ( htmlOutput ) { indent ( outline , level - 1 , " " ) ; outline . append ( "<li><a href=\"#" ) ; outline . append ( sectionId ) ; outline . append ( "\">" ) ; if ( isA...
Update the outline entry .
34,349
protected String formatSectionTitle ( String prefix , String sectionNumber , String title , String sectionId ) { return MessageFormat . format ( getSectionTitleFormat ( ) , prefix , sectionNumber , title , sectionId ) + "\n" ; }
Format the section title .
34,350
protected static void indent ( StringBuilder buffer , int number , String character ) { for ( int i = 0 ; i < number ; ++ i ) { buffer . append ( character ) ; } }
Create indentation in the given buffer .
34,351
protected static int computeLineNo ( Node node ) { final int offset = node . getStartOffset ( ) ; final BasedSequence seq = node . getDocument ( ) . getChars ( ) ; int tmpOffset = seq . endOfLine ( 0 ) ; int lineno = 1 ; while ( tmpOffset < offset ) { ++ lineno ; tmpOffset = seq . endOfLineAnyEOL ( tmpOffset + seq . eo...
Compute the number of lines for reaching the given node .
34,352
protected Iterable < DynamicValidationComponent > createValidatorComponents ( Image it , File currentFile , DynamicValidationContext context ) { final Collection < DynamicValidationComponent > components = new ArrayList < > ( ) ; if ( isLocalImageReferenceValidation ( ) ) { final int lineno = computeLineNo ( it ) ; fin...
Create a validation component for an image reference .
34,353
protected Iterable < DynamicValidationComponent > createValidatorComponents ( Link it , File currentFile , DynamicValidationContext context ) { final Collection < DynamicValidationComponent > components = new ArrayList < > ( ) ; if ( isLocalFileReferenceValidation ( ) || isRemoteReferenceValidation ( ) ) { final int li...
Create a validation component for an hyper reference .
34,354
@ SuppressWarnings ( "static-method" ) protected DynamicValidationComponent createLocalImageValidatorComponent ( Image it , URL url , int lineno , File currentFile , DynamicValidationContext context ) { File fn = FileSystem . convertURLToFile ( url ) ; if ( ! fn . isAbsolute ( ) ) { fn = FileSystem . join ( currentFile...
Create a validation component for a reference to a local image .
34,355
@ SuppressWarnings ( "static-method" ) protected Collection < DynamicValidationComponent > createLocalFileValidatorComponents ( Link it , URL url , int lineno , File currentFile , DynamicValidationContext context ) { File fn = FileSystem . convertURLToFile ( url ) ; if ( Strings . isEmpty ( fn . getName ( ) ) ) { final...
Create a validation component for an hyper reference to a local file .
34,356
@ SuppressWarnings ( "static-method" ) protected Collection < DynamicValidationComponent > createRemoteReferenceValidatorComponents ( Link it , URL url , int lineno , File currentFile , DynamicValidationContext context ) { return Collections . singleton ( new DynamicValidationComponent ( ) { public String functionName ...
Create a validation component for an hyper reference to a remote Internet page .
34,357
public JvmParameterizedTypeReference newTypeRef ( Notifier context , String typeName ) { JvmTypeReference typeReference ; try { typeReference = findType ( context , typeName ) ; getImportManager ( ) . addImportFor ( typeReference . getType ( ) ) ; return ( JvmParameterizedTypeReference ) typeReference ; } catch ( TypeN...
Replies the type reference for the given name in the given context .
34,358
protected boolean isSubTypeOf ( EObject context , JvmTypeReference subType , JvmTypeReference superType ) { if ( isTypeReference ( superType ) && isTypeReference ( subType ) ) { StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner ( services , context ) ; LightweightTypeReferenceFactory factory = new Light...
Replies if the first parameter is a subtype of the second parameter .
34,359
protected boolean isTypeReference ( JvmTypeReference typeReference ) { return ( typeReference != null && ! typeReference . eIsProxy ( ) && typeReference . getType ( ) != null && ! typeReference . getType ( ) . eIsProxy ( ) ) ; }
Replies if the given object is a valid type reference .
34,360
protected boolean isActionBodyAllowed ( XtendTypeDeclaration type ) { return ! ( type instanceof SarlAnnotationType || type instanceof SarlCapacity || type instanceof SarlEvent || type instanceof SarlInterface ) ; }
Replies if the type could contains functions with a body .
34,361
protected void recommendFrom ( String label , Set < BindingElement > source , Set < Binding > current ) { this . bindingFactory . setName ( getName ( ) ) ; boolean hasRecommend = false ; for ( final BindingElement sourceElement : source ) { final Binding wrapElement = this . bindingFactory . toBinding ( sourceElement )...
Provide the recommendations .
34,362
protected void recommend ( Class < ? > superModule , GuiceModuleAccess currentModuleAccess ) { LOG . info ( MessageFormat . format ( "Building injection configuration from {0}" , superModule . getName ( ) ) ) ; final Set < BindingElement > superBindings = new LinkedHashSet < > ( ) ; fillFrom ( superBindings , superModu...
Provide the recommendations for the given module .
34,363
public ConversionType getConversionTypeFor ( XAbstractFeatureCall featureCall ) { if ( this . conversions == null ) { this . conversions = initMapping ( ) ; } final List < Object > receiver = new ArrayList < > ( ) ; AbstractExpressionGenerator . buildCallReceiver ( featureCall , this . keywords . getThisKeywordLambda (...
Replies the type of conversion for the given feature call .
34,364
public ConversionResult convertFeatureCall ( String simpleName , JvmIdentifiableElement calledFeature , List < Object > leftOperand , List < Object > receiver , List < XExpression > arguments ) { if ( this . conversions == null ) { this . conversions = initMapping ( ) ; } final List < Pair < FeaturePattern , FeatureRep...
Convert a full call to a feature .
34,365
public String convertDeclarationName ( String simpleName , SarlAction feature ) { assert simpleName != null ; assert feature != null ; final JvmOperation operation = this . associations . getDirectlyInferredOperation ( feature ) ; if ( operation != null ) { if ( this . conversions == null ) { this . conversions = initM...
Convert the given name for the given feature to its equivalent in the extra language .
34,366
public static IExtraLanguageConversionInitializer getTypeConverterInitializer ( ) { return it -> { final List < Pair < String , String > > properties = loadPropertyFile ( TYPE_CONVERSION_FILENAME ) ; if ( ! properties . isEmpty ( ) ) { for ( final Pair < String , String > entry : properties ) { final String source = Ob...
Replies the initializer for the type converter .
34,367
public static IExtraLanguageConversionInitializer getFeatureNameConverterInitializer ( ) { return it -> { final List < Pair < String , String > > properties = loadPropertyFile ( FEATURE_CONVERSION_FILENAME ) ; if ( ! properties . isEmpty ( ) ) { for ( final Pair < String , String > entry : properties ) { final String s...
Replies the initializer for the feature name converter .
34,368
public static void install ( ResourceSet rs , MavenProject project ) { final Iterator < Adapter > iterator = rs . eAdapters ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { if ( iterator . next ( ) instanceof MavenProjectAdapter ) { iterator . remove ( ) ; } } rs . eAdapters ( ) . add ( new MavenProjectAdapter (...
Install the adapter .
34,369
public static ProgressBarConfig getConfiguration ( ConfigurationFactory configFactory ) { assert configFactory != null ; return configFactory . config ( ProgressBarConfig . class , PREFIX ) ; }
Replies the configuration factory for the logging .
34,370
@ SuppressWarnings ( "static-method" ) protected String getGeneratedTypeAccessor ( TypeReference generatedType ) { return "get" + Strings . toFirstUpper ( generatedType . getSimpleName ( ) ) + "()" ; }
Replies the accessor to the generated type .
34,371
protected List < StringConcatenationClient > generateMembers ( Collection < CodeElementExtractor . ElementDescription > grammarContainers , TopElementDescription description , boolean forInterface , boolean forAppender , boolean namedMembers ) { final List < StringConcatenationClient > clients = new ArrayList < > ( ) ;...
Generate the creators of members .
34,372
protected List < StringConcatenationClient > generateMember ( CodeElementExtractor . ElementDescription memberDescription , TopElementDescription topElementDescription , boolean forInterface , boolean forAppender , boolean namedMember ) { if ( namedMember ) { return generateNamedMember ( memberDescription , topElementD...
Generate a member from the grammar .
34,373
@ SuppressWarnings ( "unlikely-arg-type" ) protected List < TopElementDescription > generateTopElements ( boolean forInterface , boolean forAppender ) { final Set < String > memberElements = determineMemberElements ( ) ; final Collection < EObject > topElementContainers = new ArrayList < > ( ) ; final List < TopElement...
Generate top elements from the grammar .
34,374
@ SuppressWarnings ( "static-method" ) protected boolean isUnpureOperationPrototype ( XtendFunction operation ) { if ( operation == null || operation . isAbstract ( ) || operation . isDispatch ( ) || operation . isNative ( ) || operation . getExpression ( ) == null ) { return true ; } final XtendTypeDeclaration declari...
Replies if the given function is purable according to its modifiers and prototype .
34,375
boolean isPurableOperation ( XtendFunction operation , ISideEffectContext context ) { if ( isUnpureOperationPrototype ( operation ) ) { return false ; } if ( this . nameValidator . isNamePatternForNotPureOperation ( operation ) ) { return false ; } if ( this . nameValidator . isNamePatternForPureOperation ( operation )...
Replies if the given is purable in the given context .
34,376
protected boolean isReassignmentOperator ( XBinaryOperation operator ) { if ( operator . isReassignFirstArgument ( ) ) { return true ; } final QualifiedName operatorName = this . operatorMapping . getOperator ( QualifiedName . create ( operator . getFeature ( ) . getSimpleName ( ) ) ) ; final QualifiedName compboundOpe...
Replies if the given operator is a reassignment operator . A reassignment operator changes its left operand .
34,377
boolean evaluatePureAnnotationAdapters ( org . eclipse . xtext . common . types . JvmOperation operation , ISideEffectContext context ) { int index = - 1 ; int i = 0 ; for ( final Adapter adapter : operation . eAdapters ( ) ) { if ( adapter . isAdapterForType ( AnnotationJavaGenerationAdapter . class ) ) { index = i ; ...
Evalute the Pure annotatino adapters .
34,378
protected ImageDescriptor handleImageDescriptorError ( Object [ ] params , Throwable exception ) { if ( exception instanceof NullPointerException ) { final Object defaultImage = getDefaultImage ( ) ; if ( defaultImage instanceof ImageDescriptor ) { return ( ImageDescriptor ) defaultImage ; } if ( defaultImage instanceo...
Invoked when an image descriptor cannot be found .
34,379
protected StyledString signatureWithoutReturnType ( StyledString simpleName , JvmExecutable element ) { return simpleName . append ( this . uiStrings . styledParameters ( element ) ) ; }
Create a string representation of a signature without the return type .
34,380
protected StyledString getHumanReadableName ( JvmTypeReference reference ) { if ( reference == null ) { return new StyledString ( "Object" ) ; } final String name = this . uiStrings . referenceToString ( reference , "Object" ) ; return convertToStyledString ( name ) ; }
Create a string representation of the given element .
34,381
protected AbstractCreateMavenProjectsOperation createOperation ( ) { return new AbstractCreateMavenProjectsOperation ( ) { @ SuppressWarnings ( "synthetic-access" ) protected List < IProject > doCreateMavenProjects ( IProgressMonitor progressMonitor ) throws CoreException { final SubMonitor monitor = SubMonitor . conve...
Create the operation for creating the projects .
34,382
protected void createSREArgsBlock ( Composite parent , Font font ) { final Group group = new Group ( parent , SWT . NONE ) ; group . setFont ( font ) ; final GridLayout layout = new GridLayout ( ) ; group . setLayout ( layout ) ; group . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; group . moveAbove ( this...
Create the block for the SRE arguments .
34,383
private void resetPackageList ( ) { final Set < PackageDoc > set = new TreeSet < > ( ) ; for ( final PackageDoc pack : this . root . specifiedPackages ( ) ) { set . add ( pack ) ; } for ( final ClassDoc clazz : this . root . specifiedClasses ( ) ) { set . add ( clazz . containingPackage ( ) ) ; } this . packages = Util...
Reset the list of packages for avoiding duplicates .
34,384
protected OutputConfiguration getOutputConfiguration ( ) { final Set < OutputConfiguration > outputConfigurations = this . configurationProvider . getOutputConfigurations ( getProject ( ) ) ; final String expectedName = ExtraLanguageOutputConfigurations . createOutputConfigurationName ( getPreferenceID ( ) ) ; return I...
Replies the output configuration associated to the extra language generator .
34,385
protected void createTypeConversionSectionItems ( Composite parentComposite ) { final TypeConversionTable typeConversionTable = new TypeConversionTable ( this , getTargetLanguageImage ( ) , getPreferenceStore ( ) , getPreferenceID ( ) ) ; typeConversionTable . doCreate ( parentComposite , getDialogSettings ( ) ) ; make...
Create the items for the Type Conversion section .
34,386
protected static void makeScrollableCompositeAware ( Control control ) { final ScrolledPageContent parentScrolledComposite = getParentScrolledComposite ( control ) ; if ( parentScrolledComposite != null ) { parentScrolledComposite . adaptChild ( control ) ; } }
Make the given control awaer of the scrolling events .
34,387
protected void createFeatureConversionSectionItems ( Composite parentComposite ) { final FeatureNameConversionTable typeConversionTable = new FeatureNameConversionTable ( this , getTargetLanguageImage ( ) , getPreferenceStore ( ) , getPreferenceID ( ) ) ; typeConversionTable . doCreate ( parentComposite , getDialogSett...
Create the items for the Feature Conversion section .
34,388
protected void createExperimentalWarningMessage ( Composite composite ) { final Label dangerIcon = new Label ( composite , SWT . WRAP ) ; dangerIcon . setImage ( getImage ( IMAGE ) ) ; final GridData labelLayoutData = new GridData ( ) ; labelLayoutData . horizontalIndent = 0 ; dangerIcon . setLayoutData ( labelLayoutDa...
Create the experimental warning message .
34,389
protected final Image getImage ( String imagePath ) { final ImageDescriptor descriptor = getImageDescriptor ( imagePath ) ; if ( descriptor == null ) { return null ; } return descriptor . createImage ( ) ; }
Replies the image .
34,390
@ SuppressWarnings ( "static-method" ) protected ImageDescriptor getImageDescriptor ( String imagePath ) { final LangActivator activator = LangActivator . getInstance ( ) ; final ImageRegistry registry = activator . getImageRegistry ( ) ; ImageDescriptor descriptor = registry . getDescriptor ( imagePath ) ; if ( descri...
Replies the image descriptor .
34,391
protected void createGeneralSectionItems ( Composite composite ) { addCheckBox ( composite , getActivationText ( ) , ExtraLanguagePreferenceAccess . getPrefixedKey ( getPreferenceID ( ) , ExtraLanguagePreferenceAccess . ENABLED_PROPERTY ) , BOOLEAN_VALUES , 0 ) ; }
Create the items for the General section .
34,392
protected void createOutputSectionItems ( Composite composite , OutputConfiguration outputConfiguration ) { final Text defaultDirectoryField = addTextField ( composite , org . eclipse . xtext . builder . preferences . Messages . OutputConfigurationPage_Directory , BuilderPreferenceAccess . getKey ( outputConfiguration ...
Create the items for the Output section .
34,393
protected IDialogSettings getDialogSettings ( ) { try { return ( IDialogSettings ) this . reflect . get ( this , "fDialogSettings" ) ; } catch ( SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException e ) { throw new Error ( e ) ; } }
Replies the dialog settings for this view .
34,394
protected void restoreFilterAndSorter ( ) { final ProblemTreeViewer viewer = getViewer ( ) ; viewer . addFilter ( new EmptyInnerPackageFilter ( ) ) ; viewer . addFilter ( new HiddenFileFilter ( ) ) ; }
Restore the filters and sorters .
34,395
protected void internalResetLabelProvider ( ) { try { final PackageExplorerLabelProvider provider = createLabelProvider ( ) ; this . reflect . set ( this , "fLabelProvider" , provider ) ; provider . setIsFlatLayout ( isFlatLayout ( ) ) ; final DecoratingJavaLabelProvider decoratingProvider = new DecoratingJavaLabelProv...
Reset the label provider for using the SARL one .
34,396
protected ProblemTreeViewer getViewer ( ) { try { return ( ProblemTreeViewer ) this . reflect . get ( this , "fViewer" ) ; } catch ( SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException e ) { throw new Error ( e ) ; } }
Replies the viewer .
34,397
public ISarlEnumLiteralBuilder addSarlEnumLiteral ( String name ) { ISarlEnumLiteralBuilder builder = this . iSarlEnumLiteralBuilderProvider . get ( ) ; builder . eInit ( getSarlEnumeration ( ) , name , getTypeResolutionContext ( ) ) ; return builder ; }
Create a SarlEnumLiteral .
34,398
public ClassDoc wrap ( ClassDoc source ) { if ( source == null || source instanceof Proxy < ? > || ! ( source instanceof ClassDocImpl ) ) { return source ; } return new ClassDocWrapper ( ( ClassDocImpl ) source ) ; }
Wrap a class doc .
34,399
public FieldDoc wrap ( FieldDoc source ) { if ( source == null || source instanceof Proxy < ? > || ! ( source instanceof FieldDocImpl ) ) { return source ; } return new FieldDocWrapper ( ( FieldDocImpl ) source ) ; }
Wrap a field doc .