Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » IllegalArgumentException while creating Anchor
IllegalArgumentException while creating Anchor [message #949967] Fri, 19 October 2012 13:53 Go to next message
Deepak P is currently offline Deepak P
Messages: 20
Registered: January 2012
Junior Member
Hello

I get a below exception when i am trying to create a box anchor. But i am not able to figure out why this exception is occuring.

It shall be really helpful if someone can help me out in figuring it out the reason for the exceptio
n

java.lang.IllegalArgumentException: ga and referenceGa must not be null, and ga must be a child of referenceGA
at org.eclipse.graphiti.internal.services.impl.PeServiceImpl.getRelativeX(PeServiceImpl.java:830)
at org.eclipse.graphiti.internal.services.impl.PeServiceImpl.getRelativeX(PeServiceImpl.java:839)
at org.eclipse.graphiti.internal.services.impl.PeServiceImpl.getGaBoundsForAnchor(PeServiceImpl.java:817)
at org.eclipse.graphiti.internal.services.impl.LayoutServiceImpl.getGaBoundsForAnchor(LayoutServiceImpl.java:70)
at org.eclipse.graphiti.ui.internal.parts.PictogramElementDelegate.setFigureConstraint(PictogramElementDelegate.java:1401)
at org.eclipse.graphiti.ui.internal.parts.PictogramElementDelegate.refreshFigureForGraphicsAlgorithm(PictogramElementDelegate.java:589)
at org.eclipse.graphiti.ui.internal.parts.PictogramElementDelegate.refreshFigureForPictogramElement(PictogramElementDelegate.java:1184)
at org.eclipse.graphiti.ui.internal.parts.PictogramElementDelegate.refreshFigureForEditPart(PictogramElementDelegate.java:341)
at org.eclipse.graphiti.ui.internal.parts.AdvancedAnchorEditPart.refreshVisuals(AdvancedAnchorEditPart.java:156)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:725)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:644)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:253)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:223)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:212)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:781)
at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refreshChildren(ShapeEditPart.java:642)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:726)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:644)
at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refresh(ShapeEditPart.java:559)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:253)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:223)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:212)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:781)
at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refreshChildren(ShapeEditPart.java:642)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:726)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:644)
at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refresh(ShapeEditPart.java:559)
at org.eclipse.graphiti.ui.internal.parts.DiagramEditPart.refresh(DiagramEditPart.java:185)
at org.eclipse.graphiti.ui.editor.DefaultRefreshBehavior.internalRefreshEditPart(DefaultRefreshBehavior.java:256)
at org.eclipse.graphiti.ui.editor.DefaultRefreshBehavior.refresh(DefaultRefreshBehavior.java:170)
at org.eclipse.graphiti.ui.editor.DiagramEditor.refresh(DiagramEditor.java:1079)
at org.eclipse.graphiti.ui.internal.editor.DiagramRefreshJob.runInUIThread(DiagramRefreshJob.java:102)
at org.eclipse.graphiti.ui.internal.editor.DiagramChangeListener.resourceSetChanged(DiagramChangeListener.java:150)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$1.run(TransactionalEditingDomainImpl.java:781)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.postcommit(TransactionalEditingDomainImpl.java:771)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:543)
at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155)
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:83)
at org.eclipse.graphiti.ui.internal.editor.GFCommandStack.execute(GFCommandStack.java:124)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
at org.eclipse.gef.tools.CreationTool.performCreation(CreationTool.java:269)
at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:189)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
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:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
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:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)



Regards,
Deepak P

[Updated on: Fri, 19 October 2012 13:55]

Report message to a moderator

Re: IllegalArgumentException while creating Anchor [message #958934 is a reply to message #949967] Fri, 26 October 2012 10:26 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1618
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Deepak,

not sure, but it seems you pass invalid Ggraphics Algorithms to your anchor.
There is a section on anchors in the Graphiti documentation that might help,
see
http://help.eclipse.org/juno/topic/org.eclipse.graphiti.doc/resources/docu/gfw/anchors.htm?cp=23_1_3_8_1

Michael
Re: IllegalArgumentException while creating Anchor [message #1029074 is a reply to message #958934] Fri, 29 March 2013 05:14 Go to previous message
Deepak P is currently offline Deepak P
Messages: 20
Registered: January 2012
Junior Member
Hello Michael,
Thanks for your reply,

As you have mentioned, the Graphics Algorithm (GA) was an invalid one. And on providing the correct GA, the error is not longer thrown

Regards,
Deepak P
Previous Topic:Selection provides my business object?
Next Topic:Using SVG figures ?
Goto Forum:
  


Current Time: Fri Oct 24 14:54:45 GMT 2014

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

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