Package org.eclipse.jdt.ui.wizards

Examples of org.eclipse.jdt.ui.wizards.NewTypeWizardPage


        IWorkbench workbench = PlatformUI.getWorkbench();
        IWizard wizard = createNewPairWizard(targetType, workbench);
    Shell parent = workbench.getActiveWorkbenchWindow().getShell();
    WizardDialog dialog = new WizardDialog(parent, wizard);
    dialog.create();
    NewTypeWizardPage page = getNewTypeWizardPage(wizard);
    if(page == null) return;
    setUpSourceFolderWizard(page,targetType);
    setUpNewClassCreationWizard(page,pairNames);
    if (page instanceof NewTestCaseWizardPageOne) {
      NewTestCaseWizardPageOne testCasePage = (NewTestCaseWizardPageOne) page;
View Full Code Here


    Shell shell = JavaPlugin.getActiveWorkbenchShell();
    WizardDialog dialog = new WizardDialog(shell, wizard);
    dialog.create();
    dialog.getShell().setText("New");
    IWizardPage[] pages = wizard.getPages();
    NewTypeWizardPage page = (NewTypeWizardPage) pages[0];
    String markerMessage = marker.getAttribute(MESSAGE_ATTRIBUTE_KEY, "");

    IJavaProject javaProject = JdtUtils.getJavaProject(marker.getResource());

    IPackageFragmentRoot sourcePackageFragmentRoot = null;
    String packageName = extractPackageNameFromMessage(markerMessage);
    try {
      sourcePackageFragmentRoot = inferPackageFragmentRoot(javaProject, packageName);
      if (sourcePackageFragmentRoot != null) {
        page.setPackageFragmentRoot(sourcePackageFragmentRoot, true);
        IPackageFragment packageFragment = sourcePackageFragmentRoot.getPackageFragment(packageName);
        if (packageFragment != null) {
          page.setPackageFragment(packageFragment, true);
        }
      }
    }
    catch (CoreException e) {
      StatusHandler.log(e.getStatus());
    }

    page.setTypeName(extractClassNameFromMessage(markerMessage), true);

    if (dialog.open() == Window.OK) {
      IType createdType = (IType) wizard.getCreatedElement();
      String fullyQualifiedClassName = createdType.getFullyQualifiedName();
      updateXmlBeanClass(marker, fullyQualifiedClassName);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.ui.wizards.NewTypeWizardPage

Copyright © 2018 www.massapicom. 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.