Search code examples
javaeclipse-pluginswtrcp

Integrating an RCP-Plugin into a self-developed SWT/Swing-Context


We are trying to integrate an Eclipse-Plugin (it's gonna be a JT-Viewer) into our SWT-based own GUI-Framework.
The final target would be, to be able to load the View/Composite/PluginWindow in our GUI and be able to execute its Java-methods. (hide/show part(s), cut at..., measure ...)

The Plugin-Creators tell me: "We only need a composite, that we can put our Plugin into"

The Framework-Creators tell me: "We just need a composite, that we can integrate into our views."

But still we are not yet able to merge these seemingly similar circumstances. I got a sample-plugin that has the Methode "createPartControl(Composite parent)", which it seems gets called by the RCP-Framework and is cited as

This is a callback that will allow us to create the viewer and initialize it.

Is it possible to call that methode from our framework? What do I have to do to implement an interface between those two? Is it possible to integrate an Eclipse-RCP-Plugin and load all the RCP/OSGI-JARs that are needed on demand?

I am ofc willing to update this question depending on further information needed to answer this problem. Sorry, if I am not specific enough yet. All advice would be appreciated, even if it says that I am totally on the wrong track, or that it is undoable.

Update 1: We also got a Swing-Client. Therefore I also mentioned Swing in the title. But I am not yet sure if that makes a difference.


Solution

  • Eclipse plugins usually depend on lots of other plugins and on the Eclipse plugin infrastructure making them very difficult to use outside of Eclipse. Unless you already implement the OSGi bundle framework including most Eclipse plugins is not going to work.

    A few plugins are designed to work without requiring other plugins but this is unusual and the plugin author's would probably have mentioned this.

    Swing will also be very difficult since it is a completely different UI system to SWT.