MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / registerSciLexerProxy

Method registerSciLexerProxy

src/plugins/codeeditor/lexer/lexermanager.cpp:32–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void LexerManager::registerSciLexerProxy(const QString &language, AbstractLexerProxy *proxy)
33{
34 if (sciLexerProxyMng.contains(language)) {
35 qWarning() << "The lexer proxy of " << language << " has been registed!";
36 return;
37 }
38
39 if (!proxy) {
40 qWarning() << "The proxy is null";
41 return;
42 }
43
44 // The `proxy` is structured by `LexerManager`
45 if (!proxy->parent())
46 proxy->setParent(this);
47
48 sciLexerProxyMng.insert(language, proxy);
49}
50
51QsciLexer *LexerManager::createSciLexer(const QString &language, const QString &fileName)
52{

Callers 2

registEditorServiceMethod · 0.80
registEditorServiceMethod · 0.80

Calls 3

insertMethod · 0.80
containsMethod · 0.45
parentMethod · 0.45

Tested by

no test coverage detected