org.eclipse.jface.preference.StringFieldEditor Java Examples

The following examples show how to use org.eclipse.jface.preference.StringFieldEditor. 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: IoPreferencePage.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
private void createIlcdNetworkContents(Composite parent) {
	Group section = new Group(parent, SWT.SHADOW_OUT);
	section.setText(M.ILCDNetworkSettings);
	StringFieldEditor urlEditor = new StringFieldEditor(
			IoPreference.ILCD_URL, M.URL, section);
	addField(urlEditor);
	StringFieldEditor userEditor = new StringFieldEditor(
			IoPreference.ILCD_USER, M.User, section);
	addField(userEditor);
	StringFieldEditor passwordEditor = new StringFieldEditor(
			IoPreference.ILCD_PASSWORD, M.Password, section);
	passwordEditor.getTextControl(section).setEchoChar('*');
	addField(passwordEditor);
	UI.gridLayout(section, 2);
	UI.gridData(section, true, false);
}
 
Example #2
Source File: TextTemplatePreferences.java    From elexis-3-core with Eclipse Public License 1.0 6 votes vote down vote up
@Override
protected void createFieldEditors(){
	Label expl = new Label(getFieldEditorParent(), SWT.WRAP);
	expl.setText(Messages.TextTemplatePreferences_ExplanationLine1
		+ Messages.TextTemplatePreferences_ExplanationLine2
		+ Messages.TextTemplatePreferences_ExplanationLine3);
	expl.setLayoutData(SWTHelper.getFillGridData(2, true, 1, false));
	addField(new StringFieldEditor(SUFFIX_STATION, SUFFIX_FOR_THIS_STATION,
		getFieldEditorParent()));
	/*
	 * IExtensionRegistry exr = Platform.getExtensionRegistry(); IExtensionPoint exp =
	 * exr.getExtensionPoint("ch.elexis.documentTemplates"); if (exp != null) { IExtension[]
	 * extensions = exp.getExtensions(); for (IExtension ex : extensions) {
	 * IConfigurationElement[] elems = ex.getConfigurationElements(); for (IConfigurationElement
	 * el : elems) { String n=el.getAttribute("name"); addField(new StringFieldEditor(BRANCH+n,
	 * n, getFieldEditorParent())); } }
	 * 
	 * }
	 */
}
 
Example #3
Source File: PreferencePage.java    From uima-uimaj with Apache License 2.0 6 votes vote down vote up
@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()));
}
 
Example #4
Source File: EsbPreferencePage.java    From tesb-studio-se with Apache License 2.0 6 votes vote down vote up
@Override
protected void createFieldEditors() {
    StringFieldEditor localRestServiceUri = new StringFieldEditor(Activator.REST_URI_PREFERENCE,
            Messages.EsbPreferencePage_DEFAULT_REST_ENDPOINT_URI, getFieldEditorParent());
    localRestServiceUri.setEmptyStringAllowed(false);
    addField(localRestServiceUri);

    StringFieldEditor defaultServiceNamespace = new StringFieldEditor(Activator.DEFAULT_SL_NAMESPACE_PREF,
            Messages.EsbPreferencePage_SL_NAMESPACE, getFieldEditorParent());
    defaultServiceNamespace.setEmptyStringAllowed(false);
    addField(defaultServiceNamespace);
    
    BooleanFieldEditor ignoreSLStudio = new BooleanFieldEditor(Activator.IGNORE_SL_STUDIO,
            Messages.EsbPreferencePage_IGNORE_SL_STUDIO, getFieldEditorParent());
    addField(ignoreSLStudio);
}
 
Example #5
Source File: HACPreferencePage.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void createFieldEditors() {
	hostname = new StringFieldEditor(HACPreferenceConstants.P_HOSTNAME_URL, PreferencePage.Label.HOSTNAME_URL_INPUT_TEXT,
			getFieldEditorParent());
	username = new StringFieldEditor(HACPreferenceConstants.P_USERNAME, PreferencePage.Label.USERNAME_INPUT_TEXT,
			getFieldEditorParent());
	password = new StringFieldEditor(HACPreferenceConstants.P_PASSWORD, PreferencePage.Label.PASSWORD_INPUT_TEXT,
			getFieldEditorParent()) {
		@Override
		protected void doFillIntoGrid(final Composite parent, final int numColumns) {
			super.doFillIntoGrid(parent, numColumns);
			getTextControl().setEchoChar('*');
		}
	};
	timeout = new IntegerFieldEditor(HACPreferenceConstants.P_TIMEOUT, PreferencePage.Label.TIMEOUT_INPUT_TEXT,
			getFieldEditorParent());

	addField(hostname);
	addField(username);
	addField(password);
	addField(timeout);
}
 
