use of org.obeonetwork.tools.requirement.wizard.operation.RequirementEditingOperation in project InformationSystem by ObeoNetwork.
the class EditRequirementAction method run.
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
RequirementLink eObjectLink = (RequirementLink) linksView.getSelectedEntries().get(0);
TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(linksView.getInput());
DomainPropertiesEditionContext propertiesEditionContext = new DomainPropertiesEditionContext(null, null, editingDomain, linksView.getAdapterFactory(), eObjectLink.getRequirement());
WizardEditingOperation operation = new RequirementEditingOperation(propertiesEditionContext);
try {
operation.execute(new NullProgressMonitor(), null);
linksView.refresh();
} catch (ExecutionException e) {
// $NON-NLS-1$
EEFRuntimePlugin.getDefault().logError("An error occured during wizard editing.", e);
}
}
use of org.obeonetwork.tools.requirement.wizard.operation.RequirementEditingOperation in project InformationSystem by ObeoNetwork.
the class LinkedRequirementsView method createDoubleClickAction.
/**
* {@inheritDoc}
*
* @see org.obeonetwork.tools.linker.ui.view.EObjectLinksView#createDoubleClickAction()
*/
@Override
protected Action createDoubleClickAction() {
return new Action() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
if (getSelectedEntries().size() > 0) {
RequirementLink eObjectLink = (RequirementLink) getSelectedEntries().get(0);
TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(getInput());
DomainPropertiesEditionContext propertiesEditionContext = new DomainPropertiesEditionContext(null, null, editingDomain, adapterFactory, eObjectLink.getRequirement());
WizardEditingOperation operation = new RequirementEditingOperation(propertiesEditionContext);
try {
operation.execute(new NullProgressMonitor(), null);
refresh();
} catch (ExecutionException e) {
// $NON-NLS-1$
EEFRuntimePlugin.getDefault().logError("An error occured during wizard editing.", e);
}
}
}
};
}
Aggregations