Package org.eclipse.jface.preference

Examples of org.eclipse.jface.preference.StringFieldEditor


    public void createFieldEditors() {
        Composite parent = getFieldEditorParent();
       
        addField(new BooleanFieldEditor(P_USE_TEMP_DIR, "Use temp dir", parent));
       
        addField(new StringFieldEditor(P_API_URL, "API URL:", parent));
       
        addField(new StringFieldEditor(P_USERNAME, "Username:", parent));
       
        StringFieldEditor passwordFieldEditor = new StringFieldEditor(P_PASSWORD, "Password:", parent);
        passwordFieldEditor.getTextControl(parent).setEchoChar('*');
        addField(passwordFieldEditor);
       
        FileFieldEditor templateEditor = new FileFieldEditor(P_TEMPLATE, "Template File:", true, parent);
        templateEditor.setFilterPath(File.listRoots()[0]);
        addField(templateEditor);
       
        addField(new StringFieldEditor(P_CSS_URL_1, "CSS URL 1:", parent));
        addField(new StringFieldEditor(P_CSS_URL_2, "CSS URL 2:", parent));
        addField(new StringFieldEditor(P_CSS_URL_3, "CSS URL 3:", parent));
       
        addField(new StringFieldEditor(P_JS_URL_1, "JS URL 1:", parent));
        addField(new StringFieldEditor(P_JS_URL_2, "JS URL 2:", parent));
        addField(new StringFieldEditor(P_JS_URL_3, "JS URL 3:", parent));
       
        addField(new BooleanFieldEditor(P_USE_ECLIPSE_CONSOLE, "Use Eclipse Console", parent));
       
        addField(new StringFieldEditor(P_MARKDOWN_EXTENSIONS, "Markdown Extensions", parent));
    }
View Full Code Here


  }

  //mg
  private void addCommandField( final String name, final String label ) {
    final StringFieldEditor comp = new StringFieldEditor( name, label,
        getFieldEditorParent() );
    addField( comp );

    final Button button = new Button( getFieldEditorParent(), SWT.NONE );
    button.addSelectionListener( new SelectionAdapter() {

      public void widgetSelected( final SelectionEvent e ) {
        final StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(
            PlatformUI.getWorkbench().getActiveWorkbenchWindow()
            .getShell() );
        dialog.open();
        final String var = dialog.getVariableExpression();
        comp.getTextControl( getFieldEditorParent() ).insert( var );
      }
    } );
    button.setText( "Variables..." );
    GridData data = new GridData();
    data.horizontalSpan = 2;
View Full Code Here

  abstract protected void createFieldEditors();

  protected void addStringField(String name, String label)
  {
    addField(new StringFieldEditor(name, label, getFieldEditorParent()));
  }
View Full Code Here

    gridLayout.marginHeight = 10;
    gridLayout.marginWidth = 10;
    groupExist.setLayout(gridLayout);
        groupExist.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
        groupExist.setText(Messages.getString("preference.group.login.info")); //$NON-NLS-1$
        final StringFieldEditor userField = new StringFieldEditor(PreferenceConstants.P_USERNAME, Messages.getString("preference.existuser"), groupExist); //$NON-NLS-1$
      
        final StringFieldEditor passwordFieldEditor = new StringFieldEditor(PreferenceConstants.P_PASSWORD, Messages.getString("preference.existpassword"), groupExist); //$NON-NLS-1$
        Text text = passwordFieldEditor.getTextControl(groupExist);
        text.setEchoChar('*');
        addField(userField);
        addField(passwordFieldEditor);
       
        final Button login = new Button(groupExist, SWT.PUSH);
        login.setText(Messages.getString("preference.button.login")); //$NON-NLS-1$
       
        final Label expDatL = new Label(groupExist, SWT.NONE);
        expDatL.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
       
        new Label(groupExist, SWT.NONE);//spacer
       
        final Label serverInfoL = new Label(groupExist, SWT.NONE);
        serverInfoL.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
        Display.getDefault().asyncExec(new Runnable() {
      public void run() {
        setLoginInfo(expDatL, serverInfoL,  userField.getStringValue(), passwordFieldEditor.getStringValue());
      }
    });
        login.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                final String u = userField.getStringValue();
                final String p = passwordFieldEditor.getStringValue();
                setLoginInfo(expDatL, serverInfoL, u, p);
            }
        });
       
        Group option = new Group(parent, SWT.SHADOW_NONE);
