Package org.eclipse.ui.dialogs

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


        JavaElementLabelProvider.SHOW_DEFAULT));
    dialog.setTitle(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_TITLE);
    dialog.setMessage(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_DESC);
    dialog.setEmptyListMessage(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_MSG_NONE);
    dialog.setElements(packages);
    if (dialog.open() == Window.OK) {
      IPackageFragment fragment = (IPackageFragment) dialog.getFirstResult();
      if (fragment != null) {
        packageText.setText(fragment.getElementName());
      } else {
        packageText.setText(J2EEUIMessages.EMPTY_STRING);
View Full Code Here


        JavaElementLabelProvider.SHOW_DEFAULT));
    dialog.setTitle(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_TITLE);
    dialog.setMessage(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_DESC);
    dialog.setEmptyListMessage(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_MSG_NONE);
    dialog.setElements(packages);
    if (dialog.open() == Window.OK) {
      IPackageFragment fragment = (IPackageFragment) dialog.getFirstResult();
      if (fragment != null) {
        packageText.setText(fragment.getElementName());
      } else {
        packageText.setText(J2EEUIMessages.EMPTY_STRING);
View Full Code Here

    ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider(1));
    dialog.setTitle(WizardConstants.PACKAGE_SELECTION_DIALOG_TITLE);
    dialog.setMessage(WizardConstants.PACKAGE_SELECTION_DIALOG_DESC);
    dialog.setEmptyListMessage(WizardConstants.PACKAGE_SELECTION_DIALOG_MSG_NONE);
    dialog.setElements(packages);
    if (dialog.open() == Window.OK) {
      IPackageFragment fragment = (IPackageFragment) dialog.getFirstResult();
      if (fragment != null) {
        packageText.setText(fragment.getElementName());
      } else {
        packageText.setText("EMPTY_STRING");
View Full Code Here

    ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider(1));
    dialog.setTitle(WizardConstants.PACKAGE_SELECTION_DIALOG_TITLE);
    dialog.setMessage(WizardConstants.PACKAGE_SELECTION_DIALOG_DESC);
    dialog.setEmptyListMessage(WizardConstants.PACKAGE_SELECTION_DIALOG_MSG_NONE);
    dialog.setElements(packages);
    if (dialog.open() == Window.OK) {
      IPackageFragment fragment = (IPackageFragment) dialog.getFirstResult();
      if (fragment != null) {
        packageText.setText(fragment.getElementName());
      } else {
        packageText.setText("EMPTY_STRING");
View Full Code Here

    ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
    dialog.setElements(configList.toArray());
    dialog.setTitle(getTypeSelectionTitle());
    dialog.setMessage(LauncherMessages.VdmLaunchShortcut_2);
    dialog.setMultipleSelection(false);
    int result = dialog.open();
    labelProvider.dispose();
    if (result == Window.OK)
    {
      return (ILaunchConfiguration) dialog.getFirstResult();
    }
View Full Code Here

    dialog
        .setEmptyListMessage(NewWizardMessages.NewTypeWizardPage_ChoosePackageDialog_empty);
    dialog.setElements(packages);
    dialog.setHelpAvailable(false);

    if (dialog.open() == 0) {
      return (IPackageFragment) dialog.getFirstResult();
    }
    return null;
  }
View Full Code Here

          ElementListSelectionDialog dialog = new ElementListSelectionDialog(getSection().getShell(), new JavaElementLabelProvider(1));
          dialog.setTitle(WizardConstants.PACKAGE_SELECTION_DIALOG_TITLE);
          dialog.setMessage(WizardConstants.PACKAGE_SELECTION_DIALOG_DESC);
          dialog.setEmptyListMessage(WizardConstants.PACKAGE_SELECTION_DIALOG_MSG_NONE);
          dialog.setElements(list.toArray(new IJavaElement[0]));
          if (dialog.open() == Window.OK) {
            IPackageFragment fragment = (IPackageFragment) dialog.getFirstResult();
            String newBundleName = fragment.getElementName();
            boolean isArchive = fragment.getParent() instanceof JarPackageFragmentRoot;
            String fragmentRoot = fragment.getParent().getElementName();
            List<String> tmp = model.getPackageList();
View Full Code Here

          projectName);
    }
    if (javaProject != null) {
      dialog.setInitialSelections(new Object[] { javaProject });
    }
    if (dialog.open() == Window.OK) {
      return (IJavaProject) dialog.getFirstResult();
    }
    return null;
  }
View Full Code Here

      javaProject = JavaCore.create(getWorkspaceRoot()).getJavaProject(projectName);
    }
    if (javaProject != null) {
      dialog.setInitialSelections(new Object[] { javaProject });
    }
    if (dialog.open() == Window.OK) {
      return (IJavaProject) dialog.getFirstResult();
    }
    return null;
  }
View Full Code Here

          projectName);
    }
    if (javaProject != null) {
      dialog.setInitialSelections(new Object[] { javaProject });
    }
    if (dialog.open() == Window.OK) {
      return (IJavaProject) dialog.getFirstResult();
    }
    return null;
  }
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.