[149899] Clicking finish twice after New Dynamic Web Project is in...
diff --git a/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/WSTWebUIPlugin.java b/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/WSTWebUIPlugin.java
index 7f02de4..96aa54d 100644
--- a/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/WSTWebUIPlugin.java
+++ b/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/WSTWebUIPlugin.java
@@ -22,6 +22,9 @@
* The main plugin class to be used in the desktop.
*/
public class WSTWebUIPlugin extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.wst.web.ui"; //$NON-NLS-1$
+
// The shared instance.
private static WSTWebUIPlugin plugin;
public static final String[] ICON_DIRS = new String[]{"icons/full/obj16", //$NON-NLS-1$
diff --git a/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java b/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java
index 17e3b72..09bae1a 100644
--- a/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java
+++ b/plugins/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/wizards/NewProjectDataModelFacetWizard.java
@@ -24,6 +24,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -288,7 +289,16 @@
final Set fixed = this.template.getFixedProjectFacets();
this.fproj.setFixedProjectFacets(fixed);
- } finally {
+
+ try {
+ getFacetProjectNotificationOperation().execute(new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ String msg = e.getMessage();
+ if( msg == null ) msg = ""; //$NON-NLS-1$
+ final IStatus st = new Status( IStatus.ERROR, WSTWebUIPlugin.PLUGIN_ID, 0, msg, e );
+ throw new CoreException( st );
+ }
+ } finally {
monitor.done();
}
}
@@ -405,11 +415,6 @@
String projName = getProjectName();
BasicNewResourceWizard.selectAndReveal(ResourcesPlugin.getWorkspace().getRoot().getProject(projName), WSTWebUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow());
- try {
- getFacetProjectNotificationOperation().execute(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- throw new InvocationTargetException(e);
- }
}
protected IDataModelOperation getFacetProjectNotificationOperation() {