Source:
<code>public static void handleSingleRepositoryCheckoutOperationResult( Repository repository, CheckoutResult result, String target) { if (result.getStatus() == CheckoutResult.Status.CONFLICTS) { PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); if (UIRepositoryUtils.showCleanupDialog(repository, result.getConflictList(), UIText.BranchResultDialog_CheckoutConflictsTitle, shell)) { BranchOperationUI.checkout(repository, target, false) .start(); } }); } else if (result.getStatus() == CheckoutResult.Status.NONDELETED) { boolean show = false; List<String> pathList = result.getUndeletedList(); for (String path : pathList) if (new File(repository.getWorkTree(), path).exists()) { show = true; break; } if (!show) { return; } PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); new NonDeletedFilesDialog(shell, repository, result.getUndeletedList()).open(); }); <START> } else if (result.getStatus() == CheckoutResult.Status.OK) { return; <END> } else { String repoName = Activator.getDefault().getRepositoryUtil() .getRepositoryName(repository); String message = NLS.bind( UIText.BranchOperationUI_CheckoutError_DialogMessage, repoName, target); PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); MessageDialog.openError(shell, UIText.BranchOperationUI_CheckoutError_DialogTitle, message); }); } }</code><technical_language>This surely works. testing _the same_ variable for multiple cases done switch-case instead of multiple if-then more clear variable is tested. this is enum, a switch case (without default branch) immediately shown issue a compiler error</technical_language>

Target:
public static void handleSingleRepositoryCheckoutOperationResult( Repository repository, CheckoutResult result, String target) { switch (result.getStatus()) { case CONFLICTS: PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); if (UIRepositoryUtils.showCleanupDialog(repository, result.getConflictList(), UIText.BranchResultDialog_CheckoutConflictsTitle, shell)) { BranchOperationUI.checkout(repository, target, false) .start(); } }); break; case NONDELETED: boolean show = false; List<String> pathList = result.getUndeletedList(); for (String path : pathList) if (new File(repository.getWorkTree(), path).exists()) { show = true; break; } if (!show) { return; } PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); new NonDeletedFilesDialog(shell, repository, result.getUndeletedList()).open(); }); break; case OK: return; case NOT_TRIED: case ERROR: String repoName = Activator.getDefault().getRepositoryUtil() .getRepositoryName(repository); String message = NLS.bind( UIText.BranchOperationUI_CheckoutError_DialogMessage, repoName, target); PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); MessageDialog.openError(shell, UIText.BranchOperationUI_CheckoutError_DialogTitle, message); }); } }