Resources loaded from platform:/plugin URIs are not considered read-only by EcoreEditor [message #1759197] |
Fri, 07 April 2017 10:50  |
Eclipse User |
|
|
|
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)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06025 seconds