private void createJavaProject(IProject project) throws CoreException { if (!project.exists()) { BuildPathsBlock.createProject(project, null, new NullProgressMonitor()); BuildPathsBlock.addJavaNature(project, new NullProgressMonitor()); } }
private void createJavaProject(IProject project) throws CoreException { if (!project.exists()) { BuildPathsBlock.createProject(project, null, new NullProgressMonitor()); BuildPathsBlock.addJavaNature(project, new NullProgressMonitor()); } }
private void createJavaProject(IProject project) throws CoreException { if (!project.exists()) { BuildPathsBlock.createProject(project, null, new NullProgressMonitor()); BuildPathsBlock.addJavaNature(project, new NullProgressMonitor()); } }
/** * Adds the Java nature to the project (if not set yet) and configures the build classpath. * * @param newProjectCompliance compliance to set for a new project, can be <code>null</code> * @param monitor a progress monitor to report progress or <code>null</code> if * progress reporting is not desired * @throws CoreException Thrown when the configuring the Java project failed. * @throws InterruptedException Thrown when the operation has been canceled. * @since 3.5 */ public void configureJavaProject(String newProjectCompliance, IProgressMonitor monitor) throws CoreException, InterruptedException { if (monitor == null) { monitor= new NullProgressMonitor(); } int nSteps= 6; monitor.beginTask(NewWizardMessages.JavaCapabilityConfigurationPage_op_desc_java, nSteps); try { IProject project= getJavaProject().getProject(); BuildPathsBlock.addJavaNature(project, new SubProgressMonitor(monitor, 1)); getBuildPathsBlock().configureJavaProject(newProjectCompliance, new SubProgressMonitor(monitor, 5)); } catch (OperationCanceledException e) { throw new InterruptedException(); } finally { monitor.done(); } }
/** * Adds the Java nature to the project (if not set yet) and configures the build classpath. * * @param monitor a progress monitor to report progress or <code>null</code> if * progress reporting is not desired * @throws CoreException Thrown when the configuring the Java project failed. * @throws InterruptedException Thrown when the operation has been canceled. */ public void configureJavaProject(IProgressMonitor monitor) throws CoreException, InterruptedException { if (monitor == null) { monitor= new NullProgressMonitor(); } int nSteps= 6; monitor.beginTask(NewWizardMessages.JavaCapabilityConfigurationPage_op_desc_java, nSteps); try { IProject project= getJavaProject().getProject(); BuildPathsBlock.addJavaNature(project, new SubProgressMonitor(monitor, 1)); getBuildPathsBlock().configureJavaProject(new SubProgressMonitor(monitor, 5)); } catch (OperationCanceledException e) { throw new InterruptedException(); } finally { monitor.done(); } }
/** * Adds the Java nature to the project (if not set yet) and configures the build classpath. * * @param newProjectCompliance compliance to set for a new project, can be <code>null</code> * @param monitor a progress monitor to report progress or <code>null</code> if * progress reporting is not desired * @throws CoreException Thrown when the configuring the Java project failed. * @throws InterruptedException Thrown when the operation has been canceled. * @since 3.5 */ public void configureJavaProject(String newProjectCompliance, IProgressMonitor monitor) throws CoreException, InterruptedException { if (monitor == null) { monitor= new NullProgressMonitor(); } int nSteps= 6; monitor.beginTask(NewWizardMessages.JavaCapabilityConfigurationPage_op_desc_java, nSteps); try { IProject project= getJavaProject().getProject(); BuildPathsBlock.addJavaNature(project, new SubProgressMonitor(monitor, 1)); getBuildPathsBlock().configureJavaProject(newProjectCompliance, new SubProgressMonitor(monitor, 5)); } catch (OperationCanceledException e) { throw new InterruptedException(); } finally { monitor.done(); } }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { if (monitor == null) { monitor= new NullProgressMonitor(); } monitor.beginTask(NewWizardMessages.NewJavaProjectWizardPage_op_desc, 10); // initialize if needed if (fProjectModified || isNewProjectHandle()) { initBuildPaths(); } // create the project try { IPath locationPath= getLocationPath(); BuildPathsBlock.createProject(getProjectHandle(), locationPath != null ? URIUtil.toURI(locationPath) : null, new SubProgressMonitor(monitor, 2)); BuildPathsBlock.addJavaNature(getProjectHandle(), new SubProgressMonitor(monitor, 2)); fBuildPathsBlock.configureJavaProject(new SubProgressMonitor(monitor, 6)); } catch (CoreException e) { throw new InvocationTargetException(e); } catch (OperationCanceledException e) { throw new InterruptedException(); } finally { monitor.done(); } } };
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { if (monitor == null) { monitor= new NullProgressMonitor(); } monitor.beginTask(NewWizardMessages.NewJavaProjectWizardPage_op_desc, 10); // initialize if needed if (fProjectModified || isNewProjectHandle()) { initBuildPaths(); } // create the project try { IPath locationPath= getLocationPath(); BuildPathsBlock.createProject(getProjectHandle(), locationPath != null ? URIUtil.toURI(locationPath) : null, new SubProgressMonitor(monitor, 2)); BuildPathsBlock.addJavaNature(getProjectHandle(), new SubProgressMonitor(monitor, 2)); fBuildPathsBlock.configureJavaProject(new SubProgressMonitor(monitor, 6)); } catch (CoreException e) { throw new InvocationTargetException(e); } catch (OperationCanceledException e) { throw new InterruptedException(); } finally { monitor.done(); } } };
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { if (monitor == null) { monitor= new NullProgressMonitor(); } monitor.beginTask(NewWizardMessages.NewJavaProjectWizardPage_op_desc, 10); // initialize if needed if (fProjectModified || isNewProjectHandle()) { initBuildPaths(); } // create the project try { IPath locationPath= getLocationPath(); BuildPathsBlock.createProject(getProjectHandle(), locationPath != null ? URIUtil.toURI(locationPath) : null, new SubProgressMonitor(monitor, 2)); BuildPathsBlock.addJavaNature(getProjectHandle(), new SubProgressMonitor(monitor, 2)); fBuildPathsBlock.configureJavaProject(new SubProgressMonitor(monitor, 6)); } catch (CoreException e) { throw new InvocationTargetException(e); } catch (OperationCanceledException e) { throw new InterruptedException(); } finally { monitor.done(); } } };
BuildPathsBlock.addJavaNature(project, new SubProgressMonitor(pm, 1)); IJavaProject javaProject= JavaCore.create(project);
BuildPathsBlock.addJavaNature(project, new SubProgressMonitor(pm, 1)); IJavaProject javaProject= JavaCore.create(project);