1
votes

I have existing java application where GUI had mainly built using Swing and prefuse API (http://prefuse.org/). I want to develop eclipse plugin for this application. I have read in vogella tutorial that SWT is prefer to use for plugin development.

My problem is that if I should use SWT, then how can I convert each swing and prefuse API component to SWT?

PS: If I use existing GUI in my eclipse plugin project, then when I run the plugin as "Eclipse Application", it display GUI outside eclipse which I am not sure is correct behaviour for plugin development.

1
Added. I cannot use more than 5 tags.user3277258
You may be able to use the SWT_AWT class to run the Swing code from SWT, example heregreg-449

1 Answers

0
votes

The http://wiki.eclipse.org/Albireo_Project might help:

"The Albireo project builds on the SWT_AWT bridge to provide more complete Swing/SWT integration, resulting in a better "out-of-the-box" experience and more credibility for the entire notion of Swing/SWT integration."

Extend the SwingControl and implement createSwingComponent() and getLayoutAncestor(). http://eclipsesrc.appspot.com/jsrcs/org.eclipse.albireo/org.eclipse.albireo.core/src/org/eclipse/albireo/core/SwingControl.java.html