XSourcePosition (Debugger.Locatable location) { final VirtualFile file; try { file = VfsUtil.findFileByURL(new URI(location.getURI()).toURL()); } catch (Exception e) { // TODO log return null; } final int line = location.getLineNumber() - 1; final XSourcePosition position = XDebuggerUtil.getInstance().createPosition(file, line); return line >= 0 && position != null ? new XsltSourcePosition(location, position) : null; }