public static void setSpecificSARLConfigurationFor ( IProject project , IPath outputPath ) { final IPreferenceStore preferenceStore = getSARLPreferencesFor ( project ) ; // Force to use a specific configuration for the SARL preferenceStore . setValue ( IS_PROJECT_SPECIFIC , true ) ; // Loop on the Xtext configurations embedded in the SARL compiler. String key ; for ( final OutputConfiguration projectConfiguration : getXtextConfigurationsFor ( project ) ) { // // OUTPUT PATH key = BuilderPreferenceAccess . getKey ( projectConfiguration , EclipseOutputConfigurationProvider . OUTPUT_DIRECTORY ) ; preferenceStore . setValue ( key , outputPath . toOSString ( ) ) ; // // CREATE THE OUTPUT DIRECTORY key = BuilderPreferenceAccess . getKey ( projectConfiguration , EclipseOutputConfigurationProvider . OUTPUT_CREATE_DIRECTORY ) ; preferenceStore . setValue ( key , true ) ; // // OVERWRITE THE EXISTING FILES key = BuilderPreferenceAccess . getKey ( projectConfiguration , EclipseOutputConfigurationProvider . OUTPUT_OVERRIDE ) ; preferenceStore . setValue ( key , true ) ; // // SET GENERATED FILES AS DERIVED key = BuilderPreferenceAccess . getKey ( projectConfiguration , EclipseOutputConfigurationProvider . OUTPUT_DERIVED ) ; preferenceStore . setValue ( key , true ) ; // // CLEAN THE GENERATED FILES key = BuilderPreferenceAccess . getKey ( projectConfiguration , EclipseOutputConfigurationProvider . OUTPUT_CLEANUP_DERIVED ) ; preferenceStore . setValue ( key , true ) ; // // CLEAN THE OUTPUT DIRECTORY key = BuilderPreferenceAccess . getKey ( projectConfiguration , EclipseOutputConfigurationProvider . OUTPUT_CLEAN_DIRECTORY ) ; preferenceStore . setValue ( key , true ) ; } }
Configure the given project for using a specific configuration related to SARL .