Author: scabanovich
Date: 2011-12-02 18:48:43 -0500 (Fri, 02 Dec 2011)
New Revision: 36906
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbObject.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/LibraryProxy.java
Log:
JBIDE-10324
https://issues.jboss.org/browse/JBIDE-10324
Storing/loading model for MyFaces tag libraries is fixed.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbObject.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbObject.java 2011-12-02
23:42:41 UTC (rev 36905)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbObject.java 2011-12-02
23:48:43 UTC (rev 36906)
@@ -208,7 +208,7 @@
if(e_id != null) {
String cls = e_id.getAttribute(XMLStoreConstants.ATTR_CLASS);
if(XMLStoreConstants.CLS_STRING.equals(cls)) {
- id = e_id.getAttribute("string"); //$NON-NLS-1$
+ id = e_id.getAttribute(XMLStoreConstants.ATTR_VALUE);
} else if(XMLStoreConstants.CLS_MODEL_OBJECT.equals(cls)) {
id = XMLStoreHelper.loadModelObject(e_id, context);
} else {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2011-12-02
23:42:41 UTC (rev 36905)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2011-12-02
23:48:43 UTC (rev 36906)
@@ -563,7 +563,7 @@
} else {
//consider other cases;
}
- if(tagLib != null && !(tagLib instanceof ICompositeTagLibrary)) {
+ if(tagLib != null && !(tagLib instanceof ICompositeTagLibrary) &&
!(tagLib instanceof MyFacesTagLibrary)) {
LibraryProxy proxy = new LibraryProxy(tagLib);
proxy.loadXML(library, context);
tagLib = proxy.getLibrary();
@@ -611,7 +611,7 @@
for (ITagLibrary d: fs) {
if(d instanceof ICustomTagLibrary) continue;
AbstractTagLib t = (AbstractTagLib)d;
- if(!(t instanceof ICompositeTagLibrary)) {
+ if(!(t instanceof ICompositeTagLibrary) && !(t instanceof
MyFacesTagLibrary)) {
LibraryProxy proxy = new LibraryProxy(t);
proxy.toXML(cse, context);
} else {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/LibraryProxy.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/LibraryProxy.java 2011-12-02
23:42:41 UTC (rev 36905)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/LibraryProxy.java 2011-12-02
23:48:43 UTC (rev 36906)
@@ -46,12 +46,16 @@
public void loadXML(Element element, Properties context) {
super.loadXML(element, context);
- XModelObject o = (XModelObject)getId();
- LoadedDeclarations ds = new XMLScanner().parse(o, getSourcePath(),
library.getKbProject());
- if(ds != null && !ds.getLibraries().isEmpty()) {
- library = (AbstractTagLib)ds.getLibraries().get(0);
+ if(getId() instanceof XModelObject) {
+ XModelObject o = (XModelObject)getId();
+ LoadedDeclarations ds = new XMLScanner().parse(o, getSourcePath(),
library.getKbProject());
+ if(ds != null && !ds.getLibraries().isEmpty()) {
+ library = (AbstractTagLib)ds.getLibraries().get(0);
+ } else {
+ library = null;
+ }
} else {
- library = null;
+ library.loadXML(element, context);
}
}
}