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

Method openDocumentsSimple

kdevplatform/shell/documentcontroller.cpp:1103–1126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1101}
1102
1103bool DocumentController::openDocumentsSimple( QStringList urls )
1104{
1105 Sublime::Area* area = Core::self()->uiControllerInternal()->activeArea();
1106 Sublime::AreaIndex* areaIndex = area->rootIndex();
1107
1108 QList<Sublime::View*> topViews = static_cast<Sublime::MainWindow*>(Core::self()->uiControllerInternal()->activeMainWindow())->topViews();
1109
1110 if(Sublime::View* activeView = Core::self()->uiControllerInternal()->activeSublimeWindow()->activeView())
1111 areaIndex = area->indexOf(activeView);
1112
1113 qCDebug(SHELL) << "opening " << urls << " to area " << area << " index " << areaIndex << " with children " << areaIndex->first() << " " << areaIndex->second();
1114
1115 bool isFirstView = true;
1116
1117 bool ret = openDocumentsWithSplitSeparators( areaIndex, urls, isFirstView );
1118
1119 qCDebug(SHELL) << "area arch. after opening: " << areaIndex->print();
1120
1121 // Required because sublime sometimes doesn't update correctly when the area-index contents has been changed
1122 // (especially when views have been moved to other indices, through unsplit, split, etc.)
1123 static_cast<Sublime::MainWindow*>(Core::self()->uiControllerInternal()->activeMainWindow())->reconstructViews(topViews);
1124
1125 return ret;
1126}
1127
1128bool DocumentController::openDocumentsWithSplitSeparators( Sublime::AreaIndex* index, QStringList urlsWithSeparators, bool& isFirstView )
1129{

Callers

nothing calls this directly

Calls 12

activeAreaMethod · 0.80
uiControllerInternalMethod · 0.80
rootIndexMethod · 0.80
topViewsMethod · 0.80
activeSublimeWindowMethod · 0.80
secondMethod · 0.80
activeMainWindowMethod · 0.45
activeViewMethod · 0.45
indexOfMethod · 0.45
firstMethod · 0.45
printMethod · 0.45
reconstructViewsMethod · 0.45

Tested by

no test coverage detected