fGraphPanel.getCommandController().executeCommand(command);
} else {
final String message = "Unable add elements to the current graph!";
final IWorkbench workbench = PlatformUI.getWorkbench();
Display display = workbench.getDisplay();
display.syncExec(new Runnable() {
public void run() {
IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();
Shell shell = activeWorkbenchWindow.getShell();
ErrorDialog.openError(shell, "Error", message, new Status(IStatus.ERROR, DAForJavaPlugin.PLUGIN_ID, 1,
"The selected elements don't belong to the currently visualized project.", null));