Examples of PackageSelectionDialog


Examples of bndtools.internal.pkgselection.PackageSelectionDialog

            javaProject
        });
        JavaSearchScopePackageLister packageLister = new JavaSearchScopePackageLister(searchScope, window);

        // Create and open the dialog
        PackageSelectionDialog dialog = new PackageSelectionDialog(window.getShell(), packageLister, filter, "Select new packages to export from the bundle.");
        dialog.setSourceOnly(true);
        dialog.setMultipleSelection(true);
        if (dialog.open() == Window.OK) {
            Object[] results = dialog.getResult();
            added = new LinkedList<ExportedPackage>();

            // Select the results
            for (Object result : results) {
                String newPackageName = (String) result;
View Full Code Here

Examples of bndtools.internal.pkgselection.PackageSelectionDialog

            javaProject
        });
        JavaSearchScopePackageLister packageLister = new JavaSearchScopePackageLister(searchScope, window);

        // Create and open the dialog
        PackageSelectionDialog dialog = new PackageSelectionDialog(window.getShell(), packageLister, filter, "Select new packages to export from the bundle.");
        dialog.setSourceOnly(true);
        dialog.setMultipleSelection(true);
        if (dialog.open() == Window.OK) {
            Object[] results = dialog.getResult();
            added = new LinkedList<ExportedPackage>();

            // Select the results
            for (Object result : results) {
                String newPackageName = (String) result;
View Full Code Here

Examples of bndtools.internal.pkgselection.PackageSelectionDialog

            javaProject
        });
        JavaSearchScopePackageLister packageLister = new JavaSearchScopePackageLister(searchScope, window);

        // Create and open the dialog
        PackageSelectionDialog dialog = new PackageSelectionDialog(getSection().getShell(), packageLister, filter, "Select new packages to include in the bundle.");
        dialog.setSourceOnly(true);
        dialog.setMultipleSelection(true);
        if (dialog.open() == Window.OK) {
            Object[] results = dialog.getResult();
            List<String> added = new LinkedList<String>();

            // Select the results
            for (Object result : results) {
                String newPackageName = (String) result;
View Full Code Here

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

          scope.add((JavaProject)project, JavaSearchScope.SOURCES, new HashSet<Integer>(2, 1));
        } catch(Exception ex){
          ClickPlugin.log(ex);
        }

        PackageSelectionDialog dialog = new PackageSelectionDialog(getShell(), context, style, scope);
        dialog.setMultipleSelection(false);
        if(dialog.open()==PackageSelectionDialog.OK){
          Object[] result = dialog.getResult();
          if(result.length >= 1){
            IPackageFragment fragment = (IPackageFragment)result[0];
            packageName.setText(fragment.getElementName());
          }
        }
      }
    });

    ClickUtils.createLabel(classGroup, ClickPlugin.getString("wizard.newPage.pageClassGroup.classname"));
    Composite classField = FieldAssistUtils.createNullDecoratedPanel(classGroup, false);
    className = new Text(classField, SWT.BORDER);
    classField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    className.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    if(initClassName!=null){
      className.setText(initClassName);
    }
    className.addModifyListener(new ModifyListener(){
      public void modifyText(ModifyEvent e){
        validate();
      }
    });

    ClickUtils.createLabel(classGroup, "");

    ClickUtils.createLabel(classGroup, ClickPlugin.getString("wizard.newPage.pageClassGroup.superclass"));
    ContentAssistField superClassField = new ContentAssistField(classGroup, SWT.BORDER,
        new TextControlCreator(), new TextContentAdapter(), typeAssistProvider,
        ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new char[0]);
    superClass = (Text)superClassField.getControl();
    superClassField.getLayoutControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    superClass.setText(settings.get(NewClickPageWizard.SUPERCLASS));
    superClass.addModifyListener(new ModifyListener(){
      public void modifyText(ModifyEvent e){
        validate();
      }
    });
    browseSuperClass = new Button(classGroup, SWT.PUSH);
    browseSuperClass.setText(ClickPlugin.getString("action.browse"));
    browseSuperClass.addSelectionListener(new SelectionAdapter(){
      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

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

          scope.add((JavaProject)project, JavaSearchScope.SOURCES, new HashSet(2, 1));
        } catch(Exception ex){
          ClickPlugin.log(ex);
        }
       
        PackageSelectionDialog dialog = new PackageSelectionDialog(getShell(), context, style, scope);
        dialog.setMultipleSelection(false);
        if(dialog.open()==PackageSelectionDialog.OK){
          Object[] result = dialog.getResult();
          if(result.length >= 1){
            IPackageFragment fragment = (IPackageFragment)result[0];
            packageName.setText(fragment.getElementName());
          }
        }
      }
    });
   
    ClickUtils.createLabel(classGroup, ClickPlugin.getString("wizard.newPage.pageClassGroup.classname"));
    Composite classField = FieldAssistUtils.createNullDecoratedPanel(classGroup, false);
    className = new Text(classField, SWT.BORDER);
    classField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    className.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    if(initClassName!=null){
      className.setText(initClassName);
    }
    className.addModifyListener(new ModifyListener(){
      public void modifyText(ModifyEvent e){
        validate();
      }
    });
   
    ClickUtils.createLabel(classGroup, "");
   
    ClickUtils.createLabel(classGroup, ClickPlugin.getString("wizard.newPage.pageClassGroup.superclass"));
    ContentAssistField superClassField = new ContentAssistField(classGroup, SWT.BORDER,
        new TextControlCreator(), new TextContentAdapter(), typeAssistProvider,
        ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new char[0]);
    superClass = (Text)superClassField.getControl();
    superClassField.getLayoutControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    superClass.setText(settings.get(NewClickPageWizard.SUPERCLASS));
    superClass.addModifyListener(new ModifyListener(){
      public void modifyText(ModifyEvent e){
        validate();
      }
    });
    browseSuperClass = new Button(classGroup, SWT.PUSH);
    browseSuperClass.setText(ClickPlugin.getString("action.browse"));
    browseSuperClass.addSelectionListener(new SelectionAdapter(){
      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
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.