Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Resources loaded from platform:/plugin URIs are not considered read-only by EcoreEditor
Resources loaded from platform:/plugin URIs are not considered read-only by EcoreEditor [message #1759197] Fri, 07 April 2017 14:50 Go to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
When using "Load resource" in the Sample Reflective Ecore Editor and using a platform:/plugin URI (e.g. for development version of registered packages), the user can change the model since neither org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.isReadOnly(Resource) nor isReadOnly() implementation of the anonymous AdapterFactoryEditingDomain class in org.eclipse.emf.ecore.presentation.EcoreEditor.initializeEditingDomain() returns true for such URIs.

Is this intentional?

Saving the editor after modifying such resources also results in an exception:

java.io.IOException: cannot delete D:\tools\eclipse\p2\pool\plugins\org.eclipse.xtext_2.9.1.v201512180746.jar
	at org.eclipse.emf.common.archive.ArchiveURLConnection$2.close(ArchiveURLConnection.java:524)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithMemoryBuffer(ResourceImpl.java:1241)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:985)
	at org.eclipse.emf.ecore.presentation.EcoreEditor$15.execute(EcoreEditor.java:1669)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:108)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:130)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Re: Resources loaded from platform:/plugin URIs are not considered read-only by EcoreEditor [message #1759203 is a reply to message #1759197] Fri, 07 April 2017 08:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
No, that seems kind of bad. I guess mostly it's gone unnoticed because the resource isn't changed so saving it doesn't need to save anything.

Please open a Bugzilla.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Resources loaded from platform:/plugin URIs are not considered read-only by EcoreEditor [message #1759283 is a reply to message #1759197] Mon, 10 April 2017 07:22 Go to previous message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=514947 and already fixed. Thanks, Ed!
Previous Topic:How to do JAXB annotations in ecore?
Next Topic:[CDO/Papyrus] Marte profile issue
Goto Forum:
  


Current Time: Thu Apr 25 23:12:41 GMT 2024

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

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

Back to the top