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

Bug 327162

Summary: Selecting TypeHierarchy on HtmlElement throws an NPE
Product: [WebTools] JSDT Reporter: Chris Jaun <cmjaun>
Component: GeneralAssignee: Chris Jaun <cmjaun>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: ccc, cmjaun, s.kellicker
Version: 3.2.2Flags: thatnitind: review+
Target Milestone: 3.2.2 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 323993    
Bug Blocks:    
Attachments:
Description Flags
patch none

Description Chris Jaun CLA 2010-10-06 16:38:02 EDT
+++ This bug was initially created as a clone of Bug #323993 +++

Build Identifier: Helios release of JSDT as well as latest source 8/30/10

If I try to show the type hierarchy of the HTMLElement, I throw an NPE:

java.lang.NullPointerException
	at org.eclipse.jface.viewers.CustomHashtable.hashCode(CustomHashtable.java:264)
	at org.eclipse.jface.viewers.CustomHashtable.get(CustomHashtable.java:236)
	at org.eclipse.jface.viewers.StructuredViewer.mapElement(StructuredViewer.java:1295)
	at org.eclipse.jface.viewers.TreeViewer.mapElement(TreeViewer.java:760)
	at org.eclipse.wst.jsdt.internal.ui.viewsupport.ProblemTreeViewer.mapElement(ProblemTreeViewer.java:81)
	at org.eclipse.jface.viewers.StructuredViewer.associate(StructuredViewer.java:621)
	at org.eclipse.jface.viewers.AbstractTreeViewer.associate(AbstractTreeViewer.java:703)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1003)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:481)

Reproducible: Always

Steps to Reproduce:
1. In a javascript project, open Js Resources/ECMA 3 Browser support
2. double click on HtmlElement
3. In editor select HtmlElement and hit F4 to open type hierarchy.
4. If prompted, choose the one with the C next to it.
5. Once the type hierarchy is shown, click on "Show the Supertype Hierachy", a dialog pops up stating an NPE occurred.
Comment 1 Chris Jaun CLA 2010-10-06 16:39:29 EDT
Created attachment 180375 [details]
patch
Comment 2 Carl Anderson CLA 2010-10-11 17:15:35 EDT
Committed to R3_2_2_patches