org.eclipse.jface.preference.FieldEditorPreferencePage Java Examples

The following examples show how to use org.eclipse.jface.preference.FieldEditorPreferencePage. 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: ControlPreferencePage.java    From tracecompass with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Constructor
 */
public ControlPreferencePage() {
    super(FieldEditorPreferencePage.GRID);

    // Set the preference store for the preference page.
    IPreferenceStore store = Activator.getDefault().getCorePreferenceStore();
    setPreferenceStore(store);
}
 
Example #2
Source File: TmfTracingPreferencePage.java    From tracecompass with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Preferences
 */
public TmfTracingPreferencePage() {
    super(FieldEditorPreferencePage.GRID);

    // Set the preference store for the preference page.
    IPreferenceStore store = Activator.getDefault().getPreferenceStore();
    setPreferenceStore(store);
}
 
Example #3
Source File: PerspectivesPreferencePage.java    From tracecompass with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Constructor
 */
public PerspectivesPreferencePage() {
    super(FieldEditorPreferencePage.GRID);

    // Set the preference store for the preference page.
    IPreferenceStore store = Activator.getDefault().getPreferenceStore();
    setPreferenceStore(store);
}
 
Example #4
Source File: ControlPreferencePage.java    From tracecompass with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Constructor
 */
public ControlPreferencePage() {
    super(FieldEditorPreferencePage.GRID);

    // Set the preference store for the preference page.
    IPreferenceStore store = ControlPreferences.getInstance().getPreferenceStore();
    setPreferenceStore(store);
}
 
Example #5
Source File: SwaggerValidationPreferences.java    From KaiZen-OpenAPI-Editor with Eclipse Public License 1.0 5 votes vote down vote up
public SwaggerValidationPreferences() {
    // GRID is needed because we are not attaching the editor fields directly to
    // FieldEditorParent, but to its child
    super(FieldEditorPreferencePage.GRID);
    setPreferenceStore(Activator.getDefault().getPreferenceStore());
    setDescription("Swagger preferences for validation:");
}
 
Example #6
Source File: BaseStylePreferencePage.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * The constructor.
 * 
 * @param style
 */
protected BaseStylePreferencePage( Object model )
{
	super( FieldEditorPreferencePage.GRID );
	setTitle( Messages.getString( "BaseStylePreferencePage.displayname.Title" ) ); //$NON-NLS-1$

	// Set the preference store for the preference page.
	IPreferenceStore store = new StylePreferenceStore( model );
	setPreferenceStore( store );
}
 
Example #7
Source File: AdvancedPreferencePage.java    From saros with GNU General Public License v2.0 5 votes vote down vote up
public AdvancedPreferencePage() {
  super(FieldEditorPreferencePage.GRID);

  SarosPluginContext.initComponent(this);

  setPreferenceStore(saros.getPreferenceStore());
  setDescription(Messages.AdvancedPreferencePage_description);
}
 
