Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Deleted view still showing(as a little crossed circle)
Deleted view still showing [message #502975] Thu, 10 December 2009 13:45 Go to next message
Olivier Marot is currently offline Olivier MarotFriend
Messages: 14
Registered: September 2009
Junior Member
Hi,

I (obviously, given the title) have a problem with my GMF based editor.
To set up the context, we have three linked editors :
- a graphical editor based on GMF (and heavily customized),
- the EMF editor,
- a text editor based on TMF.

We kept the default generated behavior to link the editors.

The problem is, when deleting an element in another editor, the related view is not properly deleted.
In fact, it IS deleted by the semantic refresh of the xxxCanonicalEditPolicy, meaning its eContainer, element, children etc are set to null and it is not referenced by its parent view anymore.

Everything seems to be allright, but when going back to the diagram there is a gray crossed circle to the top left. A clic on this generates an exception :

Caused by: java.lang.NullPointerException
at adl.diagram.edit.policies.MindBaseItemSemanticEditPolicy.add DestroyShortcutsCommand(MindBaseItemSemanticEditPolicy.java: 289)
at adl.diagram.edit.policies.PrimitiveAnonymousSubComponentItem SemanticEditPolicy.getDestroyElementCommand(PrimitiveAnonymo usSubComponentItemSemanticEditPolicy.java:73)
at adl.diagram.edit.policies.MindBaseItemSemanticEditPolicy.get SemanticCommandSwitch(MindBaseItemSemanticEditPolicy.java:17 0)
at adl.diagram.edit.policies.MindBaseItemSemanticEditPolicy.get SemanticCommand(MindBaseItemSemanticEditPolicy.java:99)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEdit Policy.getCommand(SemanticEditPolicy.java:69)
at adl.diagram.edit.policies.MindBaseItemSemanticEditPolicy.get Command(MindBaseItemSemanticEditPolicy.java:82)
at org.eclipse.gef.editparts.AbstractEditPart.getCommand(Abstra ctEditPart.java:473)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPa rt.access$1(GraphicalEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPa rt$1.run(GraphicalEditPart.java:482)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl.runExclusive(TransactionalEditingDomainImpl.java:313)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPa rt.getCommand(GraphicalEditPart.java:477)
at adl.diagram.part.DeleteElementAction.getCommand(DeleteElemen tAction.java:78)
at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.get Command(DiagramAction.java:161)
at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.cal culateEnabled(DiagramAction.java:124)
at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.ref resh(DiagramAction.java:114)
at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandl er.selectionChanged(AbstractActionHandler.java:387)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalVie wer.flushSelectionEvents(DiagramGraphicalViewer.java:269)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalVie wer$1.run(DiagramGraphicalViewer.java:247)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
... 23 more

which is "normal" given that the view is not linked to the diagram root.
(PrimitiveAnonymousSubComponent is the deleted element)
What I don't understand is why this view is still present. I suppose it is still referenced somewhere, but I couldn't find where.

If it helps, here is some more info :
- this behavior is common to all elements
- this behavior is encountered even with all GMF custom code deactivated
- when clicking again another exception is raised :
java.lang.NullPointerException
at org.eclipse.gef.editparts.AbstractEditPart.getViewer(Abstrac tEditPart.java:601)
at org.eclipse.gef.tools.SelectEditPartTracker.performDirectEdi t(SelectEditPartTracker.java:172)
at org.eclipse.gef.tools.SelectEditPartTracker.handleButtonUp(S electEditPartTracker.java:113)
at org.eclipse.gef.tools.DragEditPartsTracker.handleButtonUp(Dr agEditPartsTracker.java:336)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java :1064)
at org.eclipse.gef.tools.SelectionTool.mouseUp(SelectionTool.ja va:544)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:263)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Released(DomainEventDispatcher.java:374)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(Li ghtweightSystem.java:538)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:207)
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:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3473)
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)

A "Delete from model" action does not cause this, so I thought the semantic refresh did not do all that it should do, but from what I found the delete from model is composed of a delete element command and a delete view command. But given that the element is already deleted and the semantic execute a delete view command, it may not.

I found this topic but I'm not sure it is the same problem.

These little circles are really annoying, and I'm out of ideas to solve this problem so I would be really thankful if someone could give me some hint.

Regards,
Olivier.
Re: Deleted view still showing [message #508411 is a reply to message #502975] Mon, 18 January 2010 16:57 Go to previous message
Olivier Marot is currently offline Olivier MarotFriend
Messages: 14
Registered: September 2009
Junior Member
Hi,

Do you have any news on this issue ?
Thanks.

Regards,
Olivier.
Previous Topic:How to add bendpoints to a connection
Next Topic:Refresh error decoration with live validation
Goto Forum:
  


Current Time: Fri Apr 26 09:43:59 GMT 2024

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

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

Back to the top