Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357087 - [All digrams] Changing editors (from Papyrus to text-based editor) causes a service-registry exception
Summary: [All digrams] Changing editors (from Papyrus to text-based editor) causes a s...
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Patrick Tessier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-08 10:06 EDT by Ansgar Radermacher CLA
Modified: 2015-04-24 09:06 EDT (History)
1 user (show)

See Also:


Attachments
stacktrace (4.83 KB, text/plain)
2011-09-29 11:12 EDT, Nicolas Bros CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ansgar Radermacher CLA 2011-09-08 10:06:00 EDT
Steps to reproduce: open a papyrus model, select an element e.g. a class. Now change to a text-based editor (e.g. Java). Each time you change away from the Papyrus editor, an "unexpected error" will show up in the error log. It seems to be caused by a current selection still within a Papyrus editor but the current editor is no longer a Papyrus editor.

org.eclipse.papyrus.core.services.ServiceNotFoundException: Can't get the ServiceRegistry from current Eclipse Active Editor
	at org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers.getServiceRegistry(ServiceUtilsForActionHandlers.java:77)
	at org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers.getTransactionalEditingDomain(ServiceUtilsForActionHandlers.java:88)
	at org.eclipse.papyrus.diagram.common.handlers.GraphicalCommandHandler.getEditingDomain(GraphicalCommandHandler.java:143)
	at org.eclipse.papyrus.diagram.common.handlers.DeleteFromModelCommandHandler.getCommand(DeleteFromModelCommandHandler.java:46)
	at org.eclipse.papyrus.diagram.common.handlers.GraphicalCommandHandler.isEnabled(GraphicalCommandHandler.java:108)
	at org.eclipse.ui.internal.handlers.HandlerProxy.isEnabled(HandlerProxy.java:320)
	at org.eclipse.core.commands.Command.isEnabled(Command.java:833)
	at org.eclipse.core.commands.Command.setHandler(Command.java:965)
	at org.eclipse.ui.internal.handlers.HandlerAuthority.updateCommand(HandlerAuthority.java:459)
	at org.eclipse.ui.internal.handlers.HandlerAuthority.processChangedCommands(HandlerAuthority.java:638)
	at org.eclipse.ui.internal.handlers.HandlerAuthority.access$1(HandlerAuthority.java:610)
	at org.eclipse.ui.internal.handlers.HandlerAuthority$1.propertyChange(HandlerAuthority.java:175)
	at org.eclipse.ui.internal.services.EvaluationAuthority$1.run(EvaluationAuthority.java:252)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
Comment 1 Nicolas Bros CLA 2011-09-29 11:12:18 EDT
Created attachment 204302 [details]
stacktrace

I had the same exception, which caused my Model Explorer to fail to initialize:
- I opened the Project Explorer view
- I opened a model.notation with a text editor
- I clicked on the Model Explorer tab

The Model Explorer stayed empty (gray), and I get the attached exception in my error log.
Comment 2 Camille Letavernier CLA 2015-04-24 09:06:45 EDT
Can't be reproduced in the current version

I close the task