Examples of IWorkbenchWizard


Examples of org.eclipse.ui.IWorkbenchWizard

  protected static IWorkbenchWizard createWizard(final String id) throws CoreException {
        final IWorkbench wb = PlatformUI.getWorkbench();
        final IWizardRegistry reg = wb.getNewWizardRegistry();
        final IWizardDescriptor desc = reg.findWizard(id);
        IWorkbenchWizard wizard = desc.createWizard();
        if (wizard != null) {
            return wizard;
        }
        throw new RuntimeException("Wizard not found. id:" + id); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchWizard

      page.setTypeName(typeName, true);
    }

    private IWizard createNewPairWizard(IType targetType, IWorkbench workbench) throws CoreException, JavaModelException {
        if (JavaTypes.isTest(targetType)) {
            IWorkbenchWizard wizard = ExtensionSupport.createNewClassCreationWizard();
            IStructuredSelection selection = new StructuredSelection(targetType.getPackageFragment());
            wizard.init(workbench, selection);
            return wizard;
        }
        else {
            IWorkbenchWizard wizard = ExtensionSupport.createNewTestCaseCreationWizard();
            IStructuredSelection selection = new StructuredSelection(targetType);
            wizard.init(workbench, selection);
            return wizard;
        }
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchWizard

  public Object execute(ExecutionEvent event) throws ExecutionException {
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(SapConnectionConfigurationExportWizard.ID);
    if (descriptor != null) {

      try {
        IWorkbenchWizard wizard = descriptor.createWizard();
        IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
        ISelection selection = HandlerUtil.getCurrentSelection(event);
        if (!(selection instanceof IStructuredSelection)) {
          selection = StructuredSelection.EMPTY;
        }
        wizard.init(PlatformUI.getWorkbench(), (StructuredSelection) selection);
        WizardDialog wizardDialog = new WizardDialog(window.getShell(), wizard);
        wizardDialog.setTitle(wizard.getWindowTitle());
        wizardDialog.create();
        wizardDialog.open();
      } catch (CoreException e) {
        // Ignore
      }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchWizard

  public void run() {
    try {
      IWizardDescriptor wizardDescriptor = getWizardRegistry()
          .findWizard(getWizardId());

      IWorkbenchWizard wizard = wizardDescriptor.createWizard();
      wizard.init(PlatformUI.getWorkbench(), StructuredSelection.EMPTY);

      if (wizardDescriptor.canFinishEarly()
          && !wizardDescriptor.hasPages()) {
        wizard.performFinish();
        return;
      }

      Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
          .getShell();
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.