user1066027
user1066027

Reputation: 13

eclipse actions controlled by a program?

(apologies if the answer to the question is available, but I clearly don't know the right words - or the right usage of the right words - to connect to the answer...)

I'd like to construct something like the existing "TypeHierarchy" in eclipse. Except that instead of "is-a" class-extension relationships governing the tree construction, I want (class-defined) "has-a" relationships governing the tree construction.

I can (easily) make a Swing JTree interface to the tree that I construct, but I'd like to be able to "connect" the Swing widget to Eclipse so that (for example) double-clicking on one of the nodes would automagically open the source for the class represented by the clicked-on node in eclipse.

thanks, Doug

Upvotes: 1

Views: 67

Answers (1)

mikołak
mikołak

Reputation: 9705

Seems like you need to write a plugin. Check if you have a "Plug-in Development" perspective. If not, install the Plug-In Development Environment first, which is a set of plugins to Eclipse itself. The easiest way is to find it under Help->Install New Software... (choose "All update sites").

Here's a good tutorial on how to start:

http://www.vogella.de/articles/EclipsePlugIn/article.html

Additionally, see the Plug-In Development cheat sheets, under Help->Cheat Sheets..->Plug-In Development.

Also, keep in mind that Eclipse uses SWT, not Swing. But don't worry, if you know one you'll have no problems switching to the other.

A final note: it may seem like a lot of work at first, but most of the stuff is boilerplate code, that to a large extent is automatically created anyway.

Upvotes: 3

Related Questions