@Override public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { if (receiver instanceof TextConsole) { TextConsole console = (TextConsole) receiver; IProcess process = (IProcess) console.getAttribute(IDebugUIConstants.ATTR_CONSOLE_PROCESS); if (process != null) { String type = process.getAttribute(IProcess.ATTR_PROCESS_TYPE); return (type != null && type.equals(expectedValue)); }//end if }//end if return false; }//end test
/** * Returns the launch associated with this hyperlink, or * <code>null</code> if none * * @return the launch associated with this hyperlink, or * <code>null</code> if none */ private ILaunch getLaunch() { IProcess process = (IProcess) getConsole().getAttribute(IDebugUIConstants.ATTR_CONSOLE_PROCESS); if (process != null) { return process.getLaunch(); } return null; }