Package org.eclipse.ui.dialogs

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


        if (!editorChanged && interpreterNamesToRestore.size() == 0) {
            IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
            SelectionDialog listDialog = createChooseIntepreterInfoDialog(workbenchWindow, exesList,
                    "Select interpreters to be restored", true);

            int open = listDialog.open();
            if (open != ListDialog.OK) {
                return;
            }
            Object[] result = (Object[]) listDialog.getResult();
            if (result == null || result.length == 0) {
View Full Code Here


          PlatformUI.getWorkbench().getProgressService(),
          searchScope,
          allowInterfaces?IJavaElementSearchConstants.CONSIDER_CLASSES_AND_INTERFACES:IJavaElementSearchConstants.CONSIDER_CLASSES,
          false);
      dialog.setTitle("Browse...");
      if (dialog.open() == Window.OK) {
        IType type = (IType) dialog.getResult()[0];
        return type.getFullyQualifiedName('$');
      }
    } catch (Exception e) {
      Logger.logException(e);
View Full Code Here

          SelectionDialog dialog = JavaUI.createTypeDialog(
              shell,new ProgressMonitorDialog(shell),
              SearchEngine.createJavaSearchScope(new IJavaElement[]{project}),
              IJavaElementSearchConstants.CONSIDER_CLASSES,false);

          if(dialog.open() == SelectionDialog.OK){
            Object[] result = dialog.getResult();
            String className = ((IType)result[0]).getFullyQualifiedName();
            if(ClickUtils.isNotEmpty(packageName) && className.startsWith(packageName)){
              className = className.substring(packageName.length() + 1);
            }
View Full Code Here

          SelectionDialog dialog = JavaUI.createTypeDialog(
              shell, new ProgressMonitorDialog(shell),
              SearchEngine.createJavaSearchScope(new IJavaElement[]{project}),
              IJavaElementSearchConstants.CONSIDER_CLASSES,false);
         
          if(dialog.open()==SelectionDialog.OK){
            Object[] result = dialog.getResult();
            superClass.setText(((IType)result[0]).getFullyQualifiedName());
          }
        } catch(Exception ex){
          ClickPlugin.log(ex);
View Full Code Here

            SelectionDialog dialog = JavaUI.createTypeDialog(
                shell,new ProgressMonitorDialog(shell),
                SearchEngine.createJavaSearchScope(new IJavaElement[]{JavaCore.create(getProject())}),
                IJavaElementSearchConstants.CONSIDER_CLASSES,false);
           
            if(dialog.open()==SelectionDialog.OK){
              Object[] result = dialog.getResult();
              type.setText(((IType)result[0]).getFullyQualifiedName());
            }
          } catch(Exception ex){
            ClickPlugin.log(ex);
View Full Code Here

            if (interpreter == null) {
                SelectionDialog listDialog = AbstractInterpreterPreferencesPage.createChooseIntepreterInfoDialog(
                        workbenchWindow, interpreters, "Select interpreter to be used.", false);

                int open = listDialog.open();
                if (open != ListDialog.OK || listDialog.getResult().length > 1) {
                    return null;
                }
                Object[] result = (Object[]) listDialog.getResult();
                if (result == null || result.length == 0) {
View Full Code Here

        Shell shell = classNameText.getShell();
        try {
          SelectionDialog dialog = JavaUI.createTypeDialog(shell, new ProgressMonitorDialog(shell),
              SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_CLASSES, false);

          if (dialog.open() == SelectionDialog.OK) {
            Object[] result = dialog.getResult();
            String className = ((IType) result[0]).getFullyQualifiedName();
            IJavaProject containerProject = ((IType) result[0]).getJavaProject();

            if (className != null) {
View Full Code Here

        Shell shell = classNameText.getShell();
        try {
          SelectionDialog dialog = JavaUI.createTypeDialog(shell, new ProgressMonitorDialog(shell),
              SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_CLASSES, false);

          if (dialog.open() == SelectionDialog.OK) {
            Object[] result = dialog.getResult();
            String className = ((IType) result[0]).getFullyQualifiedName();
           
            if (className != null) {
              classNameText.setText(className);
View Full Code Here

     
      SelectionDialog dialog = JavaUI.createPackageDialog(dialogParrentShell, javaProject, 0);
      dialog.setTitle("Package selection");
      dialog.setMessage("&Choose a package:");
     
      if (dialog.open() == SelectionDialog.OK) {
        Object[] selectedPackages = dialog.getResult();
        if (selectedPackages.length == 1) {
          m_packageNameText.setText(((IPackageFragment) selectedPackages[0]).getElementName());
        }
      }
View Full Code Here

    catch(InvocationTargetException e) {
      TestNGPlugin.log(e.getTargetException());
    }
    dialog.setBlockOnOpen(true);
    dialog.setTitle(ResourceUtil.getString("TestNGMainTab.testdialog.title")); //$NON-NLS-1$
    if(dialog.open() == Window.CANCEL) {
      return;
    }

    Object[] results = dialog.getResult();
    if((results == null) || (results.length < 1)) {
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.