Example #6
Source File: CopyrightPreferencePage.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void createFieldEditors() {
	copyrightContent = new MultiLineStringFieldEditor(CopyrightPreferenceConstants.COPYRIGHT_CONTENT,
			LABELS.COPYRIGHT_CONTENTS, getFieldEditorParent());
	firstLine = new StringFieldEditor(CopyrightPreferenceConstants.COPYRIGHT_FIRST_LINE,
			LABELS.COPYRIGHT_FIRST_LINE, FIELD_WIDTH, getFieldEditorParent());
	linePrefix = new StringFieldEditor(CopyrightPreferenceConstants.COPYRIGHT_LINE_PREFIX,
			LABELS.COPYRIGHT_LINE_PREFIX, FIELD_WIDTH, getFieldEditorParent());
	lastLine = new StringFieldEditor(CopyrightPreferenceConstants.COPYRIGHT_LAST_LINE, LABELS.COPYRIGHT_LAST_LINE,
			FIELD_WIDTH, getFieldEditorParent());
	addField(copyrightContent);
	addField(firstLine);
	addField(linePrefix);
	addField(lastLine);
}
 
Example #7
Source File: MoosePreferencePage.java    From ice with Eclipse Public License 1.0 6 votes vote down vote up
@Override
protected void createFieldEditors() {
	addField(new DirectoryFieldEditor("PATH", "&Directory preference:",
			getFieldEditorParent()));
	addField(new BooleanFieldEditor("BOOLEAN_VALUE",
			"&An example of a boolean preference", getFieldEditorParent()));

	addField(new RadioGroupFieldEditor("CHOICE",
			"An example of a multiple-choice preference", 1,
			new String[][] { { "&Choice 1", "choice1" },
					{ "C&hoice 2", "choice2" } }, getFieldEditorParent()));
	addField(new StringFieldEditor("MySTRING1", "A &text preference:",
			getFieldEditorParent()));
	addField(new StringFieldEditor("MySTRING2", "A &text preference:",
			getFieldEditorParent()));
}
 
Example #8
Source File: SpecPropertyPage.java    From tlaplus with MIT License 6 votes vote down vote up
public void createFieldEditors(Composite composite) {
	// TODO change root file
	rootFileEditor = new StringFieldEditor(
			IPreferenceConstants.P_PROJECT_ROOT_FILE,
			"Specification root module", composite);
	addEditor(rootFileEditor);
	rootFileEditor.getTextControl(composite).setEditable(false);

	StringFieldEditor pcalParamEditor = new StringFieldEditor(
			IPreferenceConstants.PCAL_CAL_PARAMS, "PlusCal call arguments",
			composite);
	addEditor(pcalParamEditor);

	directorySizeEditor = new StringFieldEditor(
			"DoesNotExistIsIrrelevant",
			"Size of .toolbox directory in kbytes", composite);
	addEditor(directorySizeEditor);
	directorySizeEditor.getTextControl(composite).setEditable(false);

	libraryPathComposite = new LibraryPathComposite(this);

}
 
Example #9
Source File: CommentBlocksPreferences.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createFieldEditors() {
    final Composite p = getFieldEditorParent();
    multiBlock = new StringFieldEditor(MULTI_BLOCK_COMMENT_CHAR, "Multi-block char (ctrl+4):", 2, p);
    multiBlock.getTextControl(p).setTextLimit(1);
    multiBlock.setEmptyStringAllowed(false);
    addField(multiBlock);

    addField(new BooleanFieldEditor(MULTI_BLOCK_COMMENT_SHOW_ONLY_CLASS_NAME,
            "In a class name, create block only with class name above of class?", p));
    addField(new BooleanFieldEditor(MULTI_BLOCK_COMMENT_SHOW_ONLY_FUNCTION_NAME,
            "In a function name, create block only with function name above of function?", p));

    labelMulti = new Label(p, SWT.NONE);

    singleBlock = new StringFieldEditor(SINGLE_BLOCK_COMMENT_CHAR, "Single-block char (ctrl+shift+4):", 2, p);
    singleBlock.setEmptyStringAllowed(false);
    singleBlock.getTextControl(p).setTextLimit(1);
    addField(singleBlock);

    alignSingle = new BooleanFieldEditor(SINGLE_BLOCK_COMMENT_ALIGN_RIGHT,
            "Align text in single-block to the right?", p);
    addField(alignSingle);
    labelSingle = new Label(p, SWT.NONE);

    IPreferenceStore store = getPreferenceStore();
    setLabelFont(p, labelSingle);
    setLabelFont(p, labelMulti);

    updateMulti(store.getString(MULTI_BLOCK_COMMENT_CHAR));
    updateSingle(store.getString(SINGLE_BLOCK_COMMENT_CHAR), store.getBoolean(SINGLE_BLOCK_COMMENT_ALIGN_RIGHT));
}
 
