Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Cannot modify resource set when changing a reference to another model in the platform
Cannot modify resource set when changing a reference to another model in the platform [message #541014] Fri, 18 June 2010 05:12
Jevon  is currently offline Jevon Friend
Messages: 164
Registered: July 2009
Senior Member
Hi,

I am having difficulty in getting a GMF editor to use references from
another EMF model in platform:/plugin/...

I've modified the editor to replace bundleentry://../ with
platform:/plugin, so that the serialised model instances are portable.
This has worked before for models defined in my own bundles, but isn't
working with the Eclipse XSD bundle.

The diagram editor can create and save models fine, but when I try to
re-open an existing diagram (or initialise a new diagram) and try to
change the reference (using the dropdown box in 'Properties'), the
editor crashes with a "Cannot modify resource set without a write
transaction" (stacktrace below).

It looks like GMF/EMF is trying to modify the XSD model outside the
scope of a transaction. Do I need to initialise the XSD model first? How
am I supposed to do this? It seems that EMF is designed to load the
model on-demand.

Thanks
Jevon

---
Stacktrace:

java.lang.IllegalStateException: Cannot modify resource set without a
write transaction
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ssertWriting(TransactionChangeRecorder.java:348)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ppendNotification(TransactionChangeRecorder.java:302)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.p rocessObjectNotification(TransactionChangeRecorder.java:284)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.n otifyChanged(TransactionChangeRecorder.java:240)
at
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify (BasicNotifierImpl.java:280)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1159)
at
org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(E coreEList.java:255)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllU nique(NotifyingListImpl.java:463)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllU nique(NotifyingListImpl.java:406)
at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractELi st.java:374)
at
org.eclipse.xsd.impl.XSDSimpleTypeDefinitionImpl.createFunda mentalFacets(XSDSimpleTypeDefinitionImpl.java:3019)
at
org.eclipse.xsd.impl.XSDSimpleTypeDefinitionImpl.getCardinal ityFacet(XSDSimpleTypeDefinitionImpl.java:2982)
at
org.eclipse.xsd.impl.XSDSimpleTypeDefinitionImpl.eGet(XSDSim pleTypeDefinitionImpl.java:2581)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:1013)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:1005)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:1000)
at
org.eclipse.emf.edit.provider.ItemPropertyDescriptor.collect ReachableObjectsOfType(ItemPropertyDescriptor.java:940)
at
org.eclipse.emf.edit.provider.ItemPropertyDescriptor.getReac hableObjectsOfType(ItemPropertyDescriptor.java:883)
at
org.eclipse.emf.edit.provider.ItemPropertyDescriptor.getComb oBoxObjects(ItemPropertyDescriptor.java:806)
at
org.eclipse.emf.edit.provider.ItemPropertyDescriptor.getChoi ceOfValues(ItemPropertyDescriptor.java:1473)
at
org.eclipse.emf.edit.ui.provider.PropertyDescriptor.createPr opertyEditor(PropertyDescriptor.java:428)
at
org.openiaml.model.diagram.sheet.IamlPropertySection$IamlCus tomPropertyDescriptor.createPropertyEditor(IamlPropertySecti on.java:148)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.getEditor(PropertySheetEntry.java:365)
at
org.eclipse.ui.views.properties.PropertySheetViewer.activate CellEditor(PropertySheetViewer.java:163)
at
org.eclipse.ui.views.properties.PropertySheetViewer.handleSe lect(PropertySheetViewer.java:727)
at
org.eclipse.ui.views.properties.PropertySheetViewer.access$8 (PropertySheetViewer.java:707)
at
org.eclipse.ui.views.properties.PropertySheetViewer$6.mouseD own(PropertySheetViewer.java:816)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:179)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3910)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3503)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Previous Topic:Creating a second palette
Next Topic:Live validation
Goto Forum:
  


Current Time: Sat Jul 27 15:39:12 GMT 2024

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

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

Back to the top