Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 293909

Summary: NPE in TaglibModelQueryExtension's function getAvailableElementContent (org.eclipse.jst.jsp.core.internal.modelquery)
Product: [WebTools] WTP Source Editing Reporter: Vikas Chandra <vikas400>
Component: jst.jspAssignee: jst-inbox <jst-inbox>
Status: CLOSED DUPLICATE QA Contact: Chuck Bridgham <cbridgha>
Severity: major    
Priority: P3 CC: nsand.dev
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Vikas Chandra CLA 2009-11-02 05:34:32 EST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: 

TaglibModelQueryExtension is a newly added class in package org.eclipse.jst.jsp.core.internal.modelquery

Appending a meta ElementImplForJSP into another head ElementImplForJSP triggers
a NPE in TaglibModelQueryExtension's function getAvailableElementContent.


IDOMElement elem = (IDOMElement)parentElement;
			IStructuredDocument structDoc = elem.getModel().getStructuredDocument();
			TLDCMDocumentManager manager = TaglibController.getTLDCMDocumentManager(structDoc);
			List trackers = manager.getCMDocumentTrackers(elem.getStartOffset());

Here the manager returned is null and so there is a NPE

Reproducible: Always

Steps to Reproduce:
1.Create a head ElementImplForJSP ( HEAD/HEAD@[2, 8] (<HEAD>)@[103, 110] (</HEAD>))
(final Element headTag = doc.createElement(HEAD_TAG);)

2.Create a meta ElementImplForJSP (meta)
( you can use  Element metaTag = doc.createElement("META); ) for this

3. Append metanode in head node by 	headNode.appendChild(metaNode);


ps: earlier this append was working fine with the same combination of input argument/ElementImplForJSP 

Also the meta tag is now shown in small case instead of capital case earlier.
Comment 1 Nick Sandonato CLA 2009-11-02 09:27:52 EST
Hi Vikas,

This looks to be a duplicate of 293082.

*** This bug has been marked as a duplicate of bug 293082 ***