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 = Iterables . find ( configurationProvider . getOutputConfigurations ( ) , it -> Objects . equals ( it . getName ( ) , IFileSystemAccess . DEFAULT_OUTPUT ) ) ; if ( config != null ) { final String path = config . getOutputDirectory ( ) ; if ( ! Strings . isNullOrEmpty ( path ) ) { final IPath pathObject = Path . fromOSString ( path ) ; if ( pathObject != null ) { return pathObject ; } } } throw new IllegalStateException ( "No global preferences found for SARL." ) ; //$NON-NLS-1$ }
Replies the SARL output path in the global preferences .