Editor: unify assist processor handling

Define the run type of the processor by its implementation instead of a
enum value of the provider. The execution of a processor inside the
assist now follows a unified procedure.

Change-Id: Ibe9fab324c6072e77702c2663946d7a9f562a085
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2022-11-09 15:38:22 +01:00
parent 33a33612c8
commit 09ee528c40
45 changed files with 230 additions and 377 deletions

View File

@@ -27,7 +27,6 @@ public:
explicit FunctionHintAssistProvider(Client *client);
TextEditor::IAssistProcessor *createProcessor(const TextEditor::AssistInterface *) const override;
RunType runType() const override;
int activationCharSequenceLength() const override;
bool isActivationCharSequence(const QString &sequence) const override;
@@ -45,7 +44,7 @@ class LANGUAGECLIENT_EXPORT FunctionHintProcessor : public TextEditor::IAssistPr
{
public:
explicit FunctionHintProcessor(Client *client);
TextEditor::IAssistProposal *perform(const TextEditor::AssistInterface *interface) override;
TextEditor::IAssistProposal *perform(TextEditor::AssistInterface *interface) override;
bool running() override { return m_currentRequest.has_value(); }
bool needsRestart() const override { return true; }
void cancel() override;