idx int64 0 41.2k | question stringlengths 74 4.04k | target stringlengths 7 750 |
|---|---|---|
33,900 | protected void generatePlistFile ( CombinedTmAppendable it ) { final String language = getLanguageSimpleName ( ) . toLowerCase ( ) ; final String newBasename = getBasename ( MessageFormat . format ( BASENAME_PATTERN_NEW , language ) ) ; writeFile ( newBasename , it . getNewSyntaxContent ( ) ) ; } | Generate the Plist file . |
33,901 | protected void generateLicenseFile ( ) { final CharSequence licenseText = getLicenseText ( ) ; if ( licenseText != null ) { final String text = licenseText . toString ( ) ; if ( ! Strings . isEmpty ( text ) ) { writeFile ( LICENSE_FILE , text . getBytes ( ) ) ; } } } | Generate the LICENSE file . |
33,902 | protected CharSequence getLicenseText ( ) { final URL url = getClass ( ) . getResource ( LICENSE_FILE ) ; if ( url != null ) { final File filename = new File ( url . getPath ( ) ) ; try { return Files . toString ( filename , Charset . defaultCharset ( ) ) ; } catch ( IOException exception ) { throw new RuntimeException... | Replies the text of the license to write to the generated output . |
33,903 | protected List < ? > createPatterns ( Set < String > literals , Set < String > expressionKeywords , Set < String > modifiers , Set < String > primitiveTypes , Set < String > punctuation , Set < String > ignored , Set < String > specialKeywords , Set < String > typeDeclarationKeywords ) { final List < Map < String , ? >... | Create the patterns . |
33,904 | protected List < Map < String , ? > > generateAnnotations ( ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; list . add ( pattern ( it -> { it . matches ( "\\@[_a-zA-Z$][_0-9a-zA-Z$]*" ) ; it . style ( ANNOTATION_STYLE ) ; it . comment ( "Annotations" ) ; } ) ) ; return list ; } | Generate the rules for the annotations . |
33,905 | protected List < Map < String , ? > > generateComments ( ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; list . add ( pattern ( it -> { it . delimiters ( "(/\\*+)" , "(\\*/)" ) ; it . style ( BLOCK_COMMENT_STYLE ) ; it . beginStyle ( BLOCK_COMMENT_DELIMITER_STYLE ) ; it . endStyle ( BLOCK_COMMENT_D... | Generate the rules for the comments . |
33,906 | protected List < Map < String , ? > > generateStrings ( ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; list . add ( pattern ( it -> { it . delimiters ( "\"" , "\"" ) ; it . style ( DOUBLE_QUOTE_STRING_STYLE ) ; it . beginStyle ( STRING_BEGIN_STYLE ) ; it . endStyle ( STRING_END_STYLE ) ; it . patt... | Generates the rules for the strings of characters . |
33,907 | protected List < Map < String , ? > > generateNumericConstants ( ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; list . add ( pattern ( it -> { it . matches ( "(?:" + "[0-9][0-9]*\\.[0-9]+([eE][0-9]+)?[fFdD]?" + ")|(?:" + "0[xX][0-9a-fA-F]+" + ")|(?:" + "[0-9]+[lL]?" + ")" ) ; it . style ( NUMBER_S... | Generate the rules for the numeric constants . |
33,908 | protected List < Map < String , ? > > generatePrimitiveTypes ( Set < String > primitiveTypes ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; if ( ! primitiveTypes . isEmpty ( ) ) { list . add ( pattern ( it -> { it . matches ( keywordRegex ( primitiveTypes ) + "(?:\\s*\\[\\s*\\])*" ) ; it . style (... | Generate the rules for the primitive types . |
33,909 | protected List < Map < String , ? > > generateLiterals ( Set < String > literals ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; if ( ! literals . isEmpty ( ) ) { list . add ( pattern ( it -> { it . matches ( keywordRegex ( literals ) ) ; it . style ( LITERAL_STYLE ) ; it . comment ( "SARL Literals... | Generate the rules for the literals . |
33,910 | protected List < Map < String , ? > > generatePunctuation ( Set < String > punctuation ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; if ( ! punctuation . isEmpty ( ) ) { list . add ( pattern ( it -> { it . matches ( orRegex ( punctuation ) ) ; it . style ( PUNCTUATION_STYLE ) ; it . comment ( "Op... | Generate the rules for the punctuation symbols . |
33,911 | protected List < Map < String , ? > > generateModifiers ( Set < String > modifiers ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; if ( ! modifiers . isEmpty ( ) ) { list . add ( pattern ( it -> { it . matches ( keywordRegex ( modifiers ) ) ; it . style ( MODIFIER_STYLE ) ; it . comment ( "Modifier... | Generate the rules for the modifier keywords . |
33,912 | protected List < Map < String , ? > > generateSpecialKeywords ( Set < String > keywords ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; if ( ! keywords . isEmpty ( ) ) { list . add ( pattern ( it -> { it . matches ( keywordRegex ( keywords ) ) ; it . style ( SPECIAL_KEYWORD_STYLE ) ; it . comment (... | Generate the rules for the special keywords . |
33,913 | protected List < Map < String , ? > > generateStandardKeywords ( Set < String > keywords ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; if ( ! keywords . isEmpty ( ) ) { list . add ( pattern ( it -> { it . matches ( keywordRegex ( keywords ) ) ; it . style ( KEYWORD_STYLE ) ; it . comment ( "Stand... | Generate the rules for the standard keywords . |
33,914 | protected List < Map < String , ? > > generateTypeDeclarations ( Set < String > declarators ) { final List < Map < String , ? > > list = new ArrayList < > ( ) ; if ( ! declarators . isEmpty ( ) ) { list . add ( pattern ( it -> { it . matches ( keywordRegex ( declarators ) ) ; it . style ( TYPE_DECLARATION_STYLE ) ; it ... | Generate the rules for the type declaration keywords . |
33,915 | protected Map < String , ? > pattern ( Procedure1 < ? super Pattern > proc ) { final Pattern patternDefinition = new Pattern ( ) ; proc . apply ( patternDefinition ) ; return patternDefinition . getDefinition ( ) ; } | Build a pattern definition . |
33,916 | @ SuppressWarnings ( "static-method" ) public ExtraLanguageListCommand provideExtraLanguageListCommand ( BootLogger bootLogger , Provider < IExtraLanguageContributions > contributions ) { return new ExtraLanguageListCommand ( bootLogger , contributions ) ; } | Provide the command for displaying the available extra - language generators . |
33,917 | protected void _format ( SarlEvent event , IFormattableDocument document ) { formatAnnotations ( event , document , XbaseFormatterPreferenceKeys . newLineAfterClassAnnotations ) ; formatModifiers ( event , document ) ; final ISemanticRegionsFinder regionFor = this . textRegionExtensions . regionFor ( event ) ; document... | Format the given SARL event . |
33,918 | protected void _format ( SarlCapacity capacity , IFormattableDocument document ) { formatAnnotations ( capacity , document , XbaseFormatterPreferenceKeys . newLineAfterClassAnnotations ) ; formatModifiers ( capacity , document ) ; final ISemanticRegionsFinder regionFor = this . textRegionExtensions . regionFor ( capaci... | Format the given SARL capacity . |
33,919 | protected void _format ( SarlAgent agent , IFormattableDocument document ) { formatAnnotations ( agent , document , XbaseFormatterPreferenceKeys . newLineAfterClassAnnotations ) ; formatModifiers ( agent , document ) ; final ISemanticRegionsFinder regionFor = this . textRegionExtensions . regionFor ( agent ) ; document... | Format the given SARL agent . |
33,920 | protected void _format ( SarlBehavior behavior , IFormattableDocument document ) { formatAnnotations ( behavior , document , XbaseFormatterPreferenceKeys . newLineAfterClassAnnotations ) ; formatModifiers ( behavior , document ) ; final ISemanticRegionsFinder regionFor = this . textRegionExtensions . regionFor ( behavi... | Format the given SARL behavior . |
33,921 | protected void _format ( SarlSkill skill , IFormattableDocument document ) { formatAnnotations ( skill , document , XbaseFormatterPreferenceKeys . newLineAfterClassAnnotations ) ; formatModifiers ( skill , document ) ; final ISemanticRegionsFinder regionFor = this . textRegionExtensions . regionFor ( skill ) ; document... | Format the given SARL skill . |
33,922 | protected void _format ( SarlBehaviorUnit behaviorUnit , IFormattableDocument document ) { formatAnnotations ( behaviorUnit , document , XbaseFormatterPreferenceKeys . newLineAfterMethodAnnotations ) ; final ISemanticRegionsFinder regionFor = this . textRegionExtensions . regionFor ( behaviorUnit ) ; document . append ... | Format a behavior unit . |
33,923 | protected void _format ( SarlCapacityUses capacityUses , IFormattableDocument document ) { final ISemanticRegionsFinder regionFor = this . textRegionExtensions . regionFor ( capacityUses ) ; document . append ( regionFor . keyword ( this . keywords . getUsesKeyword ( ) ) , ONE_SPACE ) ; formatCommaSeparatedList ( capac... | Format a capacity use . |
33,924 | protected void _format ( SarlRequiredCapacity requiredCapacity , IFormattableDocument document ) { final ISemanticRegionsFinder regionFor = this . textRegionExtensions . regionFor ( requiredCapacity ) ; document . append ( regionFor . keyword ( this . keywords . getRequiresKeyword ( ) ) , ONE_SPACE ) ; formatCommaSepar... | Format a required capacity . |
33,925 | protected void formatCommaSeparatedList ( Collection < ? extends EObject > elements , IFormattableDocument document ) { for ( final EObject element : elements ) { document . format ( element ) ; final ISemanticRegionFinder immediatelyFollowing = this . textRegionExtensions . immediatelyFollowing ( element ) ; final ISe... | Format a list of comma separated elements . |
33,926 | public StyledString styledParameters ( JvmIdentifiableElement element ) { final StyledString str = new StyledString ( ) ; if ( element instanceof JvmExecutable ) { final JvmExecutable executable = ( JvmExecutable ) element ; str . append ( this . keywords . getLeftParenthesisKeyword ( ) ) ; str . append ( parametersToS... | Replies the styled parameters . |
33,927 | protected StyledString parametersToStyledString ( Iterable < ? extends JvmFormalParameter > elements , boolean isVarArgs , boolean includeName ) { return getParameterStyledString ( elements , isVarArgs , includeName , this . keywords , this . annotationFinder , this ) ; } | Replies the styled string representation of the parameters . |
33,928 | public static String getParameterString ( Iterable < ? extends JvmFormalParameter > elements , boolean isVarArgs , boolean includeName , SARLGrammarKeywordAccess keywords , AnnotationLookup annotationFinder , UIStrings utils ) { final StringBuilder result = new StringBuilder ( ) ; boolean needsSeparator = false ; final... | Format the parameters . |
33,929 | public void setFileExtensions ( @ Named ( Constants . FILE_EXTENSIONS ) String fileExtensions ) { this . fileExtensions . clear ( ) ; this . fileExtensions . addAll ( Arrays . asList ( fileExtensions . split ( "[,;: ]+" ) ) ) ; } | Set the file extensions . |
33,930 | @ SuppressWarnings ( "checkstyle:all" ) private ImageDescriptor getPackageFragmentIcon ( IPackageFragment fragment ) { boolean containsJavaElements = false ; try { containsJavaElements = fragment . hasChildren ( ) ; } catch ( JavaModelException e ) { } try { if ( ! containsJavaElements ) { final Object [ ] resources = ... | Replies the image description of the package fragment . |
33,931 | protected boolean isSarlResource ( Object resource ) { if ( resource instanceof IFile ) { final IFile file = ( IFile ) resource ; return getFileExtensions ( ) . contains ( file . getFileExtension ( ) ) ; } return false ; } | Replies if the given resource is a SARL resource . |
33,932 | public void setJarFile ( IPath jarFile ) { if ( ! Objects . equal ( jarFile , this . jarFile ) ) { final PropertyChangeEvent event = new PropertyChangeEvent ( this , ISREInstallChangedListener . PROPERTY_JAR_FILE , this . jarFile , jarFile ) ; this . jarFile = jarFile ; setDirty ( true ) ; if ( getNotify ( ) ) { SARLRu... | Change the path to the JAR file that is supporting this SRE installation . |
33,933 | private static IPath parsePath ( String path , IPath defaultPath , IPath rootPath ) { if ( ! Strings . isNullOrEmpty ( path ) ) { try { final IPath pathObject = Path . fromPortableString ( path ) ; if ( pathObject != null ) { if ( rootPath != null && ! pathObject . isAbsolute ( ) ) { return rootPath . append ( pathObje... | Path the given string for extracting a path . |
33,934 | public static List < Pair < String , String > > loadPropertyFile ( String filename , Plugin bundledPlugin , Class < ? > readerClass , Function1 < IOException , IStatus > statusBuilder ) { final URL url ; if ( bundledPlugin != null ) { url = FileLocator . find ( bundledPlugin . getBundle ( ) , Path . fromPortableString ... | Load a property file from the resources . This function is able to get the resource from an OSGi bundles if it is specified or from the application classpath . |
33,935 | protected XExpression getAssociatedExpression ( JvmMember object ) { final XExpression expr = getTypeBuilder ( ) . getExpression ( object ) ; if ( expr == null ) { final Procedure1 < ? super ITreeAppendable > strategy = getTypeExtensions ( ) . getCompilationStrategy ( object ) ; if ( strategy != null ) { } else { final... | Replies the expression associated to the given object . Usually the expression is inside the given object . |
33,936 | protected String toFilename ( QualifiedName name , String separator ) { final List < String > segments = name . getSegments ( ) ; if ( segments . isEmpty ( ) ) { return "" ; } final StringBuilder builder = new StringBuilder ( ) ; builder . append ( name . toString ( separator ) ) ; builder . append ( getFilenameExtensi... | Replies the filename for the qualified name . |
33,937 | protected boolean writeFile ( QualifiedName name , ExtraLanguageAppendable appendable , IExtraLanguageGeneratorContext context ) { final ExtraLanguageAppendable fileAppendable = createAppendable ( null , context ) ; generateFileHeader ( name , fileAppendable , context ) ; final ImportManager importManager = appendable ... | Write the given file . |
33,938 | protected IExtraLanguageGeneratorContext createGeneratorContext ( IFileSystemAccess2 fsa , IGeneratorContext context , Resource resource ) { if ( context instanceof IExtraLanguageGeneratorContext ) { return ( IExtraLanguageGeneratorContext ) context ; } return new ExtraLanguageGeneratorContext ( context , fsa , this , ... | Create the generator context for this generator . |
33,939 | protected void _generate ( SarlScript script , IExtraLanguageGeneratorContext context ) { if ( script != null ) { for ( final XtendTypeDeclaration content : script . getXtendTypes ( ) ) { if ( context . getCancelIndicator ( ) . isCanceled ( ) ) { return ; } try { generate ( content , context ) ; } finally { context . c... | Generate the given script . |
33,940 | protected static List < JvmTypeReference > getSuperTypes ( JvmTypeReference extension , List < ? extends JvmTypeReference > implemented ) { final List < JvmTypeReference > list = new ArrayList < > ( ) ; if ( extension != null ) { list . add ( extension ) ; } if ( implemented != null ) { list . addAll ( implemented ) ; ... | Replies the merged list with the extended and implemented types . |
33,941 | protected LightweightTypeReference getExpectedType ( XExpression expr ) { final IResolvedTypes resolvedTypes = getTypeResolver ( ) . resolveTypes ( expr ) ; final LightweightTypeReference actualType = resolvedTypes . getActualType ( expr ) ; return actualType ; } | Compute the expected type of the given expression . |
33,942 | protected LightweightTypeReference getExpectedType ( XtendExecutable executable , JvmTypeReference declaredReturnType ) { if ( declaredReturnType == null ) { if ( executable instanceof XtendFunction ) { final XtendFunction function = ( XtendFunction ) executable ; final JvmOperation operation = this . sarlAssociations ... | Replies the expected type of the given executable . |
33,943 | private Object readResolve ( ) throws ObjectStreamException { Constructor < ? > compatible = null ; for ( final Constructor < ? > candidate : this . proxyType . getDeclaredConstructors ( ) ) { if ( candidate != null && isCompatible ( candidate ) ) { if ( compatible != null ) { throw new IllegalStateException ( ) ; } co... | This function enables to deserialize an instance of this proxy . |
33,944 | @ SuppressWarnings ( "static-method" ) protected void addPreferences ( IMavenProjectFacade facade , SARLConfiguration config , IProgressMonitor monitor ) throws CoreException { final IPath outputPath = makeProjectRelativePath ( facade , config . getOutput ( ) ) ; SARLPreferences . setSpecificSARLConfigurationFor ( faca... | Invoked to add the preferences dedicated to SARL JRE etc . |
33,945 | @ SuppressWarnings ( { "checkstyle:magicnumber" , "checkstyle:npathcomplexity" } ) protected void addSourceFolders ( IMavenProjectFacade facade , SARLConfiguration config , IClasspathDescriptor classpath , IProgressMonitor monitor ) throws CoreException { assertHasNature ( facade . getProject ( ) , SARLEclipseConfig . ... | Invoked to add the source folders . |
33,946 | protected < T > T getParameterValue ( MavenProject project , String parameter , Class < T > asType , MojoExecution mojoExecution , IProgressMonitor monitor , T defaultValue ) throws CoreException { T value = getParameterValue ( project , parameter , asType , mojoExecution , monitor ) ; if ( value == null ) { value = de... | Replies the configuration value . |
33,947 | protected SARLConfiguration readConfiguration ( ProjectConfigurationRequest request , IProgressMonitor monitor ) throws CoreException { SARLConfiguration initConfig = null ; SARLConfiguration compileConfig = null ; final List < MojoExecution > mojos = getMojoExecutions ( request , monitor ) ; for ( final MojoExecution ... | Read the SARL configuration . |
33,948 | private SARLConfiguration readInitializeConfiguration ( ProjectConfigurationRequest request , MojoExecution mojo , IProgressMonitor monitor ) throws CoreException { final SARLConfiguration config = new SARLConfiguration ( ) ; final MavenProject project = request . getMavenProject ( ) ; final File input = getParameterVa... | Read the configuration for the Initialize mojo . |
33,949 | private SARLConfiguration readCompileConfiguration ( ProjectConfigurationRequest request , MojoExecution mojo , IProgressMonitor monitor ) throws CoreException { final SARLConfiguration config = new SARLConfiguration ( ) ; final MavenProject project = request . getMavenProject ( ) ; final File input = getParameterValue... | Read the configuration for the Compilation mojo . |
33,950 | @ SuppressWarnings ( "static-method" ) protected void addSarlLibraries ( IClasspathDescriptor classpath ) { final IClasspathEntry entry = JavaCore . newContainerEntry ( SARLClasspathContainerInitializer . CONTAINER_ID ) ; classpath . addEntry ( entry ) ; } | Add the SARL libraries into the given classpath . |
33,951 | public boolean hasConversion ( String type ) { if ( ( isImplicitSarlTypes ( ) && type . startsWith ( IMPLICIT_PACKAGE ) ) || isImplicitJvmTypes ( ) ) { return true ; } if ( this . mapping == null ) { this . mapping = initMapping ( ) ; } return this . mapping . containsKey ( type ) ; } | Indicates if the given name has a mapping to the extra language . |
33,952 | public String convert ( String type ) { if ( isImplicitSarlTypes ( ) && type . startsWith ( IMPLICIT_PACKAGE ) ) { return type ; } if ( this . mapping == null ) { this . mapping = initMapping ( ) ; } final String map = this . mapping . get ( type ) ; if ( map != null ) { if ( map . isEmpty ( ) && ! isImplicitJvmTypes (... | Convert the given type to its equivalent in the extra language . |
33,953 | public boolean isSarlAgent ( LightweightTypeReference type ) { return ! type . isInterfaceType ( ) && ( getSarlElementEcoreType ( type ) == SarlPackage . SARL_AGENT || type . isSubtypeOf ( Agent . class ) ) ; } | Replies if the given JVM element is a SARL agent . |
33,954 | public boolean isSarlBehavior ( LightweightTypeReference type ) { return ! type . isInterfaceType ( ) && ( getSarlElementEcoreType ( type ) == SarlPackage . SARL_BEHAVIOR || type . isSubtypeOf ( Behavior . class ) ) ; } | Replies if the given JVM element is a SARL behavior . |
33,955 | public boolean isSarlCapacity ( LightweightTypeReference type ) { return type . isInterfaceType ( ) && ( getSarlElementEcoreType ( type ) == SarlPackage . SARL_CAPACITY || type . isSubtypeOf ( Capacity . class ) ) ; } | Replies if the given JVM element is a SARL capacity . |
33,956 | public boolean isSarlEvent ( LightweightTypeReference type ) { return ! type . isInterfaceType ( ) && ( getSarlElementEcoreType ( type ) == SarlPackage . SARL_EVENT || type . isSubtypeOf ( Event . class ) ) ; } | Replies if the given JVM element is a SARL event . |
33,957 | public boolean isSarlSkill ( LightweightTypeReference type ) { return ! type . isInterfaceType ( ) && ( getSarlElementEcoreType ( type ) == SarlPackage . SARL_SKILL || type . isSubtypeOf ( Skill . class ) ) ; } | Replies if the given JVM element is a SARL skill . |
33,958 | public ADDRESST unregisterParticipant ( ADDRESST address , EventListener entity ) { synchronized ( mutex ( ) ) { removeListener ( address ) ; this . participants . remove ( entity . getID ( ) , address ) ; } return address ; } | Remove a participant from this repository . |
33,959 | public SynchronizedCollection < ADDRESST > getAddresses ( UUID participant ) { final Object mutex = mutex ( ) ; synchronized ( mutex ) { return Collections3 . synchronizedCollection ( this . participants . get ( participant ) , mutex ) ; } } | Replies all the addresses of the participant with the given identifier . |
33,960 | public boolean markAssignmentAccess ( EObject object ) { assert object != null ; if ( ! isAssigned ( object ) ) { return object . eAdapters ( ) . add ( ASSIGNMENT_MARKER ) ; } return false ; } | Mark the given object as an assigned object after its initialization . |
33,961 | @ SuppressWarnings ( "static-method" ) public boolean isAssigned ( final EObject object ) { assert object != null ; return object . eAdapters ( ) . contains ( ASSIGNMENT_MARKER ) ; } | Replies if the given object was marked as assigned within the current compilation unit . |
33,962 | protected ISourceAppender appendFiresClause ( ISourceAppender appendable ) { final List < LightweightTypeReference > types = getFires ( ) ; final Iterator < LightweightTypeReference > iterator = types . iterator ( ) ; if ( iterator . hasNext ( ) ) { appendable . append ( " " ) . append ( this . keywords . getFiresKeywo... | Append the fires clause . |
33,963 | public static IPreferenceStore getSARLPreferencesFor ( IProject project ) { if ( project != null ) { final Injector injector = LangActivator . getInstance ( ) . getInjector ( LangActivator . IO_SARL_LANG_SARL ) ; final IPreferenceStoreAccess preferenceStoreAccess = injector . getInstance ( IPreferenceStoreAccess . clas... | Replies the preference store for the given project . |
33,964 | public static Set < OutputConfiguration > getXtextConfigurationsFor ( IProject project ) { final Injector injector = LangActivator . getInstance ( ) . getInjector ( LangActivator . IO_SARL_LANG_SARL ) ; final EclipseOutputConfigurationProvider configurationProvider = injector . getInstance ( EclipseOutputConfigurationP... | Replies the Xtext output configurations related to the given project . |
33,965 | public static void setSystemSARLConfigurationFor ( IProject project ) { final IPreferenceStore preferenceStore = getSARLPreferencesFor ( project ) ; preferenceStore . setValue ( IS_PROJECT_SPECIFIC , false ) ; } | Configure the given project for using the system - wide configuration related to SARL . |
33,966 | public static void setSpecificSARLConfigurationFor ( IProject project , IPath outputPath ) { final IPreferenceStore preferenceStore = getSARLPreferencesFor ( project ) ; preferenceStore . setValue ( IS_PROJECT_SPECIFIC , true ) ; String key ; for ( final OutputConfiguration projectConfiguration : getXtextConfigurations... | Configure the given project for using a specific configuration related to SARL . |
33,967 | public static IPath getGlobalSARLOutputPath ( ) { final Injector injector = LangActivator . getInstance ( ) . getInjector ( LangActivator . IO_SARL_LANG_SARL ) ; final IOutputConfigurationProvider configurationProvider = injector . getInstance ( IOutputConfigurationProvider . class ) ; final OutputConfiguration config ... | Replies the SARL output path in the global preferences . |
33,968 | protected String ensureMemberDeclarationKeyword ( 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 member . |
33,969 | protected BlockExpressionContextDescription getBlockExpressionContextDescription ( ) { for ( final CodeElementExtractor . ElementDescription containerDescription : getCodeElementExtractor ( ) . getTopElements ( getGrammar ( ) , getCodeBuilderConfig ( ) ) ) { if ( ! getCodeBuilderConfig ( ) . getNoActionBodyTypes ( ) . ... | Replies the description of the block expression context . |
33,970 | public < T > int getRegisteredEventListeners ( Class < T > type , Collection < ? super T > collection ) { synchronized ( this . behaviorGuardEvaluatorRegistry ) { return this . behaviorGuardEvaluatorRegistry . getRegisteredEventListeners ( type , collection ) ; } } | Extract the registered listeners with the given type . |
33,971 | private void executeBehaviorMethodsInParalellWithSynchroAtTheEnd ( Collection < Runnable > behaviorsMethodsToExecute ) throws InterruptedException , ExecutionException { final CountDownLatch doneSignal = new CountDownLatch ( behaviorsMethodsToExecute . size ( ) ) ; final OutputParameter < Throwable > runException = new... | Execute every single Behaviors runnable a dedicated thread will created by the executor local to this class and be used to execute each runnable in parallel and this method waits until its future has been completed before leaving . |
33,972 | private void executeAsynchronouslyBehaviorMethods ( Collection < Runnable > behaviorsMethodsToExecute ) { for ( final Runnable runnable : behaviorsMethodsToExecute ) { this . executor . execute ( runnable ) ; } } | Execute every single Behaviors runnable a dedicated thread will created by the executor local to this class and be used to execute each runnable in parallel . |
33,973 | protected void selectSREFromConfig ( ILaunchConfiguration config ) { final boolean notify = this . sreBlock . getNotify ( ) ; final boolean changed ; try { this . sreBlock . setNotify ( false ) ; if ( this . accessor . getUseSystemSREFlag ( config ) ) { changed = this . sreBlock . selectSystemWideSRE ( ) ; } else if ( ... | Loads the SARL runtime environment from the launch configuration s preference store . |
33,974 | protected boolean isValidJREVersion ( ILaunchConfiguration config ) { final IVMInstall install = this . fJREBlock . getJRE ( ) ; if ( install instanceof IVMInstall2 ) { final String version = ( ( IVMInstall2 ) install ) . getJavaVersion ( ) ; if ( version == null ) { setErrorMessage ( MessageFormat . format ( Messages ... | Replies if the selected configuration has a valid version for a SARL application . |
33,975 | public ImageDescriptor image ( SarlAgent agent ) { final JvmDeclaredType jvmElement = this . jvmModelAssociations . getInferredType ( agent ) ; return this . images . forAgent ( agent . getVisibility ( ) , this . adornments . get ( jvmElement ) ) ; } | Replies the image for an agent . |
33,976 | public ImageDescriptor image ( SarlBehavior behavior ) { final JvmDeclaredType jvmElement = this . jvmModelAssociations . getInferredType ( behavior ) ; return this . images . forBehavior ( behavior . getVisibility ( ) , this . adornments . get ( jvmElement ) ) ; } | Replies the image for a behavior . |
33,977 | public ImageDescriptor image ( SarlCapacity capacity ) { final JvmDeclaredType jvmElement = this . jvmModelAssociations . getInferredType ( capacity ) ; return this . images . forCapacity ( capacity . getVisibility ( ) , this . adornments . get ( jvmElement ) ) ; } | Replies the image for a capacity . |
33,978 | public ImageDescriptor image ( SarlSkill skill ) { final JvmDeclaredType jvmElement = this . jvmModelAssociations . getInferredType ( skill ) ; return this . images . forSkill ( skill . getVisibility ( ) , this . adornments . get ( jvmElement ) ) ; } | Replies the image for a skill . |
33,979 | public ImageDescriptor image ( SarlEvent event ) { final JvmDeclaredType jvmElement = this . jvmModelAssociations . getInferredType ( event ) ; return this . images . forEvent ( event . getVisibility ( ) , this . adornments . get ( jvmElement ) ) ; } | Replies the image for an event . |
33,980 | public ImageDescriptor image ( SarlAction action ) { final JvmOperation jvmElement = this . jvmModelAssociations . getDirectlyInferredOperation ( action ) ; return this . images . forOperation ( action . getVisibility ( ) , this . adornments . get ( jvmElement ) ) ; } | Replies the image for an action . |
33,981 | public ImageDescriptor image ( SarlField attribute ) { return this . images . forField ( attribute . getVisibility ( ) , this . adornments . get ( this . jvmModelAssociations . getJvmField ( attribute ) ) ) ; } | Replies the image for an attribute . |
33,982 | public ImageDescriptor image ( SarlConstructor constructor ) { if ( constructor . isStatic ( ) ) { return this . images . forStaticConstructor ( ) ; } return this . images . forConstructor ( constructor . getVisibility ( ) , this . adornments . get ( this . jvmModelAssociations . getInferredConstructor ( constructor ) ... | Replies the image for a constructor . |
33,983 | public static IJavaBatchCompiler newDefaultJavaBatchCompiler ( ) { try { synchronized ( SarlBatchCompiler . class ) { if ( defaultJavaBatchCompiler == null ) { final ImplementedBy annotation = IJavaBatchCompiler . class . getAnnotation ( ImplementedBy . class ) ; assert annotation != null ; final Class < ? > type = ann... | Create a default Java batch compiler without injection . |
33,984 | private void notifiesIssueMessageListeners ( Issue issue , org . eclipse . emf . common . util . URI uri , String message ) { for ( final IssueMessageListener listener : this . messageListeners ) { listener . onIssue ( issue , uri , message ) ; } } | Replies the message for the given issue . |
33,985 | public void setLogger ( Logger logger ) { this . logger = logger == null ? LoggerFactory . getLogger ( getClass ( ) ) : logger ; } | Set the logger . |
33,986 | public void setBaseURI ( org . eclipse . emf . common . util . URI basePath ) { this . baseUri = basePath ; } | Change the base URI . |
33,987 | public List < File > getBootClassPath ( ) { if ( this . bootClasspath == null ) { return Collections . emptyList ( ) ; } return Collections . unmodifiableList ( this . bootClasspath ) ; } | Replies the boot classpath . This option is only supported on JDK 8 and older and will be ignored when source level is 9 or newer . |
33,988 | public void setClassPath ( String classpath ) { this . classpath = new ArrayList < > ( ) ; for ( final String path : Strings . split ( classpath , Pattern . quote ( File . pathSeparator ) ) ) { this . classpath . add ( normalizeFile ( path ) ) ; } } | Change the classpath . |
33,989 | public List < File > getClassPath ( ) { if ( this . classpath == null ) { return Collections . emptyList ( ) ; } return Collections . unmodifiableList ( this . classpath ) ; } | Replies the classpath . |
33,990 | @ SuppressWarnings ( "static-method" ) protected File createTempDirectory ( ) { final File tmpPath = new File ( System . getProperty ( "java.io.tmpdir" ) ) ; int i = 0 ; File tmp = new File ( tmpPath , "sarlc" + i ) ; while ( tmp . exists ( ) ) { ++ i ; tmp = new File ( tmpPath , "sarlc" + i ) ; } return tmp ; } | Create the temp directory that should be used by the compiler . |
33,991 | public void setJavaSourceVersion ( String version ) { final JavaVersion javaVersion = JavaVersion . fromQualifier ( version ) ; if ( javaVersion == null ) { final List < String > qualifiers = new ArrayList < > ( ) ; for ( final JavaVersion vers : JavaVersion . values ( ) ) { qualifiers . addAll ( vers . getAllQualifier... | Change the version of the Java source to be used for the generated Java files . |
33,992 | public void setSourcePath ( String sourcePath ) { this . sourcePath = new ArrayList < > ( ) ; for ( final String path : Strings . split ( sourcePath , Pattern . quote ( File . pathSeparator ) ) ) { this . sourcePath . add ( normalizeFile ( path ) ) ; } } | Change the source path . |
33,993 | public void addSourcePath ( File sourcePath ) { if ( this . sourcePath == null ) { this . sourcePath = new ArrayList < > ( ) ; } this . sourcePath . add ( sourcePath ) ; } | Add a folder to the source path . |
33,994 | public List < File > getSourcePaths ( ) { if ( this . sourcePath == null ) { return Collections . emptyList ( ) ; } return Collections . unmodifiableList ( this . sourcePath ) ; } | Replies the source path . |
33,995 | protected void overrideXtextInternalLoggers ( ) { final Logger logger = getLogger ( ) ; final org . apache . log4j . spi . LoggerFactory factory = new InternalXtextLoggerFactory ( logger ) ; final org . apache . log4j . Logger internalLogger = org . apache . log4j . Logger . getLogger ( MessageFormat . format ( Message... | Change the loggers that are internally used by Xtext . |
33,996 | protected String createIssueMessage ( Issue issue ) { final IssueMessageFormatter formatter = getIssueMessageFormatter ( ) ; final org . eclipse . emf . common . util . URI uriToProblem = issue . getUriToProblem ( ) ; if ( formatter != null ) { final String message = formatter . format ( issue , uriToProblem ) ; if ( m... | Create a message for the issue . |
33,997 | protected boolean reportCompilationIssues ( Iterable < Issue > issues ) { boolean hasError = false ; for ( final Issue issue : issues ) { final String issueMessage = createIssueMessage ( issue ) ; switch ( issue . getSeverity ( ) ) { case ERROR : hasError = true ; getLogger ( ) . error ( issueMessage ) ; break ; case W... | Output the given issues that result from the compilation of the SARL code . |
33,998 | protected void reportInternalError ( String message , Object ... parameters ) { getLogger ( ) . error ( message , parameters ) ; if ( getReportInternalProblemsAsIssues ( ) ) { final org . eclipse . emf . common . util . URI uri = null ; final Issue . IssueImpl issue = new Issue . IssueImpl ( ) ; issue . setCode ( INTER... | Reports the given error message . |
33,999 | protected void generateJavaFiles ( Iterable < Resource > validatedResources , IProgressMonitor progress ) { assert progress != null ; progress . subTask ( Messages . SarlBatchCompiler_49 ) ; getLogger ( ) . info ( Messages . SarlBatchCompiler_28 , getOutputPath ( ) ) ; final JavaIoFileSystemAccess javaIoFileSystemAcces... | Generate the Java files from the SARL scripts . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.