chqu1012 / RichClientFX

A lightweight EMF Rich Client Platform based on JavaFX
Apache License 2.0
2 stars 0 forks source link

JDT Open Type Dialog programmatically #496

Closed chqu1012 closed 5 years ago

chqu1012 commented 5 years ago
            SelectionDialog dialog = new OpenTypeSelectionDialog(new Shell(), true,
                    PlatformUI.getWorkbench().getProgressService(), null, IJavaSearchConstants.TYPE);
            dialog.setTitle(JavaUIMessages.OpenTypeAction_dialogTitle);
            dialog.setMessage(JavaUIMessages.OpenTypeAction_dialogMessage);

            int result = dialog.open();
            if (result == SWT.OK) {
                for (Object obj : dialog.getResult()) {
                    System.out.println(obj);
                }
            }