Java Code Examples for org.eclipse.xtext.generator.OutputConfiguration#setDescription()

The following examples show how to use org.eclipse.xtext.generator.OutputConfiguration#setDescription() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: N4IDLSubGenerator.java    From n4js with Eclipse Public License 1.0 6 votes vote down vote up
private static CompilerDescriptor createDescriptor() {
	final CompilerDescriptor result = new CompilerDescriptor();
	result.setIdentifier(COMPILER_ID);
	result.setName("N4IDL to ECMAScript transpiler");
	result.setDescription(
			"Transpiles N4IDL to ECMAScript, currently ES5 plus some selected ES6 features supported by V8.");
	result.setActive(true);
	result.setCompiledFileExtension("js");
	result.setCompiledFileSourceMapExtension("map");
	final OutputConfiguration outCfg = new OutputConfiguration(COMPILER_ID);
	outCfg.setDescription("N4IDL to ECMAScript transpiler");
	outCfg.setOutputDirectory(N4JSLanguageConstants.DEFAULT_PROJECT_OUTPUT);
	outCfg.setOverrideExistingResources(true);
	outCfg.setCreateOutputDirectory(true);
	outCfg.setCleanUpDerivedResources(true);
	outCfg.setSetDerivedProperty(true);
	outCfg.setKeepLocalHistory(true);
	outCfg.setCanClearOutputDirectory(true);
	result.setOutputConfiguration(outCfg);
	return result;
}
 
Example 2
Source File: EcmaScriptSubGenerator.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/** Creates a default OutputConfiguration */
public static OutputConfiguration createDefaultOutputConfiguration() {
	final OutputConfiguration outCfg = new OutputConfiguration(COMPILER_ID);
	outCfg.setDescription("N4JS to ECMAScript transpiler");
	outCfg.setOutputDirectory(N4JSLanguageConstants.DEFAULT_PROJECT_OUTPUT);
	outCfg.setOverrideExistingResources(true);
	outCfg.setCreateOutputDirectory(true);
	outCfg.setCleanUpDerivedResources(true);
	outCfg.setSetDerivedProperty(true);
	outCfg.setKeepLocalHistory(true);
	outCfg.setCanClearOutputDirectory(true);
	return outCfg;
}
 
