use of org.eclipse.egit.ui.internal.rebase.RebaseInteractiveView in project egit by eclipse.
the class RebaseInteractiveCurrentHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
final Repository repository = getRepository(event);
if (repository == null) {
return null;
}
if (LaunchFinder.shouldCancelBecauseOfRunningLaunches(repository, null)) {
return null;
}
super.execute(event);
try {
RebaseInteractiveView rebaseInteractiveView = (RebaseInteractiveView) HandlerUtil.getActiveWorkbenchWindowChecked(event).getActivePage().showView(RebaseInteractiveView.VIEW_ID);
rebaseInteractiveView.setInput(repository);
} catch (PartInitException e) {
Activator.showError(e.getMessage(), e);
}
return null;
}
use of org.eclipse.egit.ui.internal.rebase.RebaseInteractiveView in project egit by eclipse.
the class EditHandler method openStagingAndRebaseInteractiveViews.
private void openStagingAndRebaseInteractiveViews(final Repository repository) {
Job job = new UIJob(UIText.EditHandler_OpenStagingAndRebaseInteractiveViews) {
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
try {
IWorkbenchPage workbenchPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
final StagingView stagingView = (StagingView) workbenchPage.showView(StagingView.VIEW_ID);
stagingView.reload(repository);
stagingView.setAmending(true);
RebaseInteractiveView rebaseView = (RebaseInteractiveView) workbenchPage.showView(RebaseInteractiveView.VIEW_ID);
rebaseView.setInput(repository);
} catch (PartInitException e) {
Activator.logError(e.getMessage(), e);
}
return Status.OK_STATUS;
}
};
job.setRule(RuleUtil.getRule(repository));
job.setUser(true);
job.schedule();
}
Aggregations