Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339686 - Open Table with a customization : Cannot modify resource set without a write transaction
Summary: Open Table with a customization : Cannot modify resource set without a write ...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Gregoire Dupe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-11 08:28 EST by Vincent Lorenzo CLA
Modified: 2020-05-01 11:27 EDT (History)
2 users (show)

See Also:
gdupe: indigo+


Attachments
Patch for Bug 339686.patch (1.16 KB, patch)
2011-03-11 10:00 EST, Nicolas Guyomar CLA
gdupe: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2011-03-11 08:28:41 EST
When I open a table with a customization defined in Table Configuration, I get this exception : 

java.lang.IllegalStateException: Cannot modify resource set without a write transaction
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.assertWriting(TransactionChangeRecorder.java:348)
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.appendNotification(TransactionChangeRecorder.java:302)
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.processObjectNotification(TransactionChangeRecorder.java:284)
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:240)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:255)
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:300)
	at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:307)
	at org.eclipse.emf.facet.infra.browser.uicore.internal.customization.CustomizationEngine.loadCustomization(CustomizationEngine.java:415)
	at org.eclipse.emf.facet.infra.browser.uicore.internal.customization.CustomizationEngine.loadCustomizations(CustomizationEngine.java:331)
	at org.eclipse.emf.facet.widgets.nattable.NatTableWidget.loadCustomizations(NatTableWidget.java:2124)
	at org.eclipse.emf.facet.widgets.nattable.NatTableWidget.setInput(NatTableWidget.java:433)
	at org.eclipse.emf.facet.widgets.nattable.NatTableWidget.init(NatTableWidget.java:331)
	at org.eclipse.emf.facet.widgets.nattable.NatTableWidget.<init>(NatTableWidget.java:312)
	at org.eclipse.emf.facet.widgets.nattable.NatTableWidgetFactoryImpl.createNatTableWidget(NatTableWidgetFactoryImpl.java:27)
	at org.eclipse.papyrus.table.common.internal.NatTableEditor.createPartControl(NatTableEditor.java:255)
	at org.eclipse.papyrus.sasheditor.internal.EditorPart.createEditorPartControl(EditorPart.java:263)
	at org.eclipse.papyrus.sasheditor.internal.EditorPart.createPartControl(EditorPart.java:169)
	at org.eclipse.papyrus.sasheditor.internal.TabFolderPart.createChildPart(TabFolderPart.java:917)
	at org.eclipse.papyrus.sasheditor.internal.TabFolderPart.createTabItem(TabFolderPart.java:842)
	at org.eclipse.papyrus.sasheditor.internal.TabFolderPart.synchronize2(TabFolderPart.java:757)
	at org.eclipse.papyrus.sasheditor.internal.RootPart.synchronize2(RootPart.java:139)
	at org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer.refreshTabsInternal(SashWindowsContainer.java:431)
	at org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer.refreshTabs(SashWindowsContainer.java:384)
	at org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer.createPartControl(SashWindowsContainer.java:173)
	at org.eclipse.papyrus.sasheditor.editor.AbstractMultiPageSashEditor.createPartControl(AbstractMultiPageSashEditor.java:130)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
	at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1429)
	at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:942)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4101)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3718)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1599)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4101)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3718)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2605)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2495)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	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(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 1 Nicolas Guyomar CLA 2011-03-11 10:00:03 EST
Created attachment 190985 [details]
Patch for Bug 339686.patch

Hi Vincent,

Indeed this exception came from our customizationEngine, their was no reason to modify the resource.

I attached a fix on org.eclipse.emf.facet.infra.browser.uicore

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.

Regards,
Nicolas Guyomar
Comment 2 Gregoire Dupe CLA 2011-03-11 12:20:52 EST
Comment on attachment 190985 [details]
Patch for Bug 339686.patch


Here are a contribution from one employee of Mia-Software, targeting future
Indigo release. The company has signed a Member Commiter Agreement. The
contribution does not need a CQ (see bug 322327).

I've committed this contribution.

Committed revison 379.
Comment 3 Gregoire Dupe CLA 2011-03-14 05:52:04 EDT
Vincent,

Please, can you test the new version EMF Facet (>=0.1.0.v201103140910) in your environment.

Regards,
Gregoire
Comment 4 Vincent Lorenzo CLA 2011-03-14 12:00:18 EDT
Hi Grégoire, I tested the new version EMF-Facet and all works fine. This bug is resolved for me!
Nevertheless, I don't understand why the access for these classes is discouraged, because we need them to create new Query isn't it?

org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
org.eclipse.emf.facet.infra.query.runtime.ModelQueryParameterValue;
Comment 5 Gregoire Dupe CLA 2011-03-14 13:01:29 EDT
Hi,

> I tested the new version EMF-Facet and all works fine. This bug is
resolved for me!

Good news, I'll marked this bug has fixed.

> Nevertheless, I don't understand why the access for these classes is
discouraged, because we need them to create new Query isn't it?

This is normal. We have clean our API and added x-internal tags to inform EMF Facet users about the API that will be maintained (or not), cf. http://wiki.eclipse.org/EMF_Facet/API_Policy. The EMF Facet team is aware that Papyrus uses those APIs. Before any modification, the EMF Facet team will contact the Papyrus team.

If you want we can add x-friends in the EMF Facet plug-in MANIFEST.MF, but we need the names of the Papyrus’ plug-in which depends on EMF Facet. (Please, send them in an other bug.)

Regards,
Gregoire
Comment 6 Vincent Lorenzo CLA 2011-03-25 05:24:08 EDT
This bug can be marked as closed.