KTextEditor
codecompletionmodelcontrollerinterface.cpp
Go to the documentation of this file.
39bool CodeCompletionModelControllerInterface::shouldStartCompletion(View* view, const QString &insertedText, bool userInsertion, const Cursor &position)
78 if(!range.text().isEmpty() && range.text().count() == 1 && range.text().first().trimmed().isEmpty())
83QString CodeCompletionModelControllerInterface::filterString(View* view, const SmartRange &range, const Cursor &position)
88bool CodeCompletionModelControllerInterface::shouldAbortCompletion(View* view, const SmartRange &range, const QString ¤tCompletion)
94 //Do not abort completions when the text has been empty already before and a newline has been entered
104bool CodeCompletionModelControllerInterface::shouldExecute(const QModelIndex& index, QChar inserted) {
110KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction CodeCompletionModelControllerInterface2::matchingItem(const QModelIndex& selected) {
127bool CodeCompletionModelControllerInterface3::shouldStartCompletion(View* view, const QString &insertedText, bool userInsertion, const Cursor &position)
142Range CodeCompletionModelControllerInterface3::completionRange(View* view, const Cursor &position)
163Range CodeCompletionModelControllerInterface3::updateCompletionRange(View* view, const Range& range)
173QString CodeCompletionModelControllerInterface3::filterString(View* view, const Range &range, const Cursor &position)
178bool CodeCompletionModelControllerInterface3::shouldAbortCompletion(View* view, const Range &range, const QString ¤tCompletion)
184 //Do not abort completions when the text has been empty already before and a newline has been entered
194bool CodeCompletionModelControllerInterface3::shouldExecute(const QModelIndex& index, QChar inserted) {
200KTextEditor::CodeCompletionModelControllerInterface3::MatchReaction CodeCompletionModelControllerInterface3::matchingItem(const QModelIndex& selected) {
MatchReaction
Definition: codecompletionmodelcontrollerinterface.h:172
@ HideListIfAutomaticInvocation
If this is returned, the completion-list is hidden if it was invoked automatically.
Definition: codecompletionmodelcontrollerinterface.h:174
virtual MatchReaction matchingItem(const QModelIndex &matched)
Called whenever an item in the completion-list perfectly matches the current filter text.
Definition: codecompletionmodelcontrollerinterface.cpp:110
virtual bool shouldAbortCompletion(View *view, const Range &range, const QString ¤tCompletion)
This function decides if the completion should be aborted.
Definition: codecompletionmodelcontrollerinterface.cpp:178
virtual MatchReaction matchingItem(const QModelIndex &matched)
Called whenever an item in the completion-list perfectly matches the current filter text.
Definition: codecompletionmodelcontrollerinterface.cpp:200
virtual Range completionRange(View *view, const Cursor &position)
This function returns the completion range that will be used for the current completion.
Definition: codecompletionmodelcontrollerinterface.cpp:142
virtual void aborted(View *view)
Notification that completion for this model has been aborted.
Definition: codecompletionmodelcontrollerinterface.cpp:190
CodeCompletionModelControllerInterface3()
Definition: codecompletionmodelcontrollerinterface.cpp:119
virtual Range updateCompletionRange(View *view, const Range &range)
This function lets the CompletionModel dynamically modify the range.
Definition: codecompletionmodelcontrollerinterface.cpp:163
MatchReaction
Definition: codecompletionmodelcontrollerinterface.h:326
@ HideListIfAutomaticInvocation
Definition: codecompletionmodelcontrollerinterface.h:328
virtual bool shouldExecute(const QModelIndex &selected, QChar inserted)
When an item within this model is currently selected in the completion-list, and the user inserted th...
Definition: codecompletionmodelcontrollerinterface.cpp:194
virtual ~CodeCompletionModelControllerInterface3()
Definition: codecompletionmodelcontrollerinterface.cpp:123
virtual QString filterString(View *view, const Range &range, const Cursor &position)
This function returns the filter-text used for the current completion.
Definition: codecompletionmodelcontrollerinterface.cpp:173
virtual bool shouldStartCompletion(View *view, const QString &insertedText, bool userInsertion, const Cursor &position)
This function decides if the automatic completion should be started when the user entered some text.
Definition: codecompletionmodelcontrollerinterface.cpp:127
virtual Range completionRange(View *view, const Cursor &position)
This function returns the completion range that will be used for the current completion.
Definition: codecompletionmodelcontrollerinterface.cpp:54
virtual QString filterString(View *view, const SmartRange &range, const Cursor &position)
This function returns the filter-text used for the current completion.
Definition: codecompletionmodelcontrollerinterface.cpp:83
virtual void aborted(View *view)
Notification that completion for this model has been aborted.
Definition: codecompletionmodelcontrollerinterface.cpp:100
virtual void updateCompletionRange(View *view, SmartRange &range)
This function lets the CompletionModel dynamically modify the range.
Definition: codecompletionmodelcontrollerinterface.cpp:75
CodeCompletionModelControllerInterface()
Definition: codecompletionmodelcontrollerinterface.cpp:31
virtual ~CodeCompletionModelControllerInterface()
Definition: codecompletionmodelcontrollerinterface.cpp:35
virtual bool shouldExecute(const QModelIndex &selected, QChar inserted)
When an item within this model is currently selected in the completion-list, and the user inserted th...
Definition: codecompletionmodelcontrollerinterface.cpp:104
virtual bool shouldStartCompletion(View *view, const QString &insertedText, bool userInsertion, const Cursor &position)
This function decides if the automatic completion should be started when the user entered some text.
Definition: codecompletionmodelcontrollerinterface.cpp:39
virtual bool shouldAbortCompletion(View *view, const SmartRange &range, const QString ¤tCompletion)
This function decides if the completion should be aborted.
Definition: codecompletionmodelcontrollerinterface.cpp:88
virtual QStringList textLines(const Range &range, bool block=false) const =0
Get the document content within the given range.
An object representing a section of text, from one Cursor to another.
Definition: range.h:55
A Range which is bound to a specific Document, and maintains its position.
Definition: smartrange.h:95
virtual QStringList text(bool block=false) const
Retrieve the text which is contained within this range.
Definition: smartrange.cpp:641
virtual Document * document() const =0
Get the view's document, that means the view is a view of the returned document.
virtual Cursor cursorPosition() const =0
Get the view's current cursor position.
const KShortcut & end()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.