Example #8
Source File: Config.java    From pmTrans with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void showConfigurationDialog(Shell parent) throws PmTransException {
	// Create the preference manager
	PreferenceManager mgr = new PreferenceManager();

	// Create the nodes
	PreferenceNode playbackNode = new PreferenceNode("playbackPreferences");
	PreferencePage playbackPage = new FieldEditorPreferencePage() {
		@Override
		protected void createFieldEditors() {
			addField(new IntegerFieldEditor(SHORT_REWIND,
					"Short rewind duration (in sec)",
					getFieldEditorParent()));
			addField(new IntegerFieldEditor(LONG_REWIND,
					"Long rewind duration (in sec)", getFieldEditorParent()));
			addField(new IntegerFieldEditor(REWIND_AND_PLAY,
					"Rewind-and-resume duartion duration (in sec)",
					getFieldEditorParent()));
			addField(new IntegerFieldEditor(LOOP_FRECUENCY,
					"Loops frecuency (in seconds)", getFieldEditorParent()));
			addField(new IntegerFieldEditor(LOOP_LENGHT,
					"Loop rewind lenght (in seconds)",
					getFieldEditorParent()));
		}
	};
	playbackPage.setTitle("Playback preferences");
	playbackNode.setPage(playbackPage);

	PreferenceNode shortcutsNode = new PreferenceNode(
			"shortcutsPreferences");
	PreferencePage shortcutsPage = new FieldEditorPreferencePage() {
		@Override
		protected void createFieldEditors() {
			addField(new ShortcutFieldEditor(SHORT_REWIND_KEY,
					"Short rewind", getFieldEditorParent()));
			addField(new ShortcutFieldEditor(LONG_REWIND_KEY,
					"Long rewind", getFieldEditorParent()));
			addField(new ShortcutFieldEditor(PAUSE_KEY, "Pause and resume",
					getFieldEditorParent()));
			addField(new ShortcutFieldEditor(AUDIO_LOOPS_KEY,
					"Enable audio loops", getFieldEditorParent()));
			addField(new ShortcutFieldEditor(SLOW_DOWN_KEY,
					"Slow down audio playback", getFieldEditorParent()));
			addField(new ShortcutFieldEditor(SPEED_UP_KEY,
					"Speed up audio playback", getFieldEditorParent()));
			addField(new ShortcutFieldEditor(TIMESTAMP_KEY,
					"Insert timestamp", getFieldEditorParent()));
		}
	};
	shortcutsPage.setTitle("Shortcuts preferences");
	shortcutsNode.setPage(shortcutsPage);

	PreferenceNode generalNode = new PreferenceNode("generalPreferences");
	PreferencePage generalPage = new FieldEditorPreferencePage() {
		@Override
		protected void createFieldEditors() {
			addField(new IntegerFieldEditor(AUDIO_FILE_CACHE_LENGHT,
					"Max size of the \"recent audio files\" list",
					getFieldEditorParent()));
			addField(new IntegerFieldEditor(TEXT_FILE_CACHE_LENGHT,
					"Max size of the \"recent text files\" list",
					getFieldEditorParent()));
			// TODO add a separator here
			addField(new BooleanFieldEditor(AUTO_SAVE, "Auto save",
					getFieldEditorParent()));
			addField(new IntegerFieldEditor(AUTO_SAVE_TIME,
					"Auto save frecuency (in minutes)",
					getFieldEditorParent()));
		}
	};
	generalPage.setTitle("General preferences");
	generalNode.setPage(generalPage);

	mgr.addToRoot(playbackNode);
	mgr.addToRoot(shortcutsNode);
	mgr.addToRoot(generalNode);
	PreferenceDialog dlg = new PreferenceDialog(parent, mgr);
	dlg.setPreferenceStore(this);

	if (dlg.open() == PreferenceDialog.OK)
		try {
			save();
		} catch (IOException e) {
			throw new PmTransException("Unable to save preferences", e);
		}
}
 
Example #9
Source File: JUnitStatusBarPreferencePage.java    From eclipse-extras with Eclipse Public License 1.0 4 votes vote down vote up
public JUnitStatusBarPreferencePage() {
  super( "JUnit Status Bar", FieldEditorPreferencePage.GRID );
  noDefaultAndApplyButton();
}
 
Example #10
Source File: OpenApi3ValidationPreferences.java    From KaiZen-OpenAPI-Editor with Eclipse Public License 1.0 4 votes vote down vote up
public OpenApi3ValidationPreferences() {
    super(FieldEditorPreferencePage.GRID);
    setPreferenceStore(Activator.getDefault().getPreferenceStore());
    setDescription("OpenAPI preferences for validation:");
}
 
Example #11
Source File: JenerateBasePreferencePage.java    From jenerate with Eclipse Public License 1.0 4 votes vote down vote up
public JenerateBasePreferencePage() {
    super(FieldEditorPreferencePage.GRID);
    setPreferenceStore(JeneratePlugin.getDefault().getPreferenceStore());
}
 
Example #12
Source File: NodePreferencePage.java    From APICloud-Studio with GNU General Public License v3.0 4 votes vote down vote up
public NodePreferencePage()
{
	// This will align the field-editors in a nice way.
	super(FieldEditorPreferencePage.GRID);
}
 
Example #13
Source File: CommunicationPreferencePage.java    From saros with GNU General Public License v2.0 4 votes vote down vote up
public CommunicationPreferencePage() {
  super(FieldEditorPreferencePage.GRID);
  SarosPluginContext.initComponent(this);
  setPreferenceStore(prefs);
}
 
Example #14
Source File: GeneralPreferencePage.java    From saros with GNU General Public License v2.0 4 votes vote down vote up
public GeneralPreferencePage() {
  super(FieldEditorPreferencePage.GRID);
  SarosPluginContext.initComponent(this);
  setPreferenceStore(saros.getPreferenceStore());
}
 
Example #15
Source File: FeatureFlagPage.java    From olca-app with Mozilla Public License 2.0 4 votes vote down vote up
public FeatureFlagPage() {
	super(FieldEditorPreferencePage.GRID);
	setDescription("Warning: Experimental features are less tested"
			+ " and may be removed in future versions of openLCA.");
}