Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.InputDialog


                    return null;
                }
            }
        };

        InputDialog dialog = new InputDialog(
            getShell(),
            Messages.getString( "RenameAction.RenameConnectionFolder" ), Messages.getString( "RenameAction.NewNameConnectionFolder" ), connectionFolder.getName(), //$NON-NLS-1$ //$NON-NLS-2$
            validator );

        dialog.open();
        String newName = dialog.getValue();
        if ( newName != null )
        {
            connectionFolder.setName( newName );
        }
    }
View Full Code Here


                        }
                    }
                };

                // Opening a dialog to ask the user a new name for the server
                InputDialog dialog = new InputDialog( view.getSite().getShell(),
                    Messages.getString( "RenameAction.RenameServer" ), //$NON-NLS-1$
                    Messages.getString( "RenameAction.NewName" ), //$NON-NLS-1$
                    server.getName(), validator );
                dialog.open();

                String newName = dialog.getValue();
                if ( newName != null )
                {
                    server.setName( newName );
                }
            }
View Full Code Here

    {
        String selectedCipherSuite = getSelectedSslStartTlsCipherSuite();

        if ( selectedCipherSuite != null )
        {
            InputDialog dialog = new InputDialog( editCipherSuiteButton.getShell(),
                Messages.getString( "LdapLdapsServersPage.Edit" ), //$NON-NLS-1$
                Messages.getString( "LdapLdapsServersPage.CipherSuite" ), //$NON-NLS-1$
                selectedCipherSuite, null );

            if ( dialog.open() == InputDialog.OK )
            {
                String newCipherSuite = dialog.getValue();

                getLdapServerBean().getEnabledCipherSuites().remove( selectedCipherSuite );
                getLdapServerBean().addEnabledCipherSuites( newCipherSuite );

                cipherSuitesTableViewer.refresh();
View Full Code Here

                else
                    return null;
            }
        };

        InputDialog dialog = new InputDialog(
            getShell(),
            Messages.getString( "RenameAction.RenameSearchDialog" ), Messages.getString( "RenameAction.RenameSearchNewName" ), search.getName(), validator ); //$NON-NLS-1$ //$NON-NLS-2$

        dialog.open();
        String newName = dialog.getValue();
        if ( newName != null )
        {
            search.setName( newName );
        }
    }
View Full Code Here

                else
                    return null;
            }
        };

        InputDialog dialog = new InputDialog(
            getShell(),
            Messages.getString( "RenameAction.RenameBookmarkDialog" ), Messages.getString( "RenameAction.RenameBookmarkNewName" ), bookmark.getName(), validator ); //$NON-NLS-1$ //$NON-NLS-2$

        dialog.open();
        String newName = dialog.getValue();
        if ( newName != null )
        {
            bookmark.setName( newName );
        }
    }
View Full Code Here

                        }
                    }
                };

                // Opening a dialog to ask the user a new name for the server
                InputDialog dialog = new InputDialog( view.getSite().getShell(),
                    Messages.getString( "RenameAction.RenameServer" ), //$NON-NLS-1$
                    Messages.getString( "RenameAction.NewName" ), //$NON-NLS-1$
                    server.getName(), validator );
                dialog.open();

                String newName = dialog.getValue();
                if ( newName != null )
                {
                    server.setName( newName );
                }
            }
View Full Code Here

  private String getVertexId(String initialValue) {
    IWorkbench workbench = PlatformUI.getWorkbench();
    IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
    Shell shell = window.getShell();

    InputDialog dialog = new InputDialog(shell, "New vertex",
        "Please enter a vertex identifier", initialValue,
        new IInputValidator() {

          @Override
          public String isValid(String vertexId) {
            if (vertexId.isEmpty()) {
              return "";
            }

            if (graph != null) {
              Vertex vertex = graph.findVertex(vertexId);
              if (vertex != null) {
                return "A vertex already exists with the same identifier";
              }
            }

            return null;
          }

        });
    int res = dialog.open();
    if (res == InputDialog.OK) {
      String value = dialog.getValue();
      if (value == null || value.isEmpty()) {
        return null;
      } else {
        return value;
      }
View Full Code Here

    AbstractObject model = getModel();

    String dialogTitle = "New value";
    String dialogMessage = "Please enter a value:";
    String initialValue = "";
    InputDialog dialog = new InputDialog(getShell(), dialogTitle,
        dialogMessage, initialValue, new IInputValidator() {

          @Override
          public String isValid(String newText) {
            return newText.isEmpty() ? "" : null;
          }

        });

    if (dialog.open() == InputDialog.OK) {
      List<Object> oldList = (List<Object>) model.getValue(parameterName);
      List<Object> newList = new ArrayList<Object>(oldList);
      newList.add(dialog.getValue());

      IWorkbenchPart part = getPart();
      if (part instanceof GraphEditor) {
        ParameterChangeValueCommand command = new ParameterChangeValueCommand(
            model, "Add element to list");
View Full Code Here

  private String getVertexId() {
    IWorkbench workbench = PlatformUI.getWorkbench();
    IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
    Shell shell = window.getShell();

    InputDialog dialog = new InputDialog(shell, "New vertex",
        "Please enter a vertex identifier", "", new IInputValidator() {

          @Override
          public String isValid(String vertexId) {
            if (vertexId.isEmpty()) {
              return "";
            }

            if (graph != null) {
              Vertex vertex = graph.findVertex(vertexId);
              if (vertex != null) {
                return "A vertex already exists with the same identifier";
              }
            }

            return null;
          }

        });
    dialog.open();

    String value = dialog.getValue();
    if (value == null || value.isEmpty()) {
      return null;
    } else {
      return value;
    }
View Full Code Here

  private String getPortName(String portName) {
    IWorkbench workbench = PlatformUI.getWorkbench();
    IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
    Shell shell = window.getShell();

    InputDialog dialog = new InputDialog(shell,
        "Connection: " + connection, "Please enter a " + portName
            + " name:", "", null);
    dialog.open();
    String value = dialog.getValue();
    if (value.isEmpty()) {
      return null;
    } else {
      return value;
    }
View Full Code Here

TOP

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

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.