Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMFCP is crashing the eclipse workspace
EMFCP is crashing the eclipse workspace [message #1100539] Tue, 03 September 2013 04:26 Go to next message
Simon Stumps is currently offline Simon Stumps
Messages: 8
Registered: April 2013
Junior Member
Hello together,

i am developing an eclipse rcp application and would like to use the EMFCP plugins. i started with this tutorial: eclipsesource.com/blogs/tutorials/getting-started-with-the-emf-client-platform/

after plugin installation, my eclipse opens a default workspace every time i start it and i am not able to change it back to save the last known workspace. at least the "switch workspace" option works fine.

In addition: after 1 or 2 starts eclipse takes more then 10 minuts to load the workspace.

i tryed to install the EMFCP plugins into a new eclipse with same results.

also: where is the bugtracker for the project? the link from the homepage (http://www.eclipse.org/emfclient/support.html) is a dead end.

any one else with this problem?

thanks

PS: I am using eclipse kepler and also tryed it with 4.2

[Updated on: Tue, 03 September 2013 04:59]

Report message to a moderator

Re: EMFCP is crashing the eclipse workspace [message #1100657 is a reply to message #1100539] Tue, 03 September 2013 08:07 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 363
Registered: July 2009
Senior Member
Hi,
first of all about the bug tracker:
The project id has recently changed from "emfclient" to "ecp", I have
updated the link on the homepage. You should now be able to report bugs
again, thanks for pointing this out.
About the issue, i have some questions to help us identifying the issue:

- You have installed the ECP bundles into your IDE?
- Could you provide me a list of the bundles you have installed?
- Are you planing to use ECP within your IDE, or do you plan to develop
an application based on it?
- Have you already created ECP projects?
- Is it by any chance possible for you to attach an example workspace to
reproduce this?

Tanks you very much for reporting this!

Regards

Jonas
Am 03.09.2013 10:26, schrieb Simon Beine:
> Hello together,
>
> i am developing an eclipse rcp application and would like to use the
> EMFCP plugins. i started with this tutorial:
> eclipsesource.com/blogs/tutorials/getting-started-with-the-emf-client-platform/
>
>
> after plugin installation, my eclipse opens a default workspace every
> time i start it and i am not able to change it back to save the last
> known workspace. at least the "switch workspace" option works fine.
> In addition: after 1 or 2 starts eclipse takes more then 10 minuts to
> load the workspace.
> i tryed to install the EMFCP plugins into a new eclipse with same results.
> also: where is the bugtracker for the project? the link from the
> homepage (http://www.eclipse.org/emfclient/support.html) is a dead end.
>
> any one else with this problem?
>
> thanks
Re: EMFCP is crashing the eclipse workspace [message #1100794 is a reply to message #1100539] Tue, 03 September 2013 11:46 Go to previous messageGo to next message
Simon Stumps is currently offline Simon Stumps
Messages: 8
Registered: April 2013
Junior Member
Hello Jonas and thx for your reply.

-i have installed the ECP bundles into my fresh downloaded eclipse kepler and also into an existing eclipse 4.2, both with the same problem.
-i can give you the bundlelist tomorrow
- i am planning to use the ECP within my IDE. particularly in an eclipse RCP application i am currently developing
- this is my first ECP project
- i can create a new installation with a fresh workspace and the sample project from the homepage and attach it here, that shouldnt be a problem.

Regards,

Simon
Re: EMFCP is crashing the eclipse workspace [message #1100813 is a reply to message #1100794] Tue, 03 September 2013 12:20 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 363
Registered: July 2009
Senior Member
Thanks, that will hep to identify the problem...

Am 03.09.2013 17:46, schrieb Simon Stumps:
> Hello Jonas and thx for your reply.
>
> -i have installed the ECP bundles into my fresh downloaded eclipse
> kepler and also into an existing eclipse 4.2, both with the same problem.
> -i can give you the bundlelist tomorrow
> - i am planning to use the ECP within my IDE. particularly in an eclipse
> RCP application i am currently developing
> - this is my first ECP project
> - i can create a new installation with a fresh workspace and the sample
> project from the homepage and attach it here, that shouldnt be a problem.
>
> Regards,
> Simon
Re: EMFCP is crashing the eclipse workspace [message #1101234 is a reply to message #1100813] Wed, 04 September 2013 03:16 Go to previous messageGo to next message
Simon Stumps is currently offline Simon Stumps
Messages: 8
Registered: April 2013
Junior Member
Hello again,

here is what i have done:

- http://eclipse.org/emfclient/gettingstarted.html -> step 1 download and then on the top right klicked the "the latest modeling edition" link and downloaded the "eclipse-modeling-kepler-R-win32-x86_64.zip".
- unpack and start
- then I used the eclipse update site under http://download.eclipse.org/emfclient/releases/102 to install all available packages:

picture(remove whitespace since i am under 5 posts): http:// i.imgur.com/kktlpbu.png

after restarting eclipse, I closed it and opened it again, the workspace was already changed and I had to manually change it back to the one I have chosen at the first start of this new eclipse. It looks like that the workspace location changes to C:/user/[username]/workspace. The workspace I have created only contains a .metadata folder with the typically ".mylyn", and ".plugins" folders, that's all.
Maybe you can reproduce it at your own computer.

Regards,
Simon

edit: i could reproduce the problem on another computer.

[Updated on: Wed, 04 September 2013 03:19]

Report message to a moderator

Re: EMFCP is crashing the eclipse workspace [message #1101332 is a reply to message #1101234] Wed, 04 September 2013 06:14 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 363
Registered: July 2009
Senior Member
thanks, I am looking into it now...

Am 04.09.2013 09:16, schrieb Simon Stumps:
> Hello again,
>
> here is what i have done:
>
> - http://eclipse.org/emfclient/gettingstarted.html -> step 1 download
> and then on the top right klicked the "the latest modeling edition" link
> and downloaded the "eclipse-modeling-kepler-R-win32-x86_64.zip".
> - unpack and start
> - then I used the eclipse update site under
> http://download.eclipse.org/emfclient/releases/102 to install all
> available packages:
>
> picture(remove whitespace since i am under 5 posts): http://
> i.imgur.com/kktlpbu.png
> after restarting eclipse, I closed it and opened it again, the workspace
> was already changed and I had to manually change it back to the one I
> have chosen at the first start of this new eclipse. It looks like that
> the workspace location changes to C:/user/[username]/workspace. The
> workspace I have created only contains a .metadata folder with the
> typically ".mylyn", and ".plugins" folders, that's all.
> Maybe you can reproduce it at your own computer.
>
> Regards,
> Simon
>
Re: EMFCP is crashing the eclipse workspace [message #1101514 is a reply to message #1101332] Wed, 04 September 2013 10:59 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 363
Registered: July 2009
Senior Member
Hi,
I can reproduce this. I have created a bug for this:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=416531

It has probably something to do with the initialization oder of
services, however hard to debug. I will try to fix this a soon as
possible. In the meantime, I hope this is no blocker for you. If you
want to avoid manually switching your workspace everytime you re-start,
you might want to define an explicit target platform and add ECP in
that. That allows you do deinstall it from the IDE as long as the issue
occurs.

Regards

Jonas

Am 04.09.2013 12:14, schrieb Jonas Helming:
> thanks, I am looking into it now...
>
> Am 04.09.2013 09:16, schrieb Simon Stumps:
>> Hello again,
>>
>> here is what i have done:
>>
>> - http://eclipse.org/emfclient/gettingstarted.html -> step 1 download
>> and then on the top right klicked the "the latest modeling edition" link
>> and downloaded the "eclipse-modeling-kepler-R-win32-x86_64.zip".
>> - unpack and start
>> - then I used the eclipse update site under
>> http://download.eclipse.org/emfclient/releases/102 to install all
>> available packages:
>>
>> picture(remove whitespace since i am under 5 posts): http://
>> i.imgur.com/kktlpbu.png
>> after restarting eclipse, I closed it and opened it again, the workspace
>> was already changed and I had to manually change it back to the one I
>> have chosen at the first start of this new eclipse. It looks like that
>> the workspace location changes to C:/user/[username]/workspace. The
>> workspace I have created only contains a .metadata folder with the
>> typically ".mylyn", and ".plugins" folders, that's all.
>> Maybe you can reproduce it at your own computer.
>>
>> Regards,
>> Simon
>>
>
Re: EMFCP is crashing the eclipse workspace [message #1103236 is a reply to message #1101514] Fri, 06 September 2013 10:16 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 363
Registered: July 2009
Senior Member
Hi,
the issue should be fixed in 1.1.M1, I suggest you upgrade to this version.
http://eclipse.org/emfclient/download.html#milestone
Please tell me, if this resolves the problems.
Regards
Jonas

Am 04.09.2013 16:59, schrieb Jonas Helming:
> Hi,
> I can reproduce this. I have created a bug for this:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=416531
>
> It has probably something to do with the initialization oder of
> services, however hard to debug. I will try to fix this a soon as
> possible. In the meantime, I hope this is no blocker for you. If you
> want to avoid manually switching your workspace everytime you re-start,
> you might want to define an explicit target platform and add ECP in
> that. That allows you do deinstall it from the IDE as long as the issue
> occurs.
>
> Regards
>
> Jonas
>
> Am 04.09.2013 12:14, schrieb Jonas Helming:
>> thanks, I am looking into it now...
>>
>> Am 04.09.2013 09:16, schrieb Simon Stumps:
>>> Hello again,
>>>
>>> here is what i have done:
>>>
>>> - http://eclipse.org/emfclient/gettingstarted.html -> step 1 download
>>> and then on the top right klicked the "the latest modeling edition" link
>>> and downloaded the "eclipse-modeling-kepler-R-win32-x86_64.zip".
>>> - unpack and start
>>> - then I used the eclipse update site under
>>> http://download.eclipse.org/emfclient/releases/102 to install all
>>> available packages:
>>>
>>> picture(remove whitespace since i am under 5 posts): http://
>>> i.imgur.com/kktlpbu.png
>>> after restarting eclipse, I closed it and opened it again, the workspace
>>> was already changed and I had to manually change it back to the one I
>>> have chosen at the first start of this new eclipse. It looks like that
>>> the workspace location changes to C:/user/[username]/workspace. The
>>> workspace I have created only contains a .metadata folder with the
>>> typically ".mylyn", and ".plugins" folders, that's all.
>>> Maybe you can reproduce it at your own computer.
>>>
>>> Regards,
>>> Simon
>>>
>>
>
Re: EMFCP is crashing the eclipse workspace [message #1106513 is a reply to message #1100539] Wed, 11 September 2013 03:38 Go to previous messageGo to next message
Simon Stumps is currently offline Simon Stumps
Messages: 8
Registered: April 2013
Junior Member
Hello Jonas,

i installed the update today and it fixed my problem.

but now my editor isnt working any more. i am opening the ECPEditor with openEditor(input, "org.eclipse.emf.ecp.editor", true); and before the update it worked pretty well but now i only get many null pointer exceptions.

edit: looks like the ViewContext is new. Can you update the doc?

[Updated on: Wed, 11 September 2013 04:14]

Report message to a moderator

Re: EMFCP is crashing the eclipse workspace [message #1106536 is a reply to message #1106513] Wed, 11 September 2013 04:21 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 363
Registered: July 2009
Senior Member
You probably need to adapt your run or product configuration and add new
bundles in 1.1.0M1. Could you validate your run configuration?

Am 11.09.2013 09:38, schrieb Simon Stumps:
> Hello Jonas,
>
> i installed the update today and it fixed my problem.
>
> but now my editor isnt working any more. i am opening the ECPEditor with
> openEditor(input, "org.eclipse.emf.ecp.editor", true); and before the
> update it worked pretty well but now i only get many null pointer
> exceptions. i will look into it.
Re: EMFCP is crashing the eclipse workspace [message #1106553 is a reply to message #1106536] Wed, 11 September 2013 04:44 Go to previous messageGo to next message
Simon Stumps is currently offline Simon Stumps
Messages: 8
Registered: April 2013
Junior Member
i already did that. but i have to use ViewContext in the new version, right? its also missing in the doc: https://hudson.eclipse.org/hudson/job/emf-emfclient-maintenance/531/artifact/git/bundles/org.eclipse.emf.ecp.doc/target/ecp-doc/index.html

i wrote my own EditorInput and now it has to implement public ECPControlContext createSubContext(EObject eObject) and public ViewModelContext getViewContext()

here is the error log (shortend)

java.lang.NullPointerException
	at org.eclipse.emf.ecp.internal.ui.view.builders.NodeBuilders.build(NodeBuilders.java:116)
	at org.eclipse.emf.ecp.internal.ui.view.builders.NodeBuilders.build(NodeBuilders.java:100)
	at org.eclipse.emf.ecp.ui.view.swt.internal.ECPSWTViewRendererImpl.render(ECPSWTViewRendererImpl.java:96)
	at org.eclipse.emf.ecp.ui.view.swt.internal.ECPSWTViewRendererImpl.render(ECPSWTViewRendererImpl.java:82)
	at org.eclipse.emf.ecp.internal.editor.ViewModelEditorComposite.createUI(ViewModelEditorComposite.java:49)
	at org.eclipse.emf.ecp.editor.internal.e3.MEEditorPage.createFormContent(MEEditorPage.java:125)
	at org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:152)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:150)
	at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:471)
	at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1083)
	at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:603)
	at org.eclipse.ui.forms.editor.SharedHeaderFormEditor.createPages(SharedHeaderFormEditor.java:103)
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:358)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:142)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:323)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:877)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:119)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:333)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:254)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1096)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:576)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:543)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:605)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:585)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:539)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:528)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1026)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3120)
	at org.eclipse.ui.internal.WorkbenchPage.access$21(WorkbenchPage.java:3042)
	at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:3024)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3020)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2984)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2975)

