Migrating GEF 3 project [message #1753866] |
Fri, 10 February 2017 18:34  |
Eclipse User |
|
|
|
I'm migrating an e3 RCP project that made extensive use of GEF MVC. It was largely based off the old shapes example https://eclipse.org/articles/Article-GEF-diagram-editor/shape.html
Transitioning to e4 was a challenge, but we think it'll really be worth it and now have much of our core functionality working. However, GEF is proving to be a real struggle for us. As we understand it, GEF 3, will not work on e4 applications and we are ready to migrate to using GEF 4. We do not want to use the e4/e3 compatibility layer. It seems like we want to use Zest, but, honestly, the vast collection of components is baffling.
Are there any tutorials out there that do a walk through on a simple diagram editor like the old shapes example? Something that has a palette that lets you create nodes and then connect them with arcs?
|
|
|
Re: Migrating GEF 3 project [message #1753912 is a reply to message #1753866] |
Sun, 12 February 2017 04:23   |
Eclipse User |
|
|
|
Hallo Ken,
the different components and their scope are documented in the reference documentation at https://github.com/eclipse/gef/wiki. While the documentation does not reflect the merger of MVC/MVC.FX (see http://nyssen.blogspot.de/2017/02/gef4-1-gef-5.html) yet, it should be a good starting point.
Besides, with respect to MVC, the logo example can pretty much be used as a reference, as we have tried to incorporate all directly supported 'features' there. In case you need to look into details, I would recommend to take a look at it.
Concerning tutorials, Frank Benoit has externally provided one MVC tutorial based on GEF4 at https://github.com/frankbenoit/gef4.mvc.tutorial. It could help you to get in touch with the concepts, while not being based on the current 5.0.0 code base. We have internally prepared an MVC Mindmap tutorial (based on 5.0.0 M5) that is not yet available, but should be published before Eclipse Converge (I will announce its availability here).
Best Regards,
Alexander
|
|
|
|
|
Re: Migrating GEF 3 project [message #1754923 is a reply to message #1754856] |
Fri, 24 February 2017 01:26   |
Eclipse User |
|
|
|
I'm trying to dive in to adding GEF 4.1 to a plugin in my e4 RCP application. I've been looking at the org.eclipse.gef4.mvc.examples.logo.ui plugin (although I understand that is a 3.x plugin in order to work with the workbench). I added the org.eclipse.gef4.fx.swt plugin dependency to my plugin and the org.eclipse.gef4.fx.swt feature to my feature based product. When I hit add required, the product also added org.eclipse.gef4.common and org.eclipse.fx.runtime.min.feature.
To get started, I just wanted to display the canvas. I created a part and added this composite to it:
import javax.inject.Inject;
import org.eclipse.gef4.fx.swt.canvas.IFXCanvasFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import javafx.embed.swt.FXCanvas;
public class AEGComposite extends Composite {
@Inject
private IFXCanvasFactory canvasFactory;
private FXCanvas canvas = null;
public AEGComposite(Composite parent, int style) {
super(parent, style);
setLayout(new FillLayout());
canvas = canvasFactory.createCanvas(this, SWT.NONE);
}
}
This comes from the code in AbstractFXView. This compiles with no problem, but when I try to run the product, I get this error:
org.osgi.framework.BundleException: Could not resolve module: edu.illinois.mobius.atomic.advise [1275]
Unresolved requirement: Require-Bundle: org.eclipse.gef4.fx.swt; bundle-version="1.0.1"
-> Bundle-SymbolicName: org.eclipse.gef4.fx.swt; bundle-version="1.0.1.201609060946"
org.eclipse.gef4.fx.swt [1279]
Unresolved requirement: Require-Bundle: org.eclipse.gef4.common; bundle-version="[1.0.0,2.0.0)"
-> Bundle-SymbolicName: org.eclipse.gef4.common; bundle-version="1.1.0.201609060946"
org.eclipse.gef4.common [1278]
Unresolved requirement: Import-Package: com.google.common.collect; version="[12.0.0,16.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:444)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1599)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
I'm not sure where to find the package com.google.common.collect. How can I resolve this error?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03204 seconds