Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » 3.0 Call Hierarchy Extension Points?
3.0 Call Hierarchy Extension Points? [message #168013] Fri, 09 July 2004 23:54 Go to next message
Eclipse UserFriend
Originally posted by: chrism.clabs.org

I'm researching the possibility of building a plugin that would take the
Call Hierarchy tree, add a new popup menu to generate GraphViz dot
source -- not sure of the destination, clipboard, .png in a browser or
somesuch -- right now I'm just trying to find out about where and how
I'd hook in to do this. I'd want/need access to the currently displayed
call hierarchy tree.

Is there a ready-made JDT extension point for something like this? I'm
guessing not since browsing through jdt.jar shows CallHierarchy stuffs
only in the internal package. Would I need to modify the actual source
to do this, rebuild a custom .jar?

--
Chris
http://clabs.org
Re: 3.0 Call Hierarchy Extension Points? [message #168020 is a reply to message #168013] Sat, 10 July 2004 05:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: linnet.nospam.users.sourceforge.net

Hi Chris,

No, I'm afraid that the Call Hierarchy currently is internal code only.
If you'd like it to be extensible, I suggest you create an enhancement
request in Bugzilla. Please postfix the title with [call hierarchy] so
that it shows up in the right places :-)

Best regards,

Jesper


Chris Morris wrote:
> I'm researching the possibility of building a plugin that would take the
> Call Hierarchy tree, add a new popup menu to generate GraphViz dot
> source -- not sure of the destination, clipboard, .png in a browser or
> somesuch -- right now I'm just trying to find out about where and how
> I'd hook in to do this. I'd want/need access to the currently displayed
> call hierarchy tree.
>
> Is there a ready-made JDT extension point for something like this? I'm
> guessing not since browsing through jdt.jar shows CallHierarchy stuffs
> only in the internal package. Would I need to modify the actual source
> to do this, rebuild a custom .jar?
>
> --
> Chris
> http://clabs.org
Re: 3.0 Call Hierarchy Extension Points? [message #168778 is a reply to message #168020] Thu, 15 July 2004 00:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chrism.clabs.org

Jesper Kamstrup Linnet wrote:
> No, I'm afraid that the Call Hierarchy currently is internal code only.
> If you'd like it to be extensible, I suggest you create an enhancement
> request in Bugzilla. Please postfix the title with [call hierarchy] so
> that it shows up in the right places :-)

I opened one today: https://bugs.eclipse.org/bugs/show_bug.cgi?id=70054

Dirk Baeumer replied:
==
What exactly are zou asking for ?

The workbench provides mechanisms to contribute actions to a context
menu of a view part without the need of hacking it. This can be simply
done using menu contributions in XML.
===

Is it possible to do what I want with something like the following? I
tried it, but it didn't work (but I'm rather new to all this as well):

<extension
point="org.eclipse.ui.viewActions">
<viewContribution
targetID="org.eclipse.jdt.callhierarchy.view"
id="org.clabs.eclipse.plugin.callgraph.viewContribution">
<action
label="Graph Plugin"
tooltip="test"

class="org.clabs.eclipse.plugin.callgraph.ViewActionDelegate "
menubarPath="additions"
id="org.clabs.eclipse.plugin.callgraph.graphAction"/>
</viewContribution>
</extension>

--
Chris
http://clabs.org
Re: 3.0 Call Hierarchy Extension Points? [message #168849 is a reply to message #168778] Thu, 15 July 2004 14:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: linnet.nospam.users.sourceforge.net

Hi Chris,

You might want to take a look at the
org.eclipse.jdt.internal.ui.callhierarchy.CopyCallHierarchyA ction (which
copies a text representation of the hierarchy to the clipboard.) The
nodes in the tree (subclasses of MethodWrapper) can be obtained with the
TreeItem.getData() method.

Alternatively you might want to look at the CallHierarchyVisitor
interface (which can be used from the MethodWrapper.accept(...) method.

You should be aware though (as Dirk also wrote later in the bug report)
that none of the Call Hierarchy code is public API (and probably will
not be opened up). I would not expect it to change that much, so I
wouldn't be so afraid to use it - but that's your decision :-)

Best regards,

Jesper


Chris Morris wrote:
> Jesper Kamstrup Linnet wrote:
>
>> No, I'm afraid that the Call Hierarchy currently is internal code
>> only. If you'd like it to be extensible, I suggest you create an
>> enhancement request in Bugzilla. Please postfix the title with [call
>> hierarchy] so that it shows up in the right places :-)
>
>
> I opened one today: https://bugs.eclipse.org/bugs/show_bug.cgi?id=70054
>
> Dirk Baeumer replied:
> ==
> What exactly are zou asking for ?
>
> The workbench provides mechanisms to contribute actions to a context
> menu of a view part without the need of hacking it. This can be simply
> done using menu contributions in XML.
> ===
>
> Is it possible to do what I want with something like the following? I
> tried it, but it didn't work (but I'm rather new to all this as well):
>
> <extension
> point="org.eclipse.ui.viewActions">
> <viewContribution
> targetID="org.eclipse.jdt.callhierarchy.view"
> id="org.clabs.eclipse.plugin.callgraph.viewContribution">
> <action
> label="Graph Plugin"
> tooltip="test"
>
> class="org.clabs.eclipse.plugin.callgraph.ViewActionDelegate "
> menubarPath="additions"
> id="org.clabs.eclipse.plugin.callgraph.graphAction"/>
> </viewContribution>
> </extension>
>
> --
> Chris
> http://clabs.org
Re: 3.0 Call Hierarchy Extension Points? [message #168957 is a reply to message #168849] Fri, 16 July 2004 00:24 Go to previous message
Eclipse UserFriend
Originally posted by: chrism.clabs.org

Jesper Kamstrup Linnet wrote:

> You might want to take a look at the
> org.eclipse.jdt.internal.ui.callhierarchy.CopyCallHierarchyA ction (which
> copies a text representation of the hierarchy to the clipboard.) The
> nodes in the tree (subclasses of MethodWrapper) can be obtained with the
> TreeItem.getData() method.
>
> Alternatively you might want to look at the CallHierarchyVisitor
> interface (which can be used from the MethodWrapper.accept(...) method.

I'm familiar with CopyCallHierarchyAction, it's what I based my current
class on (GraphCallHierarchyAction) -- all I need is the plug-in stuffs
to hook into CallHierarchyViewPart without actually modifying its code
to add my popupMenu. My current hack simply modifies the source in
CallHierarchyViewPart, but apparently, I should be able to plug-in to it
externally, but I don't know how yet.

> You should be aware though (as Dirk also wrote later in the bug report)
> that none of the Call Hierarchy code is public API (and probably will
> not be opened up). I would not expect it to change that much, so I
> wouldn't be so afraid to use it - but that's your decision :-)

Oh, that's no problem. I'm primarily using it on a current gig to help
myself out, and my hacking approach is fine for that, but I would like
to know how to do it as a pure plug-in, as that might make it more
accessible to others.

--
Chris
http://clabs.org
Previous Topic:Migrate custom new java project to 3.0.0
Next Topic:JUnit RemoteTestRunner Error
Goto Forum:
  


Current Time: Wed Jul 16 14:04:05 EDT 2025

Powered by FUDForum. Page generated in 0.27561 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top