| 143 | } |
| 144 | |
| 145 | KTextEditor::Range DUChainBase::rangeInCurrentRevision() const |
| 146 | { |
| 147 | DocumentChangeTracker* tracker = ICore::self()->languageController()->backgroundParser()->trackerForUrl(url()); |
| 148 | |
| 149 | if (tracker && topContext() && topContext()->parsingEnvironmentFile()) { |
| 150 | qint64 revision = topContext()->parsingEnvironmentFile()->modificationRevision().revision; |
| 151 | return tracker->transformToCurrentRevision(d_func()->m_range, revision); |
| 152 | } |
| 153 | |
| 154 | // If the document is not open, we can simply cast the range over, as no translation can be done |
| 155 | return d_func()->m_range.castToSimpleRange(); |
| 156 | } |
| 157 | |
| 158 | PersistentMovingRange::Ptr DUChainBase::createRangeMoving() const |
| 159 | { |