Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » problem saving a diagram after assigning a stereotype (very often after assignment of a stereotype to a component I am not able to save the component diagram)
problem saving a diagram after assigning a stereotype [message #1783280] Sat, 10 March 2018 16:45 Go to next message
Rolf Schumacher is currently offline Rolf SchumacherFriend
Messages: 60
Registered: January 2014
Member
Very often after assignment of a stereotype to a component I am not able to save the component diagram.

It happens in a first example project that I am preparing.
I can repeat the problem with any new Papyrus project:

I created a very simple profile.
Restart Eclipse - just to be sure the profile is known.
I create a new Papyrus project, add a component diagram put a component on there. Still able to save the diagram.
Now when I try to assign a stereotype to that component, but miss it, because I click only one time instead of double-click, and try to save, I get the message: "Save Failed
Path must include project and resource name: /<the projects name>/"

I googled, saw that this happened before, but did not find any numbered issue, solution, or workaround.

My workaround was, to save the diagram as a picture, restart Eclipse and repeat the changes. Attached you may find the profile and a simple application together with a screenshot of the failure message.

I am using Oxygen 2, updated today, on Debian Jessie (LMDE 2) and Java-9.

Any other idea to cope with this problem?

[Updated on: Sun, 11 March 2018 21:08]

Report message to a moderator

Re: problem saving a diagram after assigning a stereotype [message #1783747 is a reply to message #1783280] Fri, 16 March 2018 14:50 Go to previous messageGo to next message
Yupanqui Munoz is currently offline Yupanqui MunozFriend
Messages: 8
Registered: December 2014
Location: Paris Saclay, France
Junior Member
Hi,

Your project and profile works with me.
I am using Oxygen 2, on Windows 10 and java 8.

Yupanqui

Yupanqui
Re: problem saving a diagram after assigning a stereotype [message #1790232 is a reply to message #1783747] Thu, 07 June 2018 10:08 Go to previous messageGo to next message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 461
Registered: March 2011
Location: Paris Saclay, France
Senior Member
Did the error happen again? If yes, did you see an exception in the error log? (if yes, could you please post the exception here?)
Might be related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=535644Bug535644. Another possible cause are static profiles whose derived attributes are not implemented and cause exceptions (haven't checked this for your profile)
Re: problem saving a diagram after assigning a stereotype [message #1848675 is a reply to message #1790232] Mon, 13 December 2021 17:19 Go to previous messageGo to next message
John McCabe is currently offline John McCabeFriend
Messages: 228
Registered: July 2009
Senior Member
Does anyone know if a bug report was ever filed for this? I've just had it with the 2021-09 download of Papyrus on Windows 10 after:

1. Adding an interface into a class diagram
2. Selecting the interface, right click and select "Profiles" -> "Update profiles..."
3. Move "Class" from left to right
4. Remove "Interface" from right
5. Click on OK.
6. Delete the interface as the stuff above didn't do what I'd hoped.

Ctrl-S after that gives the path error.

The stack trace is:

java.lang.IllegalArgumentException: Path must include project and resource name: /EMAControllerStuffUML/
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:66)
	at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2143)
	at org.eclipse.core.internal.resources.Container.getFile(Container.java:196)
	at org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers.FSReadOnlyHandler.getIFile(FSReadOnlyHandler.java:101)
	at org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers.FSReadOnlyHandler.computeAnyReadOnly(FSReadOnlyHandler.java:83)
	at org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers.FSReadOnlyHandler.anyReadOnly(FSReadOnlyHandler.java:65)
	at org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManager.anyReadOnly(ReadOnlyManager.java:275)
	at org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManager.anyReadOnly(ReadOnlyManager.java:256)
	at org.eclipse.papyrus.infra.core.resource.ModelSet.save(ModelSet.java:738)
	at org.eclipse.papyrus.infra.ui.lifecycleevents.SaveAndDirtyService.doSave(SaveAndDirtyService.java:289)
	at org.eclipse.papyrus.infra.ui.editor.CoreMultiDiagramEditor.doSave(CoreMultiDiagramEditor.java:1040)
	at org.eclipse.ui.internal.SaveableHelper.lambda$0(SaveableHelper.java:156)
	at org.eclipse.ui.internal.SaveableHelper.lambda$3(SaveableHelper.java:271)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:434)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:352)
	at org.eclipse.ui.internal.WorkbenchWindow.lambda$7(WorkbenchWindow.java:2345)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2343)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:278)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:260)
	at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:160)
	at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3820)
	at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3833)
	at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:82)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
	at jdk.internal.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
	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.invokeUsingClass(InjectorImpl.java:317)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:580)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:647)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1270)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1059)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1069)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1111)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1107)
	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1536)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4875)
	at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4753)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3624)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1041)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	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:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

[Updated on: Mon, 13 December 2021 17:19]

Report message to a moderator

Re: problem saving a diagram after assigning a stereotype [message #1849132 is a reply to message #1848675] Wed, 05 January 2022 08:28 Go to previous message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 461
Registered: March 2011
Location: Paris Saclay, France
Senior Member
I can reproduce getting an exception during saving, even if I get a different error in the log and my testmodel is apparently saved (with Papyrus 6.0 / Eclipse 2021-12). It only happens, If I say "yes" when a dialog pops up that requires write request to additional resources. As the command only makes sense for profiles, it shouldn't appear in the context menu of a normal class diagram.

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Resource '/tests/bugs/BugSave' already exists.
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.flush(PlatformResourceURIHandlerImpl.java:143)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.close(PlatformResourceURIHandlerImpl.java:91)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper$
...
Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/tests/bugs/BugSave' already exists.
	at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:309)
	at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:296)
	at org.eclipse.core.internal.resources.File.create(File.java:107)
	at org.eclipse.core.internal.resources.File.create(File.java:179)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.flush(PlatformResourceURIHandlerImpl.java:130)
	... 78 more

Previous Topic:New TextDocument
Next Topic: Is there any way to hide some unnecessary options in the properties interface
Goto Forum:
  


Current Time: Fri Apr 26 23:56:50 GMT 2024

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

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

Back to the top