Example #10
Source File: AnalysisPreferencesPage.java    From depan with Apache License 2.0 5 votes vote down vote up
@Override
protected void createFieldEditors() {
  Composite parent = getFieldEditorParent();

  FileFieldEditor executable = new FileFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_EXECUTABLE,
      "Maven Executable", 
      true, parent);
  executable.setEmptyStringAllowed(false);

  BooleanFieldEditor systemjava = new BooleanFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_SYSTEMJAVA,
      "Use System JAVA_HOME",
      BooleanFieldEditor.SEPARATE_LABEL, parent);

  final DirectoryFieldEditor javahome = new DirectoryFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_JAVAHOME,
      "JAVA_HOME", parent);

  StringFieldEditor effectivepom = new StringFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_EFFECTIVEPOM,
      "Maven Effective POM command", parent);
  effectivepom.setEmptyStringAllowed(false);

  addField(executable);
  addField(systemjava);
  addField(javahome);
  addField(effectivepom);
}
 
Example #11
Source File: PreferencesPage.java    From JReFrameworker with MIT License 5 votes vote down vote up
@Override
protected void createFieldEditors() {
	StringFieldEditor mergeRenamingPrefixStringField = new StringFieldEditor(JReFrameworkerPreferences.MERGE_RENAMING_PREFIX, "&" + MERGE_RENAME_PREFIX_DESCRIPTION, getFieldEditorParent());
	// class files do not have a defined max length, see http://stackoverflow.com/a/695959/475329
	// but if long prefixes becomes a problem use the setTextLimit(int) method to limit input length
	mergeRenamingPrefixStringField.setEmptyStringAllowed(false);
	String mergeRenamingPrefix = JReFrameworkerPreferences.getMergeRenamingPrefix();
	if(mergeRenamingPrefix == null || mergeRenamingPrefix.equals("")){
		mergeRenamingPrefixStringField.setStringValue(JReFrameworkerPreferences.MERGE_RENAMING_PREFIX_DEFAULT);
	}
	addField(mergeRenamingPrefixStringField);
	addField(new BooleanFieldEditor(JReFrameworkerPreferences.VERBOSE_LOGGING, "&" + VERBOSE_LOGGING_DESCRIPTION, getFieldEditorParent()));
}
 
Example #12
Source File: StringPluginPreferenceTest.java    From jenerate with Eclipse Public License 1.0 5 votes vote down vote up
@Test
public void testCreateFieldEditor() {
    Display.getDefault().asyncExec(new Runnable() {
        @Override
        public void run() {
            assertEquals(new StringFieldEditor(KEY, DESCRIPTION, parent),
                    pluginPreference.createFieldEditor(parent));
        }
    });
}
 