Example 3
Source File: EclipseOutputConfigurationProvider.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @deprecated use {@link #createAndOverlayOutputConfiguration(IProject, IPreferenceStore, OutputConfiguration)}
 */
@Deprecated
protected OutputConfiguration createAndOverlayOutputConfiguration(IPreferenceStore store, OutputConfiguration output) {
	OutputConfiguration result = new OutputConfiguration(output.getName());
	boolean clearOutputDirectory = getBoolean(output, OUTPUT_CLEAN_DIRECTORY, store, output.isCanClearOutputDirectory());
	result.setCanClearOutputDirectory(clearOutputDirectory);
	boolean cleanUpDerivedResources = getBoolean(output, OUTPUT_CLEANUP_DERIVED, store, output.isCleanUpDerivedResources());
	result.setCleanUpDerivedResources(cleanUpDerivedResources);
	boolean createOutputDirectory = getBoolean(output, OUTPUT_CREATE_DIRECTORY, store, output.isCreateOutputDirectory());
	result.setCreateOutputDirectory(createOutputDirectory);
	boolean overrideExistingResources = getBoolean(output, OUTPUT_OVERRIDE, store, output.isOverrideExistingResources());
	result.setOverrideExistingResources(overrideExistingResources);
	boolean setDerivedProperty = getBoolean(output, OUTPUT_DERIVED, store, output.isSetDerivedProperty());
	result.setSetDerivedProperty(setDerivedProperty);
	boolean installDslAsPrimarySource = getBoolean(output, INSTALL_DSL_AS_PRIMARY_SOURCE, store, output.isInstallDslAsPrimarySource());
	result.setInstallDslAsPrimarySource(installDslAsPrimarySource);
	boolean hideSyntheticLocalVariables = getBoolean(output, HIDE_LOCAL_SYNTHETIC_VARIABLES, store, output.isHideSyntheticLocalVariables());
	result.setHideSyntheticLocalVariables(hideSyntheticLocalVariables);
	String description = getString(output, OUTPUT_DESCRIPTION, store, output.getDescription());
	result.setDescription(description);
	String directory = getString(output, OUTPUT_DIRECTORY, store, output.getOutputDirectory());
	result.setOutputDirectory(directory);
	boolean keepLocalHistory = getBoolean(output, OUTPUT_KEEP_LOCAL_HISTORY, store, output.isKeepLocalHistory());
	result.setKeepLocalHistory(keepLocalHistory);
	boolean useOutputPerSourceFolder = getBoolean(output, USE_OUTPUT_PER_SOURCE_FOLDER, store, output.isUseOutputPerSourceFolder());
	result.setUseOutputPerSourceFolder(useOutputPerSourceFolder);
	return result;
}
 
Example 4
Source File: XtendOutputConfigurationProvider.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public Set<OutputConfiguration> getOutputConfigurations() {
	OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
	defaultOutput.setDescription("Output folder for generated Java files");
	defaultOutput.setOutputDirectory("xtend-gen");
	defaultOutput.setOverrideExistingResources(true);
	defaultOutput.setCreateOutputDirectory(true);
	defaultOutput.setCanClearOutputDirectory(false);
	defaultOutput.setCleanUpDerivedResources(true);
	defaultOutput.setSetDerivedProperty(true);
	defaultOutput.setKeepLocalHistory(false);
	return newHashSet(defaultOutput);
}
 
Example 5
Source File: FormatOutputConfigurationProvider.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates output configuration for a Formatter.
 *
 * @return output configuration
 */
private OutputConfiguration getFormatterConfig() {
  OutputConfiguration config = new OutputConfiguration(FormatConstants.FORMATTER);
  config.setDescription("Output configuration for a formatter");
  config.setOverrideExistingResources(false);
  config.setCanClearOutputDirectory(false);
  config.setCleanUpDerivedResources(false);
  config.setOutputDirectory("src");
  return config;
}
 
Example 6
Source File: FormatOutputConfigurationProvider.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates output configuration for a AbstractFormatter.
 *
 * @return output configuration
 */
private OutputConfiguration getAbstractFormatterConfig() {
  OutputConfiguration config = new OutputConfiguration(FormatConstants.ABSTRACT_FORMATTER);
  config.setDescription("Output configuration for a abstract formatter");
  config.setOverrideExistingResources(true);
  config.setOutputDirectory("src-gen");
  return config;
}
 
Example 7
Source File: ExportOutputConfigurationProvider.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates output configuration for generated stubs.
 *
 * @return output configuration
 */
private OutputConfiguration getStubConfig() {
  OutputConfiguration config = new OutputConfiguration(STUB_OUTPUT);
  config.setDescription("Output configuration for stubs"); //$NON-NLS-1$
  config.setOverrideExistingResources(false);
  config.setCanClearOutputDirectory(false);
  config.setCleanUpDerivedResources(false);
  config.setOutputDirectory("src"); //$NON-NLS-1$
  return config;
}
 
Example 8
Source File: ExportOutputConfigurationProvider.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates output configuration for regular generated files.
 *
 * @return output configuration
 */
private OutputConfiguration getDefaultConfig() {
  OutputConfiguration config = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
  config.setDescription("Output configuration for generated classes"); //$NON-NLS-1$
  config.setOverrideExistingResources(true);
  config.setOutputDirectory("src-gen"); //$NON-NLS-1$
  return config;
}
 
Example 9
Source File: CheckOutputConfigurationProvider.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Gets the check documentation output configuration.
 *
 * @return the check documentation configuration
 */
private OutputConfiguration getCheckDocumentationConfig() {
  OutputConfiguration config = new OutputConfiguration(CheckGeneratorConstants.CHECK_DOC_OUTPUT);
  config.setDescription("Output configuration for check documentation use");
  config.setOutputDirectory(DOCS_PATH);
  config.setCreateOutputDirectory(true);
  config.setCanClearOutputDirectory(true);
  return config;
}
 
Example 10
Source File: CheckOutputConfigurationProvider.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Gets the service registry output configuration.
 *
 * @return the service registry configuration
 */
private OutputConfiguration getServiceRegistryConfig() {
  OutputConfiguration config = new OutputConfiguration(CheckGeneratorConstants.CHECK_REGISTRY_OUTPUT);
  config.setDescription("Output configuration for service registry use");
  config.setOutputDirectory("META-INF/services");
  config.setOverrideExistingResources(true);
  config.setCreateOutputDirectory(true);
  config.setCleanUpDerivedResources(false);
  config.setSetDerivedProperty(true);
  return config;
}
 
Example 11
Source File: SarlOutputConfigurationProvider.java    From sarl with Apache License 2.0 5 votes vote down vote up
/** Create the standard output configuration.
 *
 * @return the configuration, never {@code null}.
 * @since 0.8
 */
@SuppressWarnings("static-method")
protected OutputConfiguration createStandardOutputConfiguration() {
	final OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
	defaultOutput.setDescription(Messages.SarlOutputConfigurationProvider_0);
	defaultOutput.setOutputDirectory(SARLConfig.FOLDER_SOURCE_GENERATED);
	defaultOutput.setOverrideExistingResources(true);
	defaultOutput.setCreateOutputDirectory(true);
	defaultOutput.setCanClearOutputDirectory(false);
	defaultOutput.setCleanUpDerivedResources(true);
	defaultOutput.setSetDerivedProperty(true);
	defaultOutput.setKeepLocalHistory(false);
	return defaultOutput;
}
 
Example 12
Source File: SarlOutputConfigurationProvider.java    From sarl with Apache License 2.0 5 votes vote down vote up
/** Create the unit test output configuration.
 *
 * @return the configuration, never {@code null}.
 * @since 0.8
 */
@SuppressWarnings("static-method")
protected OutputConfiguration createTestOutputConfiguration() {
	final OutputConfiguration testOutput = new OutputConfiguration(SARLConfig.TEST_OUTPUT_CONFIGURATION);
	testOutput.setDescription(Messages.SarlOutputConfigurationProvider_1);
	testOutput.setOutputDirectory(SARLConfig.FOLDER_TEST_SOURCE_GENERATED);
	testOutput.setOverrideExistingResources(true);
	testOutput.setCreateOutputDirectory(true);
	testOutput.setCanClearOutputDirectory(false);
	testOutput.setCleanUpDerivedResources(true);
	testOutput.setSetDerivedProperty(true);
	testOutput.setKeepLocalHistory(false);
	return testOutput;
}
 
Example 13
Source File: PyOutputConfigurationProvider.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Override
public Set<OutputConfiguration> getOutputConfigurations() {
	final OutputConfiguration pythonOutput = new OutputConfiguration(OUTPUT_CONFIGURATION_NAME);
	pythonOutput.setDescription(Messages.PyOutputConfigurationProvider_0);
	pythonOutput.setOutputDirectory(OUTPUT_FOLDER);
	pythonOutput.setOverrideExistingResources(true);
	pythonOutput.setCreateOutputDirectory(true);
	pythonOutput.setCanClearOutputDirectory(true);
	pythonOutput.setCleanUpDerivedResources(true);
	pythonOutput.setSetDerivedProperty(true);
	pythonOutput.setKeepLocalHistory(false);
	return newHashSet(pythonOutput);
}