This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 100664

Summary: SourceUtils.treeFor returns null for TypeParameterElement
Product: java Reporter: Jan Pokorsky <jpokorsky>
Component: SourceAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 90254    

Description Jan Pokorsky 2007-04-11 20:08:33 UTC
I need to get Tree for TypeParameterElement that is not part of the file where I
change the source. When I call SourceUtils.treeFor I get null.

I have something like 

class TestClass<T> {
}

where T is the TypeParameterElement I hold.

It seems there is an invalid Scope since even if I run a user action task on the
TestClass.java CompilationInfo.getTrees().getScope(path).getEnclosingClass(),
where path is TreePath to T parameter, returns null too.
Comment 1 Jan Lahoda 2007-04-25 10:29:53 UTC
Dusan, please take a look on this...
Comment 2 Dusan Balek 2007-05-10 15:37:07 UTC
Should be fixed together with issue #99968.