Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » MvcUiModule dependency on PlatformUI
MvcUiModule dependency on PlatformUI [message #1736099] Sat, 25 June 2016 21:38 Go to next message
Robert Onslow is currently offline Robert OnslowFriend
Messages: 27
Registered: March 2016
Junior Member
I'm using GEF4/MVC which needs to integrate into a pure E4/SWT application

This means I do, in my view

@PostConstruct
public void createPartControl(Composite parent) {

Guice.createInjector(new MvcFxModule(), new MvcFxUiModule());
//..create the FX component here

IFXCanvasFactory canvasFactory = injector.getInstance(IFCanvasFactory.class);
FXCanvas canvas = canvasFactory.createCanvas(parent, SWT.NONE);
canvas.setScene(scene);




However I get

java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:93)
at org.eclipse.gef4.mvc.ui.MvcUiModule.bindIOperationHistory(MvcUiModule.java:38)

This shows a dependency of MvcFXUIModule on the E3 compatability layer.

Could this dependency be removed?

Robert
Re: MvcUiModule dependency on PlatformUI [message #1736101 is a reply to message #1736099] Sun, 26 June 2016 00:41 Go to previous messageGo to next message
Colin Sharples is currently offline Colin SharplesFriend
Messages: 90
Registered: July 2009
Location: Wellington, New Zealand
Member

The MVC.UI and MVC.FX.UI modules are for integrating GEF4 with an Eclipse application, so the dependency on PlatformUI is intentional and necessary for integrating with the Eclipse platform. You shouldn't be using MxcFxUiModule in a pure e4 application.

I found it pretty hard to get JavaFX running inside an e4/SWT application, and ended up re-writing my app as a pure JavaFX application, which (IMHO) is a lot better anyway. JavaFX is so much nicer than SWT, and I ended up with a lot less code in the end.


Colin Sharples
CTG Games Ltd
Wellington, New Zealand
Re: MvcUiModule dependency on PlatformUI [message #1736262 is a reply to message #1736101] Tue, 28 June 2016 06:06 Go to previous messageGo to next message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 235
Registered: July 2009
Location: L√ľnen
Senior Member
Yes, exactly so.
Re: MvcUiModule dependency on PlatformUI [message #1736543 is a reply to message #1736101] Thu, 30 June 2016 09:32 Go to previous message
Robert Onslow is currently offline Robert OnslowFriend
Messages: 27
Registered: March 2016
Junior Member
Yes, have switched to a pure JavaFX E4 app.
Thanks
Robert
Previous Topic:[GEF4] Adapter binding warning messages
Next Topic:[GEF4] Immutable geometry primitives
Goto Forum:
  


Current Time: Wed Sep 26 13:24:07 GMT 2018

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

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

Back to the top