idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
34,300
@ Pure 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 .
55
12
34,301
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 .
240
5
34,302
protected void recommend ( Class < ? > superModule , GuiceModuleAccess currentModuleAccess ) { LOG . info ( MessageFormat . format ( "Building injection configuration from {0}" , //$NON-NLS-1$ superModule . getName ( ) ) ) ; final Set < BindingElement > superBindings = new LinkedHashSet <> ( ) ; fillFrom ( superBinding...
Provide the recommendations for the given module .
146
9
34,303
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 .
300
12
34,304
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 .
184
9
34,305
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 .
178
17
34,306
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 .
179
10
34,307
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 .
182
11
34,308
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 .
89
4
34,309
public static ProgressBarConfig getConfiguration ( ConfigurationFactory configFactory ) { assert configFactory != null ; return configFactory . config ( ProgressBarConfig . class , PREFIX ) ; }
Replies the configuration factory for the logging .
37
9
34,310
@ SuppressWarnings ( "static-method" ) @ Pure protected String getGeneratedTypeAccessor ( TypeReference generatedType ) { return "get" //$NON-NLS-1$ + Strings . toFirstUpper ( generatedType . getSimpleName ( ) ) + "()" ; //$NON-NLS-1$ }
Replies the accessor to the generated type .
78
10
34,311
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 .
114
7
34,312
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 .
94
8
34,313
@ 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 < TopElementD...
Generate top elements from the grammar .
294
8
34,314
@ 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 .
101
16
34,315
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 .
150
13
34,316
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 .
108
22
34,317
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 .
153
10
34,318
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 .
122
10
34,319
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 .
43
12
34,320
protected StyledString getHumanReadableName ( JvmTypeReference reference ) { if ( reference == null ) { return new StyledString ( "Object" ) ; //$NON-NLS-1$ } final String name = this . uiStrings . referenceToString ( reference , "Object" ) ; //$NON-NLS-1$ return convertToStyledString ( name ) ; }
Create a string representation of the given element .
89
9
34,321
protected AbstractCreateMavenProjectsOperation createOperation ( ) { return new AbstractCreateMavenProjectsOperation ( ) { @ SuppressWarnings ( "synthetic-access" ) @ Override protected List < IProject > doCreateMavenProjects ( IProgressMonitor progressMonitor ) throws CoreException { final SubMonitor monitor = SubMoni...
Create the operation for creating the projects .
175
8
34,322
protected void createSREArgsBlock ( Composite parent , Font font ) { // Create the block for the SRE 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_BOT...
Create the block for the SRE arguments .
157
9
34,323
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 = Utils...
Reset the list of packages for avoiding duplicates .
101
11
34,324
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 .
86
12
34,325
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 .
107
9
34,326
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 .
66
11
34,327
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 .
109
9
34,328
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 .
79
6
34,329
protected final Image getImage ( String imagePath ) { final ImageDescriptor descriptor = getImageDescriptor ( imagePath ) ; if ( descriptor == null ) { return null ; } return descriptor . createImage ( ) ; }
Replies the image .
48
5
34,330
@ 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 .
142
6
34,331
protected void createGeneralSectionItems ( Composite composite ) { addCheckBox ( composite , getActivationText ( ) , ExtraLanguagePreferenceAccess . getPrefixedKey ( getPreferenceID ( ) , ExtraLanguagePreferenceAccess . ENABLED_PROPERTY ) , BOOLEAN_VALUES , 0 ) ; }
Create the items for the General section .
70
8
34,332
protected IDialogSettings getDialogSettings ( ) { try { return ( IDialogSettings ) this . reflect . get ( this , "fDialogSettings" ) ; //$NON-NLS-1$ } catch ( SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException e ) { throw new Error ( e ) ; } }
Replies the dialog settings for this view .
76
9
34,333
protected void restoreFilterAndSorter ( ) { final ProblemTreeViewer viewer = getViewer ( ) ; viewer . addFilter ( new EmptyInnerPackageFilter ( ) ) ; viewer . addFilter ( new HiddenFileFilter ( ) ) ; }
Restore the filters and sorters .
52
8
34,334
protected void internalResetLabelProvider ( ) { try { final PackageExplorerLabelProvider provider = createLabelProvider ( ) ; this . reflect . set ( this , "fLabelProvider" , provider ) ; //$NON-NLS-1$ provider . setIsFlatLayout ( isFlatLayout ( ) ) ; final DecoratingJavaLabelProvider decoratingProvider = new Decoratin...
Reset the label provider for using the SARL one .
178
12
34,335
protected ProblemTreeViewer getViewer ( ) { try { return ( ProblemTreeViewer ) this . reflect . get ( this , "fViewer" ) ; //$NON-NLS-1$ } catch ( SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException e ) { throw new Error ( e ) ; } }
Replies the viewer .
76
5
34,336
public ISarlEnumLiteralBuilder addSarlEnumLiteral ( String name ) { ISarlEnumLiteralBuilder builder = this . iSarlEnumLiteralBuilderProvider . get ( ) ; builder . eInit ( getSarlEnumeration ( ) , name , getTypeResolutionContext ( ) ) ; return builder ; }
Create a SarlEnumLiteral .
78
10
34,337
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 .
55
6
34,338
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 .
55
6
34,339
public ConstructorDoc wrap ( ConstructorDoc source ) { if ( source == null || source instanceof Proxy < ? > || ! ( source instanceof ConstructorDocImpl ) ) { return source ; } return new ConstructorDocWrapper ( ( ConstructorDocImpl ) source ) ; }
Wrap a constructor doc .
60
6
34,340
public MethodDoc wrap ( MethodDoc source ) { if ( source == null || source instanceof Proxy < ? > || ! ( source instanceof MethodDocImpl ) ) { return source ; } return new MethodDocWrapper ( ( MethodDocImpl ) source ) ; }
Wrap a method doc .
55
6
34,341
public AnnotationTypeElementDoc wrap ( AnnotationTypeElementDoc source ) { if ( source == null || source instanceof Proxy < ? > || ! ( source instanceof AnnotationTypeElementDocImpl ) ) { return source ; } return new AnnotationTypeElementDocWrapper ( ( AnnotationTypeElementDocImpl ) source ) ; }
Wrap a annotation type element doc .
70
8
34,342
@ Pure @ Inline ( value = "(long) (($1).doubleValue() * $2.MILLIS_IN_SECOND)" , imported = { TimeExtensions . class } ) public static long seconds ( Number secs ) { return ( long ) ( secs . doubleValue ( ) * MILLIS_IN_SECOND ) ; }
Convert seconds to milliseconds .
75
6
34,343
@ Pure @ Inline ( value = "(long) (($1).doubleValue() * $2.MILLIS_IN_MINUTE)" , imported = { TimeExtensions . class } ) public static long minutes ( Number mins ) { return ( long ) ( mins . doubleValue ( ) * MILLIS_IN_MINUTE ) ; }
Convert minutes to milliseconds .
73
6
34,344
@ Pure @ Inline ( value = "(long) (($1).doubleValue() * $2.MILLIS_IN_HOUR)" , imported = { TimeExtensions . class } ) public static long hours ( Number hours ) { return ( long ) ( hours . doubleValue ( ) * MILLIS_IN_HOUR ) ; }
Convert hours to milliseconds .
73
6
34,345
@ Pure @ Inline ( value = "(long) (($1).doubleValue() * $2.MILLIS_IN_DAY)" , imported = { TimeExtensions . class } ) public static long days ( Number days ) { return ( long ) ( days . doubleValue ( ) * MILLIS_IN_DAY ) ; }
Convert days to milliseconds .
71
6
34,346
@ Pure @ Inline ( value = "(long) (($1).doubleValue() * $2.MILLIS_IN_WEEK)" , imported = { TimeExtensions . class } ) public static long weeks ( Number weeks ) { return ( long ) ( weeks . doubleValue ( ) * MILLIS_IN_WEEK ) ; }
Convert weeks to milliseconds .
73
6
34,347
public Injector createInjectorAndDoEMFRegistration ( Module ... modules ) { doPreSetup ( ) ; final Injector injector = createInjector ( modules ) ; register ( injector ) ; return injector ; }
Create the injector based on the given set of modules and prepare the EMF infrastructure .
51
18
34,348
@ SuppressWarnings ( "static-method" ) public Injector createInjector ( Module ... modules ) { return Guice . createInjector ( Modules . override ( new SARLRuntimeModule ( ) ) . with ( modules ) ) ; }
Create the injectors based on the given set of modules .
57
12
34,349
protected static int installationOrder ( Skill skill ) { final int len = StandardBuiltinCapacitiesProvider . SKILL_INSTALLATION_ORDER . length ; if ( skill instanceof BuiltinSkill ) { for ( int i = 0 ; i < len ; ++ i ) { final Class < ? extends Skill > type = StandardBuiltinCapacitiesProvider . SKILL_INSTALLATION_ORDER...
Replies the installation order of the given skill .
110
10
34,350
public AbstractSREInstallPage getPage ( ISREInstall sre ) { final IExtensionPoint extensionPoint = Platform . getExtensionRegistry ( ) . getExtensionPoint ( SARLEclipsePlugin . PLUGIN_ID , SARLEclipseConfig . EXTENSION_POINT_SRE_INSTALL_PAGES ) ; if ( sre != null && extensionPoint != null ) { IConfigurationElement firs...
Returns a page to use for editing a SRE install type .
478
13
34,351
protected Resource getXtextResource ( ) { //FIXME: for helping to resolve #661 final XtextEditor editor = getEditor ( ) ; if ( editor != null ) { final IResource resource = editor . getResource ( ) ; if ( resource instanceof IStorage ) { final IProject project = resource . getProject ( ) ; if ( project != null ) { fina...
Replies the current Xtext document that is supported by the linked editor .
143
15
34,352
protected void generateExpressionAppender ( ) { final TypeReference builderInterface = getExpressionBuilderInterface ( ) ; final TypeReference appender = getCodeElementExtractor ( ) . getElementAppenderImpl ( "Expression" ) ; //$NON-NLS-1$ final StringConcatenationClient content = new StringConcatenationClient ( ) { @ ...
Generate the expression appender .
475
7
34,353
protected String ensureContainerKeyword ( EObject grammarContainer ) { final Iterator < Keyword > iterator = Iterators . filter ( grammarContainer . eContents ( ) . iterator ( ) , Keyword . class ) ; if ( iterator . hasNext ( ) ) { return iterator . next ( ) . getValue ( ) ; } return getExpressionConfig ( ) . getFieldC...
Replies a keyword for declaring a container .
87
9
34,354
protected String ensureFieldDeclarationKeyword ( CodeElementExtractor . ElementDescription memberDescription ) { final List < String > modifiers = getCodeBuilderConfig ( ) . getModifiers ( ) . get ( memberDescription . getName ( ) ) ; if ( modifiers != null && ! modifiers . isEmpty ( ) ) { return modifiers . get ( 0 ) ...
Replies a keyword for declaring a field .
93
9
34,355
protected ExpressionContextDescription getExpressionContextDescription ( ) { for ( final CodeElementExtractor . ElementDescription containerDescription : getCodeElementExtractor ( ) . getTopElements ( getGrammar ( ) , getCodeBuilderConfig ( ) ) ) { final AbstractRule rule = getMemberRule ( containerDescription ) ; if (...
Replies the description of the expression context .
310
9
34,356
public EventSpace postConstruction ( ) { this . spaceRepository . postConstruction ( ) ; this . defaultSpace = createSpace ( OpenEventSpaceSpecification . class , this . defaultSpaceID ) ; if ( this . defaultSpace == null ) { // The default space could have been created before thanks to Hazelcast, // thus createSpace r...
Create the default space in this context .
146
8
34,357
@ SuppressWarnings ( "checkstyle:magicnumber" ) public TextStyle capacityMethodInvocation ( ) { final TextStyle textStyle = extensionMethodInvocation ( ) . copy ( ) ; //textStyle.setColor(new RGB(128, 36, 0)); textStyle . setStyle ( SWT . ITALIC ) ; return textStyle ; }
Style for the capacity method extension .
77
7
34,358
public void validate ( StateAccess validationState , ValidationMessageAcceptor messageAcceptor ) { if ( isResponsible ( validationState . getState ( ) . context , validationState . getState ( ) . currentObject ) ) { try { for ( final MethodWrapper method : getMethods ( validationState . getState ( ) . currentObject ) )...
Validate the given resource .
138
6
34,359
protected void collectMethods ( Class < ? extends AbstractExtraLanguageValidator > clazz , Collection < Class < ? > > visitedClasses , Collection < MethodWrapper > result ) { if ( ! visitedClasses . add ( clazz ) ) { return ; } for ( final Method method : clazz . getDeclaredMethods ( ) ) { if ( method . getAnnotation (...
Collect the check methods .
160
5
34,360
@ SuppressWarnings ( "static-method" ) protected boolean isResponsible ( Map < Object , Object > context , EObject eObject ) { // Skip the validation of an feature call if one of its container was validated previously if ( eObject instanceof XMemberFeatureCall || eObject instanceof XFeatureCall ) { final XAbstractFeatu...
Replies if the validator is responsible to validate the given object .
117
14
34,361
protected void error ( String message , EObject source , EStructuralFeature feature ) { getContext ( ) . getMessageAcceptor ( ) . acceptError ( MessageFormat . format ( getErrorMessageFormat ( ) , message ) , source , feature , ValidationMessageAcceptor . INSIGNIFICANT_INDEX , IssueCodes . INVALID_EXTRA_LANGUAGE_GENERA...
Generate an error for the extra - language .
88
10
34,362
protected void warning ( String message , EObject source , EStructuralFeature feature ) { getContext ( ) . getMessageAcceptor ( ) . acceptWarning ( MessageFormat . format ( getErrorMessageFormat ( ) , message ) , source , feature , ValidationMessageAcceptor . INSIGNIFICANT_INDEX , IssueCodes . INVALID_EXTRA_LANGUAGE_GE...
Generate a warning for the extra - language .
88
10
34,363
protected void info ( String message , EObject source , EStructuralFeature feature ) { getContext ( ) . getMessageAcceptor ( ) . acceptInfo ( MessageFormat . format ( getErrorMessageFormat ( ) , message ) , source , feature , ValidationMessageAcceptor . INSIGNIFICANT_INDEX , IssueCodes . INVALID_EXTRA_LANGUAGE_GENERATI...
Generate an information message for the extra - language .
88
11
34,364
public ExtraLanguageTypeConverter getTypeConverter ( ) { ExtraLanguageTypeConverter converter = this . typeConverter ; if ( converter == null ) { converter = createTypeConverterInstance ( getTypeConverterInitializer ( ) , null ) ; this . injector . injectMembers ( converter ) ; this . typeConverter = converter ; } retu...
Replies the type converter .
84
6
34,365
@ SuppressWarnings ( "static-method" ) protected ExtraLanguageTypeConverter createTypeConverterInstance ( IExtraLanguageConversionInitializer initializer , IExtraLanguageGeneratorContext context ) { return new ExtraLanguageTypeConverter ( initializer , context ) ; }
Create the instance of the type converter .
62
8
34,366
public ExtraLanguageFeatureNameConverter getFeatureNameConverter ( ) { ExtraLanguageFeatureNameConverter converter = this . featureConverter ; if ( converter == null ) { converter = createFeatureNameConverterInstance ( getFeatureConverterInitializer ( ) , null ) ; this . injector . injectMembers ( converter ) ; this . ...
Replies the feature name converter .
88
7
34,367
protected ExtraLanguageFeatureNameConverter createFeatureNameConverterInstance ( IExtraLanguageConversionInitializer initializer , IExtraLanguageGeneratorContext context ) { return new ExtraLanguageFeatureNameConverter ( initializer , context , getExtraLanguageKeywordProvider ( ) ) ; }
Create the instance of the feature name converter .
61
9
34,368
protected boolean doTypeMappingCheck ( EObject source , JvmType type , Procedure3 < ? super EObject , ? super JvmType , ? super String > errorHandler ) { if ( source != null && type != null ) { final ExtraLanguageTypeConverter converter = getTypeConverter ( ) ; final String qn = type . getQualifiedName ( ) ; if ( conve...
Do a type mapping check .
130
6
34,369
protected void doCheckMemberFeatureCallMapping ( XAbstractFeatureCall featureCall , Procedure3 < ? super EObject , ? super JvmType , ? super String > typeErrorHandler , Function2 < ? super EObject , ? super JvmIdentifiableElement , ? extends Boolean > featureErrorHandler ) { final XAbstractFeatureCall rootFeatureCall =...
Check if the feature call could be translated to the extra - language .
184
14
34,370
@ SuppressWarnings ( "static-method" ) protected void handleInvocationTargetException ( Throwable targetException , Context context ) { // ignore NullPointerException, as not having to check for NPEs all the time is a convenience feature if ( ! ( targetException instanceof NullPointerException ) ) { Exceptions . throwU...
Handle an exception .
82
4
34,371
protected ITreeAppendable generateStaticConstructor ( JvmOperation it , ITreeAppendable appendable , GeneratorConfig config ) { appendable . newLine ( ) ; appendable . openScope ( ) ; generateJavaDoc ( it , appendable , config ) ; final ITreeAppendable tracedAppendable = appendable . trace ( it ) ; tracedAppendable . a...
Generate a static constructor from the given Jvm constructor .
118
12
34,372
public static int open ( Shell parentShell ) { final SubmitEclipseLogWizard wizard = new SubmitEclipseLogWizard ( ) ; final WizardDialog dialog = new WizardDialog ( parentShell , wizard ) ; wizard . setWizardDialog ( dialog ) ; return dialog . open ( ) ; }
Open the wizard .
62
4
34,373
WizardDialog getWizardDialog ( ) { final WeakReference < WizardDialog > ref = this . wizardDialog ; return ( ref == null ) ? null : ref . get ( ) ; }
Replies the associated wieard dialog .
40
9
34,374
@ SuppressWarnings ( "static-method" ) protected String buildContent ( String description , Charset charset ) throws IOException { final StringBuilder fullContent = new StringBuilder ( ) ; // User message if ( ! Strings . isEmpty ( description ) ) { fullContent . append ( description ) ; fullContent . append ( Messages...
Build the issue content .
524
5
34,375
@ Inject public void setSpaceService ( ContextSpaceService service ) { if ( this . spaceService != null ) { this . spaceService . removeSpaceRepositoryListener ( this . serviceListener ) ; } this . spaceService = service ; if ( this . spaceService != null ) { this . spaceService . addSpaceRepositoryListener ( this . se...
Set the reference to the space service .
79
8
34,376
protected void firePeerConnected ( URI peerURI , SpaceID space ) { final NetworkServiceListener [ ] ilisteners ; synchronized ( this . listeners ) { ilisteners = new NetworkServiceListener [ this . listeners . size ( ) ] ; this . listeners . toArray ( ilisteners ) ; } for ( final NetworkServiceListener listener : ilist...
Notifies that a peer space was connected .
92
9
34,377
protected void firePeerDisconnected ( URI peerURI , SpaceID space ) { final NetworkServiceListener [ ] ilisteners ; synchronized ( this . listeners ) { ilisteners = new NetworkServiceListener [ this . listeners . size ( ) ] ; this . listeners . toArray ( ilisteners ) ; } for ( final NetworkServiceListener listener : il...
Notifies that a peer space was disconnected .
92
9
34,378
protected void firePeerDiscovered ( URI peerURI ) { final NetworkServiceListener [ ] ilisteners ; synchronized ( this . listeners ) { ilisteners = new NetworkServiceListener [ this . listeners . size ( ) ] ; this . listeners . toArray ( ilisteners ) ; } for ( final NetworkServiceListener listener : ilisteners ) { liste...
Notifies that a peer was discovered .
86
8
34,379
private static EventEnvelope extractEnvelope ( Socket socket ) throws IOException { // To-Do: Read the ZeroMQ socket via a NIO wrapper to support large data: // indeed the arrays has a maximal size bounded by a native int value, and // the real data could be larger than this limit. byte [ ] data = socket . recv ( ZMQ ....
Receive data from the network .
329
7
34,380
protected synchronized void receive ( EventEnvelope env ) throws Exception { this . logger . getKernelLogger ( ) . fine ( MessageFormat . format ( Messages . ZeroMQNetworkService_8 , this . validatedURI , env ) ) ; final EventDispatch dispatch = this . serializer . deserialize ( env ) ; this . logger . getKernelLogger ...
Extract data from a received envelope and forwad it to the rest of the platform .
223
19
34,381
public GeneratorConfig getGeneratorConfig ( ) { if ( this . generatorConfig == null ) { this . generatorConfig = this . generatorConfigProvider . get ( EcoreUtil . getRootContainer ( this . contextObject ) ) ; } return this . generatorConfig ; }
Replies the generator configuration .
57
6
34,382
public GeneratorConfig2 getGeneratorConfig2 ( ) { if ( this . generatorConfig2 == null ) { this . generatorConfig2 = this . generatorConfigProvider2 . get ( EcoreUtil . getRootContainer ( this . contextObject ) ) ; } return this . generatorConfig2 ; }
Replies the generator configuration v2 .
63
8
34,383
public Collection < Procedure1 < ? super ITreeAppendable > > getGuardEvalationCodeFor ( SarlBehaviorUnit source ) { assert source != null ; final String id = source . getName ( ) . getIdentifier ( ) ; final Collection < Procedure1 < ? super ITreeAppendable > > evaluators ; final Pair < SarlBehaviorUnit , Collection < P...
Replies the guard evaluation code for the given event .
183
11
34,384
public List < Runnable > getPostFinalizationElements ( ) { final GenerationContext prt = getParentContext ( ) ; if ( prt != null ) { return prt . getPostFinalizationElements ( ) ; } return this . postFinalization ; }
Replies the collection of the elements that must be generated after the generation process of the current SARL element .
58
22
34,385
public GeneratorConfig2 install ( final ResourceSet resourceSet , GeneratorConfig2 config ) { GeneratorConfigAdapter adapter = GeneratorConfigAdapter . findInEmfObject ( resourceSet ) ; if ( adapter == null ) { adapter = new GeneratorConfigAdapter ( ) ; } adapter . attachToEmfObject ( resourceSet ) ; return adapter . g...
Install the given configuration in the resource set .
89
9
34,386
protected String getOperatorSymbol ( XAbstractFeatureCall call ) { if ( call != null ) { final Resource res = call . eResource ( ) ; if ( res instanceof StorageAwareResource ) { final boolean isLoadedFromStorage = ( ( StorageAwareResource ) res ) . isLoadedFromStorage ( ) ; if ( isLoadedFromStorage ) { final QualifiedN...
Get the string representation of an operator .
147
8
34,387
public static String getCallSimpleName ( XAbstractFeatureCall featureCall , ILogicalContainerProvider logicalContainerProvider , IdentifiableSimpleNameProvider featureNameProvider , Function0 < ? extends String > nullKeyword , Function0 < ? extends String > thisKeyword , Function0 < ? extends String > superKeyword , Fu...
Compute the simple name for the called feature .
340
10
34,388
public static boolean buildCallReceiver ( XAbstractFeatureCall call , Function0 < ? extends String > thisKeyword , Function1 < ? super XExpression , ? extends String > referenceNameDefinition , List < Object > output ) { if ( call . isStatic ( ) ) { if ( call instanceof XMemberFeatureCall ) { final XMemberFeatureCall m...
Compute the list of object that serve as the receiver for the given call .
428
16
34,389
@ Provides @ Named ( JanusConfig . DEFAULT_CONTEXT_ID_NAME ) public static UUID getContextID ( ) { String str = JanusConfig . getSystemProperty ( JanusConfig . DEFAULT_CONTEXT_ID_NAME ) ; if ( Strings . isNullOrEmpty ( str ) ) { Boolean v ; // From boot agent type str = JanusConfig . getSystemProperty ( JanusConfig . B...
Create a context identifier .
424
5
34,390
@ Provides @ Named ( JanusConfig . DEFAULT_SPACE_ID_NAME ) public static UUID getSpaceID ( ) { final String v = JanusConfig . getSystemProperty ( JanusConfig . DEFAULT_SPACE_ID_NAME , JanusConfig . DEFAULT_SPACE_ID_VALUE ) ; return UUID . fromString ( v ) ; }
Construct a space identifier .
81
5
34,391
private static String getPUBURIAsString ( ) { String pubUri = JanusConfig . getSystemProperty ( JanusConfig . PUB_URI ) ; if ( pubUri == null || pubUri . isEmpty ( ) ) { InetAddress a = NetworkUtil . getPrimaryAddress ( ) ; if ( a == null ) { a = NetworkUtil . getLoopbackAddress ( ) ; } if ( a != null ) { pubUri = Netw...
Extract the current value of the PUB_URI from the system s property or form the platform default value .
145
23
34,392
public static void populateInterfaceElements ( JvmDeclaredType jvmElement , Map < ActionPrototype , JvmOperation > operations , Map < String , JvmField > fields , IActionPrototypeProvider sarlSignatureProvider ) { for ( final JvmFeature feature : jvmElement . getAllFeatures ( ) ) { if ( ! "java.lang.Object" . equals ( ...
Analyzing the type hierarchy of the given interface and extract hierarchy information .
253
14
34,393
public static boolean isVarArg ( List < ? extends XtendParameter > params ) { assert params != null ; if ( params . size ( ) > 0 ) { final XtendParameter param = params . get ( params . size ( ) - 1 ) ; assert param != null ; return param . isVarArg ( ) ; } return false ; }
Replies if the last parameter is a variadic parameter .
74
12
34,394
public static String createNameForHiddenCapacityImplementationAttribute ( String id ) { return PREFIX_CAPACITY_IMPLEMENTATION + fixHiddenMember ( id . toUpperCase ( ) ) . replace ( "." , //$NON-NLS-1$ HIDDEN_MEMBER_REPLACEMENT_CHARACTER ) ; }
Create the name of the hidden field that is containing a capacity implementation .
77
14
34,395
public static boolean isNameForHiddenCapacityImplementationCallingMethod ( String simpleName ) { return simpleName != null && simpleName . startsWith ( PREFIX_CAPACITY_IMPLEMENTATION ) && simpleName . endsWith ( POSTFIX_CAPACITY_IMPLEMENTATION_CALLER ) ; }
Replies if the given simple name is the name of the hidden method that is calling a capacity implementation .
68
21
34,396
public static String createNameForHiddenGuardEvaluatorMethod ( String eventId , int handlerIndex ) { return PREFIX_GUARD + fixHiddenMember ( eventId ) + HIDDEN_MEMBER_CHARACTER + handlerIndex ; }
Create the name of the hidden method that is containing the event guard evaluation .
53
15
34,397
public static String createNameForHiddenEventHandlerMethod ( String eventId , int handlerIndex ) { return PREFIX_EVENT_HANDLER + fixHiddenMember ( eventId ) + HIDDEN_MEMBER_CHARACTER + handlerIndex ; }
Create the name of the hidden method that is containing the event handler code .
54
15
34,398
public static boolean isClass ( LightweightTypeReference typeRef ) { final JvmType t = typeRef . getType ( ) ; if ( t instanceof JvmGenericType ) { return ! ( ( JvmGenericType ) t ) . isInterface ( ) ; } return false ; }
Replies if the given reference is pointing to a class type .
61
13
34,399
public static boolean isFinal ( LightweightTypeReference expressionTypeRef ) { if ( expressionTypeRef . isArray ( ) ) { return isFinal ( expressionTypeRef . getComponentType ( ) ) ; } if ( expressionTypeRef . isPrimitive ( ) ) { return true ; } return expressionTypeRef . getType ( ) instanceof JvmDeclaredType && ( ( Jv...
Replies if the given reference is referencing a final type .
101
12