Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335155 - Hide Empty Column : Cannot modify resource set without a write transaction
Summary: Hide Empty Column : Cannot modify resource set without a write transaction
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-01-24 03:12 EST by Vincent Lorenzo CLA
Modified: 2020-05-01 11:27 EDT (History)
2 users (show)

See Also:
gdupe: indigo+


Attachments
Hide Empty Column Action within an EMF Command (107.09 KB, application/x-zip-compressed)
2011-01-24 08:52 EST, Nicolas Guyomar CLA
no flags Details
Bug 335155 - Hide Empty Column (1.35 KB, patch)
2011-02-16 09:57 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-01-24 03:12:32 EST
With Papyrus, we get the following exception when we do the action "Hide Empty Column". 
This action should be done in a EMF Command. :

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.facet.widgets.nattable.instance.tableinstance.impl.TableInstanceImpl.setHideEmptyColumns(TableInstanceImpl.java:410)
	at org.eclipse.emf.facet.widgets.nattable.NatTableWidget.setHideEmptyColumns(NatTableWidget.java:1467)
	at org.eclipse.emf.facet.widgets.nattable.workbench.editor.NatTableEditor.setHideEmptyColumns(NatTableEditor.java:197)
	at org.eclipse.emf.facet.widgets.nattable.workbench.editor.TableEditorToolBar$7.widgetSelected(TableEditorToolBar.java:192)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4084)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3675)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	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:369)
	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:621)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:576)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1409)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1385)
Comment 1 Nicolas Guyomar CLA 2011-01-24 08:52:25 EST
Created attachment 187418 [details]
Hide Empty Column Action within an EMF Command

Hi,

This action was modifying the model outside of an EMF command, please find
attached the updated plug-ins :
 - org.eclipse.emf.facet.widgets.nattable
 - org.eclipse.emf.facet.widgets.nattable.workbench

(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 Vincent Lorenzo CLA 2011-01-24 10:11:37 EST
That works!
Comment 3 Nicolas Guyomar CLA 2011-02-16 09:57:06 EST
Created attachment 189101 [details]
Bug 335155 - Hide Empty Column

Hi,

Here is a patch on revision 312 for an easiest integration

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


Regards,
Nicolas Guyomar
Comment 4 Gregoire Dupe CLA 2011-02-16 10:03:40 EST
Comment on attachment 189101 [details]
Bug 335155 - Hide Empty Column

This patch is smaller than 250 lines.

I've committed this patch.

Committed revision 314.
Comment 5 Gregoire Dupe CLA 2011-02-16 10:04:03 EST
This bug can be marked has fixed.
Comment 6 Gregoire Dupe CLA 2011-02-16 10:04:21 EST
This bug can be marked has fixed.
Comment 7 Vincent Lorenzo CLA 2011-02-24 09:26:21 EST
This bug can be closed.