org.eclipse.xtext.builder.preferences.BuilderConfigurationBlock Java Examples

The following examples show how to use org.eclipse.xtext.builder.preferences.BuilderConfigurationBlock. 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: XtextProjectConfigurator.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
private void configureLanguage(ProjectScope projectPreferences, Language language, ProjectConfigurationRequest request) throws CoreException {
	if (language.getOutputConfigurations().isEmpty()) return;
	
	IEclipsePreferences languagePreferences = projectPreferences.getNode(language.name());
	languagePreferences.putBoolean(OptionsConfigurationBlock.isProjectSpecificPropertyKey(BuilderConfigurationBlock.PROPERTY_PREFIX), true);
	languagePreferences.putBoolean(PREF_AUTO_BUILDING, true);
	for (OutputConfiguration outputConfiguration : language.getOutputConfigurations()) {
		configureOutlet(languagePreferences, outputConfiguration, request);
	}
	try {
		languagePreferences.flush();
	} catch (BackingStoreException e) {
		throw new RuntimeException(e);
	}
}
 
Example #2
Source File: XtendProjectConfigurator.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
private void writePreferences(OutputConfiguration configuration,
		IProject project) {
	ProjectScope projectPreferences = new ProjectScope(project);
	IEclipsePreferences languagePreferences = projectPreferences
			.getNode("org.eclipse.xtend.core.Xtend");
	languagePreferences.putBoolean(
			OptionsConfigurationBlock.isProjectSpecificPropertyKey(BuilderConfigurationBlock.PROPERTY_PREFIX), true);
	languagePreferences.putBoolean(
			getKey(configuration, INSTALL_DSL_AS_PRIMARY_SOURCE),
			configuration.isInstallDslAsPrimarySource());
	languagePreferences.putBoolean(
			getKey(configuration, HIDE_LOCAL_SYNTHETIC_VARIABLES),
			configuration.isHideSyntheticLocalVariables());
	languagePreferences.putBoolean(
			getKey(configuration, USE_OUTPUT_PER_SOURCE_FOLDER),
			true);
	for (SourceMapping sourceMapping : configuration.getSourceMappings()) {
		languagePreferences.put(
				getOutputForSourceFolderKey(configuration,
						sourceMapping.getSourceFolder()),
				Strings.nullToEmpty(sourceMapping.getOutputDirectory()));
	}

	try {
		languagePreferences.flush();
	} catch (BackingStoreException e) {
		throw new RuntimeIOException(e);
	}
}
 
Example #3
Source File: DefaultXbaseUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends BuilderConfigurationBlock> bindBuilderConfigurationBlock() {
	return XbaseBuilderConfigurationBlock.class;
}
 
Example #4
Source File: CheckUiModule.java    From dsl-devkit with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public Class<? extends BuilderConfigurationBlock> bindBuilderConfigurationBlock() {
  return CheckBuilderConfigurationBlock.class;
}
 
Example #5
Source File: AbstractSARLUiModule.java    From sarl with Apache License 2.0 4 votes vote down vote up
public Class<? extends BuilderConfigurationBlock> bindBuilderConfigurationBlock() {
	return SARLBuilderConfigurationBlock.class;
}