forked from qt-creator/qt-creator
Allow for snippets in cmake and qmake project files
Change-Id: I593595ad130b3fc7b86e22dc2c6fc4cf2c8935bf Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -59,7 +59,9 @@ IAssistProcessor *CMakeFileCompletionAssistProvider::createProcessor() const
|
||||
|
||||
CMakeFileCompletionAssist::CMakeFileCompletionAssist() :
|
||||
KeywordsCompletionAssistProcessor(Keywords())
|
||||
{}
|
||||
{
|
||||
setSnippetGroup(Constants::CMAKE_SNIPPETS_GROUP_ID);
|
||||
}
|
||||
|
||||
IAssistProposal *CMakeFileCompletionAssist::perform(const AssistInterface *interface)
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <texteditor/codeassist/assistinterface.h>
|
||||
#include <texteditor/codeassist/keywordscompletionassist.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
|
||||
@@ -335,7 +336,9 @@ IAssistProcessor *ProFileCompletionAssistProvider::createProcessor() const
|
||||
if (m_variables.isEmpty())
|
||||
const_cast<ProFileCompletionAssistProvider *>(this)->init();
|
||||
TextEditor::Keywords keywords = TextEditor::Keywords(m_variables, m_functions, QMap<QString, QStringList>());
|
||||
return new KeywordsCompletionAssistProcessor(keywords);
|
||||
auto processor = new KeywordsCompletionAssistProcessor(keywords);
|
||||
processor->setSnippetGroup(TextEditor::Constants::TEXT_SNIPPET_GROUP_ID);
|
||||
return processor;
|
||||
}
|
||||
|
||||
QStringList ProFileCompletionAssistProvider::variables() const
|
||||
|
||||
Reference in New Issue
Block a user