use of org.obeonetwork.tools.doc.core.command.EditDocumentationLinkCommand in project InformationSystem by ObeoNetwork.
the class EditDocumentationLink 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) {
DocumentationLink editedLink = (DocumentationLink) linksView.getSelectedEntries().get(0);
DocumentationLinkDialog dialog = new DocumentationLinkDialog(linksView.getSite().getShell(), editedLink);
int open = dialog.open();
if (open == Window.OK) {
editingDomain.getCommandStack().execute(new EditDocumentationLinkCommand(editedLink, dialog.getName(), dialog.getValue()));
linksView.refresh();
}
}
}
Aggregations