Author: vrubezhny
Date: 2010-03-04 07:44:54 -0500 (Thu, 04 Mar 2010)
New Revision: 20649
Modified:
branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
Log:
JBIDE-5992: Inserting tag into selected element causes NullPointerException
issue is fixed
Modified:
branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
---
branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2010-03-04
12:44:41 UTC (rev 20648)
+++
branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2010-03-04
12:44:54 UTC (rev 20649)
@@ -503,6 +503,8 @@
private void fillElReferencesForNode(IDOMNode node, XmlContextImpl context) {
if(Node.ELEMENT_NODE == node.getNodeType() || Node.TEXT_NODE == node.getNodeType()) {
IStructuredDocumentRegion regionNode = node.getFirstStructuredDocumentRegion();
+ if (regionNode == null)
+ return;
ITextRegionList regions = regionNode.getRegions();
for(int i=0; i<regions.size(); i++) {
ITextRegion region = regions.get(i);
Show replies by date