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

Method initWindowService

src/plugins/codeeditor/codeeditor.cpp:209–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209void CodeEditor::initWindowService()
210{
211 auto &ctx = dpfInstance.serviceContext();
212 WindowService *windowService = ctx.service<WindowService>(WindowService::name());
213
214 workspaceWidget = new WorkspaceWidget;
215 using namespace std::placeholders;
216 if (windowService) {
217 QAction *action = new QAction(MWNA_EDIT, this);
218 action->setIcon(QIcon::fromTheme("edit-navigation"));
219 windowService->addNavigationItem(new AbstractAction(action), Priority::high);
220
221 windowService->registerWidgetToMode("editWindow", new AbstractWidget(workspaceWidget), CM_EDIT, Position::Central, true, true);
222 windowService->registerWidgetToMode("editWindow", new AbstractWidget(workspaceWidget), CM_DEBUG, Position::Central, true, true);
223 windowService->addContextWidget(QTabWidget::tr("Search &Results"), new AbstractWidget(CodeLens::instance()), true);
224
225 StatusInfoManager::instance()->init(windowService);
226 }
227}
228
229void CodeEditor::initOptionService()
230{

Callers

nothing calls this directly

Calls 6

addNavigationItemMethod · 0.80
registerWidgetToModeMethod · 0.80
addContextWidgetMethod · 0.80
nameFunction · 0.50
setIconMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected