Author: rob.stryker(a)jboss.com
Date: 2009-06-10 06:42:22 -0400 (Wed, 10 Jun 2009)
New Revision: 15845
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.override.ui/src/org/jboss/ide/eclipse/as/wtp/override/ui/propertypage/AddModuleDependenciesPropertiesPage.java
Log:
fixed a bug in the new override plugin
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.override.ui/src/org/jboss/ide/eclipse/as/wtp/override/ui/propertypage/AddModuleDependenciesPropertiesPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.override.ui/src/org/jboss/ide/eclipse/as/wtp/override/ui/propertypage/AddModuleDependenciesPropertiesPage.java 2009-06-10
09:50:27 UTC (rev 15844)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.override.ui/src/org/jboss/ide/eclipse/as/wtp/override/ui/propertypage/AddModuleDependenciesPropertiesPage.java 2009-06-10
10:42:22 UTC (rev 15845)
@@ -88,6 +88,7 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import
org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
import
org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
import
org.eclipse.wst.common.componentcore.internal.operation.RemoveReferenceComponentsDataModelProvider;
@@ -467,11 +468,14 @@
getProjectLabelProvider(), getProjectContentProvider());
if (d.open() == Window.OK) {
IProject selected = (IProject) d.getFirstResult();
- addedElements.add(selected);
+ Object selected2 = ModuleCoreNature.isFlexibleProject(selected) ?
+ ComponentCore.createComponent(selected) : selected;
+ addedElements.add(selected2);
+ objectToRuntimePath.put(selected2, "/");
refresh();
TableItem[] items = availableComponentsViewer.getTable().getItems();
for (int i = 0; i < items.length; i++)
- if (items[i].getData().equals(selected))
+ if (items[i].getData().equals(selected2))
items[i].setChecked(true);
}
}
@@ -1059,8 +1063,10 @@
Object o;
while(i.hasNext()) {
o = i.next();
- if( o instanceof IProject )
+ if( o instanceof IProject && !ModuleCoreNature.isFlexibleProject((IProject)o))
projects.add((IProject)o);
+ else if( o instanceof IProject )
+ components.add(ComponentCore.createComponent(((IProject)o)));
else if( o instanceof IVirtualComponent)
components.add((IVirtualComponent)o);
}
Show replies by date