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


                    IJavaProject javaProject = JavaCore.create(resource.getProject());
                    if(javaProject != null)
                    {
                        org.eclipse.jdt.core.search.IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
                        SelectionDialog sd = JavaUI.createTypeDialog(getShell(), new ApplicationWindow(getShell()), searchScope, 2, false);
                        sd.open();
                        Object objects[] = sd.getResult();
                        if(objects != null && objects.length > 0)
                        {
                            IType type = (IType)objects[0];
                            String fullyQualifiedName = type.getFullyQualifiedName('.');
View Full Code Here

                    IJavaProject javaProject = JavaCore.create(resource.getProject());
                    if(javaProject != null)
                    {
                        org.eclipse.jdt.core.search.IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
                        SelectionDialog sd = JavaUI.createTypeDialog(getShell(), new ApplicationWindow(getShell()), searchScope, 2, false);
                        sd.open();
                        Object objects[] = sd.getResult();
                        if(objects != null && objects.length > 0)
                        {
                            IType type = (IType)objects[0];
                            singleValueText.setText(type.getFullyQualifiedName());
View Full Code Here

        if (item.getData() instanceof Interpolation) {
          interpolation = (Interpolation) item.getData();
          try {
            SelectionDialog sd = JavaUI.createTypeDialog(new Shell(), null, SearchEngine.createWorkspaceScope(),
                IJavaElementSearchConstants.CONSIDER_CLASSES_AND_INTERFACES, false);
            sd.open();
            Object[] objects = sd.getResult();
            if (null != objects && objects.length > 0) {
              ConfigurationManager configuration = ConfigurationManager.getInstance(interpolation.getResource().getProject());
              IType type = (IType) objects[0];
              try {
View Full Code Here

                            IJavaElementSearchConstants.CONSIDER_CLASSES,
                            false,
                            "*"); //$NON-NLS-1$
                dialog.setTitle("Select Fixture Type"); // LauncherMessages.JavaMainTab_Choose_Main_Type_11
                dialog.setMessage("Select &type (? = any character, * = any String, TZ = TimeZone):"); // LauncherMessages.JavaMainTab_Choose_a_main__type_to_launch__12
                if (dialog.open() == Window.CANCEL) {
                    return;
                }
                Object[] results = dialog.getResult()
                IType type = (IType)results[0];
                if (type != null) {
View Full Code Here

          project, 0, null);

      dlg.setTitle( dialogTitle.format( property.definition().getLabel( true, CapitalizationType.TITLE_STYLE, false ) ) );
      dlg.setMessage( dialogMessage.text() );

      if (dlg.open() == SelectionDialog.OK) {
        Object results[] = dlg.getResult();
        assert results != null && results.length == 1;
        if (results[0] instanceof IPackageFragment) {
          return ((IPackageFragment) results[0]).getElementName();
        }
View Full Code Here

            final SelectionDialog dlg
                = JavaUI.createTypeDialog( ( (FormComponentPresentation) context ).shell(), null, project, browseDialogStyle, false );
           
            dlg.setTitle( dialogTitle.format( property.definition().getLabel( true, CapitalizationType.TITLE_STYLE, false ) ) );
           
            if (dlg.open() == SelectionDialog.OK) {
                Object results[] = dlg.getResult();
                assert results != null && results.length == 1;
                if (results[0] instanceof IType) {
                    return ((IType) results[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

                    .createWorkspaceScope(),
                IJavaElementSearchConstants.CONSIDER_CLASSES, false);
            dialog.setMessage("Select Mapper type (implementing )");
            dialog.setBlockOnOpen(true);
            dialog.setTitle("Select Mapper Type");
            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

    public static void doSelect(List<IPythonNature> pythonNatures, List<AbstractAdditionalTokensInfo> additionalInfo,
            String selectedText) {

        SelectionDialog dialog = GlobalsDialogFactory.create(getShell(), additionalInfo, selectedText);

        dialog.open();
        Object[] result = dialog.getResult();
        if (result != null && result.length > 0) {
            for (Object obj : result) {
                IInfo entry;
                if (obj instanceof AdditionalInfoAndIInfo) {
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.