Source:
<code>public Object execute(final ExecutionEvent event) { final IResource item = getResource(event); if (item == null) { return null; } final StatusReporter statusReporter = HandlerUtil.getActiveWorkbenchWindow(event).getService( StatusReporter.class); Job job = Job.create(IDEWorkbenchMessages.ShowInSystemExplorerHandler_jobTitle, new IJobFunction() { @Override public IStatus run(IProgressMonitor monitor) { String logMsgPrefix; try { logMsgPrefix = event.getCommand().getName() + ": "; } catch (NotDefinedException e) { logMsgPrefix = event.getCommand().getId() + ": "; } try { File canonicalPath = getSystemExplorerPath(item); if (canonicalPath == null) { return statusReporter.newStatus(IStatus.ERROR, logMsgPrefix + IDEWorkbenchMessages.ShowInSystemExplorerHandler_notDetermineLocation, null); } String launchCmd = formShowInSytemExplorerCommand(canonicalPath); if ("".equals(launchCmd)) { return statusReporter.newStatus(IStatus.ERROR, logMsgPrefix + IDEWorkbenchMessages.ShowInSystemExplorerHandler_commandUnavailable, null); } File dir = item.getWorkspace().getRoot().getLocation().toFile(); Process p; if (Util.isLinux() || Util.isMac()) { p = Runtime.getRuntime().exec(new String[] { "/bin/sh", "-c", launchCmd }, null, dir); } else { p = Runtime.getRuntime().exec(launchCmd, null, dir); } int retCode = p.waitFor(); if (retCode != 0 && !Util.isWindows()) { return statusReporter.newStatus(IStatus.ERROR, "Execution of '" + launchCmd + "' failed with return code: " + retCode, null); } } catch <START> (Exception e) <END> { return statusReporter.newStatus(IStatus.ERROR, logMsgPrefix + "Unhandled failure.", e); } return Status.OK_STATUS; } }); job.schedule(); return null; }</code><technical_language>cleaner IOException | InterruptedException</technical_language>

Target:
public Object execute(final ExecutionEvent event) { final IResource item = getResource(event); if (item == null) { return null; } final StatusReporter statusReporter = HandlerUtil.getActiveWorkbenchWindow(event).getService( StatusReporter.class); Job job = Job.create(IDEWorkbenchMessages.ShowInSystemExplorerHandler_jobTitle, new IJobFunction() { @Override public IStatus run(IProgressMonitor monitor) { String logMsgPrefix; try { logMsgPrefix = event.getCommand().getName() + ": "; } catch (NotDefinedException e) { logMsgPrefix = event.getCommand().getId() + ": "; } try { File canonicalPath = getSystemExplorerPath(item); if (canonicalPath == null) { return statusReporter.newStatus(IStatus.ERROR, logMsgPrefix + IDEWorkbenchMessages.ShowInSystemExplorerHandler_notDetermineLocation, null); } String launchCmd = formShowInSytemExplorerCommand(canonicalPath); if ("".equals(launchCmd)) { return statusReporter.newStatus(IStatus.ERROR, logMsgPrefix + IDEWorkbenchMessages.ShowInSystemExplorerHandler_commandUnavailable, null); } File dir = item.getWorkspace().getRoot().getLocation().toFile(); Process p; if (Util.isLinux() || Util.isMac()) { p = Runtime.getRuntime().exec(new String[] { "/bin/sh", "-c", launchCmd }, null, dir); } else { p = Runtime.getRuntime().exec(launchCmd, null, dir); } int retCode = p.waitFor(); if (retCode != 0 && !Util.isWindows()) { return statusReporter.newStatus(IStatus.ERROR, "Execution of '" + launchCmd + "' failed with return code: " + retCode, null); } } catch (IOException | InterruptedException e) { return statusReporter.newStatus(IStatus.ERROR, logMsgPrefix + "Unhandled failure.", e); } return Status.OK_STATUS; } }); job.schedule(); return null; }