Jason Hu
Jason Hu

Reputation: 23

Eclipse plug-in capabilities?

I am developing a Eclipse plug-in project which can clone the code of other installed eclipse plug-ins from a git server.

I'm new to plug-in dev so I really need to get some basic idea.

  1. Is it possible for a plug-in to add buttons to a certain dialog? For example: On the eclipse menu, click Help->About Eclipse SDK->Installation Details In this window, is it possible to add a button on the bottom of this window by using a plug-in? If so, can i get a hint or sample example?

  2. Is it possible for a plug-in to load info from a certain dialog? For example: On that same window in Q1, can a plug-in get access to those tables? If so, how can I do that?

Thanks!

Upvotes: 2

Views: 198

Answers (1)

Chris Gerken
Chris Gerken

Reputation: 16390

Generally speaking, in order for you to add something to another plugin's dialog (or UI in general), that other plugin needs to have implemented the ability to take additional UI components from other plugins and to support the user events those UI components produce. The way that would be done, if it were to be done, is for the other plugin to define an extension point that other plugins can extend. If you look at almost any plugin.xml file you'll see XML describing the extensions provided by that that plugin for extension points provided by the plugin's pre-reqs.

I doubt that the extension point you're looking for exists, but you can tell for sure by looking at the plugin.xml for the plugin that provides that dialog. Look to see if that plugin.xml defines any extension points that you can use.

As far as accessing internal state for another plugin, you'll have to look at the classes that implement that state (the tables) and see if those classes are visible from your plugin. Again, I doubt you'll have access to what you need, but this is the way to know for sure.

Upvotes: 2

Related Questions