| 1101 | } |
| 1102 | |
| 1103 | bool 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 | |
| 1128 | bool DocumentController::openDocumentsWithSplitSeparators( Sublime::AreaIndex* index, QStringList urlsWithSeparators, bool& isFirstView ) |
| 1129 | { |
nothing calls this directly
no test coverage detected