Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.IInputValidator


      fAddButton.addSelectionListener(new SelectionListener() {
        public void widgetDefaultSelected(SelectionEvent e) {
        }

        public void widgetSelected(SelectionEvent e) {
          IInputValidator validator = new IInputValidator() {
            public String isValid(String newText) {
              if (newText.trim().length() > 0 && newText.matches("[_a-zA-Z]*")) //$NON-NLS-1$
                return null;
              return RutaFoldingMessages.RutaFoldingPreferenceBlock_2;
            }
View Full Code Here


          InputDialog dialog = new InputDialog(
              addToGroup.getShell(),
              "Create Group",
              "Name for the newly created Group",
              "",
              new IInputValidator(){
                public String isValid(String newText) {
                  if(newText.equals("")) return "Enter a valid name.";
                  if(activeAccount.xmpp.getRoster().getGroup(newText) != null) return "Group already exists.";
                  if(newText.equalsIgnoreCase("default")) return "Invalid Group Name";
                  return null;
View Full Code Here

  }

  private void joinMUCRoom(String addressid) {
    String name = StringUtils.parseName(addressid);
    if(name.equals("")) {
      InputDialog dialog = new InputDialog(sShell,"Join Room","Enter Name of the room you want to join on service: " + addressid,"",new IInputValidator(){
        public String isValid(String newText) {
          if(newText.equals("") ||
              newText.indexOf('@')>-1)
            return "Enter a valid room name. e.g: myroomname";
          return null;
View Full Code Here

        btnAddPattern.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
            InputDialog dialog = new InputDialog(getShell(),
                Messages.TapestryFacetInstallPage_PatternDialogTitle,
                Messages.TapestryFacetInstallPage_PatternDialogDesc, null,
                new IInputValidator() {
   
                  public String isValid(String newText) {
                    return isValidPattern(newText);
                  }
   
View Full Code Here

     
      public void widgetSelected(SelectionEvent e) {
        InputDialog inputDialog = new InputDialog(getControl()
            .getShell(), "Kind:", "Type new kind here:", "",
            new IInputValidator() {

              public String isValid(String newText) {
                if (newText.trim().length() == 0) {
                  return "Kind may not be empty string";
                }
View Full Code Here

   * Also call {@link MigrationTaskListener#groupsListUpdated(Object)}.
   */
  protected void newGroup() {
    InputDialog dialog = new InputDialog(control.getShell(),
        "New Migration Group", "Select a name for the group", "",
        new IInputValidator() {
          public String isValid(String newText) {
            if (newText.length() <= 0) {
              return "The name must contains at least one character.";
            }
            for (MigrationGroup group : task.getMigrationGroups()) {
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

     * @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 connection
     *      the Connection to rename
     */
    protected void renameConnection( final Connection connection )
    {
        IInputValidator validator = new IInputValidator()
        {
            public String isValid( String newName )
            {
                if ( connection.getName().equals( newName ) )
                    return null;
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.