Author: scabanovich
Date: 2011-10-06 15:43:50 -0400 (Thu, 06 Oct 2011)
New Revision: 35434
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigConstants.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/Util.java
Log:
JBIDE-9852
https://issues.jboss.org/browse/JBIDE-9852
Seam config migrated to 3.1.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/plugin.xml 2011-10-06 19:40:32
UTC (rev 35433)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/plugin.xml 2011-10-06 19:43:50
UTC (rev 35434)
@@ -5,6 +5,10 @@
point="org.jboss.tools.cdi.core.cdiextensions">
<cdiextension
class="org.jboss.tools.cdi.seam.config.core.CDISeamConfigExtension"
+
runtime="org.jboss.solder.config.xml.bootstrap.XmlConfigExtension">
+ </cdiextension>
+ <cdiextension
+ class="org.jboss.tools.cdi.seam.config.core.CDISeamConfigExtension"
runtime="org.jboss.seam.config.xml.bootstrap.XmlConfigExtension">
</cdiextension>
</extension>
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigConstants.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigConstants.java 2011-10-06
19:40:32 UTC (rev 35433)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigConstants.java 2011-10-06
19:43:50 UTC (rev 35434)
@@ -56,5 +56,6 @@
public String ATTR_DIMENSIONS = "dimensions";
- public String INLINE_BEAN_QUALIFIER =
"org.jboss.seam.config.xml.fieldset.InlineBeanQualifier";
+ public String INLINE_BEAN_QUALIFIER =
"org.jboss.solder.config.xml.fieldset.InlineBeanQualifier";
+ public String INLINE_BEAN_QUALIFIER_30 =
"org.jboss.seam.config.xml.fieldset.InlineBeanQualifier";
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java 2011-10-06
19:40:32 UTC (rev 35433)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java 2011-10-06
19:43:50 UTC (rev 35434)
@@ -61,15 +61,20 @@
*
*/
public class CDISeamConfigExtension implements ICDIExtension, IBuildParticipantFeature,
IValidatorFeature {
+ private static String ID =
"org.jboss.solder.config.xml.bootstrap.XmlConfigExtension";
+ private static String ID_30 =
"org.jboss.seam.config.xml.bootstrap.XmlConfigExtension";
ConfigDefinitionContext context = new ConfigDefinitionContext();
ConfigFileSet fileSet = new ConfigFileSet();
public static CDISeamConfigExtension getExtension(CDICoreNature project) {
- Set<ICDIExtension> es =
project.getExtensionManager().getExtensions(IBuildParticipantFeature.class);
- for (ICDIExtension ext: es) {
- if(ext instanceof CDISeamConfigExtension) return (CDISeamConfigExtension)ext;
+ ICDIExtension result = project.getExtensionManager().getExtensionByRuntime(ID);
+ if(result == null) {
+ result = project.getExtensionManager().getExtensionByRuntime(ID_30);
}
+ if(result instanceof CDISeamConfigExtension) {
+ return (CDISeamConfigExtension)result;
+ }
return null;
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java 2011-10-06
19:40:32 UTC (rev 35433)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java 2011-10-06
19:43:50 UTC (rev 35434)
@@ -495,6 +495,9 @@
IJavaAnnotation createInlineBeanQualifier() {
IType type = project.getType(CDISeamConfigConstants.INLINE_BEAN_QUALIFIER);
if(type == null) {
+ type = project.getType(CDISeamConfigConstants.INLINE_BEAN_QUALIFIER_30);
+ }
+ if(type == null) {
return null;
}
long id = inlineBeanCount++;
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/Util.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/Util.java 2011-10-06
19:40:32 UTC (rev 35433)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/Util.java 2011-10-06
19:43:50 UTC (rev 35434)
@@ -38,6 +38,7 @@
*/
public class Util implements CDISeamConfigConstants {
public static Map<String, String> EE_TYPES = new HashMap<String, String>();
+ public static Map<String, String> EE_TYPES_30 = new HashMap<String,
String>();
static {
EE_TYPES.put("int", "java.lang.Integer");
@@ -86,7 +87,10 @@
// In Seam3 doc, item 6.7. Overriding the type of an injection point is devoted to
@Exact,
// but item 6.1 does not mentions its package in namespace urn:java:ee.
String[] SEAM_SOLDER = {"Exact"};
- for (String s: SEAM_SOLDER) EE_TYPES.put(s, "org.jboss.seam.solder.core." +
s);
+ for (String s: SEAM_SOLDER) {
+ EE_TYPES.put(s, "org.jboss.solder.core." + s);
+ EE_TYPES_30.put(s, "org.jboss.seam.solder.core." + s);
+ }
}
@@ -109,6 +113,9 @@
String typeName = null;
if(pkg.equals(PACKAGE_EE)) {
typeName = Util.EE_TYPES.get(name);
+ if(typeName == null) {
+ typeName = Util.EE_TYPES_30.get(name);
+ }
} else {
typeName = pkg + "." + name;
}