use of org.eclipse.ui.actions.PartEventAction in project xtext-eclipse by eclipse.
the class DefaultMergeViewer method setActionsActivated.
@Override
protected void setActionsActivated(SourceViewer sourceViewer, boolean state) {
DefaultMergeEditor mergeEditor = getEditor(sourceViewer);
if (mergeEditor != null) {
mergeEditor.setActionsActivated(state);
IAction saveAction = mergeEditor.getAction(ITextEditorActionConstants.SAVE);
if (saveAction instanceof IPageListener) {
PartEventAction partEventAction = (PartEventAction) saveAction;
IWorkbenchPart compareEditorPart = getCompareConfiguration().getContainer().getWorkbenchPart();
if (state) {
partEventAction.partActivated(compareEditorPart);
} else {
partEventAction.partDeactivated(compareEditorPart);
}
}
}
}
Aggregations