Author: DartPeng
Date: 2008-10-20 04:23:31 -0400 (Mon, 20 Oct 2008)
New Revision: 10960
Modified:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java
Log:
JBIDE-2935
When the analyzer to parse the model , it can't understand the input data type.
Now I modify some codes to make it can know the input data type to parse that,
Modified:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java 2008-10-20
08:16:32 UTC (rev 10959)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java 2008-10-20
08:23:31 UTC (rev 10960)
@@ -40,6 +40,7 @@
import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
import org.jboss.tools.smooks.utils.UIUtils;
import org.jboss.tools.smooks.xml.model.AbstractXMLObject;
+import org.jboss.tools.smooks.xml.model.DocumentObject;
import org.jboss.tools.smooks.xml.model.TagObject;
import org.jboss.tools.smooks.xml.model.TagPropertyObject;
@@ -203,6 +204,9 @@
public MappingResourceConfigList analyzeMappingSmooksModel(
SmooksResourceListType listType, Object sourceObject,
Object targetObject) {
+ if(sourceObject instanceof DocumentObject){
+ sourceObject = ((DocumentObject)sourceObject).getRootTag();
+ }
if(targetObject instanceof List){
targetObject = (JavaBeanModel) ((List)targetObject).get(0);
}
Show replies by date