Author: scabanovich
Date: 2007-07-06 12:07:13 -0400 (Fri, 06 Jul 2007)
New Revision: 2349
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
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/scanner/java/SeamAnnotations.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java
Log:
EXIN-217 Added processing of javax.ejb.Stateful annotation
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-07-06
15:32:10 UTC (rev 2348)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-07-06
16:07:13 UTC (rev 2349)
@@ -121,6 +121,10 @@
public boolean isStateful() {
return stateful;
}
+
+ public void setStateful(boolean b) {
+ stateful = b;
+ }
public void removeBijectedAttribute(IBijectedAttribute attribute) {
bijectedAttributes.remove(attribute);
@@ -192,7 +196,7 @@
return precedence;
}
- /* (non-Javadoc)
+ /**
* @see
org.jboss.tools.seam.core.ISeamJavaComponentDeclaration#setPrecedence(org.jboss.tools.seam.core.SeamComponentPrecedenceType)
*/
public void setPrecedence(int precedence) {
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 2007-07-06
15:32:10 UTC (rev 2348)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-06
16:07:13 UTC (rev 2349)
@@ -140,6 +140,7 @@
componentDeclarationsRemoved(old);
loaded = current;
current = null;
+ c = getComponent(name);
} else {
continue;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/SeamAnnotations.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/SeamAnnotations.java 2007-07-06
15:32:10 UTC (rev 2348)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/SeamAnnotations.java 2007-07-06
16:07:13 UTC (rev 2349)
@@ -16,6 +16,6 @@
public static String FACTORY_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX +
"Factory";
- public static String STATEFUL_TYPE = "javax.ejb.Stateful";
+ public static String STATEFUL_ANNOTATION_TYPE = "javax.ejb.Stateful";
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassScanner.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassScanner.java 2007-07-06
15:32:10 UTC (rev 2348)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassScanner.java 2007-07-06
16:07:13 UTC (rev 2349)
@@ -97,7 +97,9 @@
Map<String,Annotation> map = null;
for (int i = 0; i < as.length; i++) {
Class<?> acls = as[i].annotationType();
- if(acls.getName().startsWith(SEAM_ANNOTATION_TYPE_PREFIX)) {
+ if(acls.getName().startsWith(SEAM_ANNOTATION_TYPE_PREFIX) ||
+ //TODO put all non-seam relevant annotations to set
+ acls.getName().equals(STATEFUL_ANNOTATION_TYPE)) {
if(map == null) map = new HashMap<String, Annotation>();
map.put(acls.getName(), as[i]);
}
@@ -123,6 +125,10 @@
Object precedence = getValue(a, "precedence");
if(precedence instanceof Integer) component.setPrecedence((Integer)precedence);
}
+ a = map.get(STATEFUL_ANNOTATION_TYPE);
+ if(a != null) {
+ component.setStateful(true);
+ }
}
Method[] ms = null;
try {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java 2007-07-06
15:32:10 UTC (rev 2348)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java 2007-07-06
16:07:13 UTC (rev 2349)
@@ -155,8 +155,8 @@
IClassFile typeRoot = (IClassFile)es[i];
IType type = typeRoot.getType();
String className = type.getFullyQualifiedName();
- if(className.indexOf("ProcessInstanceF") >= 0) {
- System.out.println("!!");
+ if(className.equals("org.jboss.seam.core.TransactionListener")) {
+// System.out.println("!!");
}
Class<?> cls = null;
@@ -178,7 +178,7 @@
if(ds1 != null) {
ds.add(ds1);
}
- System.out.println(className);
+// System.out.println(className);
}
}
}
Show replies by date