Skip to main content



      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 10:50 Go to next message
Eclipse UserFriend
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 04:02 Go to previous messageGo to next message
Eclipse UserFriend
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.
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 03:22 Go to previous message
Eclipse UserFriend
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 Jul 17 00:22:12 EDT 2025

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

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

Back to the top