SourcePosition (final Location location) { if (location == null) return null; return ReadAction.nonBlocking(() -> { SourcePosition res = null; try { res = mySourcePositionCache.get(location); } catch (IllegalArgumentException ignored) { // Invalid method id } if (checkCacheEntry(res, location)) return res; String sourceName = DebuggerUtilsEx.getSourceName(location, e -> null); FileType fileType = sourceName != null ? FileTypeManager.getInstance().getFileTypeByFileName(sourceName) : null; return iterate(positionManager -> { SourcePosition res1 = positionManager.getSourcePosition(location); try { mySourcePositionCache.put(location, res1); } catch (IllegalArgumentException ignored) { // Invalid method id } return res1; }, null, fileType, false); }).executeSynchronously(); }