Package org.eclipse.core.runtime.preferences

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


    fTaskTags = (TaskTag[]) taskTags.toArray(new TaskTag[taskTags.size()]);
    valueTable.setInput(fTaskTags);
  }

  private void save() {
    IEclipsePreferences defaultPreferences = new DefaultScope().getNode(TaskTagPreferenceKeys.TASK_TAG_NODE);
    String defaultTags = defaultPreferences.get(TaskTagPreferenceKeys.TASK_TAG_TAGS, null);
    String defaultPriorities = defaultPreferences.get(TaskTagPreferenceKeys.TASK_TAG_PRIORITIES, null);

    StringBuffer buf = new StringBuffer();
    for (int i = 0; i < fTaskTags.length; i++) {
View Full Code Here


  private IPreferencesService fPreferencesService = null;
  private IScopeContext[] fScopes = null;

  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()};
      }
    }
  }
View Full Code Here

    fTaskTags = (TaskTag[]) taskTags.toArray(new TaskTag[taskTags.size()]);
    valueTable.setInput(fTaskTags);
  }

  private void save() {
    IEclipsePreferences defaultPreferences = new DefaultScope().getNode(TaskTagPreferenceKeys.TASK_TAG_NODE);
    String defaultTags = defaultPreferences.get(TaskTagPreferenceKeys.TASK_TAG_TAGS, null);
    String defaultPriorities = defaultPreferences.get(TaskTagPreferenceKeys.TASK_TAG_PRIORITIES, null);

    StringBuffer buf = new StringBuffer();
    for (int i = 0; i < fTaskTags.length; i++) {
View Full Code Here

      }
    }
  }

  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

   * @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

    }
    return IMessage.NORMAL_SEVERITY;
  }

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

    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()};
      }
    }
  }
View Full Code Here

  private boolean isReservedTaglibPrefix(String name) {
    return fReservedPrefixes.get(name) != null;
  }
 
  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()};
      }
    }

    fSeverityIncludeFileMissing = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND);
    fSeverityIncludeFileNotSpecified = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED);
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
   */
  public void initializeDefaultPreferences() {
    IEclipsePreferences node = new DefaultScope().getNode(XMLCorePlugin.getDefault().getBundle().getSymbolicName());

    // formatting preferences
    node.putInt(XMLCorePreferenceNames.LINE_WIDTH, 72);
    node.putBoolean(XMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES, false);
    node.put(XMLCorePreferenceNames.INDENTATION_CHAR, XMLCorePreferenceNames.TAB);
View Full Code Here

    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

    if (context != null) {
      final IProject project = context.getProject();
      if (project != null && project.isAccessible()) {
        final ProjectScope projectScope = new ProjectScope(project);
        if (projectScope.getNode(XMLCorePlugin.getDefault().getBundle().getSymbolicName()).getBoolean(XMLCorePreferenceNames.USE_PROJECT_SETTINGS, false))
        return new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
      }
    }
    return new IScopeContext[]{new InstanceScope(), new DefaultScope()};
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.preferences.DefaultScope

Copyright © 2018 www.massapicom. 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.