Package org.eclipse.ui.dialogs

Examples of org.eclipse.ui.dialogs.ListSelectionDialog.open()


        ArrayContentProvider.getInstance(),
        new WorkbenchLabelProvider(),
        "message");
    dialog.setTitle("title");
    dialog.setHelpAvailable(false);
    if (dialog.open() != Window.OK) return;
    for (Object each: dialog.getResult()) fProjectListDialogField.addElement(each);
  }

  @SuppressWarnings("unchecked")
  private Collection getNotYetRequiredProjects() {
View Full Code Here


        },
        new LabelProvider(),
        "Select suppier plans from list");
        supplierDialog.setInitialSelections(supplierPlans.toArray());
        supplierDialog.setTitle("Supplier Plans");
        int act = supplierDialog.open();
        switch (act){
        case Dialog.OK:
          /*
           * 1. clear the existing suppliers,
           * 2. write the selected ones
View Full Code Here

              dlg.setInitialSelections(modelsToSave.toArray());
              dlg.setTitle(SAVE_RESOURCES_TITLE);
 
              // this "if" statement aids in testing.
              if (SaveableHelper.testGetAutomatedResponse()==SaveableHelper.USER_RESPONSE) {
                int result = dlg.open();
                  //Just return false to prevent the operation continuing
                  if (result == IDialogConstants.CANCEL_ID) {
            return false;
          }
 
View Full Code Here

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    ICsvService service = new CsvService();
    ListSelectionDialog dlg = new ListSelectionDialog(Display.getCurrent().getActiveShell(), service.getTableHeaders(event), new CsvContentProvider(), new LabelProvider(), "Select the columns to delete.");
    dlg.setTitle("Delete columns");
        if (dlg.open() == Window.OK) {
          service.deleteColumn(dlg.getResult(), event);
        }
    return null;
  }
}
View Full Code Here

    };
    iProjects = this.getIProjects();
    ListSelectionDialog listSelectionDialog = new ListSelectionDialog(new Shell(), "WOLips", structuredContentProvider, labelProvider, "Select the projects to install.");
    listSelectionDialog.setInitialSelections(iProjects);
    listSelectionDialog.open();
    if (listSelectionDialog.getReturnCode() == Window.CANCEL) {
      return;
    }
    Object[] selectionResult = listSelectionDialog.getResult();
    IProject[] projectsSelected = new IProject[selectionResult.length];
View Full Code Here

        List<String> tableNames = reverseEngineer.reverseEngineerTableNames();

        ListSelectionDialog dlg = new ListSelectionDialog(getWindow().getShell(), tableNames, new StringContentProvider(), new StringLabelProvider(), "Select the tables to reverse engineer:");
        dlg.setInitialSelections(tableNames.toArray());
        dlg.setTitle("Reverse Engineer");
        if (dlg.open() == Window.OK) {
          Object[] selectedTableNameObjs = dlg.getResult();
          String[] selectedTableNames = new String[selectedTableNameObjs.length];
          System.arraycopy(selectedTableNameObjs, 0, selectedTableNames, 0, selectedTableNameObjs.length);
          List<String> selectedTableNamesList = Arrays.asList(selectedTableNames);
          File reverseEngineeredEOModelFolder = reverseEngineer.reverseEngineerWithTableNamesIntoModel(selectedTableNamesList);
View Full Code Here

              return null;
            }
          },
          "Select an UML model"
          );
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        if (result[0] instanceof UmlResource) {
          umlResource = (UmlResource) result[0];
          umlModelPathText.setText(umlResource.getLocation());
View Full Code Here

              return null;
            }
          },
          "Select an UML model"
          );
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        if (result[0] instanceof UmlResource) {
          umlResource = (UmlResource) result[0];
          umlModelPathText.setText(umlResource.getLocation());
View Full Code Here

        }
      };
     
      ListSelectionDialog dialog =
        new ListSelectionDialog(getShell(), modelDec, contentProvider, labelProvider, "Select an Activity Diagram");
      if (dialog.open() == ListSelectionDialog.OK) {
        Object[] result = dialog.getResult();
        if (result.length == 1) {
          if (result[0] instanceof Activity) {
            activity = (Activity) result[0];
            activityQualifiedNameText.setText(activity.getQualifiedName());
View Full Code Here

          labelProvider,
          UIText.DecoratorPreferencesPage_selectVariablesToAdd);
      dialog.setHelpAvailable(false);
      dialog
      .setTitle(UIText.DecoratorPreferencesPage_addVariablesTitle);
      if (dialog.open() != Window.OK)
        return;

      Object[] result = dialog.getResult();

      for (int i = 0; i < result.length; i++) {
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.