Examples of OpenTypeSelectionDialog2


Examples of org.eclipse.dltk.internal.ui.dialogs.OpenTypeSelectionDialog2

    falseFlags = (type == NewElementWizardPage.CLASSES ? PHPFlags.AccTrait | PHPFlags.AccInterface
        | PHPFlags.AccNameSpace : 0);
    trueFlags = (type == NewElementWizardPage.INTERFACES ? PHPFlags.AccInterface : 0);

    OpenTypeSelectionDialog2 dialog = new OpenTypeSelectionDialog2(DLTKUIPlugin.getActiveWorkbenchShell(), multi,
        PlatformUI.getWorkbench().getProgressService(), scope, IDLTKSearchConstants.TYPE,
        new PHPTypeSelectionExtension(trueFlags, falseFlags), PHPUILanguageToolkit.getInstance());

    dialog.setTitle(title);
    dialog.setMessage(message);

    return dialog;
  }
View Full Code Here

Examples of org.eclipse.dltk.internal.ui.dialogs.OpenTypeSelectionDialog2

      }

      @Override
      public void customButtonPressed(TreeListDialogField field, int index) {
        if (index == 0) {
          OpenTypeSelectionDialog2 dialog = getDialog(NewElementWizardPage.INTERFACES,
            "Interface selection",
            "Select interface",
            true);
          int result = dialog.open();
          if (result != IDialogConstants.OK_ID)
            return;
          Object[] types = dialog.getResult();
          for (Object type : types) {
            field.addElement((IType) type);
          }
        }
View Full Code Here

Examples of org.eclipse.dltk.internal.ui.dialogs.OpenTypeSelectionDialog2

    superClassField = new StringButtonDialogField(new IStringButtonAdapter() {

      @Override
      public void changeControlPressed(DialogField field) {

        OpenTypeSelectionDialog2 dialog = getDialog(NewElementWizardPage.CLASSES,
          "Superclass selection",
          "Select superclass",
          false);
        int result = dialog.open();
        if (result != IDialogConstants.OK_ID)
          return;

        Object searchedObject[] = dialog.getResult();
        setSuperclass((IType) searchedObject[0]);
        ((StringDialogField) field).setText(getSuperclass().getFullyQualifiedName().replace("$", "\\"));
      }
    });
View Full Code Here

Examples of org.eclipse.jdt.internal.ui.dialogs.OpenTypeSelectionDialog2

  protected void handleBehaviourSearchButtonSelected() {
    Shell shell = getShell();
   
    IJavaProject javaProject = getJavaProject();
   
    OpenTypeSelectionDialog2 dialog= new OpenTypeSelectionDialog2(
        shell, false,
        PlatformUI.getWorkbench().getProgressService(),
        null, IJavaSearchConstants.TYPE);
      dialog.setTitle("Search Behaviour Class");
      dialog.setMessage("Search for the behaviour class to verify");
     
      int result= dialog.open();
      if (result != IDialogConstants.OK_ID)
        return;
     
      Object[] types= dialog.getResult();
      if (types != null && types.length > 0) {
        IType type= (IType)types[0];
        behaviourText.setText(type.getFullyQualifiedName('.'));
        javaProject = type.getJavaProject();
        projectText.setText(javaProject.getElementName());
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.