Reputation: 27
I am developing eclipse plugin for my already developed application. My application is basically provides graphical view for input source code.
Now, in my application, i use javax.swing.JFrame. Since I am developing eclipse plugin, therefore, when i run as "Eclipse application", it opens a new JFrame Popup. I want to run my application within eclipse (don't know where). Right now, it opens a window outside eclipse. Any idea, how can I implement this and what is the recommended way.
Upvotes: 0
Views: 190
Reputation: 11841
First off, you must create an Eclipse plugin. This will enable your application to exist within the Eclipse ecosystem as a plugin (it sounds like you've already done some of this).
Secondly, Eclipse graphical interfaces are typically built using the Eclipse Standard Widget Toolkit (SWT), instead of Swing or JavaFX, etc. There is nothing that prevents you from creating UI components using other frameworks e.g. Swing or JavaFX, however using SWT is preferred.
SWT is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented.
So that being said...
It sounds like your application provides some sort of 'code viewer'. If you want that 'code viewer' to appear as an Eclipse view
or editor
, you must extend/contribute Eclipse using its provided facilities. For example, to contribute a new editor to Eclipse, you must create an extension to org.eclipse.ui.editors
in plugin.xml
and implement your own org.eclipse.ui.part.EditorPart
. You must do this for your 'code viewer' to appear as a proper Eclipse view
or editor
.
This tutorial should help you get started.
All in all, for your code viewer to appear as an Eclipse view
or editor
, you may have to migrate some of your existing 'code viewer' code, so that you can appropriately contribute your viewer to Eclipse.
Upvotes: 1