Author: scabanovich
Date: 2009-04-30 07:46:26 -0400 (Thu, 30 Apr 2009)
New Revision: 14975
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java 2009-04-30
10:11:01 UTC (rev 14974)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java 2009-04-30
11:46:26 UTC (rev 14975)
@@ -78,7 +78,11 @@
};
return reference;
}
-
+
+ public void addAttribute(String path, IValueInfo value) {
+ attributes.put(path, value);
+ }
+
public void setName(IValueInfo value) {
attributes.put(ISeamXmlComponentDeclaration.NAME, value);
name = value == null ? null : value.getValue();
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2009-04-30
10:11:01 UTC (rev 14974)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2009-04-30
11:46:26 UTC (rev 14975)
@@ -142,6 +142,13 @@
if(scope != null) {
factory.setScope(scope);
}
+
+ ValueInfo _a = new ValueInfo();
+ _a.value = FACTORY_ANNOTATION_TYPE;
+ _a.valueStartPosition = a.getStartPosition();
+ _a.valueLength = a.getLength();
+ factory.addAttribute(FACTORY_ANNOTATION_TYPE, _a);
+
ds.getFactories().add(factory);
}
}
@@ -171,9 +178,19 @@
BijectedAttribute att = createBijectedAttribute(types);
+ Annotation in = as.get(BijectedAttributeType.IN);
+ if(in != null) {
+ ValueInfo _in = new ValueInfo();
+ _in.value = IN_ANNOTATION_TYPE;
+ _in.valueStartPosition = in.getStartPosition();
+ _in.valueLength = in.getLength();
+ att.addAttribute(IN_ANNOTATION_TYPE, _in);
+ }
+
ValueInfo name = ValueInfo.getValueInfo(main, null);
att.setValue(name);
- if(name == null || isDataModelSelectionType) {
+ if(name == null || isDataModelSelectionType
+ || name.value == null || name.value.length() == 0) {
name = new ValueInfo();
name.valueStartPosition = m.getStartPosition();
name.valueLength = m.getLength();
@@ -200,9 +217,19 @@
BijectedAttribute att = createBijectedAttribute(types);
+ Annotation in = as.get(BijectedAttributeType.IN);
+ if(in != null) {
+ ValueInfo _in = new ValueInfo();
+ _in.value = IN_ANNOTATION_TYPE;
+ _in.valueStartPosition = in.getStartPosition();
+ _in.valueLength = in.getLength();
+ att.addAttribute(IN_ANNOTATION_TYPE, _in);
+ }
+
ValueInfo name = ValueInfo.getValueInfo(main, null);
att.setValue(name);
- if(name == null || isDataModelSelectionType) {
+ if(name == null || isDataModelSelectionType
+ || name.value == null || name.value.length() == 0) {
name = new ValueInfo();
name.valueStartPosition = m.getStartPosition();
name.valueLength = m.getLength();