/** Execution of the command */ @Override protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { View view = getView(); List<Edge> sourceList = ViewUtil.getSourceConnections(view); List<Edge> targetList = ViewUtil.getTargetConnections(view); for (Edge edge : sourceList) { IdentityAnchor anchor = (IdentityAnchor) edge.getSourceAnchor(); if (anchor != null) { anchor.setId(getNewIdStr(anchor)); } } for (Edge edge : targetList) { IdentityAnchor anchor = (IdentityAnchor) edge.getTargetAnchor(); if (anchor != null) { anchor.setId(getNewIdStr(anchor)); } } return CommandResult.newOKCommandResult(); }