[EMF Forms] Embedding EMF Forms in SWT application [message #1277625] |
Wed, 26 March 2014 04:44  |
Eclipse User |
|
|
|
Hi,
I have some trouble getting EMF Forms running inside an SWT Application. I followed the hints at eclipsesource.com/blogs/tutorials/emf-client-platform-how-to-customize-the-editor-layout/#embbededitor but when I try to show a EMF Forms based view inside a composite of my SWT test application I get a NullPointerException.
Exception in thread "main" java.lang.NullPointerException
at org.eclipse.emf.ecp.view.spi.provider.ViewProviderHelper.readViewProviders(ViewProviderHelper.java:55)
at org.eclipse.emf.ecp.view.spi.provider.ViewProviderHelper.getViewProviders(ViewProviderHelper.java:48)
at org.eclipse.emf.ecp.view.spi.provider.ViewProviderHelper.getView(ViewProviderHelper.java:109)
at org.eclipse.emf.ecp.view.internal.swt.ECPSWTViewRendererImpl.render(ECPSWTViewRendererImpl.java:44)
at de.test.swt.example.TreeItemSelectionListener.handleEvent(TreeItemSelectionListener.java:30)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at amelie.ui.swt.app.Main.main(Main.java:55)
The part where I call ECPSWTViewRenderer looks like this:
Method eobject = new Amelie_modelFactoryImpl().createMethod();
eobject.setName("New EObject");
ECPSWTViewRenderer.INSTANCE.render(MainView.getMainComposite(), eobject);
The project dependencies are:
* org.eclipse.swt
* org.eclipse.emf.ecp.ui.view.swt
* org.eclipse.emf.ecp.view.model.provider.generator
* org.eclipse.emf.ecp.view.model.provider.xmi
* My Ecore project
* My Ecore.edit project
I'm definitely missing something here but I can not find any decent documentation on this topic.
|
|
|
|
|
Re: [EMF Forms] Embedding EMF Forms in SWT application [message #1290833 is a reply to message #1290540] |
Thu, 10 April 2014 09:25   |
Eclipse User |
|
|
|
Hi,
just to be sure: Ia your final goal a non-OSGi application? This use
case is currently not supported, as EMF Forms relys on extension points
provided by core.runtime. In general it would be possible to provide a
plain Java version, too, but we would to refactor a bit for that.
If you want to be based on OSGi, then not the dependencies are the
issue, but the run configuration (which decides which bundles are
started). To get a running run configuration, I propose you start with
the feature based configuration as described in the getting started
tutorial and add your bundle to it. This way you make sure everything
required is in.
Best Regards
Jonas
Am 10.04.2014 09:55, schrieb Phillipp von Rotenhan:
> Hi Jonas,
> sorry for the delay but I had to work on other things with higher
> priority first.
>
> Just to make this a little bit more clear, my application is not a test
> as in "unit-test" but "helloWorld" like application to figure out how to
> get EMF-Form running with SWT. Anyway, I had a look at the test cases in
> the ECP source but I still can't figure out what dependency I'm missing.
> A plugin.xml of a EMF-Forms & SWT project would help me in a great way.
> The custom factory was used just for some custom logging behavior but I
> doesn't work with the generated factory either.
>
|
|
|
|
Re: [EMF Forms] Embedding EMF Forms in SWT application [message #1293467 is a reply to message #1291710] |
Sat, 12 April 2014 13:18  |
Eclipse User |
|
|
|
I am curious: What is the reason you want to avoid OSGi? It could also
be considered as a main advantage :-)
I am not sure, whether you will get happy with a RCP application without
using OSGi, too.
Best regards
Jonas
Am 11.04.2014 08:41, schrieb Phillipp von Rotenhan:
> Hi Jonas,
> my intent was to create a non-OSGi application. Since it is no supported
> I will be switching to RCP, after all this is only a technology
> evaluation project.
> Thank you for your help.
|
|
|
Powered by
FUDForum. Page generated in 0.05062 seconds