Example #13
Source File: RenamingPreferencePage.java    From MergeProcessor with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void createFieldEditors() {
	final StringFieldEditor urlField = new StringFieldEditor(RENAME_DATABASE_URL,
			Messages.RenamingPreferencePage_databaseUrl, getFieldEditorParent());
	textUrl = urlField.getTextControl(getFieldEditorParent());
	addField(urlField);

	final StringFieldEditor userField = new StringFieldEditor(RENAME_DATABASE_USER,
			Messages.RenamingPreferencePage_databaseUserId, getFieldEditorParent());
	addField(userField);
	textUser = userField.getTextControl(getFieldEditorParent());

	final StringFieldEditor passwordField = new StringFieldEditor(RENAME_DATABASE_PASSWORD,
			Messages.RenamingPreferencePage_databasePassword, getFieldEditorParent());
	passwordField.getTextControl(getFieldEditorParent()).setEchoChar('*');
	textPassword = passwordField.getTextControl(getFieldEditorParent());
	addField(passwordField);

	final Button buttonCheckDbConnection = new Button(getFieldEditorParent(), SWT.NONE);
	GridDataFactory.swtDefaults().span(2, 1).align(SWT.RIGHT, SWT.CENTER).applyTo(buttonCheckDbConnection);
	buttonCheckDbConnection.setText(Messages.RenamingPreferencePage_buttonValidateConnection);
	buttonCheckDbConnection.addListener(SWT.Selection, e -> checkDbConnection());

	labelRenameDatabaseCopy = new Label(getFieldEditorParent(), SWT.NONE);
	labelRenameDatabaseCopy.setText("H2 Database is copied to");

	linkRenameDatabaseCopy = new Link(getFieldEditorParent(), SWT.NONE);
	linkRenameDatabaseCopy.setText("<a>C:\\dev\\mp\\rename2.mv.db</a>");
	linkRenameDatabaseCopy.addListener(SWT.Selection, e -> openDirectoryForLocalH2DatabaseCopy());

	showRenameCopyIfRequired();
}
 
Example #14
Source File: SamplePage.java    From e4Preferences with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createFieldEditors()
{
	
	addField(new ComboFieldEditor("prefCombo", "A combo field", new String[][]{{"display1", "value1"},{"display2", "value2"}}, getFieldEditorParent()));

	addField(new ColorFieldEditor("prefColor", "Color for table items : ", getFieldEditorParent()));
	addField(new BooleanFieldEditor("prefBoolean", "A boolean : ", getFieldEditorParent()));
	addField(new StringFieldEditor("prefString", "A string : ", getFieldEditorParent()));
}
 
Example #15
Source File: SamplePageWithProvider.java    From e4Preferences with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createFieldEditors()
{
	
	addField(new ComboFieldEditor("prefCombo", "A combo field", new String[][]{{"display1", "value1"},{"display2", "value2"}}, getFieldEditorParent()));

	addField(new ColorFieldEditor("prefColor", "Color for table items : ", getFieldEditorParent()));
	addField(new BooleanFieldEditor("prefBoolean", "A boolean : ", getFieldEditorParent()));
	addField(new StringFieldEditor("prefString", "A string : ", getFieldEditorParent()));
}
 
Example #16
Source File: FileTypesPreferencesPage.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createFieldEditors() {
    final Composite p = getFieldEditorParent();

    addField(new LabelFieldEditorWith2Cols("Label_Info_File_Preferences1", WrapAndCaseUtils.wrap(
            "These setting are used to know which files should be considered valid internally, and are "
                    + "not used in the file association of those files to the pydev editor.\n\n",
            80), p) {
        @Override
        public String getLabelTextCol1() {
            return "Note:\n\n";
        }
    });

    addField(new LabelFieldEditorWith2Cols(
            "Label_Info_File_Preferences2",
            WrapAndCaseUtils
                    .wrap("After changing those settings, a manual reconfiguration of the interpreter and a manual rebuild "
                            + "of the projects may be needed to update the inner caches that may be affected by those changes.\n\n",
                            80),
            p) {
        @Override
        public String getLabelTextCol1() {
            return "Important:\n\n";
        }
    });

    addField(new StringFieldEditor(FileTypesPreferences.VALID_SOURCE_FILES, "Valid source files (comma-separated):",
            StringFieldEditor.UNLIMITED, p));
    addField(
            new StringFieldEditor(FileTypesPreferences.FIRST_CHOICE_PYTHON_SOURCE_FILE, "Default python extension:",
                    StringFieldEditor.UNLIMITED, p));
}
 
Example #17
Source File: IronpythonInterpreterPreferencesPage.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createFieldEditors() {
    super.createFieldEditors();
    addField(new StringFieldEditor(IInterpreterManager.IRONPYTHON_INTERNAL_SHELL_VM_ARGS,
            "Vm arguments for IronPython", getFieldEditorParent()) {
        @Override
        protected void adjustForNumColumns(int numColumns) {
            GridData gd = (GridData) getTextControl().getLayoutData();
            gd.horizontalSpan = numColumns; //We want it in a separate line!
            gd.grabExcessHorizontalSpace = true;

        }
    });
}
 
