Author: scabanovich
Date: 2011-11-17 19:49:06 -0500 (Thu, 17 Nov 2011)
New Revision: 36429
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java
Log:
JBIDE-10195
https://issues.jboss.org/browse/JBIDE-10195
Seam 2 Components view should show Seam 2 project when it is opened in new window.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-11-18 00:47:16 UTC (rev
36428)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-11-18 00:49:06 UTC (rev
36429)
@@ -204,12 +204,14 @@
id="org.jboss.tools.seam.ui.views.rootContent">
<triggerPoints>
<or>
+ <instanceof value="org.eclipse.core.resources.IProject" />
<instanceof value="org.eclipse.core.resources.IWorkspaceRoot" />
<instanceof value="org.jboss.tools.seam.core.ISeamElement" />
</or>
</triggerPoints>
<possibleChildren>
<or>
+ <instanceof value="org.eclipse.core.resources.IProject" />
<instanceof value="org.eclipse.core.resources.IWorkspaceRoot"
/>
<instanceof value="org.jboss.tools.seam.core.ISeamElement" />
</or>
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java 2011-11-18
00:47:16 UTC (rev 36428)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java 2011-11-18
00:49:06 UTC (rev 36429)
@@ -115,6 +115,15 @@
}
public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof IProject) {
+ ISeamProject p = SeamCorePlugin.getSeamProject((IProject)inputElement, false);
+ if (p == null) return new Object[0];
+ if(!processed.contains(p)) {
+ processed.add(p);
+ p.addSeamProjectListener(this);
+ }
+ return new Object[]{p};
+ }
return getChildren(inputElement);
}