Hello!
I have a structure like this:
Node A ---(1)---> Node B ---(2)---> Node C
If I delete connection (1) I would like to also delete connection (2) between node B and C. The connections are of a different type.
Does anybody know a solution how to access and delete connection (2)?
Thank you very much!
Here is the remove of Connection (1) (after the confirmation of a dialog):
protected Command getDestroyElementCommand(DestroyElementRequest req) {
DestroyElementCommand cmd = new DestroyElementCommand(req) {
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Shell shell = new Shell(SWT.DIALOG_TRIM | SWT.PRIMARY_MODAL);
boolean result = MessageDialog.openQuestion(shell, Messages.StateTransitionDeleteQuestionTitle, Messages.StateTransitionDeleteQuestion);
if (result) {
// OK Button selected
return super.doExecuteWithResult(monitor, info);
} else {
// Cancel Button selected
return CommandResult.newCancelledCommandResult();
}
}
};
return getGEFWrapper(cmd);
}