Examples of DefaultScope


Examples of org.eclipse.core.runtime.preferences.DefaultScope

    boolean result = regionType.equals(DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) || regionType.equals(DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) || regionType.equals(DOMJSPRegionContexts.JSP_DECLARATION_OPEN) || regionType.equals(DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN);
    return result;
  }

  private void loadPreferences(IFile file) {
    fScopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};

    fPreferencesService = Platform.getPreferencesService();
    if (file != null && file.isAccessible()) {
      ProjectScope projectScope = new ProjectScope(file.getProject());
      if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
        fScopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
      }
    }

    fSeverityMissingRequiredAttribute = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE);
    fSeverityNonEmptyInlineTag = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG);
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.DefaultScope

    if (adapter == null) {
      adapter = getElement().getAdapter(IResource.class);
    }
    if (adapter != null && adapter instanceof IResource) {
      String preferenceKey = TagModelQuery.createPreferenceKey(((IResource) adapter).getFullPath());
      new DefaultScope().getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName()).put(preferenceKey, fValues[0]);
      ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(((IResource) adapter).getProject()), JSPCorePlugin.getDefault().getBundle().getSymbolicName());

      String[][] entryNamesAndValues = new String[][]{{fDisplayTypes[0], fValues[0]}, {fDisplayTypes[1], fValues[1]}};
      fComboFieldEditor = new ComboFieldEditor(preferenceKey, JSPUIMessages.JSPFContentSettingsPropertyPage_2, entryNamesAndValues, composite);
      fComboFieldEditor.fillIntoGrid(composite, 2);
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.DefaultScope

   * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
   */
  protected void performDefaults() {
    resetSeverities();

    IEclipsePreferences defaultContext = new DefaultScope().getNode(getPreferenceNodeQualifier());
    boolean validateFragments = defaultContext.getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
    fValidateFragments.setSelection(validateFragments);

    super.performDefaults();
  }
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.DefaultScope

      }
    }
  }
 
  protected void resetSeverities() {
    IEclipsePreferences defaultContext = new DefaultScope().getNode(getPreferenceNodeQualifier());
    for(int i = 0; i < fCombos.size(); i++) {
      ComboData data = (ComboData)((Combo)fCombos.get(i)).getData();
      int severity = defaultContext.getInt(data.getKey(), ValidationMessage.WARNING);
      data.setSeverity(severity);
      ((Combo)fCombos.get(i)).select(data.getIndex());
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.DefaultScope

    };
    fTabEnablementListener.widgetSelected(null);
    fEnableCheckbox.addSelectionListener(fTabEnablementListener);

    // restore last selected tab
    int activeTab = new DefaultScope().getNode(getPreferenceNodeQualifier()).getInt(TASK_TAG_LAST_TAB, 0);
    if (activeTab > 0) {
      fTabFolder.setSelection(activeTab);
    }

    SSEUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.PREFWEBX_TASKTAGS_HELPID);
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.DefaultScope

    }

    promptForRedetectIfNecessary();

    // save last tab (use Default scope since it won't be persisted)
    new DefaultScope().getNode(getPreferenceNodeQualifier()).putInt(TASK_TAG_LAST_TAB, fTabFolder.getSelectionIndex());

    IScopeContext[] contexts = createPreferenceScopes();
    // remove project-specific information if it's not enabled
    if (getProject() != null && !isElementSettingsEnabled()) {
      if (_debugPreferences) {
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.DefaultScope

* Sets default values for JSP Core preferences
*/
public class JSPCorePreferenceInitializer extends AbstractPreferenceInitializer {

  public void initializeDefaultPreferences() {
    IEclipsePreferences node = new DefaultScope().getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName());

    // compiler/validation preferences
    node.putBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);

    // code generation preferences
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.DefaultScope

  }

  protected IScopeContext[] createPreferenceScopes() {
    IProject project = getProject();
    if (project != null) {
      return new IScopeContext[]{new ProjectScope(project), new InstanceScope(), new DefaultScope()};
    }
    return new IScopeContext[]{new InstanceScope(), new DefaultScope()};
  }
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.DefaultScope

    IFile tld = (IFile) resource;
    if (tld.isAccessible()) {
      try {
        final IJavaProject javaProject = JavaCore.create(tld.getProject());
        if (javaProject.exists()) {
          IScopeContext[] scopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
          ProjectScope projectScope = new ProjectScope(tld.getProject());
          if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
            scopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
          }
          Map[] problems = detectProblems(javaProject, tld, scopes);
          for (int i = 0; i < problems.length; i++) {
            ValidatorMessage message = ValidatorMessage.create(problems[i].get(IMarker.MESSAGE).toString(), resource);
            message.setType(MARKER_TYPE);
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.DefaultScope

  }

  protected IScopeContext[] createPreferenceScopes() {
    IProject project = getProject();
    if (project != null) {
      return new IScopeContext[]{new ProjectScope(project), new InstanceScope(), new DefaultScope()};
    }
    return new IScopeContext[]{new InstanceScope(), new DefaultScope()};
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.