Bug 112964 - UnsupportedOperationException thrown when dragging model element in MSL Library Model Editor
Summary: UnsupportedOperationException thrown when dragging model element in MSL Libra...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---   Edit
Assignee: Chris McGee CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-10-18 13:18 EDT by Christian Vogt CLA
Modified: 2010-07-19 12:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Vogt CLA 2005-10-18 13:18:36 EDT
Steps to reproduce:
1. Create a library model.
2. Open the library model in the MSL Library Model Editor.
3. Create a Library element.
4. Click and drag the Library element.
Result:
Exception is thrown

java.lang.UnsupportedOperationException
	at 
org.eclipse.gmf.runtime.emf.core.internal.domain.MSLEditingDomain.createCommand
(MSLEditingDomain.java:1178)
	at org.eclipse.emf.edit.command.DragAndDropCommand.create
(DragAndDropCommand.java:75)
	at 
org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter$DragAndDropCommandInf
ormation.createCommand(EditingDomainViewerDropAdapter.java:478)
	at org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter.helper
(EditingDomainViewerDropAdapter.java:288)
	at org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter.dragEnter
(EditingDomainViewerDropAdapter.java:143)
	at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:867)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:852)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:660)
	at org.eclipse.swt.dnd.DropTarget.notifyListeners(DropTarget.java:480)
	at org.eclipse.swt.dnd.DropTarget.DragEnter(DropTarget.java:264)
	at org.eclipse.swt.dnd.DropTarget.access$4(DropTarget.java:247)
	at org.eclipse.swt.dnd.DropTarget$3.method3(DropTarget.java:233)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback3
(COMObject.java:90)
	at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method)
	at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:277)
	at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:267)
	at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:161)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:367)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:103)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:163)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:58)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:60)
	at java.lang.reflect.Method.invoke(Method.java:391)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
	at org.eclipse.core.launcher.Main.run(Main.java:973)
	at org.eclipse.core.launcher.Main.main(Main.java:948)
Comment 1 Chris McGee CLA 2005-11-21 15:30:25 EST
The MSLEditingDomain has been fixed so that it will delegate calls such as createCommand(), createOverrideCommand() and getCommandStack() to inner adapter factory editing domain. A client can use this part of the EditingDomain API but the resulting command execution will fail because of an MSLActionProtocolException. 

In the MSL Library Editor context, this shows the user that they cannot perform any modification to the resource without opening a write action in an undo interval. A similar exception is thrown if the user were to attempt to modify one of the structural features of an object with the properties view. This is the intent of the example editor.
Comment 2 Eclipse Webmaster CLA 2010-07-19 12:24:53 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime EMF was the original product and component for this bug