Navigatable (final AbstractTestProxy proxy, final TestConsoleProperties testConsoleProperties, final boolean openFailureLine) { final Project project = testConsoleProperties.getProject(); if (proxy != null) { final Location location = proxy.getLocation(project, testConsoleProperties.getScope()); if (openFailureLine) { return proxy.getDescriptor(location, testConsoleProperties); } final Navigatable navigatable = location == null ? null : location.getNavigatable(); if (navigatable instanceof OpenFileDescriptor && ((OpenFileDescriptor)navigatable).getFile().isValid()) { return navigatable; } return navigatable; } return null; }