Package org.eclipse.jface.preference

Examples of org.eclipse.jface.preference.FieldEditor


      this.fieldType = fieldType;
    }

    @Override
    void setValue(T value, E tabElements) {
      FieldEditor fieldEditor = getFieldEditor(tabElements);
      fieldType.setStoreDefaultValue(fieldEditor.getPreferenceStore(),
          fieldEditor.getPreferenceName(), value);
      fieldEditor.loadDefault();
    }
View Full Code Here


      fieldEditor.loadDefault();
    }

    @Override
    T getValue(E tabElements) {
      FieldEditor fieldEditor = getFieldEditor(tabElements);
      storeEditor(fieldEditor, getEditorErrorValue());
      return fieldType.getStoreValue(fieldEditor.getPreferenceStore(),
          fieldEditor.getPreferenceName());
    }
View Full Code Here

    Map<String, Object> values = f.getAlgorithmParameterStandardValues();
    if (params != null) {
      for (int i = 0; i < params.length; i++) {
        TextRulerLearnerParameter p = params[i];
        String id = algorithmController.getID() + "." + p.id;
        FieldEditor l = null;
        switch (p.type) {
          case ML_BOOL_PARAM: {
            l = new BooleanFieldEditor(id, p.name, getFieldEditorParent());
            fields.add(l);
            addField(l);
            store.setDefault(id, (Boolean) values.get(p.id));
            l.setPreferenceStore(store);
            break;
          }

          case ML_FLOAT_PARAM:
          case ML_DOUBLE_PARAM:
          case ML_INT_PARAM:
          case ML_STRING_PARAM: {
            l = new StringFieldEditor(id, p.name, getFieldEditorParent());
            fields.add(l);
            addField(l);
            store.setDefault(id, values.get(p.id).toString());
            l.setPreferenceStore(store);
            break;
          }
          // case ML_SELECT_PARAM: {
          // Combo combo = new Combo(top, SWT.READ_ONLY);
          // if (p.selectValues != null)
View Full Code Here

  @Override
  protected Control createContents(Composite parent) {
    Control control = createPage(parent);
      for (Iterator<FieldEditor> iter = fieldList.iterator(); iter.hasNext();) {
        FieldEditor editor = iter.next();
      editor.setPage(this);
      editor.setPropertyChangeListener(this);
      editor.setPreferenceStore(getPreferenceStore());
        editor.load();
      }
    checkState();
    return control;
  }
View Full Code Here

        GridData d = new GridData();
        d.horizontalAlignment = GridData.FILL;
        d.grabExcessHorizontalSpace = true;
        button.setLayoutData(d);

        FieldEditor fe = new LabelFieldEditor("Help", w, p);
        addField(fe);
    }
View Full Code Here

  {
    super.propertyChange(event);
   
    if( event.getSource() instanceof FieldEditor )
    {
      FieldEditor field = (FieldEditor)event.getSource();
     
      if (field == periodicReindexEnabled){
        periodicReindexInterval.setEnabled(periodicReindexEnabled.getBooleanValue(), getFieldEditorParent());
      }
     
      if( PreferenceConstants.P_INDEXABLE_EXTENSIONS.equals(field.getPreferenceName())
          || PreferenceConstants.P_EXCLUDE_DIRS.equals(field.getPreferenceName())
          || PreferenceConstants.P_INDEX_EMPTY_EXTENSION.equals(field.getPreferenceName()))
        setMessage("Rebuilding of index is recommended", INFORMATION);
      else if( PreferenceConstants.P_INDEX_ARCHIVES.equals(field.getPreferenceName()) )
        setMessage("Rebuilding of index is required", INFORMATION);
    }
  }
View Full Code Here

    checkState();
    return result;
  }

  private void createSessionManagementGroup(final Composite parent) {
    FieldEditor editor;
    final Group group = createGroup(parent,
        UIMessages.CoverageSessionManagement_titel);
    editor = new BooleanFieldEditor(UIPreferences.PREF_SHOW_COVERAGE_VIEW,
        UIMessages.CoveragePreferencesShowCoverageView_label, group);
    addField(editor);
    editor.fillIntoGrid(group, 2);
    editor = new BooleanFieldEditor(UIPreferences.PREF_ACTICATE_NEW_SESSIONS,
        UIMessages.CoveragePreferencesActivateNewSessions_label, group);
    addField(editor);
    editor.fillIntoGrid(group, 2);
    editor = new BooleanFieldEditor(UIPreferences.PREF_AUTO_REMOVE_SESSIONS,
        UIMessages.CoveragePreferencesAutoRemoveSessions_label, group);
    addField(editor);
    editor = new BooleanFieldEditor(UIPreferences.PREF_RESET_ON_DUMP,
        UIMessages.CoveragePreferencesResetOnDump_label, group);
    addField(editor);
    editor.fillIntoGrid(group, 2);
    adjustGroupLayout(group);
  }
View Full Code Here

    editor.fillIntoGrid(group, 2);
    adjustGroupLayout(group);
  }

  private void createDefaultScopeGroup(final Composite parent) {
    FieldEditor editor;
    final Group group = createGroup(parent,
        UIMessages.CoveragePreferencesDefaultScope_title);
    editor = new BooleanFieldEditor(
        UIPreferences.PREF_DEFAULT_SCOPE_SOURCE_FOLDERS_ONLY,
        UIMessages.CoveragePreferencesSourceFoldersOnly_label, group);
    addField(editor);
    editor.fillIntoGrid(group, 2);
    editor = new BooleanFieldEditor(
        UIPreferences.PREF_DEFAULT_SCOPE_SAME_PROJECT_ONLY,
        UIMessages.CoveragePreferencesSameProjectOnly_label, group);
    addField(editor);
    editor.fillIntoGrid(group, 2);
    editor = new StringFieldEditor(UIPreferences.PREF_DEFAULT_SCOPE_FILTER,
        UIMessages.CoveragePreferencesClasspathFilter_label, group);
    addField(editor);
    editor.fillIntoGrid(group, 2);
    adjustGroupLayout(group);
  }
