Author: scabanovich
Date: 2009-04-29 07:02:26 -0400 (Wed, 29 Apr 2009)
New Revision: 14957
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java 2009-04-29
10:45:26 UTC (rev 14956)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java 2009-04-29
11:02:26 UTC (rev 14957)
@@ -197,6 +197,19 @@
public Set<ISeamContextVariable> getVariablesByPath(IPath path);
/**
+ * Utility method collecting all bijected attributes in java declarations.
+ * @return set of all bijections in Seam project.
+ */
+ public Set<IBijectedAttribute> getBijectedAttributes();
+
+ /**
+ * Utility method collecting all bijections of given type in java declarations.
+ * @param type
+ * @return set of all bijections of given type in Seam project.
+ */
+ public Set<IBijectedAttribute> getBijectedAttributesByType(BijectedAttributeType
type);
+
+ /**
* @return all factories methods of project
*/
public ISeamFactory[] getFactories();
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2009-04-29
10:45:26 UTC (rev 14956)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2009-04-29
11:02:26 UTC (rev 14957)
@@ -38,6 +38,8 @@
import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.xml.XMLUtilities;
+import org.jboss.tools.seam.core.BijectedAttributeType;
+import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamContextVariable;
@@ -1310,6 +1312,26 @@
return result;
}
+ public Set<IBijectedAttribute> getBijectedAttributes() {
+ Set<IBijectedAttribute> result = new HashSet<IBijectedAttribute>();
+ ISeamJavaComponentDeclaration[] ds = components.getJavaDeclarationsArray();
+ for (ISeamJavaComponentDeclaration d: ds) {
+ Set<IBijectedAttribute> as = d.getBijectedAttributes();
+ if(as != null) result.addAll(as);
+ }
+ return result;
+ }
+
+ public Set<IBijectedAttribute> getBijectedAttributesByType(BijectedAttributeType
type) {
+ Set<IBijectedAttribute> result = new HashSet<IBijectedAttribute>();
+ ISeamJavaComponentDeclaration[] ds = components.getJavaDeclarationsArray();
+ for (ISeamJavaComponentDeclaration d: ds) {
+ Set<IBijectedAttribute> as = d.getBijectedAttributesByType(type);
+ if(as != null) result.addAll(as);
+ }
+ return result;
+ }
+
/**
*
* @param v