Java 类org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard 实例源码

项目:traceability-assistant-eclipse-plugins    文件:ProjectNewWizard.java   
@Override
public boolean performFinish() {
    String name = _pageOne.getProjectName();
    URI location = null;

    if (!_pageOne.useDefaults()) {
        location = _pageOne.getLocationURI();
    }

    try {
        ProjectSupport.createProject(name, location);
    } catch (UnsupportedEncodingException e) {
        logger.error("Error creating the project",e);
    }
    BasicNewProjectResourceWizard.updatePerspective(_configurationElement);

    return true;
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaProjectWizard.java   
@Override
public boolean performFinish() {
    boolean res= super.performFinish();
    if (res) {
        final IJavaElement newElement= getCreatedElement();

        IWorkingSet[] workingSets= fFirstPage.getWorkingSets();
        if (workingSets.length > 0) {
            PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(newElement, workingSets);
        }

        BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
        selectAndReveal(fSecondPage.getJavaProject().getProject());

        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                IWorkbenchPart activePart= getActivePart();
                if (activePart instanceof IPackagesViewPart) {
                    PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
                    view.tryToReveal(newElement);
                }
            }
        });
    }
    return res;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaProjectWizard.java   
@Override
public boolean performFinish() {
    boolean res= super.performFinish();
    if (res) {
        final IJavaElement newElement= getCreatedElement();

        IWorkingSet[] workingSets= fFirstPage.getWorkingSets();
        if (workingSets.length > 0) {
            PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(newElement, workingSets);
        }

        BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
        selectAndReveal(fSecondPage.getJavaProject().getProject());

        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                IWorkbenchPart activePart= getActivePart();
                if (activePart instanceof IPackagesViewPart) {
                    PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
                    view.tryToReveal(newElement);
                }
            }
        });
    }
    return res;
}
项目:OpsDev    文件:DesignerJavaProjectWizard.java   
@Override
public boolean performFinish() {
  boolean res = super.performFinish();
  if (res) {
    {
      org.eclipse.ui.IWorkingSet[] workingSets = fFirstPage.getWorkingSets();
      if (workingSets.length > 0) {
        IJavaProject newElement = getCreatedElement();
        org.eclipse.ui.PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(
            newElement,
            workingSets);
      }
    }
    BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
   // BasicNewResourceWizard.selectAndReveal(
     //   fSecondPage.getJavaProject().getProject(),
   //     DesignerPlugin.getActiveWorkbenchWindow());
  }
  return res;
}
项目:XRobot    文件:AbstractNewProjectWizard.java   
@Override
public boolean performFinish() {
    NullProgressMonitor pm = new NullProgressMonitor();
    try {
        pageTwo.performFinish(pm);
    } catch (Exception e) {
        //TODO not sure how to handle this. There don't seem to be any ways to report an error back to the caller.
        LeJOSEV3Util.log(e);
    }

    IJavaProject newProject = pageTwo.getJavaProject();
    IWorkingSet[] workingSets= pageOne.getWorkingSets();
    if (workingSets != null && workingSets.length > 0) {
        fWorkbench.getWorkingSetManager().addToWorkingSets(newProject, workingSets);
    }

    BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
    BasicNewResourceWizard.selectAndReveal(newProject.getProject(), fWorkbench.getActiveWorkbenchWindow());

    return true;
}
项目:LibertyEiffel-Eclipse-Plugin    文件:LEProjectNewWizard.java   
@Override
public boolean performFinish() {
    String name = pageOne.getProjectName();
    URI location = null;
    if (!pageOne.useDefaults()) {
        location = pageOne.getLocationURI();
    }//else location = null

    LEProjectSupport.createProject(name, location);
    BasicNewProjectResourceWizard.updatePerspective(configurationElement);

    return true;
}
项目:Gauge-Eclipse    文件:ImportGaugeProjectWizard.java   
public boolean performFinish() {
    String name = importProjectPage.getProjectName();
    IPath projectPath = importProjectPage.getLocationPath();
    new GaugeProjectCreator(name, projectPath).addProjectToWorkspace();
    BasicNewProjectResourceWizard.updatePerspective(configurationElement);
    return true;
}
项目:Gauge-Eclipse    文件:NewGaugeProjectWizard.java   
@Override
public boolean performFinish() {
    String name = _newProjectPage.getProjectName();

    if (_newProjectPage.useDefaults()) {
        new GaugeProjectCreator(name, _newProjectPage.getLocationPath().append(name)).createProject();
    } else {
        new GaugeProjectCreator(name, _newProjectPage.getLocationPath()).createProject();
    }
    BasicNewProjectResourceWizard.updatePerspective(_configurationElement);
    return true;
}
项目:OpsDev    文件:PythonProjectWizard.java   
/**
 * The user clicked Finish button
 * 
 * Launches another thread to create Python project. A progress monitor is shown in the UI thread.
 */
