Source:
<code>public void execute(IProgressMonitor m) throws CoreException { IProgressMonitor monitor = m != null ? m : new NullProgressMonitor(); <START> IWorkspaceRunnable action = new IWorkspaceRunnable() { <END> public void run(IProgressMonitor pm) throws CoreException { pm.beginTask("", 2); pm.subTask(MessageFormat.format( CoreText.SquashCommitsOperation_squashing, Integer.valueOf(commits.size()))); InteractiveHandler handler = new InteractiveHandler() { public void prepareSteps(List<RebaseTodoLine> steps) { RevCommit firstCommit = commits.get(0); for (RebaseTodoLine step : steps) { if (isRelevant(step.getCommit())) { try { if (step.getCommit().prefixCompare( firstCommit) == 0) step.setAction(RebaseTodoLine.Action.REWORD); else step.setAction(RebaseTodoLine.Action.FIXUP); } catch (IllegalTodoFileModification e) { } } } } private boolean isRelevant(AbbreviatedObjectId id) { for (RevCommit commit : commits) { if (id.prefixCompare(commit) == 0) return true; } return false; } public String modifyCommitMessage(String oldMessage) { return message; } }; try { Git git = new Git(repository); git.rebase().setUpstream(commits.get(0).getParent(0)) .runInteractively(handler) .setOperation(RebaseCommand.Operation.BEGIN).call(); } catch (GitAPIException e) { throw new TeamException(e.getLocalizedMessage(), e.getCause()); } pm.worked(1); ProjectUtil.refreshValidProjects( ProjectUtil.getValidOpenProjects(repository), new SubProgressMonitor(pm, 1)); pm.done(); } }; ResourcesPlugin.getWorkspace().run(action, getSchedulingRule(), IWorkspace.AVOID_UPDATE, monitor); }</code><technical_language>add a blank line anonymous class stand out (that's standard Eclipse formatter does)</technical_language>

Target:
public void execute(IProgressMonitor m) throws CoreException { IProgressMonitor monitor = m != null ? m : new NullProgressMonitor(); IWorkspaceRunnable action = new IWorkspaceRunnable() { public void run(IProgressMonitor pm) throws CoreException { pm.beginTask("", 2); pm.subTask(MessageFormat.format( CoreText.SquashCommitsOperation_squashing, Integer.valueOf(commits.size()))); InteractiveHandler handler = new InteractiveHandler() { public void prepareSteps(List<RebaseTodoLine> steps) { RevCommit firstCommit = commits.get(0); for (RebaseTodoLine step : steps) { if (isRelevant(step.getCommit())) { try { if (step.getCommit().prefixCompare( firstCommit) == 0) step.setAction(RebaseTodoLine.Action.PICK); else step.setAction(RebaseTodoLine.Action.SQUASH); } catch (IllegalTodoFileModification e) { } } } } private boolean isRelevant(AbbreviatedObjectId id) { for (RevCommit commit : commits) { if (id.prefixCompare(commit) == 0) return true; } return false; } public String modifyCommitMessage(String oldMessage) { return messageHandler.modifyCommitMessage(oldMessage); } }; try { Git git = new Git(repository); git.rebase().setUpstream(commits.get(0).getParent(0)) .runInteractively(handler) .setOperation(RebaseCommand.Operation.BEGIN).call(); } catch (GitAPIException e) { throw new TeamException(e.getLocalizedMessage(), e.getCause()); } pm.worked(1); ProjectUtil.refreshValidProjects( ProjectUtil.getValidOpenProjects(repository), new SubProgressMonitor(pm, 1)); pm.done(); } }; ResourcesPlugin.getWorkspace().run(action, getSchedulingRule(), IWorkspace.AVOID_UPDATE, monitor); }