use of org.eclipse.core.runtime.preferences.DefaultScope in project webtools.sourceediting by eclipse.
the class PreferenceInitializer method initializeDefaultPreferences.
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
public void initializeDefaultPreferences() {
IEclipsePreferences taskTagDefaults = new DefaultScope().getNode(TaskTagPreferenceKeys.TASK_TAG_NODE);
taskTagDefaults.putBoolean(TaskTagPreferenceKeys.TASK_TAG_ENABLE, false);
// $NON-NLS-1$
taskTagDefaults.put(TaskTagPreferenceKeys.TASK_TAG_TAGS, "TODO,FIXME,XXX");
// $NON-NLS-1$
taskTagDefaults.put(TaskTagPreferenceKeys.TASK_TAG_PRIORITIES, "1,2,1");
// $NON-NLS-1$
taskTagDefaults.put(TaskTagPreferenceKeys.TASK_TAG_CONTENTTYPES_IGNORED, "");
}
use of org.eclipse.core.runtime.preferences.DefaultScope in project webtools.sourceediting by eclipse.
the class ELGeneratorVisitor method getScopeContexts.
private IScopeContext[] getScopeContexts() {
IScopeContext[] scopes = new IScopeContext[] { new InstanceScope(), new DefaultScope() };
final IFile file = getFile();
if (file != null && file.exists()) {
final IProject project = file.getProject();
if (project.exists()) {
final ProjectScope projectScope = new ProjectScope(project);
if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
scopes = new IScopeContext[] { projectScope, new InstanceScope(), new DefaultScope() };
}
}
}
return scopes;
}
use of org.eclipse.core.runtime.preferences.DefaultScope in project webtools.sourceediting by eclipse.
the class JSPCorePreferencesTest method testPluginGetDefaultPreferences.
/**
* Tests default values of preferences.
*
* NOTE: Expected default values are hard-coded, so if default values do
* get changed, assertions need to be updated as well
*/
public void testPluginGetDefaultPreferences() {
IEclipsePreferences node = new DefaultScope().getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName());
pluginGetDefaultPreference(node, JSPCorePreferenceNames.VALIDATE_FRAGMENTS, Boolean.toString(true));
}
use of org.eclipse.core.runtime.preferences.DefaultScope in project webtools.sourceediting by eclipse.
the class PreferenceInitializer method initializeDefaultPreferences.
@Override
public void initializeDefaultPreferences() {
IEclipsePreferences node = new DefaultScope().getNode(XSLUIPlugin.getDefault().getBundle().getSymbolicName());
// default to the basic stylesheet
node.put(XSLUIConstants.NEW_FILE_TEMPLATE_NAME, ORG_ECLIPSE_WST_XSLT_TEMPLATES_XSL_BASIC);
}
use of org.eclipse.core.runtime.preferences.DefaultScope in project webtools.sourceediting by eclipse.
the class TaskScanningJob method isEnabledOnProject.
private boolean isEnabledOnProject(IProject p) {
IPreferencesService preferencesService = Platform.getPreferencesService();
IScopeContext[] lookupOrder = new IScopeContext[] { new ProjectScope(p), new InstanceScope(), new DefaultScope() };
return preferencesService.getBoolean(TaskTagPreferenceKeys.TASK_TAG_NODE, TaskTagPreferenceKeys.TASK_TAG_ENABLE, false, lookupOrder);
}
Aggregations