}
}
+ try {
+ RtProjectNature.makeRtProject(_newProject, monitor);
+ } catch (CoreException e) {
+ logger.error(e.getMessage(), e);
+ }
+
_newProject.refreshLocal(IResource.DEPTH_INFINITE, monitor);
monitor.worked(1);
final IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
description.setLocationURI(location);
- // create the new project operation
- // IRunnableWithProgress op = new IRunnableWithProgress() {
- // @Override
- // public void run(IProgressMonitor monitor) throws
- // InvocationTargetException {
CreateProjectOperation op = new CreateProjectOperation(description,
Messages.NewArtikProjectWizard_CreateOperationLabel);
try {
} catch (ExecutionException e) {
// throw new InvocationTargetException(e);
}
- // }
- // };
-
- try {
- RtProjectNature.makeRtProject(newProjectHandle, monitor);
- } catch (CoreException e) {
- logger.error(e.getMessage(), e);
- }
-
- // // run the new project creation operation
- // try {
- // getContainer().run(true, true, op);
- // } catch (InterruptedException e) {
- // return null;
- // } catch (InvocationTargetException e) {
- // Throwable t = e.getTargetException();
- // if (t instanceof ExecutionException && t.getCause() instanceof
- // CoreException) {
- // CoreException cause = (CoreException) t.getCause();
- // IStatus status = null;
- //// if (cause.getStatus().getCode() ==
- // IResourceStatus.CASE_VARIANT_EXISTS) {
- //// status = BundleMakerUiUtils.newWarning(
- //// format("The underlying file system is case insensitive. There is an
- // existing project or directory that conflicts with '%s'",
- //// newProjectHandle.getName()),
- //// cause);
- //// } else {
- //// status = BundleMakerUiUtils.newStatus(cause, "Problems while
- // creating the project");
- //// }
- // StatusAdapter statusAdapter = new StatusAdapter(status);
- // statusAdapter.setProperty(IStatusAdapterConstants.TITLE_PROPERTY,
- // "Project creation problems");
- // StatusManager.getManager().handle(status, StatusManager.BLOCK);
- // } else {
- // IStatus status = null;
- // StatusAdapter statusAdapter = new StatusAdapter(status);
- // statusAdapter.setProperty(IStatusAdapterConstants.TITLE_PROPERTY,
- // "Project creation problems");
- // StatusManager.getManager().handle(statusAdapter, StatusManager.LOG |
- // StatusManager.BLOCK);
- // }
- // return null;
- // }
-
- // try {
- // BundleMakerCore.addBundleMakerNature(newProjectHandle);
- // if (mainPage.isTransformationScriptSupportSelected()) {
- //
- // TransformationScriptSupport.enableTransformationScriptSupport(newProjectHandle,
- // PreferenceConstants.getDefaultJRELibrary());
- //
- // }
- // IBundleMakerProject bundleMakerProject =
- // BundleMakerCore.getBundleMakerProject(newProjectHandle);
- // IModifiableProjectDescription modifiableProjectDescription =
- // bundleMakerProject
- // .getModifiableProjectDescription();
- // modifiableProjectDescription.setJre(mainPage.getSelectedJreId());
- // modifiableProjectDescription.save();
- //
- // } catch (CoreException ex) {
- // IStatus status = BundleMakerUiUtils.newStatus(ex, "Could not add
- // Bundlemaker nature");
- // StatusAdapter statusAdapter = new StatusAdapter(status);
- // statusAdapter.setProperty(IStatusAdapterConstants.TITLE_PROPERTY,
- // "Project creation problems");
- // StatusManager.getManager().handle(status, StatusManager.BLOCK);
- // return null;
- //
- // }
_newProject = newProjectHandle;