| 301 | } |
| 302 | |
| 303 | KTextEditor::Range ClangSupport::specialLanguageObjectRange(const QUrl &url, const KTextEditor::Cursor& position) |
| 304 | { |
| 305 | DUChainReadLocker lock; |
| 306 | const QPair<TopDUContextPointer, Use> macroExpansion = macroExpansionForPosition(url, position); |
| 307 | if (macroExpansion.first) { |
| 308 | return macroExpansion.first->transformFromLocalRevision(macroExpansion.second.m_range); |
| 309 | } |
| 310 | |
| 311 | const QPair<TopDUContextPointer, KTextEditor::Range> import = importedContextForPosition(url, position); |
| 312 | if(import.first) { |
| 313 | return import.second; |
| 314 | } |
| 315 | |
| 316 | return KTextEditor::Range::invalid(); |
| 317 | } |
| 318 | |
| 319 | QPair<QUrl, KTextEditor::Cursor> ClangSupport::specialLanguageObjectJumpCursor(const QUrl &url, const KTextEditor::Cursor& position) |
| 320 | { |
no test coverage detected