Author: snjeza
Date: 2008-10-29 18:37:02 -0400 (Wed, 29 Oct 2008)
New Revision: 11313
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
Log:
JBIDE-3031 Project examples (Seam Booking) don't start on server.
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
===================================================================
---
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2008-10-29
21:15:10 UTC (rev 11312)
+++
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2008-10-29
22:37:02 UTC (rev 11313)
@@ -118,7 +118,6 @@
protected void handleClassButtonSelected() {
getControl().setCursor(new Cursor(getShell().getDisplay(), SWT.CURSOR_WAIT));
IProject project = (IProject) model.getProperty(PROJECT);
- IVirtualComponent component = ComponentCore.createComponent(project);
MultiSelectFilteredFileSelectionDialog ms = new
MultiSelectFilteredFileSelectionDialog(
getShell(),
"New Portlet",
@@ -126,7 +125,13 @@
new String[0],
false,
project);
- IContainer root = component.getRootFolder().getUnderlyingFolder();
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IContainer root = null;
+ if (component != null) {
+ root = component.getRootFolder().getUnderlyingFolder();
+ } else {
+ root = project;
+ }
ms.setInput(root);
ms.open();
if (ms.getReturnCode() == Window.OK) {
Show replies by date