[Updated on: Wed, 11 September 2013 04:51]

Report message to a moderator

Re: EMFCP is crashing the eclipse workspace [message #1106573 is a reply to message #1106553] Wed, 11 September 2013 05:13 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 363
Registered: July 2009
Senior Member
Yes, this is introduced in 1.1.0.
Can you post the NPE you get, I can probably help you then...

Am 11.09.2013 10:44, schrieb Simon Stumps:
> i already did that. but i have to use ViewContext in the new version,
> right? its also missing in the doc:
> https://hudson.eclipse.org/hudson/job/emf-emfclient-maintenance/531/artifact/git/bundles/org.eclipse.emf.ecp.doc/target/ecp-doc/index.html
>
Re: EMFCP is crashing the eclipse workspace [message #1106583 is a reply to message #1106573] Wed, 11 September 2013 05:26 Go to previous messageGo to next message
Simon Stumps is currently offline Simon Stumps
Messages: 8
Registered: April 2013
Junior Member
In my MyECPControlContextImpl i use the new ViewModelContextImpl(getView(), getModelElement()); method to get a ViewContext. i use a copy from ECPControlContextImpl.getView() and there is the NPE.

	private View getView() {
		int highestPrio = IViewProvider.NOT_APPLICABLE;
		IViewProvider selectedProvider = null;
		for (final IViewProvider viewProvider : ViewProviderHelper.getViewProviders()) {
			final int prio = viewProvider.canRender(getModelElement());
			if (prio > highestPrio) {
				highestPrio = prio;
				selectedProvider = viewProvider;
			}
		}
		if (selectedProvider != null) {
			return selectedProvider.generate(getModelElement());
		}
		return null;
	}


NPE is in the "final int prio = viewProvider.canRender(getModelElement());" line. Probably because i dont have a viewProvider

java.lang.NullPointerException
	at org.eclipse.emf.ecp.view.model.provider.xmi.ViewModelFileExtensionsManager.hasViewModelFor(ViewModelFileExtensionsManager.java:139)
	at org.eclipse.emf.ecp.view.model.provider.xmi.ExtensionXMIViewModelProvider.canRender(ExtensionXMIViewModelProvider.java:30)
	at com.project.presentation.produktmodellierung.editor.MyECPControlContextImpl.getView(MyECPControlContextImpl.java:124)
	at com.project.presentation.produktmodellierung.editor.MyECPControlContextImpl.<init>(MyECPControlContextImpl.java:47)

[Updated on: Wed, 11 September 2013 05:27]

Report message to a moderator

Re: EMFCP is crashing the eclipse workspace [message #1106643 is a reply to message #1106583] Wed, 11 September 2013 07:04 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 363
Registered: July 2009
Senior Member
Hi,
looking at the line where the NPE is thrown let me assume, that the
model element is null (getModelElement()). Could you please check this?
getModelElement() should return the EObject to be opened.

However, in 1.1.M1, we provide a new API, which makes it much easier to
create an editor. We are planning to deprecate the ECPControlContext in
future versions. However, the new API does not yet support references
features yet. If your EObjects only have simple attributes, you can
already try it. It is documented here:
http://eclipsesource.com/blogs/tutorials/emf-client-platform-how-to-customize-the-editor-layout/
(last paragraph)
If you experience any more issues, you can also contact me on Skype if
you want: "JonasHelming"

Thanks for the feedback!

Regards

Jonas



Am 11.09.2013 11:26, schrieb Simon Stumps:
> In my MyECPControlContextImpl i use the new
> ViewModelContextImpl(getView(), getModelElement()); method to get a
> ViewContext. i use a copy from ECPControlContextImpl.getView() and there
> is the NPE.
>
> private View getView() {
> int highestPrio = IViewProvider.NOT_APPLICABLE;
> IViewProvider selectedProvider = null;
> for (final IViewProvider viewProvider :
> ViewProviderHelper.getViewProviders()) {
> final int prio = viewProvider.canRender(getModelElement());
> if (prio > highestPrio) {
> highestPrio = prio;
> selectedProvider = viewProvider;
> }
> }
> if (selectedProvider != null) {
> return selectedProvider.generate(getModelElement());
> }
> return null;
> }
>
>
> NPE is in the "final int prio =
> viewProvider.canRender(getModelElement());" line
>
> java.lang.NullPointerException
> at
> org.eclipse.emf.ecp.view.model.provider.xmi.ViewModelFileExtensionsManager.hasViewModelFor(ViewModelFileExtensionsManager.java:139)
>
> at
> org.eclipse.emf.ecp.view.model.provider.xmi.ExtensionXMIViewModelProvider.canRender(ExtensionXMIViewModelProvider.java:30)
>
> at
> com.project.presentation.produktmodellierung.editor.MyECPControlContextImpl.getView(MyECPControlContextImpl.java:124)
>
> at
> com.project.presentation.produktmodellierung.editor.MyECPControlContextImpl.<init>(MyECPControlContextImpl.java:47)
>
Re: EMFCP is crashing the eclipse workspace [message #1106681 is a reply to message #1106643] Wed, 11 September 2013 07:53 Go to previous message
Simon Stumps is currently offline Simon Stumps
Messages: 8
Registered: April 2013
Junior Member
you where totaly right: i had an error in getModelElement. its now working. thank you.
Previous Topic:[ECP] Read-only editor
Next Topic:[EMFStore] Looking for the API Javadoc
Goto Forum:
  


Current Time: Fri Apr 18 19:34:27 EDT 2014

Powered by FUDForum. Page generated in 0.02253 seconds