Search in sources :

Example 1 with RequirementCreationOperation

use of org.obeonetwork.tools.requirement.wizard.operation.RequirementCreationOperation in project InformationSystem by ObeoNetwork.

the class CreateRequirementAction method run.

/**
 * {@inheritDoc}
 *
 * @see org.eclipse.jface.action.Action#run()
 */
@Override
public void run() {
    EditingDomain editingDomain = TransactionUtil.getEditingDomain(linksView.getInput());
    RequirementCreationPropertiesEditingContext propertiesEditionContext = new RequirementCreationPropertiesEditingContext(null, null, editingDomain, linksView.getAdapterFactory(), linksView.getInput());
    RequirementCreationOperation operation = new RequirementCreationOperation(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);
    }
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) RequirementCreationPropertiesEditingContext(org.obeonetwork.tools.requirement.wizard.util.RequirementCreationPropertiesEditingContext) RequirementCreationOperation(org.obeonetwork.tools.requirement.wizard.operation.RequirementCreationOperation) EditingDomain(org.eclipse.emf.edit.domain.EditingDomain) ExecutionException(org.eclipse.core.commands.ExecutionException)

Aggregations

ExecutionException (org.eclipse.core.commands.ExecutionException)1 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)1 EditingDomain (org.eclipse.emf.edit.domain.EditingDomain)1 RequirementCreationOperation (org.obeonetwork.tools.requirement.wizard.operation.RequirementCreationOperation)1 RequirementCreationPropertiesEditingContext (org.obeonetwork.tools.requirement.wizard.util.RequirementCreationPropertiesEditingContext)1