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 - SourceUtils.treeFor returns null for TypeParameterElement
Summary: SourceUtils.treeFor returns null for TypeParameterElement
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks: 90254
  Show dependency tree
 
Reported: 2007-04-11 20:08 UTC by Jan Pokorsky
Modified: 2007-05-10 15:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.