Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.InputDialog


                else
                    return null;
            }
        };

        InputDialog dialog = new InputDialog( getShell(), "Rename Connection", "New name:", connection.getName(),
            validator );

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


                else
                    return null;
            }
        };

        InputDialog dialog = new InputDialog( getShell(), "Rename Search", "New name:", search.getName(), validator );

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

                else
                    return null;
            }
        };

        InputDialog dialog = new InputDialog( getShell(), "Rename Bookmark", "New name:", bookmark.getName(), validator );

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

  public static String askString(String dialogTitle, String dialogMessage,
      String initialValue, IInputValidator validator) {
   
    String ret = null;
    Shell shell = getShell();
    InputDialog inputDialog = new InputDialog(
        shell, dialogTitle, dialogMessage, initialValue, validator);
    int retDialog = inputDialog.open();
    if (retDialog == Window.OK) {
      ret = inputDialog.getValue();
    }
    return ret;
  }
View Full Code Here

    for (Path p : paths) {
      // Generate AMPL Data for each Path
      String data = Path2AMPLData.transform(p);
      ampl.loadData(data);
      if (solver == null) {
        InputDialog d = new InputDialog(null, "W�hlen sie den Solver",
            "Welchen Solver m�chten sie verwenden", "couenne", null);
        d.create();
        d.open();
        solver = d.getValue();
        ampl.setSolver(solver);
      }
      // Solve the Model and Data to get Input data
      SolveResult solved;
      try {
View Full Code Here

    // Transform Model to AMPL
    String amplModel = ActTCG2AMPLModel.transform(tcgActivity);

    // create PathData
    InputDialog dialogPathDepth = new InputDialog(null,
        "Geben sie die Maximale Pfadtiefe an",
        "Geben sie die Maximale Pfadtiefe an", "100", null);
    dialogPathDepth.create();
    dialogPathDepth.open();
    InputDialog dialogNoPaths = new InputDialog(null,
        "Geben sie die Maximale Pfadanzahl an",
        "Geben sie die Maximale Pfadanzahl an", "40", null);
    dialogNoPaths.create();
    dialogNoPaths.open();
    PathSearch search = PathSearch.BOUNDED_BFS;
    properties.setProperty(PathSearch.PROPERTY_MAX_PATHLENGTH, dialogPathDepth.getValue());
    properties.setProperty(PathSearch.PROPERTY_MAX_NO_PATHS, dialogNoPaths.getValue());
    search.setProperties( properties );
    EList<Path> paths = search.findAllPaths(tcgActivity);
    int pathnum = 0;
    for (Path p : paths) {
      String data = Path2AMPLData.transform(p);
View Full Code Here

    String initialName = "newStyleName";
    if (property.getValue() instanceof String) {
      initialName = (String) property.getValue();
    }
    // ask for style name
    InputDialog inputDialog =
        new InputDialog(DesignerPlugin.getShell(),
            "New style name",
            "Enter new style name (without leading '.'):",
            initialName,
            null);
    if (inputDialog.open() == Window.CANCEL) {
      return;
    }
    String newStyleName = inputDialog.getValue();
    // actually add style
    {
      RuleAccessor ruleAccessor = RuleAccessor.get(objectInfo);
      List<ContextDescription> contexts = ruleAccessor.getContexts();
      ContextDescription context = getTargetContextDescription(contexts, newStyleName);
View Full Code Here

  @Override
  protected void toPropertyEx(Property property, CCombo3 combo, int index) throws Exception {
    if (index == m_formatMethods.size()) {
      // custom item selected
      InputDialog inputDialog =
          new InputDialog(combo.getShell(),
              "Date&time format",
              "Enter date & time format pattern",
              getPattern(property),
              null);
      if (inputDialog.open() == Window.OK) {
        String pattern = inputDialog.getValue();
        Object value =
            ReflectionUtils.invokeMethod(m_formatClass, "getFormat(java.lang.String)", pattern);
        setPropertyExpression((GenericProperty) property, "getFormat(\"" + pattern + "\")", value);
      }
    } else {
View Full Code Here

    String fileName = source.getName();
    // generate unique name
    String uniqueName = getUniqueFileName( containerPath, fileName, fileExtension);

    // TODO migrate this to a wizard
    InputDialog dialog = new InputDialog(
        PlatformUI.getWorkbench().getDisplay().getActiveShell(),
        "Enter in destination model file",
        "Please enter in the destination model file",
        uniqueName,
        null  // InputValidator
      );
    dialog.setBlockOnOpen(true);
    dialog.open();
   
    String destination = dialog.getValue();
    if (destination == null) {
      // cancelled
      return null;
    }
   
View Full Code Here

                    return null;
                }
            }
        };

        InputDialog dialog = new InputDialog(
            getShell(),
            Messages.getString( "RenameAction.RenameConnection" ), Messages.getString( "RenameAction.NewNameConnection" ), connection.getName(), //$NON-NLS-1$ //$NON-NLS-2$
            validator );

        dialog.open();
        String newName = dialog.getValue();
        if ( newName != null )
        {
            connection.setName( newName );
        }
    }
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.