Logo Search packages:      
Sourcecode: ooeclipseintegration version File versions  Download package

IProject org::openoffice::ide::eclipse::core::wizards::NewUnoProjectPage::createNewProject (  )  [inline, private]

Creates a new project resource with the selected name.

In normal usage, this method is invoked after the user has pressed Finish on the wizard; the enablement of the Finish button implies that all controls on the pages currently contain valid values.

Note that this wizard caches the new project once it has been successfully created; subsequent invocations of this method will answer the same project resource without attempting to create it again.

the created project resource, or null if the project was not created

Definition at line 271 of file NewUnoProjectPage.java.

References createProject().

Referenced by fillData().

        if (newProject != null) {
                  return newProject;

        // get a project handle
        final IProject newProjectHandle = getProjectHandle();

        // get a project descriptor
        URI location = null;
        if (!useDefaults()) {
                  location = getLocationURI();

        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        final IProjectDescription description = workspace

        // create the new project operation
        WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
            protected void execute(IProgressMonitor monitor)
                    throws CoreException {
                createProject(description, newProjectHandle, monitor);

        // run the new project creation operation
        try {
            getContainer().run(true, true, op);
        } catch (InterruptedException e) {
            return null;
        } catch (InvocationTargetException e) {
            // ie.- one of the steps resulted in a core exception
            Throwable t = e.getTargetException();
            PluginLogger.error(t.toString(), t);
                        "Error during the project folder creation",
                        null, // no special message
                        ((CoreException) t).getStatus());
            return null;

        newProject = newProjectHandle;

        return newProject;

Generated by  Doxygen 1.6.0   Back to index