@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- MPart part = TaxeditorStorePlugin.getDefault().getWorkbench().getService(EPartService.class).showPart(
- AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DERIVATE_DERIVATEVIEW, PartState.ACTIVATE);
+ EPartService partService = TaxeditorStorePlugin.getDefault().getWorkbench().getService(EPartService.class);
+ MPart part = partService.createPart(AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DERIVATE_DERIVATEVIEW);
+ partService.showPart(part, PartState.ACTIVATE);
DerivateView derivateView = (DerivateView) part.getObject();
derivateView.init(new DerivateViewEditorInput());
return null;
import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
}
Map parameterMap = commandParameters.getParameterMap();
String partId = parameterMap.get(AppModelId.COMMANDPARAMETER_EU_ETAXONOMY_TAXEDITOR_WORKBENCH_COMMANDPARAMETER_PARTNAME).toString();
- partService.showPart(partId, PartState.ACTIVATE);
+ MPart part = partService.createPart(partId);
+ partService.showPart(part, PartState.ACTIVATE);
}
@CanExecute