Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] Move from 1.9 to 1.17(Moving from 1.9 to 1.17 produces errors)
[EMF Forms] Move from 1.9 to 1.17 [message #1790663] Thu, 14 June 2018 07:15 Go to next message
Andre Doerscheln is currently offline Andre DoerschelnFriend
Messages: 6
Registered: June 2015
Junior Member
Hi Community!

We're currently trying to finally update our dependencies to the very latest versions. This includes RAP (3.1 -> 3.5) and EMFForms (1.9 -> 1.17).

We're currently facing the issue that some Components loose their references, when Activators assign them. To give you an example, this happens with the EMFFormsLabelProvider, which is used in the org.eclipse.emf.ecp.edit.internal.swt.Activator singleton. It get's requested by getEMFFormsLabelProvider() and is then unget by the same method. When the LabelProvider stored in the singleton is then used, there are no references anymore, because of ungetting it earlier, which leads Equinox to throw it away.

As a workaround we're currently requesting the same service via the BundleContext upfront to increase the useCount, so that Equinox is not throwing it away when ungetting the service.

I don't think it should be like this. Do i miss something? How is this supposed to work?

What we're using:
- ECP/EMFForms 1.17.0 (self-build from tag, minor customizations)
- Eclipse RAP 3.5
Dependencies are coming from
- the latest Photon Orbit (R20180606145124)
- EPP Photon update site (http://download.eclipse.org/technology/epp/packages/photon/)
- Eclipse Photon update site (http://download.eclipse.org/releases/photon/)

Edit: We're still using e3.

Kind regards,
André Dörscheln

[Updated on: Thu, 14 June 2018 08:07]

Report message to a moderator

Re: [EMF Forms] Move from 1.9 to 1.17 [message #1790674 is a reply to message #1790663] Thu, 14 June 2018 09:35 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 79
Registered: September 2016
Member
Hi,

is the issue that the remaining two controls provided by EMF Forms (LinkControl and ReferenceMultiControl), which uses this method do not work anymore? If so, that is indeed a bug. Please note that those two classes are deprecated anyways, you should consider to move to the new renderers.

OR

Is the issue that you use the getLabelProvider method in your custom code to retrieve the service? If that is the case, then indeed you should just get it injected in your custom renderer or, if you use it outsite of a renderer, retrieve it via declarative services.

Best regards,

Jonas


Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/


--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] Move from 1.9 to 1.17 [message #1790704 is a reply to message #1790674] Thu, 14 June 2018 16:19 Go to previous messageGo to next message
Andre Doerscheln is currently offline Andre DoerschelnFriend
Messages: 6
Registered: June 2015
Junior Member
Hi Jonas,

thanks for your quick reply. We do not use or extend any deprecated renderers - as far as i'm aware of.
We're using the ECPSWTViewRenderer to render our views. The following stacktrace occurs when i remove our workaround:

org.eclipse.emf.ecp.ui.view.ECPRendererException: No EMFFormsRendererService available!
	at org.eclipse.emf.ecp.view.internal.swt.ECPSWTViewRendererImpl.render(ECPSWTViewRendererImpl.java:95) ~[na:na]
	at my.company.rwt.editor.page.ToolkixEditorPage.createPartControl(ToolkixEditorPage.java:307) ~[na:na]
	at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:240) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:210) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at my.company.rwt.editor.ToolkixEditor.createPage(ToolkixEditor.java:610) [my.company.rwt.editor/:na]
	at my.company.rwt.editor.ToolkixEditor.createPages(ToolkixEditor.java:722) [my.company.rwt.editor/:na]
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:668) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:464) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:599) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:310) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:185) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:265) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:64) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:479) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1262) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1215) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1614) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:508) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:106) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:494) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:115) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:65) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:775) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:673) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:633) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2855) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2763) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2755) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2706) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2702) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2686) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2669) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at my.company.rwt.editor.factory.EditorEditingContext.open(EditorEditingContext.java:26) [my.company.rwt.editor/:na]
	at my.company.rwt.ui.editingmanager.IresEditingManager.open(IresEditingManager.java:139) [my.company.rwt.ui/:na]
	at my.company.rwt.ui.editingmanager.x.IresEditingHandler.execute(IresEditingHandler.java:74) [my.company.rwt.ui/:na]
	at my.company.rwt.ui.editingmanager.x.IresCreationHandler.execute(IresCreationHandler.java:48) [my.company.rwt.ui/:na]
	at my.company.views.kunden.KundenWizardHandlerIresEditor.execute(KundenWizardHandlerIresEditor.java:25) [my.company.rap.ui/:na]
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:304) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494) [org.eclipse.core.commands_3.9.100.v20180404-1234.jar:na]
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487) [org.eclipse.core.commands_3.9.100.v20180404-1234.jar:na]
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:167) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:239) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:834) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:820) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:810) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1217) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1198) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2733) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2694) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2530) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:701) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) [org.eclipse.core.databinding.observable_1.6.200.v20180424-1922.jar:na]
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:684) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at my.company.rap.ui.Application.startLogin(Application.java:70) [my.company.rap.ui/:na]
	at my.company.rap.ui.Application.start(Application.java:40) [my.company.rap.ui/:na]
	at org.eclipse.rap.ui.internal.application.EntryPointApplicationWrapper.createUI(EntryPointApplicationWrapper.java:38) [org.eclipse.rap.ui.workbench_3.5.0.20180502-1429.jar:na]
	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:177) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:290) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]
	at java.base/java.lang.Thread.run(Thread.java:844) [na:na]
	at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:107) [org.eclipse.rap.rwt_3.5.0.20180517-1244.jar:na]


