Package org.eclipse.ui.dialogs

Examples of org.eclipse.ui.dialogs.SelectionDialog


                        "named " + policyTypeElement.getName() +
                        ". Expected " + DeviceRepositorySchemaConstants.
                        POLICY_DEFINITION_TYPE_ELEMENT_NAME);
            }

            SelectionDialog dialog = null;

            Element orderedSetElement = policyTypeElement.getChild(
                    DeviceRepositorySchemaConstants.
                    POLICY_DEFINITION_ORDEREDSET_ELEMENT_NAME,
                    policyTypeElement.getNamespace());
View Full Code Here


      public void widgetSelected(SelectionEvent evt){
        Shell shell = getShell();
        try {
          IJavaProject project = JavaCore.create(getProject());

          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

     
      IFileEditorInput input = (IFileEditorInput)editorPart.getEditorInput();
      IJavaProject project = JavaCore.create(input.getFile().getProject());
     
      Shell shell = cellEditorWindow.getShell();
      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

          String sStartDir = Platform.getLocation().toString();
          dialog.setFilterPath(sStartDir);
          className = dialog.open();

        } else {
          SelectionDialog typeDialog = JavaUI.createTypeDialog(getSection().getShell(), editor
                  .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();
        }
        if (className == null || className.equals("")) //$NON-NLS-1$
          return;
View Full Code Here

        try {
          baseType = getPackageFragmentRoot().getJavaProject().findType(
              baseClassName);

          // edit this to limit the scope
          SelectionDialog dialog = JavaUI.createTypeDialog(
              composite.getShell(), new ProgressMonitorDialog(composite
                  .getShell()), SearchEngine.createHierarchyScope(baseType),
              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());
          }
        } catch (JavaModelException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
View Full Code Here

    Button button = toolkit.createButton(composite, ClickPlugin.getString("action.browse"), SWT.PUSH);
    button.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(SelectionEvent evt){
        Shell shell = text.getShell();
        try {
          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

        private String chooseTargetClass() {
            IProject project = MuClipsePlugin.getProject(txtProject.getText().trim());
            try
            {
              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();
              }
              else
View Full Code Here

       
        private String chooseTest() {
            IProject project = MuClipsePlugin.getProject(txtProject.getText().trim());
            try
            {
              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();
              }
              else
View Full Code Here

            IProject project = MuClipsePlugin.getProject(txtProject.getText().trim());
           
           
            try
            {
              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();
              }
              else
View Full Code Here

    IRunnableContext context = DesignerPlugin.getActiveWorkbenchWindow();
    // prepare extension
    ChooseBeanTypeSelectionExtension extension =
        new ChooseBeanTypeSelectionExtension(packageFragment, searchScope, contributors);
    // prepare dialog dialog
    SelectionDialog dialog =
        JavaUI.createTypeDialog(
            DesignerPlugin.getShell(),
            context,
            searchScope,
            IJavaElementSearchConstants.CONSIDER_CLASSES,
            false,
            "",
            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

TOP

Related Classes of org.eclipse.ui.dialogs.SelectionDialog

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.