use of org.eclipse.egit.ui.internal.synchronize.action.GitOpenInCompareAction in project egit by eclipse.
the class GitActionContributor method initialize.
@Override
public void initialize(ISynchronizePageConfiguration configuration) {
super.initialize(configuration);
ExpandAllModelAction expandAllAction = new ExpandAllModelAction(GitActionContributor_ExpandAll, configuration);
expandAllAction.setImageDescriptor(EXPAND_ALL);
appendToGroup(P_TOOLBAR_MENU, NAVIGATE_GROUP, expandAllAction);
PullAction pullAction = new PullAction(UIText.GitActionContributor_Pull, configuration);
pullAction.setImageDescriptor(PULL);
appendToGroup(P_TOOLBAR_MENU, SYNCHRONIZE_GROUP, pullAction);
PushAction pushAction = new PushAction(UIText.GitActionContributor_Push, configuration);
pushAction.setImageDescriptor(PUSH);
appendToGroup(P_TOOLBAR_MENU, SYNCHRONIZE_GROUP, pushAction);
ISynchronizePageSite site = configuration.getSite();
IWorkbenchSite ws = site.getWorkbenchSite();
openWorkingFileAction = new OpenWorkingFileAction(ws.getWorkbenchWindow().getActivePage());
site.getSelectionProvider().addSelectionChangedListener(openWorkingFileAction);
if (ws instanceof IViewSite) {
Object oldAction = configuration.getProperty(P_OPEN_ACTION);
if (!(oldAction instanceof Action))
return;
final GitOpenInCompareAction openInCompareAction = new GitOpenInCompareAction(configuration, (Action) oldAction);
configuration.setProperty(P_OPEN_ACTION, openInCompareAction);
}
}
Aggregations