Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Unable to use instance of IEditorPart (Eclipse text editor) in JavaFX application(Access org.eclipse.ui.IEditorPart from JavaFX application)
Unable to use instance of IEditorPart (Eclipse text editor) in JavaFX application [message #1725817] Mon, 07 March 2016 21:34 Go to next message
Colin Donovan is currently offline Colin DonovanFriend
Messages: 3
Registered: February 2016
Junior Member
I am creating a plugin whereby when a handler is called an instance of IEditorPart is instantiated with the current editor which is the eclipse text editor in this context.

editor = HandlerUtil.getActiveEditor(event);

This instance is passed to a JavaFX application through starting an eclipse job. Before Application.launch() is called there is access to this instance of the eclipse text editor, however, after it is called a null pointer exception occurs when trying to use it.

Does this instance get removed when the JavaFX application enters its life-cycle? Is there anyway to use this instance as it is a vital element in the plugin as I am using tables and when an element of the table is clicked, the eclipse editor is brought into scope and then this element clicked is wrote to the screen.

I am aware the eclipse text editor is SWT therefore there may be complications using both SWT and JavaFX together. Any ideas? I can post full code if the question is too ambiguous.
Re: Unable to use instance of IEditorPart (Eclipse text editor) in JavaFX application [message #1725868 is a reply to message #1725817] Tue, 08 March 2016 07:33 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2624
Registered: July 2012
Senior Member
IEditorPart and HandlerUtil are not only SWT related, they are also Eclipse 3 which is interpreted by the compatibility layer. AFAIK e(fx)clipse does neither support SWT nor Eclipse 3.x API.
Previous Topic:Adding javafx/** to "Access rules" does not seem to work.
Next Topic:Plug-in org.eclipse.xtext.ui.shared was unable to load class
Goto Forum:

Current Time: Sun Nov 18 19:16:10 GMT 2018

Powered by FUDForum. Page generated in 0.01912 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top