use of org.obeonetwork.tools.doc.ui.dialog.DocumentationLinkDialog 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();
}
}
}
use of org.obeonetwork.tools.doc.ui.dialog.DocumentationLinkDialog 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