public boolean performFinish() {
    createdProject = createNewProject();
    // Switch to default perspective (will ask before changing)
    BasicNewProjectResourceWizard.updatePerspective(fConfigElement);

    return true;
}
项目:DynamicSpotter    文件:NewProjectWizard.java   
@Override
public boolean performFinish() {
    String host = pageTwo.getHost();
    String port = pageTwo.getPort();

    if (!pageTwo.testConnection()) {
        ServiceClientWrapper.showConnectionProblemMessage(null, host, port, true);
        return false;
    }

    String name = pageOne.getProjectName();
    URI location = null;
    if (!pageOne.useDefaults()) {
        location = pageOne.getLocationURI();
    } // else location == null

    // make sure there are no preferences cached from an old project with
    // the same name
    SpotterProjectSupport.deleteProjectPreferences(name);

    ServiceClientWrapper client = Activator.getDefault().getClient(name);
    if (!client.saveServiceClientSettings(host, port)) {
        return false;
    }
    if (SpotterProjectSupport.createProject(name, location) == null) {
        return false;
    }
    // change to proper perspective
    BasicNewProjectResourceWizard.updatePerspective(configurationElement);

    return true;
}
项目:maru    文件:ScenarioProjectWizard.java   
@Override
public boolean performFinish()
{
    IProject project = createProject();
    if (project == null) {
        return false;
    }

    BasicNewProjectResourceWizard.updatePerspective(configElement);
    BasicNewResourceWizard.selectAndReveal(project, workbench.getActiveWorkbenchWindow());
    return true;
}
项目:Pydev    文件:PythonProjectWizard.java   
/**
 * The user clicked Finish button
 *
 * Launches another thread to create Python project. A progress monitor is shown in the UI thread.
 */
@Override
public boolean performFinish() {
    createdProject = createNewProject();

    IWorkingSet[] workingSets = projectPage.getWorkingSets();
    if (workingSets.length > 0) {
        PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(createdProject, workingSets);

        //Workaround to properly show project in Package Explorer: if Top Level Elements are
        //working sets, and the destination working set of the new project is selected, that set
        //must be reselected in order to display the project.
        PydevPackageExplorer pView = (PydevPackageExplorer) PlatformUI.getWorkbench()
                .getActiveWorkbenchWindow().getActivePage()
                .findView("org.python.pydev.navigator.view");
        if (pView != null) {
            IWorkingSet[] inputSets = ((PydevCommonViewer) pView.getCommonViewer()).getSelectedWorkingSets();
            if (inputSets != null && inputSets.length == 1) {
                IWorkingSet inputSet = inputSets[0];
                if (inputSet != null) {
                    for (IWorkingSet destinationSet : workingSets) {
                        if (inputSet.equals(destinationSet)) {
                            pView.getCommonViewer().setInput(inputSet);
                            break;
                        }
                    }
                }
            }
        }
    }

    // Switch to default perspective (will ask before changing)
    BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
    BasicNewResourceWizard.selectAndReveal(createdProject, workbench.getActiveWorkbenchWindow());

    return true;
}
项目:Pydev    文件:PythonGettingStartedWizard.java   
@Override
public boolean performFinish() {

    // Switch to default 'Pydev' perspective (asks before changing)
    BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
    return true;
}
项目:goclipse    文件:LangNewProjectWizard.java   
@Override
public boolean performFinish() {
    ProjectCreationOperation projectCreator = getProjectCreator();
    boolean success = projectCreator.performCreateProject();
    if(success) {
        BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
        selectAndReveal(projectCreator.getCreatedProject());
        projectCreator.performFinishActions();
    }
    return success;
}
项目:gw4e.project    文件:GW4ECreationWizard.java   
public boolean performFinish() {
    WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
        protected void execute(IProgressMonitor monitor)
                throws CoreException, InvocationTargetException, InterruptedException {
            javaPage.performFinish(monitor);
        }
    };
    try {
        getContainer().run(false, true, op);

        IJavaProject newElement = javaPage.getJavaProject();

        GW4ENature.setGW4ENature(newElement.getProject());

        IWorkingSet[] workingSets = mainPage.getWorkingSets();
        if (workingSets.length > 0) {
            PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(newElement, workingSets);
        }

        BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
        BasicNewResourceWizard.selectAndReveal(newElement.getResource(),
                PlatformUI.getWorkbench().getActiveWorkbenchWindow());

        fMavenPage.create();

        if (provider==null) {
            provider = new NoneTemplate();
        }

        IPath p = newElement.getProject().getFullPath().append(targetFolder.getName()).append(fMavenPage.getPackagePath());
        ResourceManager.ensureFolderPath(p);

        IFolder f = (IFolder) ResourceManager.getResource(p.toString());


        IRunnableWithProgress operation = provider.createResourceOperation(newElement.getProject(),f,policies,filename);
        getContainer().run(false, false, operation);
        return provider.openInEditor(workbench);
    } catch (Exception e) {
        ResourceManager.logException(e);
        return false;
    }
}
项目:Hydrograph    文件:CustomWizard.java   
@Override
public boolean performFinish() {
    IProject project = ProjectStructureCreator.INSTANCE.createProject(pageOne.getProjectName(), pageOne.getProjectLocationURI());
    BasicNewProjectResourceWizard.updatePerspective(configurationElement);
    return project!=null ? true : false;
}
项目:birt    文件:NewReportProjectWizard.java   
/**
 * Updates the perspective for the active page within the window.
 */
protected void updatePerspective( )
{
    BasicNewProjectResourceWizard.updatePerspective( configElement );
}
项目:birt    文件:NewLibraryWizardAdapterFactory.java   
public void updatePerspective( IConfigurationElement configElement )
{
    BasicNewProjectResourceWizard.updatePerspective( configElement );
}