@Override public void reload() { ApplicationManager.getApplication().assertReadAccessAllowed(); final XSourcePosition position = myXBreakpoint.getSourcePosition(); try { final PsiFile psiFile = PsiManager.getInstance(myProject).findFile(position.getFile()); mySourcePosition = SourcePosition.createFromOffset(psiFile, position.getOffset()); } catch (Exception e) { mySourcePosition = null; } reload(BreakpointManager.getPsiFile(myXBreakpoint, myProject)); }
@Override public SourcePosition getSourcePosition(final Location location) throws NoDataException { int _lineNumber = location.lineNumber(); final int line = (_lineNumber - 1); final PsiFile psiFile = this._debugProcessExtensions.getPsiFile(this.process, location); boolean _equals = Objects.equal(psiFile, null); if (_equals) { throw NoDataException.INSTANCE; } SourcePosition _createFromLine = SourcePosition.createFromLine(psiFile, line); final AbstractTraceRegion trace = this._debugProcessExtensions.getTraceForJava(_createFromLine); boolean _equals_1 = Objects.equal(trace, null); if (_equals_1) { throw NoDataException.INSTANCE; } final URI sourceURI = this._debugProcessExtensions.findOriginalDeclaration(this.process, location); SourcePosition fallBack = null; SourcePosition secondaryFallBack = null; TreeIterator<AbstractTraceRegion> iter = trace.treeIterator(); while (iter.hasNext()) { { final AbstractTraceRegion n = iter.next(); int _myLineNumber = n.getMyLineNumber(); boolean _tripleEquals = (_myLineNumber == line); if (_tripleEquals) { final ILocationData mergedAssociatedLocation = n.getMergedAssociatedLocation(); if (((n.isUseForDebugging() && (n.getMyEndLineNumber() == line)) && (mergedAssociatedLocation.getLineNumber() == mergedAssociatedLocation.getEndLineNumber()))) { final PsiFile psi = this._debugProcessExtensions.getPsiFile(this.process, sourceURI); int _offset = mergedAssociatedLocation.getOffset(); return SourcePosition.createFromOffset(psi, _offset); } else { final PsiFile psi_1 = this._debugProcessExtensions.getPsiFile(this.process, sourceURI); int _offset_1 = mergedAssociatedLocation.getOffset(); SourcePosition _createFromOffset = SourcePosition.createFromOffset(psi_1, _offset_1); fallBack = _createFromOffset; } } int _myEndLineNumber = n.getMyEndLineNumber(); boolean _tripleEquals_1 = (_myEndLineNumber == line); if (_tripleEquals_1) { final ILocationData mergedAssociatedLocation_1 = n.getMergedAssociatedLocation(); final PsiFile psi_2 = this._debugProcessExtensions.getPsiFile(this.process, sourceURI); int _endLineNumber = mergedAssociatedLocation_1.getEndLineNumber(); SourcePosition _createFromLine_1 = SourcePosition.createFromLine(psi_2, _endLineNumber); secondaryFallBack = _createFromLine_1; } } } SourcePosition _elvis = null; if (fallBack != null) { _elvis = fallBack; } else { _elvis = secondaryFallBack; } return _elvis; }