Link Mapping problem in eclipse 3.4 [message #218527] |
Thu, 12 February 2009 15:40 |
|
Hi All..
I am using eclipse 3.4 ganymede which which has GMF 2.1.0
In my link mapping i want to create a link between say Figure 'A'source and
'A'destination.
Also want to create a link between say 'x'source and 'x'destination which
is child of figure 'A'
In my gmf map..1.)i give link mapping for 'x'source to 'x'destination.
2.)i give link mapping for 'A'source to 'A'destination.
It creates link for first ie. x to x but not for A to A
One thing which i noticed is if i interchange the order say
1.)i give link mapping for 'A'source to 'A'destination.
2.)i give link mapping for 'x'source to 'x'destination.
It creates link for first ie. A to A but not for x to x
When i try do the second connection(link) it gives me.
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:399)
at
org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(Abs tractTool.java:411)
at
org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationT ool.handleCreateConnection(ConnectionCreationTool.java:341)
at
org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationT ool.handleButtonUp(ConnectionCreationTool.java:181)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java :1064)
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:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
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:193)
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:382)
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: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by: org.eclipse.core.runtime.AssertionFailedException: null
argument:failed to create a view
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:86)
at
org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand.do ExecuteWithResult(CreateCommand.java:99)
Plz help
Regards
Govind R
at
org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:247)
at
org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:157)
at
org.eclipse.gmf.runtime.common.core.command.CompositeCommand .doExecuteWithResult(CompositeCommand.java:403)
at
org.eclipse.gmf.runtime.common.core.command.AbstractCommand. execute(AbstractCommand.java:135)
at
org.eclipse.gmf.runtime.common.core.command.CompositeCommand .doExecuteWithResult(CompositeCommand.java:403)
at
org.eclipse.gmf.runtime.common.core.command.AbstractCommand. execute(AbstractCommand.java:135)
at
org.eclipse.gmf.runtime.common.core.command.CompositeCommand .doExecuteWithResult(CompositeCommand.java:403)
at
org.eclipse.gmf.runtime.common.core.command.AbstractCommand. execute(AbstractCommand.java:135)
at
org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
... 37 more
|
|
|
|
Re: Link Mapping problem in eclipse 3.4 [message #218665 is a reply to message #218642] |
Fri, 13 February 2009 11:41 |
|
Hi Alex
I have a Main Class 'R' in model which contains 'A'(Containing class is
'R' ) and the class A contains 'x' (Containing class is 'A').
This is basically to make R as my main editor where in i can add
A(Figure) on editor and x(Figure) can be added in 'A'
Actually i had the same model and mapping in my previous version.which is
working(Eclipse europa)..Now i am moved to eclipse ganymede version 3.4
and latest version 2.1.0 of gmf and having this problem..
What is suggested for gmf projects ganymede or europa..
Please help..
Regards
Govind R
|
|
|
|
Re: Link Mapping problem in eclipse 3.4 [message #218688 is a reply to message #218680] |
Fri, 13 February 2009 12:13 |
|
Hi Alex,,.
That i asked bcoz one change what i did was moving to ganymede.
I think there is no much difference in code.but addFixedChild method
which checks for the instance . it returns false. and the exception. :(
Regards
Govind R .
|
|
|
|
Re: Link Mapping problem in eclipse 3.4 [message #218704 is a reply to message #218696] |
Fri, 13 February 2009 13:06 |
|
Hi Alex,
i have one Editpart for link to to be connected between X and X
and one Editpart for link to be connected between A and A.
For A- A
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof ABCOperator2EditPart) {
((ABCOperator2EditPart) childEditPart).setLabel(getPrimaryShape()
.getFigureABCOperatorFigure());
return true;
}
return false;
}
For x - x
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof ABCOperatorEditPart) {
((ABCOperatorEditPart) childEditPart).setLabel(getPrimaryShape()
.getFigureABCOperatorFigure());
return true;
}
return false;
}
For connection between x - x it returns false saying not a instance
Regards
Govind R
|
|
|
Re: Link Mapping problem in eclipse 3.4 [message #218712 is a reply to message #218696] |
Fri, 13 February 2009 13:13 |
|
Hi Alex
I also found one difference in the respective Editpart .
the Editpart also implements ITreeBranchEditPart which is not in my
previous version ..
and the methods 1.)addFixedChild(EditPart childEditPart)
2.)addChildVisual(EditPart childEditPart, int index)
methods in new version.
Regards
Govind R
|
|
|
|
|
|
|
|
Re: Link Mapping problem in eclipse 3.4 [message #220075 is a reply to message #220060] |
Thu, 26 February 2009 13:24 |
|
Hi Alex,
I added and checked
protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
IAdaptable info) throws ExecutionException {
if (!canExecute()) {
throw new ExecutionException(
"Invalid arguments in create link command"); //$NON-NLS-1$
}
return super.doExecuteWithResult(monitor, info);
}
canExecute returns me true .i think its is throwing exception in
super.doExecuteWithResult(monitor, info) method..
is there any problem in modelling.
Also i cames across this link
http://www.jevon.org/wiki/GMF_Troubleshooting_3
do i have add any ocl to me link mapping
Regards
Govind R
|
|
|
|
Re: Link Mapping problem in eclipse 3.4 [message #220083 is a reply to message #220079] |
Thu, 26 February 2009 14:23 |
|
Hi Alex
In my generated code i have XXXViewProvider which is my superclass, but
doesn't have any createEdge().
I Have to add link constraint or just constraint .
Hello govind,
Ok. If "true" is returned from XXXCreateCommand.canExecute() then you can
try placing a breakpont into XXXViewProvider.createEdge() operation - this
method will be called as a second part of link creation and can be another
reason preventing you from second link creation.
do i have add any ocl to me link mapping
If you have several links with same underlying domain model meta-element
then you have to add some (OCL) constraints to make it possible for GMF to
destinguish between these links.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07842 seconds