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

Method start

src/plugins/python/pythonplugin.cpp:26–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26bool PythonPlugin::start()
27{
28 qInfo() << __FUNCTION__;
29 auto &ctx = dpfInstance.serviceContext();
30 LanguageService *languageService = ctx.service<LanguageService>(LanguageService::name());
31 if (languageService) {
32 QString errorString;
33 bool ret = languageService->regClass<PythonGenerator>(PythonGenerator::toolKitName(), &errorString);
34 if (!ret) {
35 qCritical() << errorString;
36 } else {
37 ret = languageService->create<PythonGenerator>(PythonGenerator::toolKitName(), &errorString);
38 if (!ret) {
39 qCritical() << errorString;
40 }
41 }
42 }
43
44 ProjectService *projectService = ctx.service<ProjectService>(ProjectService::name());
45 if (projectService) {
46 QString errorString;
47 projectService->implGenerator<PythonProjectGenerator>(PythonProjectGenerator::toolKitName(), &errorString);
48 }
49
50 OptionService *optionService = ctx.service<OptionService>(OptionService::name());
51 if (!optionService) {
52 qCritical() << "Failed, not found OptionPython service!";
53 abort();
54 }
55 optionService->implGenerator<OptionPythonGenerator>(option::GROUP_LANGUAGE, OptionPythonGenerator::kitName());
56
57 registEditorService();
58 registerPIPInstaller();
59 return true;
60}
61
62dpf::Plugin::ShutdownFlag PythonPlugin::stop()
63{

Callers 4

queryPackagesMethod · 0.45
createVenvMethod · 0.45
pythonVersionMethod · 0.45
checkInstalledMethod · 0.45

Calls 4

toolKitNameFunction · 0.85
abortFunction · 0.85
kitNameFunction · 0.85
nameFunction · 0.50

Tested by

no test coverage detected