Examples of IInputValidator


Examples of org.eclipse.jface.dialogs.IInputValidator

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

Examples of org.eclipse.jface.dialogs.IInputValidator

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

Examples of org.eclipse.jface.dialogs.IInputValidator

  protected void buttonAddSelected() {
    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;
          }
View Full Code Here

Examples of org.eclipse.jface.dialogs.IInputValidator

   */
  public Object[] create(ICreateContext context) {
    // ask user for EClass name
    String doubleVal = Utility.askString(
        TITLE, USER_QUESTION, "0.0",
        new IInputValidator() {
          public String isValid(String input) {
            try {
              if (input != null) {
                Double.parseDouble(input);
              } else {
View Full Code Here

Examples of org.eclipse.jface.dialogs.IInputValidator

   */
  public Object[] create(ICreateContext context) {
    // ask user for EClass name
    String intVal = Utility.askString(
        TITLE, USER_QUESTION, "0",
        new IInputValidator() {
          public String isValid(String input) {
            try {
              if (input != null) {
                new BigInteger(input);
              } else {
View Full Code Here

Examples of org.eclipse.jface.dialogs.IInputValidator

        InputDialog d = new InputDialog(
            Display.getDefault().getActiveShell(),
            "Update your Twitterjjjj Status",
            "What are you doing?",
            "",
            new IInputValidator(){             
              public String isValid(String arg0) {
                if(arg0!=null&&!arg0.isEmpty())return null;
                return "";
              }
            }
View Full Code Here

Examples of org.eclipse.jface.dialogs.IInputValidator

        InputDialog dialog = new InputDialog(
            _workbench.getActiveWorkbenchWindow().getShell(),
            HTMLPlugin.getResourceString("HTMLEditorPreferencePage.Dialog.Title"),
            HTMLPlugin.getResourceString("HTMLEditorPreferencePage.Dialog.Message"),
            "",
            new IInputValidator(){
              public String isValid(String newText) {
                return newText.length()==0 ?
                    HTMLPlugin.getResourceString("HTMLEditorPreferencePage.Dialog.Error") : null;
              }
        });
View Full Code Here

Examples of org.eclipse.jface.dialogs.IInputValidator

    private void activateReplaceMode() {
        InputDialog inputDialog = new InputDialog(
                getViewSite().getShell(),
                "Replace Match by ...",
                "Enter a value which should be used to replace every instance of a found match:",
                regex.getReplace(), new IInputValidator() {

                    public String isValid(String newText) {
                        // TODO Auto-generated method stub
                        return null;
                    }
View Full Code Here

Examples of org.eclipse.jface.dialogs.IInputValidator

            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS,
            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS_INCLUDE);
    fIncludePatterns = new ListBlock(blockFolding,
            RutaPreferenceConstants.EDITOR_FOLDING_INCLUDE_LIST);

    IInputValidator val = new IInputValidator() {

      public String isValid(String number) {
        if (number.length() == 0) {
          return PreferencesMessages.DLTKEditorPreferencePage_empty_input;
        } else {
View Full Code Here

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
TOP
Copyright © 2018 www.massapi.com. 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.