View Full Code Here

    addField(_useSystemFieldEditor);
   
    _parentForProxy = new Group(root, SWT.NONE);
    _parentForProxy.setText(Messages.getString("preference.proxy.usewoj"));//$NON-NLS-1$
       
    addField(new StringFieldEditor(PreferenceConstants.P_PROXY_HOST, Messages.getString("preference.proxy.host"), _parentForProxy)); //$NON-NLS-1$
        addField(new StringFieldEditor(PreferenceConstants.P_PROXY_PORT, Messages.getString("preference.proxy.port"), _parentForProxy)); //$NON-NLS-1$
        Label sep1 = new Label(_parentForProxy, SWT.SEPARATOR | SWT.HORIZONTAL);
        sep1.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false, 3, 1));
       
        Label title = new Label(_parentForProxy, SWT.NONE);
        title.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false, 3, 1));
        title.setText(Messages.getString("preference.proxy.credential")); //$NON-NLS-1$
        addField(new StringFieldEditor(PreferenceConstants.P_PROXY_USER, Messages.getString("preference.proxy.user"), _parentForProxy)); //$NON-NLS-1$
        StringFieldEditor passField = new StringFieldEditor(PreferenceConstants.P_PROXY_PASS, Messages.getString("preference.proxy.password"), _parentForProxy); //$NON-NLS-1$
        passField.getTextControl(_parentForProxy).setEchoChar('*');
    addField(passField);
   
    Label sep2 = new Label(_parentForProxy, SWT.SEPARATOR | SWT.HORIZONTAL);
    sep2.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false, 3, 1));
        Label title2 = new Label(_parentForProxy, SWT.NONE);
        title2.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false, 3, 1));
        title2.setText(Messages.getString("preference.proxy.window.label")); //$NON-NLS-1$
        addField(new StringFieldEditor(PreferenceConstants.P_PROXY_DOMAIN, Messages.getString("preference.proxy.domain"), _parentForProxy)); //$NON-NLS-1$


        addField(new StringFieldEditor(PreferenceConstants.P_PROXY_CLIENT_HOST_NAME, Messages.getString("preference.proxy.clienthostname"), _parentForProxy)); //$NON-NLS-1$
        //spacer
        Label title3 = new Label(_parentForProxy, SWT.WRAP);
        title3.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false, 3, 1));
        title3.setText(Messages.getString("preference.proxy.clienthost.label")); //$NON-NLS-1$
        //spacer
View Full Code Here

    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

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

  @Override
  protected void createFieldEditors() {
    addField(new BooleanFieldEditor(PreferenceConstants.WOMODELER_SERVER_ENABLED, "Server Enabled", getFieldEditorParent()));
    addField(new IntegerFieldEditor(PreferenceConstants.WOMODELER_SERVER_PORT, "Server Port", getFieldEditorParent(), 5));
    addField(new StringFieldEditor(PreferenceConstants.WOMODELER_SERVER_PASSWORD, "Server Password (required)", getFieldEditorParent()));
  }
View Full Code Here

  public void createFieldEditors() {
    int widthInChars = 50;
   
    // MS: WOLips Properties is set in a different preferences store, so we want to hijack this one field editor to use the primary preferences store
    _wolipsPropertiesFieldEditor = new StringFieldEditor(Preferences.PREF_WOLIPS_PROPERTIES_FILE, "WOLips Properties File", widthInChars, StringFieldEditor.VALIDATE_ON_FOCUS_LOST, getFieldEditorParent()) {
      @Override
      public void setPreferenceStore(IPreferenceStore store) {
        super.setPreferenceStore(store == null ? null : Preferences.getPreferenceStore());
      }
     
View Full Code Here

    addField(new BooleanFieldEditor(PreferenceConstants.CHANGE_PERSPECTIVES_KEY, Messages.getString("Preferences.ChangePerspectivesLabel"), getFieldEditorParent()));
    addField(new BooleanFieldEditor(PreferenceConstants.OPEN_IN_WINDOW_KEY, Messages.getString("Preferences.OpenInWindowLabel"), getFieldEditorParent()));
    addField(new BooleanFieldEditor(PreferenceConstants.USED_FOR_LOCKING_DEFAULT_KEY, Messages.getString("Preferences.DefaultUsedForLockingLabel"), getFieldEditorParent()));
    addField(new BooleanFieldEditor(PreferenceConstants.ALLOWS_NULL_DEFAULT_KEY, Messages.getString("Preferences.DefaultAllowsNullLabel"), getFieldEditorParent()));

    addField(new StringFieldEditor(TableUtils.getPreferenceNameForTableNamed(EOEntity.class.getName()), "Entity Columns", getFieldEditorParent()));
    addField(new StringFieldEditor(TableUtils.getPreferenceNameForTableNamed(EOAttribute.class.getName()), "Attribute Columns", getFieldEditorParent()));
    addField(new StringFieldEditor(TableUtils.getPreferenceNameForTableNamed(EORelationship.class.getName()), "Relationship Columns", getFieldEditorParent()));
    addField(new StringFieldEditor(TableUtils.getPreferenceNameForTableNamed(EOArgument.class.getName()), "Argument Columns", getFieldEditorParent()));
  }
View Full Code Here

TOP

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

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.