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 197848

Summary: Adding TreePathHandle.from(ElementHandle) method
Product: java Reporter: Jan Lahoda <jlahoda>
Component: SourceAssignee: apireviews <apireviews>
Status: RESOLVED FIXED    
Severity: normal Keywords: API, API_REVIEW_FAST
Priority: P3    
Version: 7.0.1   
Hardware: PC   
OS: Linux   
Issue Type: TASK Exception Reporter:
Bug Depends on:    
Bug Blocks: 197743    
Attachments: Proposed patch.

Description Jan Lahoda 2011-04-18 19:27:11 UTC
Created attachment 107822 [details]
Proposed patch.

I would like to add a new method to the TreePathHandle that would allow to construct the TPH from the ElementHandle. Currently each node in the Java navigator keeps both TPH and EH, and TPH is used (AFAIK) only rarely and unnecessarily consumes memory. So this new method would allow to keep only the EH and construct TPH as necessary.

Please see the attached patch. Thanks for the review.
Comment 1 Tomas Zezula 2011-04-20 13:46:19 UTC
Seems good to me.
Comment 2 Jaroslav Tulach 2011-04-21 17:44:09 UTC
Y01 Issue number in apichanges.xml is not correct.
Comment 3 Jan Lahoda 2011-04-22 10:47:48 UTC
Y01: yes, will be corrected before commit. I supposed that it will be sufficiently clear that 999999 is a placeholder, but...
Comment 4 Jan Lahoda 2011-04-26 06:19:07 UTC
http://hg.netbeans.org/jet-main/rev/d0927985d420
Comment 5 Quality Engineering 2011-04-27 04:49:55 UTC
Integrated into 'main-golden', will be available in build *201104270000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d0927985d420
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #197848: Adding TreePathHandle.from(ElementHandle).
Comment 6 Quality Engineering 2011-04-28 05:09:03 UTC
Integrated into 'main-golden', will be available in build *201104280000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d0927985d420
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #197848: Adding TreePathHandle.from(ElementHandle).