private void createBooleanFieldEditor( Composite parent, String label, String preferenceName ) { FieldEditor editor = new BooleanFieldEditor( preferenceName, label, parent ); addField( editor ); } }
private Group createSearchSettings(final Composite parent) { final Group group = new Group(parent, SWT.NONE); group.setText("Search"); group.setLayout(new GridLayout(1, false)); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Composite composite = new Composite(group, SWT.NONE); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); addField(new BooleanFieldEditor(SEARCH_CASE_SENSITIVE, LABEL_CASE_SENSITIVE, composite)); addField(new BooleanFieldEditor(SEARCH_CAMEL_CASE, LABEL_CAMEL_CASE, composite)); addField(new BooleanFieldEditor(SEARCH_WORD_PREFIX, LABEL_WORD_PREFIX, composite)); addField(new BooleanFieldEditor(SEARCH_REGEXP, LABEL_REGEXP, composite)); return group; }
@Override protected void createFieldEditors() { // should the editor use the last selected type system to open the cas? showParentTypes = new BooleanFieldEditor(CasEditorViewsPreferenceConstants.SHOW_PARENT_TYPES, "Display parent types", getFieldEditorParent()); addField(showParentTypes); }
@Override protected void createFieldEditors() { addField(new BooleanFieldEditor( UIPreferences.SYNC_VIEW_FETCH_BEFORE_LAUNCH, UIText.GitPreferenceRoot_fetchBeforeSynchronization, getFieldEditorParent())); addField(new BooleanFieldEditor( UIPreferences.SYNC_VIEW_ALWAYS_SHOW_CHANGESET_MODEL, UIText.GitPreferenceRoot_automaticallyEnableChangesetModel, getFieldEditorParent())); } }
/** Creates the field editors. Field editors are abstractions of the common GUI blocks needed to manipulate various types of preferences. Each field editor knows how to save and restore itself. */ @Override public void createFieldEditors () { this.defaultZoomingEditor = new BooleanFieldEditor ( PreferenceConstants.P_DEFAULT_ZOOMING, Messages.PreferencePage_activateZooming, getFieldEditorParent () ); addField ( this.defaultZoomingEditor ); }
@Override protected void createFieldEditors() { // should the editor use the last selected type system to open the cas? mEditorRememberTypesystem = new BooleanFieldEditor(CasEditorIdePreferenceConstants.CAS_EDITOR_REMEMBER_TYPESYSTEM, "Use the previously selected type system to open a CAS", getFieldEditorParent()); addField(mEditorRememberTypesystem); }
/** * */ private BooleanFieldEditor addBoolField(String id, String label) { BooleanFieldEditor field = new BooleanFieldEditor(id, label, getFieldEditorParent()); addField(field); return field; }
/** Creates the field editors. Field editors are abstractions of the common GUI blocks needed to manipulate various types of preferences. Each field editor knows how to save and restore itself. */ @Override public void createFieldEditors () { this.defaultZoomingEditor = new BooleanFieldEditor ( PreferenceConstants.P_DEFAULT_ZOOMING, Messages.PreferencePage_activateZooming, getFieldEditorParent () ); addField ( this.defaultZoomingEditor ); }
public void createFieldEditors() { parent = getFieldEditorParent(); addField(new BooleanFieldEditor(MavenPreferenceConstants.P_DEFAULT_POM_EDITOR_PAGE, Messages.pomEditorDefaultPage, parent)); addField(new BooleanFieldEditor(MavenPreferenceConstants.P_WARN_INCOMPLETE_MAPPING, Messages.MavenPreferencePage_warnIncompleteMapping, getFieldEditorParent())); } }
@Override protected void createFieldEditors() { builderResolve = new BooleanFieldEditor(RutaCorePreferences.BUILDER_RESOLVE_IMPORTS, RutaPreferencesMessages.BuilderResolveImports, getFieldEditorParent()); addField(builderResolve); builderImport = new BooleanFieldEditor(RutaCorePreferences.BUILDER_IMPORT_BY_NAME, RutaPreferencesMessages.BuilderImportByName, getFieldEditorParent()); addField(builderImport); builderShortNames = new BooleanFieldEditor( RutaCorePreferences.BUILDER_IGNORE_DUPLICATE_SHORTNAMES, RutaPreferencesMessages.BuilderIgnoreDuplicateShortnames, getFieldEditorParent()); addField(builderShortNames); compressWordLists = new BooleanFieldEditor( RutaCorePreferences.COMPRESS_WORDLISTS, RutaPreferencesMessages.CompressWordLists, getFieldEditorParent()); addField(compressWordLists); }
@Override protected Control createDialogArea(Composite parent) { Composite top = (Composite) super.createDialogArea(parent); Composite editArea = new Composite(top, SWT.NONE); editArea.setLayout(new GridLayout()); editArea.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL)); verboseEditor = new BooleanFieldEditor("verbose", ProgressMessages.JobsViewPreferenceDialog_Note, editArea);//$NON-NLS-1$ verboseEditor.setPreferenceName(IWorkbenchPreferenceConstants.SHOW_SYSTEM_JOBS); verboseEditor.setPreferenceStore(PrefUtil.getAPIPreferenceStore()); verboseEditor.load(); Dialog.applyDialogFont(top); return top; }
@Override protected void createFieldEditors() { addField(new BooleanFieldEditor(GitCorePreferences.core_autoShareProjects, UIText.ProjectsPreferencePage_AutoShareProjects, getFieldEditorParent())); addField(new BooleanFieldEditor(UIPreferences.CHECKOUT_PROJECT_RESTORE, UIText.ProjectsPreferencePage_RestoreBranchProjects, getFieldEditorParent()) { public IPreferenceStore getPreferenceStore() { return org.eclipse.egit.ui.Activator.getDefault() .getPreferenceStore(); } }); addField(new BooleanFieldEditor( GitCorePreferences.core_autoIgnoreDerivedResources, UIText.ProjectsPreferencePage_AutoIgnoreDerivedResources, getFieldEditorParent())); } }
@Override protected void createFieldEditors() { super.createFieldEditors(); Composite parent = getFieldEditorParent(); Group refactoringGroup = new Group(parent, SWT.SHADOW_IN); refactoringGroup.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); refactoringGroup.setText("Refactoring"); GridLayout layout = new GridLayout(1, false); refactoringGroup.setLayout(layout); Composite composite = new Composite(refactoringGroup, SWT.NONE); addField(new BooleanFieldEditor(RefactoringPreferences.SAVE_ALL_BEFORE_REFACTORING, "Save all modified resources automatically prior to refactoring", composite)); addField(new BooleanFieldEditor(RefactoringPreferences.USE_INLINE_REFACTORING, "Rename in editor without dialog if possible", composite)); refactoringGroup.pack(); } }
@Override protected void createFieldEditors() { String[][] flowStyles = {{"Block", "BLOCK"}, {"Flow", "FLOW"} }; addField(new ComboFieldEditor(PreferenceConstants.FORMATTER_FLOW_STYLE, "Flow style", flowStyles, getFieldEditorParent())); addField(new BooleanFieldEditor(PreferenceConstants.FORMATTER_PRETTY_FLOW, "Pretty print in when in Flow style", BooleanFieldEditor.SEPARATE_LABEL, getFieldEditorParent())); String[][] scalarStyles = {{"Plain", "PLAIN"},{"Single quoted", "SINGLE_QUOTED"},{"Double quoted", "DOUBLE_QUOTED"} }; addField(new ComboFieldEditor(PreferenceConstants.FORMATTER_SCALAR_STYLE, "Scalar style", scalarStyles, getFieldEditorParent())); addField(new BooleanFieldEditor(PreferenceConstants.FORMATTER_EXPLICIT_START, "Explicit document start", BooleanFieldEditor.SEPARATE_LABEL, getFieldEditorParent())); addField(new BooleanFieldEditor(PreferenceConstants.FORMATTER_EXPLICIT_END, "Explicit document end", BooleanFieldEditor.SEPARATE_LABEL, getFieldEditorParent())); addField(new IntegerFieldEditor(PreferenceConstants.FORMATTER_LINE_WIDTH, "The line width to use", getFieldEditorParent(), 4)); }
@Override public void createFieldEditors() { addField(new BooleanFieldEditor(P_JCAS, "&Automatically run JCasGen when Types change", getFieldEditorParent())); addField(new BooleanFieldEditor(P_JCAS_LIMIT_TO_PROJECT_SCOPE, "&Limit JCasGen to types defined in this project", getFieldEditorParent())); addField(new BooleanFieldEditor(P_SHOW_FULLY_QUALIFIED_NAMES, "&Show fully qualified names", getFieldEditorParent())); addField(new IntegerFieldEditor(P_XML_TAB_SPACES, "&XML indentation", getFieldEditorParent())); addField(new StringFieldEditor(P_VNS_HOST, "&Vinci Name Service Host IP address", getFieldEditorParent())); addField(new StringFieldEditor(P_VNS_PORT, "Vinci NameService &Port number", getFieldEditorParent())); }
@Override protected void createFieldEditors() { BooleanFieldEditor autoTestEditor = new BooleanFieldEditor(AUTO_TEST, "Continuously Test", getFieldEditorParent()); addField(autoTestEditor); addField(createParallelizationEditor()); addField(createSlowTestWarningCutoffEditor()); }
/** * Creates the field editors. Field editors are abstractions of * the common GUI blocks needed to manipulate various types * of preferences. Each field editor knows how to save and * restore itself. */ public void createFieldEditors() { addField(new IntegerFieldEditor(PreferenceConstants.SPACES_PER_TAB, "Spaces per tab (Re-open editor to take effect.)", getFieldEditorParent(), 2 ) ); addField(new IntegerFieldEditor(PreferenceConstants.SECONDS_TO_REEVALUATE, "Seconds between syntax reevaluation", getFieldEditorParent(), 3 ) ); addField(new IntegerFieldEditor(PreferenceConstants.OUTLINE_SCALAR_MAX_LENGTH, "Maximum display length of scalar", getFieldEditorParent(), 4 ) ); addField(new BooleanFieldEditor(PreferenceConstants.OUTLINE_SHOW_TAGS, "Show tags in outline view", getFieldEditorParent() ) ); addField(new BooleanFieldEditor(PreferenceConstants.SYMFONY_COMPATIBILITY_MODE, "Symfony compatibility mode", getFieldEditorParent() ) ); addField(new BooleanFieldEditor(PreferenceConstants.AUTO_EXPAND_OUTLINE, "Expand outline on open", getFieldEditorParent() ) ); String[][] validationValues = new String[][] { {"Error", PreferenceConstants.SYNTAX_VALIDATION_ERROR}, {"Warning", PreferenceConstants.SYNTAX_VALIDATION_WARNING}, {"Ignore", PreferenceConstants.SYNTAX_VALIDATION_IGNORE} }; addField(new ComboFieldEditor(PreferenceConstants.VALIDATION, "Syntax validation severity", validationValues, getFieldEditorParent())); }
@Override protected void createFieldEditors() { // editor line length hint mEditorLineLengthHint = new IntegerFieldEditor( AnnotationEditorPreferenceConstants.EDITOR_LINE_LENGTH_HINT, "Line Length Hint", getFieldEditorParent()); addField(mEditorLineLengthHint); // editor text size mEditorTextSize = new IntegerFieldEditor( AnnotationEditorPreferenceConstants.ANNOTATION_EDITOR_TEXT_SIZE, "Editor Text Size", getFieldEditorParent()); addField(mEditorTextSize); // load CAS with partial type system mEditorPartialTypeystem = new BooleanFieldEditor( AnnotationEditorPreferenceConstants.ANNOTATION_EDITOR_PARTIAL_TYPESYSTEM, "Load CAS leniently (WARNING: only for experienced users)", getFieldEditorParent()); addField(mEditorPartialTypeystem); }
protected void createFieldEditors() { addField(new IntegerFieldEditor("launchCount", "Number of times it has been launched", getFieldEditorParent())); IntegerFieldEditor offset = new IntegerFieldEditor("offset", "Current offset from GMT", getFieldEditorParent()); offset.setValidRange(-14, +12); addField(offset); String[][] data = ZoneId.getAvailableZoneIds()// .stream().sorted().map(s -> new String[] { s, s }) // .collect(Collectors.toList()).toArray(new String[][] {}); addField(new ComboFieldEditor("favorite", "Favorite time zone", data, getFieldEditorParent())); addField(new BooleanFieldEditor("tick", "Boolean value", getFieldEditorParent())); addField(new ColorFieldEditor("colour", "Favourite colour", getFieldEditorParent())); addField(new ScaleFieldEditor("scale", "Scale", getFieldEditorParent(), 0, 360, 10, 90)); addField(new FileFieldEditor("file", "Pick a file", getFieldEditorParent())); addField(new DirectoryFieldEditor("dir", "Pick a directory", getFieldEditorParent())); addField(new PathEditor("path", "Path", "Directory", getFieldEditorParent())); addField(new RadioGroupFieldEditor("group", "Radio choices", 3, data, getFieldEditorParent(), true)); }
@Override protected void createFieldEditors() { String[][] values = new String[][] { {"Workspace", Prefs.CheckScope.Workspace.name()}, {"Current file", Prefs.CheckScope.File.name()}, {"Current project", Prefs.CheckScope.Project.name()}, {"Disabled", Prefs.CheckScope.Disabled.name()} }; addField(new ComboFieldEditor(Prefs.PROP_CHECK_SCOPE, "Check scope", values , getFieldEditorParent())); addField(new BooleanFieldEditor(Prefs.PROP_ADD_JAVAAGENT, "Add -javaagent:jmockit.jar when running JUnit", getFieldEditorParent())); }