Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] Call hierarchy only for that extended class?

Leo, please use Bugzilla for enhancement requests and the forums for user questions.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=369379.

You can start with a search for references to the method, apply the "References to overridden" filter, and then select all results and open a call hierarchy on the multi-selection. However, you need to be aware that the filtering will miss polymorphic calls to A#method() where the receiver is actually a B.

Markus



From:        Stefan Xenos <sxenos@xxxxxxxxxx>
To:        "Eclipse JDT UI developers list." <jdt-ui-dev@xxxxxxxxxxx>, "Eclipse JDT Core developers list." <jdt-core-dev@xxxxxxxxxxx>, lufimtse@xxxxxxxxxx
Date:        2016-12-09 10:36
Subject:        Re: [jdt-ui-dev] [platform-ui-dev] Call hierarchy only for that        extended class?
Sent by:        jdt-ui-dev-bounces@xxxxxxxxxxx




Moving your question to the correct mailing lists.

First: yes, JDT core has sufficient information to rule out most call sites that can't possibly apply to B... and JDT UI has sufficient context to feed JDT core with what it knows about the class where the cursor is located, so this sort of filtering is definitely possible.

This sort of filtering would work best for the first few levels of the tree. Some call sites would cause the context to be lost and further children would look pretty much the way they do now.

  - Stefan

On Wed, Dec 7, 2016, 14:30 Leo Ufimtsev <lufimtse@xxxxxxxxxx> wrote:
I sometimes have situations where I invoke call hierarchyon a method that overrides a parent class.

Ex:

Class A  {
     method()
}

Class B extends A {
    @Overrride
     method()      // <<< Call hierarchy here.
 }

I found that Eclipse will show all calls, including those that are only relevant to Class A. However, I would like to see calls only made to B.method(). Is this possible?

Like, sometimes the list is long...:
Inline image 1

---
Leo Ufimtsev
Software Engineer, Eclipse team.

Toronto, Canada

Red Hat, Inc.

Leonidas@xxxxxxxxxx| http://DeveloperBlog.RedHat.com/


_______________________________________________
platform-ui-dev mailing list

platform-ui-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/platform-ui-dev_______________________________________________
jdt-ui-dev mailing list
jdt-ui-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-ui-dev



Back to the top