void LaTeXInfo::startLaTeXCompletion(KTextEditor::View *view) { KTextEditor::CodeCompletionInterface* completionInterface = qobject_cast<KTextEditor::CodeCompletionInterface*>(view); if(!completionInterface) { return; } KTextEditor::Range range = m_latexCompletionModel->completionRange(view, view->cursorPosition()); if(!range.isValid()) { range = KTextEditor::Range(view->cursorPosition(), view->cursorPosition()); } completionInterface->startCompletion(range, m_latexCompletionModel); }
// Pop up the editors completion list if applicable void KateWordCompletionView::popupCompletionList() { kDebug( 13040 ) << "entered ..."; KTextEditor::Range r = range(); KTextEditor::CodeCompletionInterface *cci = qobject_cast<KTextEditor::CodeCompletionInterface *>( m_view ); if(!cci || cci->isCompletionActive()) return; m_dWCompletionModel->saveMatches( m_view, r ); kDebug( 13040 ) << "after save matches ..."; if ( ! m_dWCompletionModel->rowCount(QModelIndex()) ) return; cci->startCompletion( r, m_dWCompletionModel ); }