use of org.obeonetwork.tools.doc.core.command.AddDocumentationLinkCommand in project InformationSystem by ObeoNetwork.
the class AddDocumentationLink method run.
/**
* {@inheritDoc}
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
EObject input = linksView.getInput();
TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(input);
if (editingDomain != null) {
DocumentationLinkDialog dialog = new DocumentationLinkDialog(linksView.getSite().getShell());
int open = dialog.open();
if (open == Window.OK) {
editingDomain.getCommandStack().execute(new AddDocumentationLinkCommand(input, dialog.getName(), dialog.getValue()));
linksView.refresh();
}
}
}
Aggregations