Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.IInputValidator


   * @param errorOnEmptyName
   * @return input validator for refNames
   */
  public static IInputValidator getRefNameInputValidator(
      final Repository repo, final String refPrefix, final boolean errorOnEmptyName) {
    return new IInputValidator() {
      public String isValid(String newText) {
        if (newText.length() == 0) {
          if (errorOnEmptyName)
            return UIText.ValidationUtils_PleaseEnterNameMessage;
          else
View Full Code Here


    }
  }

  protected boolean ConditionDialog(PHPConditionalBreakpoint breakpoint,
      String condition) throws CoreException {
    IInputValidator validator = new IInputValidator() {
      public String isValid(String value) {
        return value;
      }
    };
View Full Code Here

    enablePref = createCheckboxPref(composite, numColumns,
        FormatterMessages.OffOnTagsTabPage_enableOffOnTags);
    enablePref.setIsChecked(codeFormatterPreferences.use_tags);

    IInputValidator inputValidator = new IInputValidator() {
      /*
       * @see
       * org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialogTabPage
       * .StringPreference.Validator#isValid(java.lang.String)
       *
 
View Full Code Here

  private final class NameEndExtensionDialog extends InputDialog {

    private NameEndExtensionDialog(Shell parentShell) {
      super(parentShell, "Please specify file name and format", "Please specify file name:", "clipboardimage.tif",
          new IInputValidator() {
            public String isValid(String newText) {
              return null;
            }
          });
    }
View Full Code Here

     * @param connection
     *      the Connection to rename
     */
    protected void renameConnection( final IConnection connection )
    {
        IInputValidator validator = new IInputValidator()
        {
            public String isValid( String newName )
            {
                if ( connection.getName().equals( newName ) )
                    return null;
View Full Code Here

     * @param search
     *      the Search to rename
     */
    protected void renameSearch( final ISearch search )
    {
        IInputValidator validator = new IInputValidator()
        {
            public String isValid( String newName )
            {
                if ( search.getName().equals( newName ) )
                    return null;
View Full Code Here

     * @param bookmark
     *      the Bookmark to rename
     */
    protected void renameBookmark( final IBookmark bookmark )
    {
        IInputValidator validator = new IInputValidator()
        {
            public String isValid( String newName )
            {
                if ( bookmark.getName().equals( newName ) )
                    return null;
View Full Code Here

    }

    protected void promptForModuleSelection() {
      InputDialog askKeywordDialog = new InputDialog(
        getShell(), getLocalString("_UI_Keyword_Search_title"), getLocalString("_UI_Keyword_Search_message"),
        null, new IInputValidator() {
          @Override
          public String isValid(String newText) {
            newText = trimToNull(newText);
            if(newText != null) {
              if(newText.length() > 30)
View Full Code Here

  /**
   * Modifies a column width.
   */
  private void modifyWidth() {
    int index = viewColumnTable.getSelectionIndex();
    IInputValidator validator = new IInputValidator() {
      public String isValid(String newText) {
        try {
          Integer.parseInt(newText);
          return null;
        }
View Full Code Here

  private InputDialog openDialog(String existingItemName, String shortMessageKey,
      String longMessageKey) {
    FieldItem fieldItem = this.fieldItemIdFieldItemMap.get(this.itemCombo.getText());
    if (fieldItem != null) {
      final List<String> itemList = fieldItem.getEntryNameList();
      IInputValidator validator = new IInputValidator() {
        public String isValid(String newText) {
          if (!itemList.contains(ReviewI18n.getKey(newText))) {
            return null;
          }
          else {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.dialogs.IInputValidator

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.