Source:
<code>protected void execute(final RebaseOperation rebase) throws ExecutionException { final Repository repository = rebase.getRepository(); if (repository == null) return; final RebaseCommand.Operation operation = rebase.getOperation(); JobUtil.scheduleUserJob(rebase, jobname, JobFamilies.REBASE, new JobChangeAdapter() { @Override public void aboutToRun(IJobChangeEvent event) { if (operation == Operation.BEGIN && !repository.getRepositoryState().equals( RepositoryState.SAFE)) { throw new IllegalStateException( "Can't start rebase if repository state isn't SAFE"); } super.aboutToRun(event); } @Override public void done(IJobChangeEvent cevent) { finishRebaseInteractive(); IStatus result = cevent.getJob().getResult(); if (operation == Operation.BEGIN && result.getSeverity() == IStatus.ERROR) { handleBeginError(repository, result); } else if (result.getSeverity() == IStatus.CANCEL) Display.getDefault().asyncExec(new Runnable() { public void run() { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow() .getShell(); MessageDialog .openInformation( shell, UIText.AbstractRebaseCommand_DialogTitle, dialogMessage); } }); else if (result.isOK()) { RebaseResultDialog.show(rebase.getResult(), repository); <START> if (rebase.getResult().getStatus() <END> .equals(Status.EDIT)) { Display.getDefault().asyncExec(new Runnable() { public void run() { try { IViewPart view = PlatformUI .getWorkbench() .getActiveWorkbenchWindow() .getActivePage() .showView(StagingView.VIEW_ID); if (view instanceof StagingView) { StagingView sv = (StagingView) view; sv.setAmending(true); sv.reload(repository); } } catch (PartInitException e) { Activator.logError(e.getMessage(), e); } } }); } } } private void finishRebaseInteractive() { RebaseInteractivePlan plan = RebaseInteractivePlan .getPlan(repository); if (plan != null && !plan.isRebasingInteractive()) plan.dispose(); } }); }</code><technical_language>enums compared ==</technical_language>

Target:
protected void execute(final RebaseOperation rebase) throws ExecutionException { final Repository repository = rebase.getRepository(); if (repository == null) return; final RebaseCommand.Operation operation = rebase.getOperation(); JobUtil.scheduleUserJob(rebase, jobname, JobFamilies.REBASE, new JobChangeAdapter() { @Override public void aboutToRun(IJobChangeEvent event) { if (operation == Operation.BEGIN && !repository.getRepositoryState().equals( RepositoryState.SAFE)) { throw new IllegalStateException( "Can't start rebase if repository state isn't SAFE"); } super.aboutToRun(event); } @Override public void done(IJobChangeEvent cevent) { finishRebaseInteractive(); IStatus result = cevent.getJob().getResult(); if (operation == Operation.BEGIN && result.getSeverity() == IStatus.ERROR) { handleBeginError(repository, result); } else if (result.getSeverity() == IStatus.CANCEL) Display.getDefault().asyncExec(new Runnable() { public void run() { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow() .getShell(); MessageDialog .openInformation( shell, UIText.AbstractRebaseCommand_DialogTitle, dialogMessage); } }); else if (result.isOK()) { RebaseResultDialog.show(rebase.getResult(), repository); if (operation == Operation.ABORT) { setAmending(false); } if (rebase.getResult().getStatus() == Status.EDIT) { setAmending(true); } } } private void setAmending( final boolean amending) { Display.getDefault().asyncExec(new Runnable() { public void run() { try { IViewPart view = PlatformUI .getWorkbench() .getActiveWorkbenchWindow() .getActivePage() .showView(StagingView.VIEW_ID); if (view instanceof StagingView) { StagingView sv = (StagingView) view; sv.setAmending(amending); sv.reload(repository); } } catch (PartInitException e) { Activator.logError(e.getMessage(), e); } } }); } private void finishRebaseInteractive() { RebaseInteractivePlan plan = RebaseInteractivePlan .getPlan(repository); if (plan != null && !plan.isRebasingInteractive()) plan.dispose(); } }); }