Example #18
Source File: CommonEditorPreferencePage.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Create the Content Assist group and options if there are any for this language/editor.
 * 
 * @param parent
 */
protected Composite createContentAssistOptions(Composite parent)
{
	IPreferenceStore s = getChainedEditorPreferenceStore();

	Label label = new Label(parent, SWT.NONE);
	label.setText(Messages.CommonEditorPreferencePage_OnTypingCharacters);
	label.setLayoutData(GridDataFactory.fillDefaults().span(2, 1).create());

	if (s.contains(com.aptana.editor.common.contentassist.IPreferenceConstants.COMPLETION_PROPOSAL_ACTIVATION_CHARACTERS))
	{
		addField(new StringFieldEditor(
				com.aptana.editor.common.contentassist.IPreferenceConstants.COMPLETION_PROPOSAL_ACTIVATION_CHARACTERS,
				Messages.CommonEditorPreferencePage_DisplayProposals, parent));
	}

	if (s.contains(com.aptana.editor.common.contentassist.IPreferenceConstants.CONTEXT_INFORMATION_ACTIVATION_CHARACTERS))
	{
		addField(new StringFieldEditor(
				com.aptana.editor.common.contentassist.IPreferenceConstants.CONTEXT_INFORMATION_ACTIVATION_CHARACTERS,
				Messages.CommonEditorPreferencePage_DisplayContextualInfo, parent));
	}

	if (s.contains(com.aptana.editor.common.contentassist.IPreferenceConstants.PROPOSAL_TRIGGER_CHARACTERS))
	{
		addField(new StringFieldEditor(
				com.aptana.editor.common.contentassist.IPreferenceConstants.PROPOSAL_TRIGGER_CHARACTERS,
				Messages.CommonEditorPreferencePage_InsertProposal, parent));
	}

	return parent;
}
 
Example #19
Source File: CommunicationPreferencePage.java    From saros with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void createFieldEditors() {
  chatGroup = new Group(getFieldEditorParent(), SWT.NONE);
  chatGroup.setText("Settings for Chat");
  chatGroup.setLayout(new GridLayout(2, false));

  GridData chatGridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
  chatGridData.horizontalSpan = 2;

  chatGroup.setLayoutData(chatGridData);

  useIRCStyleChatLayout =
      new BooleanFieldEditor(
          EclipsePreferenceConstants.USE_IRC_STYLE_CHAT_LAYOUT,
          "Use IRC style for chats",
          chatGroup);

  Composite chatServerGroup = new Composite(chatGroup, SWT.NONE);
  chatServerGroup.setLayout(new GridLayout(2, false));
  chatServerGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

  chatserver =
      new StringFieldEditor(
          EclipsePreferenceConstants.CUSTOM_MUC_SERVICE, "Custom chatserver: ", chatServerGroup);

  useCustomChatServer =
      new BooleanFieldEditor(
          EclipsePreferenceConstants.FORCE_CUSTOM_MUC_SERVICE,
          "Always use custom chatserver",
          chatGroup);

  skypeName =
      new StringFieldEditor(
          PreferenceConstants.SKYPE_USERNAME, "Skype name:", getFieldEditorParent());

  addField(useIRCStyleChatLayout);
  addField(chatserver);
  addField(useCustomChatServer);
  addField(skypeName);
}
 
Example #20
Source File: WikiPreferences.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createFieldEditors(){
	addField(new StringFieldEditor(Constants.CFG_BASE_URL, "Basis-URL", getFieldEditorParent()));
	addField(new StringFieldEditor(Constants.CFG_START_PAGE, "Start-Seite",
		getFieldEditorParent()));
	addField(new StringFieldEditor(Constants.CFG_HANDBOOK, "Handbuch", getFieldEditorParent()));
}
 
Example #21
Source File: UserTextPref.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createFieldEditors(){
	for (int i = 0; i < fields.length; i++) {
		addField(new StringFieldEditor(fields[i], texte[i], getFieldEditorParent()));
	}
	Set<String> makroNames = makros.keySet();
	for (String name : makroNames) {
		addField(new BooleanFieldEditor(EnhancedTextField.MACRO_ENABLED + "/"
			+ makros.get(name), name, getFieldEditorParent()));
	}
}
 
