Author: akazakov
Date: 2010-09-24 07:23:50 -0400 (Fri, 24 Sep 2010)
New Revision: 25144
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
Log:
JBIDE-7167
https://jira.jboss.org/browse/JBIDE-7167
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2010-09-24
09:52:55 UTC (rev 25143)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2010-09-24
11:23:50 UTC (rev 25144)
@@ -344,46 +344,46 @@
context = createJavaContext(file);
} else if(JAVA_PROPERTIES_CONTENT_TYPE.equalsIgnoreCase(typeId)) {
context = createPropertiesContext(file);
- } else if (typeId != null) {
- context = defaultContextType == null ?
- createPageContextInstance(typeId) :
- createContextInstanceOfType(defaultContextType);
- if (context == null)
- return null;
-
- context.setResource(file);
- context.setElResolvers(ELResolverFactoryManager.getInstance().getResolvers(file));
-
- if (context instanceof JspContextImpl && !(context instanceof
FaceletPageContextImpl)) {
- // Fill JSP namespaces defined in TLDCMDocumentManager
- fillJSPNameSpaces((JspContextImpl)context);
- }
-
- // The subsequently called functions may use the file and document
- // already stored in context for their needs
- if (context instanceof FaceletPageContextImpl) {
- IModelManager manager = StructuredModelManager.getModelManager();
- if(manager == null) {
- return context;
- }
- IStructuredModel model = null;
- try {
- model = manager.getModelForRead(file);
- if (model instanceof IDOMModel) {
- IDOMModel domModel = (IDOMModel) model;
- IDOMDocument document = domModel.getDocument();
- fillContextForChildNodes(document, context, parents);
- }
- } catch (CoreException e) {
- WebKbPlugin.getDefault().logError(e);
- } catch (IOException e) {
- WebKbPlugin.getDefault().logError(e);
- } finally {
- if (model != null) {
- model.releaseFromRead();
- }
- }
- }
+// } else if (typeId != null) {
+// context = defaultContextType == null ?
+// createPageContextInstance(typeId) :
+// createContextInstanceOfType(defaultContextType);
+// if (context == null)
+// return null;
+//
+// context.setResource(file);
+// context.setElResolvers(ELResolverFactoryManager.getInstance().getResolvers(file));
+//
+// if (context instanceof JspContextImpl && !(context instanceof
FaceletPageContextImpl)) {
+// // Fill JSP namespaces defined in TLDCMDocumentManager
+// fillJSPNameSpaces((JspContextImpl)context);
+// }
+//
+// // The subsequently called functions may use the file and document
+// // already stored in context for their needs
+// if (context instanceof FaceletPageContextImpl) {
+// IModelManager manager = StructuredModelManager.getModelManager();
+// if(manager == null) {
+// return context;
+// }
+// IStructuredModel model = null;
+// try {
+// model = manager.getModelForRead(file);
+// if (model instanceof IDOMModel) {
+// IDOMModel domModel = (IDOMModel) model;
+// IDOMDocument document = domModel.getDocument();
+// fillContextForChildNodes(document, context, parents);
+// }
+// } catch (CoreException e) {
+// WebKbPlugin.getDefault().logError(e);
+// } catch (IOException e) {
+// WebKbPlugin.getDefault().logError(e);
+// } finally {
+// if (model != null) {
+// model.releaseFromRead();
+// }
+// }
+// }
} else {
// ctm = System.currentTimeMillis();
// System.out.println("Create Context : " + file.getFullPath().toString() +
", Totals: " + cache.size());