MCPcopy Create free account
hub / github.com/KDE/kdevelop / openDocument

Method openDocument

plugins/contextbrowser/contextbrowser.cpp:1297–1316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1295}
1296
1297void ContextBrowserPlugin::openDocument(int historyIndex)
1298{
1299 Q_ASSERT_X(historyIndex >= 0, "openDocument", "negative history index");
1300 Q_ASSERT_X(historyIndex < m_history.size(), "openDocument", "history index out of range");
1301 DocumentCursor c = m_history[historyIndex].computePosition();
1302 if (c.isValid() && !c.document.str().isEmpty()) {
1303 disconnect(
1304 ICore::self()->documentController(), &IDocumentController::documentJumpPerformed, this,
1305 &ContextBrowserPlugin::documentJumpPerformed);
1306
1307 ICore::self()->documentController()->openDocument(c.document.toUrl(), c);
1308
1309 connect(
1310 ICore::self()->documentController(), &IDocumentController::documentJumpPerformed, this,
1311 &ContextBrowserPlugin::documentJumpPerformed);
1312
1313 KDevelop::DUChainReadLocker lock(KDevelop::DUChain::lock());
1314 updateDeclarationListBox(m_history[historyIndex].context.data());
1315 }
1316}
1317
1318void ContextBrowserPlugin::historyPrevious()
1319{

Callers 15

createFileFunction · 0.45
showStashMethod · 0.45
gotoSrcLineMethod · 0.45
createMethod · 0.45
executeMethod · 0.45
quickOpenDeclarationMethod · 0.45
jumpToSpecialObjectMethod · 0.45
quickOpenDefinitionMethod · 0.45
jumpToNearestFunctionMethod · 0.45
testProjectFileFilterMethod · 0.45
openAnyDocumentFunction · 0.45
eventFilterMethod · 0.45

Calls 8

computePositionMethod · 0.80
strMethod · 0.80
documentControllerMethod · 0.80
sizeMethod · 0.45
isValidMethod · 0.45
isEmptyMethod · 0.45
toUrlMethod · 0.45
dataMethod · 0.45

Tested by 3

testProjectFileFilterMethod · 0.36
openAnyDocumentFunction · 0.36
showSourceMethod · 0.36