Kind regards,
André
Re: [EMF Forms] Move from 1.9 to 1.17 [message #1790732 is a reply to message #1790704] Fri, 15 June 2018 07:57 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 79
Registered: September 2016
Member
Hi,

this looks rather like an incomplete product config. From 1.9 to 1.17 we have extracted a lot of services into separate bundles. Do you use a feature-based product config? This is recommended, as we update our features if we move bundles.
I suggest, in case you do not have that, to try a feature based product and add the EMF Forms SDK.

Best regards,

Jonas

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/


--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] Move from 1.9 to 1.17 [message #1790734 is a reply to message #1790732] Fri, 15 June 2018 08:14 Go to previous messageGo to next message
Andre Doerscheln is currently offline Andre DoerschelnFriend
Messages: 6
Registered: June 2015
Junior Member
Hey,

we're using a feature based product, but maybe we're missing something... This is what we have in our product config (of course more, these are jsut the ECP features):

org.eclipse.emf.ecp.view.categorization.feature
org.eclipse.emf.ecp.view.compoundcontrol.feature
org.eclipse.emf.ecp.view.custom.feature
org.eclipse.emf.ecp.view.horizontal.feature
org.eclipse.emf.ecp.view.label.feature
org.eclipse.emf.ecp.view.rule.feature
org.eclipse.emf.ecp.view.stack.feature
org.eclipse.emf.ecp.view.table.feature
org.eclipse.emf.ecp.view.template.feature
org.eclipse.emf.ecp.view.validation.feature
org.eclipse.emf.ecp.view.vertical.feature
org.eclipse.emf.ecp.viewmodel.feature


Kind regards,
André

[Updated on: Fri, 15 June 2018 08:15]

Report message to a moderator

Re: [EMF Forms] Move from 1.9 to 1.17 [message #1790801 is a reply to message #1790734] Mon, 18 June 2018 08:05 Go to previous message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 147
Registered: May 2015
Senior Member
Hi Andre,

We changed our renderers to use the eclipse dependency injection. Maybe you are missing the feature contributing the org.eclipse.e4.core.contexts bundle?

You can also set a breakpoint in org.eclipse.emfforms.internal.swt.core.EMFFormsRendererFactoryImpl.getRendererInstance(VELEMENT, ViewModelContext) and debug to find out at which it point it fails.

Cheers,
Eugen




--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:how to display eStructuralFeatures based on certain condition
Next Topic:[EMF Forms] Changing visible columns and their order in a table
Goto Forum:
  


Current Time: Wed Sep 19 08:37:42 GMT 2018

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

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

Back to the top