Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2009-04-13 14:23:41 -0400
committerpelder2009-04-13 14:23:41 -0400
commitea3b1abcf7805fef62b4c339fe33709af114fe5f (patch)
tree5d4a07e6bde53d45ccba384f5baf648f23347b5f
parent336517518069ff07f56405c4c6971f885152fa90 (diff)
downloadorg.eclipse.jet-ea3b1abcf7805fef62b4c339fe33709af114fe5f.tar.gz
org.eclipse.jet-ea3b1abcf7805fef62b4c339fe33709af114fe5f.tar.xz
org.eclipse.jet-ea3b1abcf7805fef62b4c339fe33709af114fe5f.zip
[272052] New JET Project wizard does not open any files after completing
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectWizard.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectWizard.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectWizard.java
index ab120b6..5b83af1 100644
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectWizard.java
+++ b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectWizard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,8 +19,12 @@ package org.eclipse.jet.ui.newproject;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
@@ -36,6 +40,8 @@ import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
/**
* Implement New Project Wizard for JET2 transforms.
@@ -73,6 +79,22 @@ public class NewProjectWizard extends Wizard implements INewWizard {
new ErrorDialog(getShell(), NewProjectWizard.this.getWindowTitle(),
Messages.NewProjectWizard_ErrorInJETTransform,
result, IStatus.ERROR | IStatus.WARNING).open();
+ } else {
+ final IPath mainTemplatePath = new Path(projectPage
+ .getProjectName()).append(
+ projectPage.getTemplateFolder()).append(
+ "main.jet"); //$NON-NLS-1$
+ final IFile mainTemplate = ResourcesPlugin
+ .getWorkspace().getRoot().getFile(
+ mainTemplatePath);
+ if (mainTemplate.exists()) {
+ try {
+ IDE.openEditor(Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ mainTemplate);
+ } catch (PartInitException e) {
+ InternalJET2Platform.logError(Messages.NewProjectWizard_ErrorCreatingProject, e);
+ }
+ }
}
}});
} catch (InvocationTargetException e) {

Back to the top