Example #22
Source File: UserCasePreferences.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createFieldEditors(){
	addField(new StringFieldEditor(Preferences.USR_DEFCASELABEL,
		Messages.UserCasePreferences_DefaultName, getFieldEditorParent()));
	addField(new StringFieldEditor(Preferences.USR_DEFCASEREASON,
		Messages.UserCasePreferences_DefaultReason, getFieldEditorParent()));
	addField(new StringFieldEditor(Preferences.USR_DEFLAW,
		Messages.UserCasePreferences_DefaultBillingSystem, getFieldEditorParent()));
}
 
Example #23
Source File: ExplorerPreferencePage.java    From eclipse-explorer with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 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 StringFieldEditor(PreferenceConstants.EXPLORER_CMD,
            Messages.ExplorerPreferencePage_cmd, getFieldEditorParent()));
            
    addField(new MyStringFieldEditor(PreferenceConstants.EXPLORER_TIP,
            Messages.ExplorerPreferencePage_tip, getFieldEditorParent()));
}
 
Example #24
Source File: EclipseWorkspaceStartPeferencePage.java    From MergeProcessor with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void createFieldEditors() {
	addField(new FileFieldEditor(ECLIPSE_APPLICATION_PATH,
			Messages.EclipseWorkspaceStartPeferencePage_applicationPath, getFieldEditorParent()));
	final StringFieldEditor parameters = new StringFieldEditor(ECLIPSE_APPLICATION_PARAMETERS,
			Messages.EclipseWorkspaceStartPeferencePage_parameters, 44, getFieldEditorParent());
	addField(parameters);
}
 
Example #25
Source File: ImportPreferencePage.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 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 ()
{
    final IntegerFieldEditor fieldEditor = new IntegerFieldEditor ( PreferenceConstants.P_DEFAULT_CHUNK_SIZE, "&Default chunk size:", getFieldEditorParent () );
    fieldEditor.setEmptyStringAllowed ( false );
    fieldEditor.setValidRange ( 1, Integer.MAX_VALUE );
    fieldEditor.setValidateStrategy ( StringFieldEditor.VALIDATE_ON_KEY_STROKE );

    addField ( fieldEditor );
}
 
Example #26
Source File: SolidityCompilerPreferencePage.java    From solidity-ide with Eclipse Public License 1.0 5 votes vote down vote up
protected void createCompilerSettings(Composite parent) {
	Composite composite = createGroupComposite(parent, "Solc compiler");
	compilerPathFieldEditor = new FileFieldEditor(COMPILER_PATH, "Path to solc", composite);
	addField(compilerPathFieldEditor);
	addField(new BooleanFieldEditor(COMPILER_ENABLED, "Enable solidity compiler", composite));
	addField(new BooleanFieldEditor(COMPILER_OUTPUT_BIN, "Enable solidity bin output", composite));
	addField(new BooleanFieldEditor(COMPILER_OUTPUT_ASM, "Enable solidity asm output", composite));
	addField(new BooleanFieldEditor(COMPILER_OUTPUT_ABI, "Enable solidity abi output", composite));
	addField(new StringFieldEditor(COMPILER_OUTPUT_PATH, "Compiler output path", composite));
}
 
Example #27
Source File: LogViewerPreferences.java    From LogViewer with Eclipse Public License 2.0 5 votes vote down vote up
private void createFilterExtensions(Composite composite) {
	filterExtensionsEditor = new StringFieldEditor(ILogViewerConstants.PREF_FILTER_EXTENSIONS,LogViewerPlugin.getResourceString("preferences.contenteditor.filterextensions.label.text"),composite); //$NON-NLS-1$
	filterExtensionsEditor.setPreferenceStore(doGetPreferenceStore());
	filterExtensionsEditor.setPage(this);
	filterExtensionsEditor.setTextLimit(128);
	//filterExtensionsEditor.setErrorMessage(LogViewerPlugin.getResourceString("preferences.readwait.label.errortext",new Object[]{new Integer(ILogViewerConstants.MAX_READWAIT_SIZE)})); //$NON-NLS-1$
	//filterExtensionsEditor.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
	//filterExtensionsEditor.setValidRange(0,ILogViewerConstants.MAX_READWAIT_SIZE);
	filterExtensionsEditor.load();
	//filterExtensionsEditor.setPropertyChangeListener(validityChangeListener);
}
 
