Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Template model editor issue(The template model editor fails to open a template model after eclipse restart.)
Template model editor issue [message #1821510] Thu, 13 February 2020 19:25 Go to next message
Sven Brehmer is currently offline Sven BrehmerFriend
Messages: 10
Registered: February 2020
Junior Member
The template model editor fails to open a template model after eclipse restart.

An error printout is include below. Any suggestion on how to fix this are appreciated.

Thanks,
Sven

Error: Failed to create the part's controls

Error detail:

java.lang.NullPointerException
at org.eclipse.emf.ecp.common.spi.cachetree.AbstractCachedTree.update(AbstractCachedTree.java:115)
at org.eclipse.emfforms.spi.swt.treemasterdetail.diagnostic.DiagnosticCache.updateCacheWithoutRefresh(DiagnosticCache.java:319)
at org.eclipse.emfforms.spi.swt.treemasterdetail.diagnostic.DiagnosticCache.lambda$3(DiagnosticCache.java:143)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.eclipse.emfforms.spi.swt.treemasterdetail.diagnostic.DiagnosticCache.init(DiagnosticCache.java:143)
at org.eclipse.emfforms.spi.swt.treemasterdetail.diagnostic.DiagnosticCache.<init>(DiagnosticCache.java:80)
at org.eclipse.emfforms.spi.editor.GenericEditor.createDiangosticCache(GenericEditor.java:440)
at org.eclipse.emfforms.spi.editor.GenericEditor.setupDiagnosticCache(GenericEditor.java:429)
at org.eclipse.emfforms.spi.editor.GenericEditor.createPartControl(GenericEditor.java:338)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:154)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:361)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:1002)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:967)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:139)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:408)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:331)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:1002)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:768)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:739)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:717)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1297)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.lambda$0(LazyStackRenderer.java:75)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:146)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4629)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:219)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:132)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:170)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:188)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:661)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:625)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:790)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:404)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1239)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3207)
at org.eclipse.ui.internal.WorkbenchPage.lambda$9(WorkbenchPage.java:3112)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3110)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3080)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3071)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:570)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:525)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:363)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:170)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:285)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:251)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:252)
at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:53)
at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:215)
at org.eclipse.ui.navigator.CommonNavigatorManager$1.open(CommonNavigatorManager.java:183)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:797)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:794)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1110)
at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:454)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:270)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:310)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4175)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3988)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3587)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:660)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Re: Template model editor issue [message #1821863 is a reply to message #1821510] Fri, 21 February 2020 10:49 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Sven,
this looks like a bug. Could you provide the template that causes the NPE in a bug report?

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Template model editor issue [message #1822183 is a reply to message #1821863] Fri, 28 February 2020 23:46 Go to previous messageGo to next message
Sven Brehmer is currently offline Sven BrehmerFriend
Messages: 10
Registered: February 2020
Junior Member
Hi Eugen,

I have attached a file with just one view template that causes the NPE. I hope that helps.

The attribute value looks a bit odd when opening the file in a text editor, this is just an observation since I don't know how it's created/generated.

Thanks,
Sven
Re: Template model editor issue [message #1822218 is a reply to message #1821863] Mon, 02 March 2020 00:30 Go to previous messageGo to next message
Sven Brehmer is currently offline Sven BrehmerFriend
Messages: 10
Registered: February 2020
Junior Member
Hi Eugen,

I may be worth noting that the template model that I can't load in the editor, works with the view model.

Regards,
Sven
Re: Template model editor issue [message #1822250 is a reply to message #1822218] Mon, 02 March 2020 14:41 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Sven,

thank you for the file. I will take a look at it and let you know what I can figure out.

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Template model editor issue [message #1822266 is a reply to message #1822250] Mon, 02 March 2020 20:14 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Sven,

this is a bug. I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=560703 .
Could you explain your use case of the attribute field with the attribute value?

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Template model editor issue [message #1822504 is a reply to message #1822266] Sun, 08 March 2020 23:18 Go to previous messageGo to next message
Sven Brehmer is currently offline Sven BrehmerFriend
Messages: 10
Registered: February 2020
Junior Member
Hi Eugen,

I'm using the view model element selector, with the name attribute. I commented about the attribute value looking odd in a previous post, but since it works with the view model I don't think that's an issue.

The template file is only editable in the Eclipse session in which it is created. The next time Eclipse is started the file can't be opened in the model editor. I created a very simple file with the same result, see attached screenshots.

Sorry for slow response, I missed the new message notifications.

Regards,
Sven
Re: Template model editor issue [message #1822520 is a reply to message #1822504] Mon, 09 March 2020 09:35 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Sven,

yes I could reproduce your error and created a bug for this.

My question was why you are using this kind of selector in the template? I assume you want to change the style of a specific control? Or do you have multiple controls with the name 'Helle' ?
Because if you have exactly one, you could use the DomainModelReferenceSelector instead.

We will still look into the issue.

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Template model editor issue [message #1822554 is a reply to message #1822520] Mon, 09 March 2020 18:38 Go to previous messageGo to next message
Sven Brehmer is currently offline Sven BrehmerFriend
Messages: 10
Registered: February 2020
Junior Member
Hi Eugen,

There are multiple tables in the model that should have the same view properties, it's convenient to use the ViewModelElementSelector and refer to them by name. The DomainModelReferenceSelector could also be used, however it doesn't work either, so not a viable alternative at this point.

Thanks for filing the bug report!

Do you have any idea of timing for a fix?

Regards,
Sven

Re: Template model editor issue [message #1822593 is a reply to message #1822554] Tue, 10 March 2020 10:25 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Sven,

unfortunately I don't have an estimate for you. Any contribution is welcome.
Could you open a bug report for the DomainModelReferenceSelector issue?

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Template model editor issue [message #1822659 is a reply to message #1822593] Wed, 11 March 2020 00:56 Go to previous messageGo to next message
Sven Brehmer is currently offline Sven BrehmerFriend
Messages: 10
Registered: February 2020
Junior Member
Hi Eugen,

I filed a bug report with a sample template attached.

It seems I could only attach one file with the bug report so I'm attaching the corresponding ecore file here.

I would appreciate if you check if you can reproduce the NPE and let me know.

Regards,
Sven
  • Attachment: test.ecore
    (Size: 1.11KB, Downloaded 94 times)
Re: Template model editor issue [message #1822690 is a reply to message #1822659] Wed, 11 March 2020 13:24 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Sven,

I cannot reproduce an error with the template model you attached.

Can you export your workspace and attach it here or on the issue?

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Template model editor issue [message #1822705 is a reply to message #1822690] Wed, 11 March 2020 16:34 Go to previous messageGo to next message
Sven Brehmer is currently offline Sven BrehmerFriend
Messages: 10
Registered: February 2020
Junior Member
Hi Eugen,

A test model project that triggers the NPE here is attached (import as existing project) .

Please let me know how it goes.

Regards,
Sven
  • Attachment: Test.zip
    (Size: 29.84KB, Downloaded 111 times)
Re: Template model editor issue [message #1822724 is a reply to message #1822705] Thu, 12 March 2020 09:25 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Sven,

I had a preliminary fix in my IDE, so I did not see the error.
Thank you for reporting.
I will comment on the bug as soon as I have a fix,

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Template model editor issue [message #1822753 is a reply to message #1822724] Thu, 12 March 2020 22:28 Go to previous message
Sven Brehmer is currently offline Sven BrehmerFriend
Messages: 10
Registered: February 2020
Junior Member
Hi Eugen,

OK, thanks, I look forward to hearing from you.

Regards,
Sven
Previous Topic:[ECP] Model Explorer e4
Next Topic:EMF Forms drop-down
Goto Forum:
  


Current Time: Thu Mar 28 18:51:40 GMT 2024

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

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

Back to the top