View Full Code Here

    editor.fillIntoGrid(group, 2);
    adjustGroupLayout(group);
  }

  private void createCoverageRuntimeGroup(final Composite parent) {
    FieldEditor editor;
    final Group group = createGroup(parent,
        UIMessages.CoveragePreferencesCoverageRuntime_title);
    editor = new StringFieldEditor(UIPreferences.PREF_AGENT_INCLUDES,
        UIMessages.CoveragePreferencesIncludes_label, group);
    addField(editor);
    editor.fillIntoGrid(group, 2);
    editor = new StringFieldEditor(UIPreferences.PREF_AGENT_EXCLUDES,
        UIMessages.CoveragePreferencesExcludes_label, group);
    addField(editor);
    editor.fillIntoGrid(group, 2);
    editor = new StringFieldEditor(UIPreferences.PREF_AGENT_EXCLCLASSLOADER,
        UIMessages.CoveragePreferencesExcludeClassloaders_label, group);
    addField(editor);
    editor.fillIntoGrid(group, 2);
    Label hint = new Label(group, SWT.WRAP);
    GridDataFactory.fillDefaults().span(2, 1).applyTo(hint);
    hint.setText(UIMessages.CoveragePreferencesCoverageRuntime_message);
    adjustGroupLayout(group);
  }
View Full Code Here

  /**
   * Stores all <code>FieldEditor</code> instances.
   */
  private void storeFieldEditors() {
    for (Iterator<FieldEditor> i = this.fieldEditors.iterator(); i.hasNext();) {
      FieldEditor fieldEditor = (FieldEditor) i.next();
      if (fieldEditor != null) {
        fieldEditor.setPreferenceStore(this.store);
        fieldEditor.store();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.preference.FieldEditor

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.