facebook

Call Hierarchy Plugin

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #242896 Reply

    Hello!

    I need to interact with the “Call Hierarchy Plugin/Feature” of Eclipse (I must have control over the input and output, to glue my code).

    The idea is to use it in the following way:
    – Input: class name and method name
    – Output: list of classes and methods that call the input one

    I’m asking in this forum because I can’t find a “easy” tutorial to do something similar.
    I read the “Rich Client Tutorial” from the Eclipse website but it doesn’t help.

    Since “MyEclipse” are experts in interacting with “Eclipse”, can you point me in the right direction?

    Thanks

    #242910 Reply

    Riyad Kalla
    Member

    The right direction would definately be the Eclipse JDT dev list. Those are the guys who wrote it, so they can probably give you pointers to get you coding right away.

    #242924 Reply

    Brian Fernandes
    Moderator

    JDT newsgroup is the best place to ask –
    Do you want to interact with Eclipse’s Call Hierarchy view? Or you just want to know how it picks up the hierarchy and display it in your own view / editor?

    Best,
    Brian.

    #242965 Reply

    I have a java package where I put some special classes that I would like to get the “Hierarchy” for several method (almost all of them).

    So the in the end my plug-in should be invoked by clicking a package, or class .
    I will get all the methods for a class and return the some “hierarchy” object that I can process for references. I know the pattern of the caller I want to find (it must implement some interface), so somehow I “just” need to get the list.

    I thought of a plung-in, but it could really be a standalone application.
    Right now, I parsing the “javap” result from my classes to get the hierarchy (parsing + build a list of references + analyse the references).
    I does what I want almost all the time. But since I’m the one controlling the parser I is not 100% accurate. Another problem is the “javap” result changes from JDK versions…

    Thanks for the help, meanwhile I will try the “JDT newsgroup”.

    #242968 Reply

    Brian Fernandes
    Moderator

    You should have a look at the SearchEngine class (in org.eclipse.jdt.core.search).

    If you can’t find this class, just import all the JDT projects into your workspace and you should be fine. Be advised, your plugin will need to depend on the jdt plugin(s).

    SearchEngine most probably requires that the element it’s parsing / searching be a member of a JDT Java project, but I’m not too sure if that rule can be broken or bent. Just look for references to the method you’re interested in and you should see examples of how it’s being used.

    HTH,
    Best,
    Brian.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Call Hierarchy Plugin

You must be logged in to post in the forum log in