diff options
author | cbateman | 2009-01-23 02:39:27 +0000 |
---|---|---|
committer | cbateman | 2009-01-23 02:39:27 +0000 |
commit | 51e8494d8dbeb6108c5423f07009e3150e2ca593 (patch) | |
tree | 1273dfe1d31e93406b87139448caadf0d83c1eff | |
parent | 8e4fe922fa7b19e9a82c02f3a90d210bc77ea313 (diff) | |
download | webtools.jsf-51e8494d8dbeb6108c5423f07009e3150e2ca593.tar.gz webtools.jsf-51e8494d8dbeb6108c5423f07009e3150e2ca593.tar.xz webtools.jsf-51e8494d8dbeb6108c5423f07009e3150e2ca593.zip |
Patch https://bugs.eclipse.org/bugs/attachment.cgi?id=122803.
Defers calling getBeanProperties until we know we need it since it is expensive.
-rw-r--r-- | jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java index a30295a21..163cae9a5 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java @@ -234,8 +234,6 @@ public class XMLViewObjectConstructionStrategy extends final Map<String, String> attributeToPropertyMap) { final ComponentTypeInfo typeInfo = tagElement.getComponent(); - final Map<String, JDTBeanProperty> properties = DTComponentIntrospector - .getBeanProperties(typeInfo, _constructionData.getProject()); final Map<String, ITagAttributeHandler> attributeHandlers = tagElement .getAttributeHandlers(); @@ -243,6 +241,8 @@ public class XMLViewObjectConstructionStrategy extends if (nodeMap != null && attributeHandlers != null) { + Map<String, JDTBeanProperty> properties = null; + for (int i = 0; i < nodeMap.getLength(); i++) { final Attr attr = (Attr) nodeMap.item(i); @@ -256,6 +256,10 @@ public class XMLViewObjectConstructionStrategy extends .get(name); if (attrHandler instanceof IComponentPropertyHandler) { + if (properties == null) + { + properties = DTComponentIntrospector.getBeanProperties(typeInfo, _constructionData.getProject()); + } mapComponentProperty(uri, srcElement, properties, (IComponentPropertyHandler) attrHandler, attr, name, initMap, attributeHandlers, |