Package org.eclipse.ui.dialogs

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


      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();
        return ((IType)result[0]).getFullyQualifiedName();
      }
    } catch(Exception ex){
      HTMLPlugin.logException(ex);
View Full Code Here


                  .getEditorSite().getWorkbenchWindow(), editor.getSearchScopeForDescriptorType(),
                  IJavaElementSearchConstants.CONSIDER_CLASSES, false, "*");
          typeDialog.setTitle(MessageFormat.format("Choose the {0} implementation class",
                  new Object[] { editor.descriptorTypeString() }));
          typeDialog.setMessage("Filter/mask:");
          if (typeDialog.open() == Window.CANCEL)
            return;
          Object[] result = typeDialog.getResult();
          if (result != null && result.length > 0)
            className = ((IType) result[0]).getFullyQualifiedName();
        }
View Full Code Here

              IJavaElementSearchConstants.CONSIDER_CLASSES, false);

          dialog.setMessage("&Choose a type:");
          dialog.setBlockOnOpen(true);
          dialog.setTitle(dialogTitle);
          dialog.open();

          if ((dialog.getReturnCode() == Window.OK)
              && (dialog.getResult().length > 0)) {
            IType type = (IType) dialog.getResult()[0];
            text.setText(type.getFullyQualifiedName());
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();
            text.setText(((IType)result[0]).getFullyQualifiedName());
          }
        } catch(Exception ex){
          ClickPlugin.log(ex);
View Full Code Here

              SelectionDialog dialog = JavaUI.createTypeDialog(getShell(), MuClipsePlugin.getWorkbenchWindow(),
                      project, IJavaElementSearchConstants.CONSIDER_CLASSES, false);
              dialog.setTitle("MuClipse");
              dialog.setMessage("Select a Java class");
             
              if(dialog.open() == Window.OK) {
                  Object[] rc = dialog.getResult();
                  IType thisone = (IType) rc[0];
                  txtSelectedFolderSource.setText(thisone.getPath().segment(1));
                  return thisone.getFullyQualifiedName();
              }
View Full Code Here

              SelectionDialog dialog = JavaUI.createTypeDialog(getShell(), MuClipsePlugin.getWorkbenchWindow(),
                      project, IJavaElementSearchConstants.CONSIDER_CLASSES, false);
              dialog.setTitle("MuClipse");
              dialog.setMessage("Select a test case");
             
              if(dialog.open() == Window.OK) {
                  Object[] rc = dialog.getResult();
                  IType thisone = (IType) rc[0];
                 
                  return thisone.getFullyQualifiedName();
              }
View Full Code Here

              SelectionDialog dialog = JavaUI.createTypeDialog(getShell(), MuClipsePlugin.getWorkbenchWindow(),
                      project, IJavaElementSearchConstants.CONSIDER_CLASSES, false);
              dialog.setTitle("MuClipse");
              dialog.setMessage("Select java class to mutate");
             
              if(dialog.open() == Window.OK) {
                  Object[] rc = dialog.getResult();
                  IType thisone = (IType) rc[0];
                  txtSelectedFolderSource.setText(thisone.getPath().segment(1));
                  return thisone.getPath().removeFirstSegments(2).toPortableString();
              }
View Full Code Here

            "",
            extension);
    dialog.setTitle("Choose a Widget");
    dialog.setMessage("Choose a GWT Widget (? = any character, * = any string)");
    // open and resutrn result
    if (dialog.open() == Window.OK) {
      IType type = (IType) dialog.getResult()[0];
      return type.getFullyQualifiedName();
    }
    // cancelled
    return null;
View Full Code Here

              IJavaElementSearchConstants.CONSIDER_CLASSES, false);

          dialog.setMessage("&Choose a type:");
          dialog.setBlockOnOpen(true);
          dialog.setTitle(dialogTitle);
          dialog.open();

          if ((dialog.getReturnCode() == Window.OK)
              && (dialog.getResult().length > 0)) {
            IType type = (IType) dialog.getResult()[0];
            text.setText(type.getFullyQualifiedName());
View Full Code Here

    else {
      SelectionDialog dialog = new WOElementSelectionDialog(parent, javaProject, PlatformUI.getWorkbench().getProgressService());
      dialog.setTitle("Open Component");
      dialog.setMessage("Select a Component to Open");

      int result = dialog.open();
      if (result != IDialogConstants.OK_ID) {
        return;
      }
      Object[] typeNames = dialog.getResult();
      if (typeNames != null && typeNames.length > 0) {
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.