|
Re: org.eclipse.core.runtime.AssertionFailedException: [message #1692797 is a reply to message #635729] |
Sat, 18 April 2015 21:04 |
|
Hello there,
I had exactly the same issue while using Quote:CreateConnectionViewAndElementRequest.getCreateCommand(type,sourceEditPart, targetEditPart, diagramEditPart.getDiagramPreferencesHint());
The following method solves the problem and the exception is not encountered.
public void createAndExecuteConnectionRequestCommand(IElementType type, DiagramEditPart editPart, EditPart source, EditPart target) {
CreateConnectionViewAndElementRequest request = new CreateConnectionViewAndElementRequest(type, ((IHintedType) type).getSemanticHint(), editPart.getDiagramPreferencesHint());
Command cmd = CreateConnectionViewAndElementRequest.getCreateCommand(request,
source, target);
System.out.println(cmd.getLabel());
diagramEditPart.getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
//hack to refresh visuals and show the connection!
diagramEditPart.addNotify();
}
Best, Nikos.
|
|
|
Powered by
FUDForum. Page generated in 0.03216 seconds