Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Deleting Notational View on Deleting Semantic Model
Deleting Notational View on Deleting Semantic Model [message #163485] Fri, 30 November 2007 14:52
Eclipse UserFriend
Originally posted by: biju_gopinathan.rediffmail.com

This is a multi-part message in MIME format.
--------------070807000301080800020501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi All,


To remove the connection(Edge) programatically we are using the
following code:


DestroyElementRequest destroy = new
DestroyElementRequest(this.getEditingDomain(), linkObject, true);
DestroyElementCommand command11 = new DestroyElementCommand(destroy);
if (command11 != null && command11.canExecute()) {
this.getDiagramEditDomain().getDiagramCommandStack().execute (new
ICommandProxy(command11));
}

And overrided the handleNotificationEvent() method in
CannonicalConnectionEditPolicy to call refresh() to update the view
after removing connection(Edge).

The link is removed from the UI but on executing the refresh() call in
CannonicalConnectionEditPolicy#handleNotificationEvent() a
NullPointerException is getting fiered. The Log file containing stack
trace is attached

Thanks for any Ideas, Biju


--------------070807000301080800020501
Content-Type: text/plain;
name="refresh.log"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="refresh.log"


!ENTRY org.eclipse.gmf.runtime.diagram.ui 4 4 2007-11-30 19:58:27.078
!MESSAGE execute
!STACK 0
org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred
at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:519)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack .execute(DiagramCommandStack.java:205)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack .execute(DiagramCommandStack.java:168)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack .execute(DiagramCommandStack.java:155)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTo ol.java:388)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(Abs tractTool.java:400)
at org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationT ool.handleCreateConnection(ConnectionCreationTool.java:346)
at org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationT ool.handleButtonUp(ConnectionCreationTool.java:183)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java :1053)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:259)
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:206)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at com.intsolvers.scopeye.client.Application.start(Application. java:20)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
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: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Caused by: java.lang.NullPointerException
at org.eclipse.gmf.runtime.diagram.ui.internal.commands.SetConn ectionBendpointsCommand.doExecuteWithResult(SetConnectionBen dpointsCommand.java:164)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:246)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:137)
at org.eclipse.gmf.runtime.common.core.command.CompositeCommand .doExecuteWithResult(CompositeCommand.java:406)
at org.eclipse.gmf.runtime.common.core.command.AbstractCommand. execute(AbstractCommand.java:134)
at org.eclipse.gmf.runtime.common.core.command.CompositeCommand .doExecuteWithResult(CompositeCommand.java:406)
at org.eclipse.gmf.runtime.common.core.command.AbstractCommand. execute(AbstractCommand.java:134)
at org.eclipse.gmf.runtime.common.core.command.CompositeCommand .doExecuteWithResult(CompositeCommand.java:406)
at org.eclipse.gmf.runtime.common.core.command.AbstractCommand. execute(AbstractCommand.java:134)
at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
... 37 more

--------------070807000301080800020501--
Previous Topic:Best Practice for setting property in Custom Property Section?
Next Topic:programmatically adding an edge at node creation time?
Goto Forum:
  


Current Time: Thu Mar 28 22:04:46 GMT 2024

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

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

Back to the top