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

Method createSciLexer

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

Source from the content-addressed store, hash-verified

49}
50
51QsciLexer *LexerManager::createSciLexer(const QString &language, const QString &fileName)
52{
53 auto proxy = sciLexerProxyMng.value(language, nullptr);
54 if (proxy) {
55 // The `SciLexerHandler` is structured by `TextEditor`
56 SciLexerHandler *handler = new SciLexerHandler();
57 handler->setProxy(proxy);
58 return handler;
59 }
60
61 for (auto proxy : sciLexerProxyMng) {
62 if (proxy->isSupport(fileName)) {
63 SciLexerHandler *handler = new SciLexerHandler();
64 handler->setProxy(proxy);
65 return handler;
66 }
67 }
68
69 return defaultSciLexer(language);
70}
71
72QsciLexer *LexerManager::defaultSciLexer(const QString &language)
73{

Callers 1

loadLexerMethod · 0.80

Calls 3

setProxyMethod · 0.80
valueMethod · 0.45
isSupportMethod · 0.45

Tested by

no test coverage detected