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 258838 - Call Graph doesn't keep positions
Summary: Call Graph doesn't keep positions
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 17:53 UTC by Vladimir Voskresensky
Modified: 2016-04-25 19:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch (2.93 KB, patch)
2016-04-19 18:06 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2016-04-14 17:53:15 UTC
create Quote.
Invoke call graph for main and switch to "Who is called"
Then replace readChar function body to simple
return 0;

Expected:
 clicks on call graph widgets put cursor into new the moved code parts

Observed
 random cursor position

Find Usages and Navigator works just fine
Comment 1 Vladimir Voskresensky 2016-04-19 13:29:13 UTC
Alexander, could you, please, fix this usability problem.

Thanks!
Comment 2 Alexander Simon 2016-04-19 13:39:14 UTC
(In reply to Vladimir Voskresensky from comment #0)

> Find Usages and Navigator works just fine

It is absolutely different components.
Find Usages and Navigator work with documents and can create document base objects.
Call Graph works with code model objects and do nothing know about documents.
Code model "references" does not support "document based" positions.
Comment 3 Alexander Simon 2016-04-19 13:42:05 UTC
Why it is P2 problem?
By design call graph is a static picture of code model.
You can "Refresh" view to actualize references.
Comment 4 Vladimir Voskresensky 2016-04-19 13:48:42 UTC
IDE is not for "static" usage. Could you, please, make it ready for dynamic?
Comment 5 Vladimir Voskresensky 2016-04-19 13:50:10 UTC
Of course Find Usages had the same problem in the beginning, but then update it's "design" and introduced utility method for every ones use: CsmUtilities.createPositionBounds
Comment 6 Vladimir Voskresensky 2016-04-19 14:10:50 UTC
P2, because it is not on-par with Java's Call Graph design
Comment 7 Alexander Simon 2016-04-19 18:06:05 UTC
Created attachment 159334 [details]
proposed patch

patch for occurrences (links)
Comment 8 Alexander Simon 2016-04-19 18:36:39 UTC
fixed occurrences and links, change set: 
http://hg.netbeans.org/cnd-main/rev/d67f35ac9dc1
Comment 9 Alexander Simon 2016-04-20 10:29:50 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/3687687ed963
Comment 10 Vladimir Voskresensky 2016-04-20 12:58:49 UTC
Thanks for redesign of ClassView!
Comment 11 Vladimir Voskresensky 2016-04-20 13:00:02 UTC
(In reply to Vladimir Voskresensky from comment #10)
> Thanks for redesign of ClassView!
I meant CallGraph :-)
Comment 12 Quality Engineering 2016-04-25 19:55:50 UTC
Integrated into 'main-silver', will be available in build *201604251813* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d67f35ac9dc1
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #258838 Call Graph doesn't keep positions