org.eclipse.xtext.ui.preferences.OptionsConfigurationBlock Java Examples

The following examples show how to use org.eclipse.xtext.ui.preferences.OptionsConfigurationBlock. 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: N4JSBuilderPreferencePage.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This method has been copied from org.eclipse.xtext.builder.preferences.BuilderConfigurationBlock.
 *
 * @param projectToBuild
 *            the project to build
 * @return the configured build job
 */
protected Job getBuildJob(IProject projectToBuild) {
	Job buildJob = new OptionsConfigurationBlock.BuildJob(Messages.BuilderConfigurationBlock_BuildJob_Title0,
			projectToBuild);
	buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
	buildJob.setUser(true);
	return buildJob;
}
 
Example #2
Source File: XtextValidatorConfigurationBlock.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected Job getBuildJob(IProject project) {
	Job buildJob = new OptionsConfigurationBlock.BuildJob(Messages.XtextValidatorConfigurationBlock_11, project);
	buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
	buildJob.setUser(true);
	return buildJob;

}
 
Example #3
Source File: AbstractValidatorConfigurationBlock.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @since 2.15
 */
@Override
protected Job getBuildJob(IProject project) {
	Job buildJob = new OptionsConfigurationBlock.BuildJob(
			Messages.ValidationConfigurationBlock_build_job_title, project);
	buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
	buildJob.setUser(true);
	return buildJob;

}
 
Example #4
Source File: TaskTagConfigurationBlock.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected Job getBuildJob(IProject project) {
	Job buildJob = new OptionsConfigurationBlock.BuildJob("Rebuild", project);
	buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
	buildJob.setUser(true);
	return buildJob;
}
 
Example #5
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 #6
Source File: BuilderConfigurationBlock.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected Job getBuildJob(IProject project) {
	Job buildJob = new OptionsConfigurationBlock.BuildJob(Messages.BuilderConfigurationBlock_BuildJob_Title0, project);
	buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
	buildJob.setUser(true);
	return buildJob;
}
 
Example #7
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 #8
Source File: HelloWorldValidatorConfigurationBlock.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected Job getBuildJob(IProject project) {
	Job buildJob = new OptionsConfigurationBlock.BuildJob("Validation Settings Changed", project);
	buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
	buildJob.setUser(true);
	return buildJob;
}
 
Example #9
Source File: AbstractGeneratorConfigurationBlock.java    From sarl with Apache License 2.0 5 votes vote down vote up
@Override
protected Job getBuildJob(IProject project) {
	final Job buildJob = new OptionsConfigurationBlock.BuildJob(Messages.AbstractGeneratorConfigurationBlock_3, project);
	buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
	buildJob.setUser(true);
	return buildJob;
}