Author: scabanovich
Date: 2008-10-20 11:01:18 -0400 (Mon, 20 Oct 2008)
New Revision: 11003
Modified:
branches/jbosstools-3.0.0.Beta1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java
branches/jbosstools-3.0.0.Beta1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java
Log:
JBIDE-2928
Modified:
branches/jbosstools-3.0.0.Beta1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java 2008-10-20
14:57:43 UTC (rev 11002)
+++
branches/jbosstools-3.0.0.Beta1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java 2008-10-20
15:01:18 UTC (rev 11003)
@@ -17,17 +17,19 @@
* @author Alexey Kazakov
*/
public enum BijectedAttributeType implements SeamAnnotations {
- IN(IN_ANNOTATION_TYPE, true),
- OUT(OUT_ANNOTATION_TYPE, true),
- DATA_BINDER(DATA_MODEL_ANNOTATION_TYPE, true),
- DATA_MODEL_SELECTION(DATA_MODEL_SELECTION_ANNOTATION_TYPE, false),
- DATA_MODEL_SELECTION_INDEX(DATA_MODEL_SELECTION_INDEX_ANNOTATION_TYPE, false);
+ IN(IN_ANNOTATION_TYPE, true, false),
+ OUT(OUT_ANNOTATION_TYPE, true, true),
+ DATA_BINDER(DATA_MODEL_ANNOTATION_TYPE, true, true),
+ DATA_MODEL_SELECTION(DATA_MODEL_SELECTION_ANNOTATION_TYPE, false, true),
+ DATA_MODEL_SELECTION_INDEX(DATA_MODEL_SELECTION_INDEX_ANNOTATION_TYPE, false, true);
boolean isUsingMemberName;
+ boolean isOutjection;
- BijectedAttributeType(String annotationType, boolean isUsingMemberName) {
+ BijectedAttributeType(String annotationType, boolean isUsingMemberName, boolean
isOutjection) {
this.annotationType = annotationType;
this.isUsingMemberName = isUsingMemberName;
+ this.isOutjection = isOutjection;
}
String annotationType;
@@ -43,4 +45,8 @@
return isUsingMemberName;
}
-}
\ No newline at end of file
+ public boolean isOut() {
+ return isOutjection;
+ }
+
+}
Modified:
branches/jbosstools-3.0.0.Beta1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java 2008-10-20
14:57:43 UTC (rev 11002)
+++
branches/jbosstools-3.0.0.Beta1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java 2008-10-20
15:01:18 UTC (rev 11003)
@@ -43,9 +43,11 @@
}
public boolean isContextVariable() {
- //TODO which else?
- return isOfType(BijectedAttributeType.OUT)
- || isOfType(BijectedAttributeType.DATA_BINDER);
+ if(types == null || types.length == 0) return false;
+ for (int i = 0; i < types.length; i++) {
+ if(types[i].isOut()) return true;
+ }
+ return false;
}
public void setTypes(BijectedAttributeType[] types) {
Show replies by date