Example #28
Source File: TLA2TeXPreferencePage.java    From tlaplus with MIT License 5 votes vote down vote up
protected void createFieldEditors() {
	if (Platform.getOS().equals(Platform.OS_MACOSX)) {
		addField(new BooleanFieldEditor(
				ITLA2TeXPreferenceConstants.HAVE_OS_OPEN_PDF,
				"Have your OS open PDFs", getFieldEditorParent()));
	} else {
		addField(new BooleanFieldEditor(
				ITLA2TeXPreferenceConstants.EMBEDDED_VIEWER,
				"&Use built-in PDF viewer", getFieldEditorParent()));
	}
	
	// Preference to regenerate PDF upon spec save?
	addField(new BooleanFieldEditor(
			ITLA2TeXPreferenceConstants.AUTO_REGENERATE, "&Regenerate pretty-printed PDF on spec save (takes effect once spec re-opened).",
			getFieldEditorParent()));

	addField(new BooleanFieldEditor(
			ITLA2TeXPreferenceConstants.SHADE_COMMENTS, "&Shade comments",
			getFieldEditorParent()));
       addField(new BooleanFieldEditor(
               ITLA2TeXPreferenceConstants.NO_PCAL_SHADE, "&Do not shade PlusCal code",
               getFieldEditorParent()));
	addField(new BooleanFieldEditor(
			ITLA2TeXPreferenceConstants.NUMBER_LINES, "&Number lines",
			getFieldEditorParent()));
	addField(new StringFieldEditor(
			ITLA2TeXPreferenceConstants.DOT_COMMAND,
			"&Specify dot command", getFieldEditorParent()));
	addField(new StringFieldEditor(
			ITLA2TeXPreferenceConstants.LATEX_COMMAND,
			"&Specify pdflatex command", getFieldEditorParent()));
	addField(new DoubleFieldEditor(ITLA2TeXPreferenceConstants.GRAY_LEVEL,
			"&Specify gray level (between 0.0 and 1.0)",
			getFieldEditorParent(), 0, 1));
}
 
Example #29
Source File: LogViewerPreferences.java    From LogViewer with Eclipse Public License 2.0 5 votes vote down vote up
private void createReadWaitField(Composite composite) {
	readWaitEditor = new IntegerFieldEditor(ILogViewerConstants.PREF_READWAIT,LogViewerPlugin.getResourceString("preferences.readwait.label.text"),composite); //$NON-NLS-1$
	readWaitEditor.setPreferenceStore(doGetPreferenceStore());
	readWaitEditor.setPage(this);
	readWaitEditor.setTextLimit(Integer.toString(ILogViewerConstants.MAX_READWAIT_SIZE).length());
	readWaitEditor.setErrorMessage(LogViewerPlugin.getResourceString("preferences.readwait.label.errortext",new Object[]{new Integer(ILogViewerConstants.MAX_READWAIT_SIZE)})); //$NON-NLS-1$
	readWaitEditor.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
	readWaitEditor.setValidRange(0,ILogViewerConstants.MAX_READWAIT_SIZE);
	readWaitEditor.load();
	readWaitEditor.setPropertyChangeListener(validityChangeListener);
}
 
Example #30
Source File: LogViewerPreferences.java    From LogViewer with Eclipse Public License 2.0 5 votes vote down vote up
private void createReadBufferField(Composite composite) {
	bufferEditor = new IntegerFieldEditor(ILogViewerConstants.PREF_BUFFER,LogViewerPlugin.getResourceString("preferences.buffer.label.text"),composite); //$NON-NLS-1$
	bufferEditor.setPreferenceStore(doGetPreferenceStore());
	bufferEditor.setPage(this);
	bufferEditor.setTextLimit(Integer.toString(ILogViewerConstants.MAX_TAIL_BUFFER_SIZE).length());
	bufferEditor.setErrorMessage(LogViewerPlugin.getResourceString("preferences.buffer.label.errortext",new Object[]{new Integer(ILogViewerConstants.MAX_TAIL_BUFFER_SIZE)})); //$NON-NLS-1$
	bufferEditor.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
	bufferEditor.setValidRange(0,ILogViewerConstants.MAX_TAIL_BUFFER_SIZE);
	bufferEditor.load();
	bufferEditor.setPropertyChangeListener(validityChangeListener);
}