Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ define(function LiveDevelopment(require, exports, module) {
FileSystemError = require("filesystem/FileSystemError"),
FileUtils = require("file/FileUtils"),
LiveDevServerManager = require("LiveDevelopment/LiveDevServerManager"),
MainViewManager = require("view/MainViewManager"),
NativeApp = require("utils/NativeApp"),
PreferencesDialogs = require("preferences/PreferencesDialogs"),
ProjectManager = require("project/ProjectManager"),
Expand Down Expand Up @@ -1266,8 +1267,8 @@ define(function LiveDevelopment(require, exports, module) {
otherDocumentsInWorkingFiles;

if (doc && !doc._masterEditor) {
otherDocumentsInWorkingFiles = DocumentManager.getWorkingSet().length;
DocumentManager.addToWorkingSet(doc.file);
otherDocumentsInWorkingFiles = MainViewManager.getPaneViewList(MainViewManager.FOCUSED_PANE).length;
MainViewManager.addToPaneViewList(MainViewManager.FOCUSED_PANE, doc.file);

if (!otherDocumentsInWorkingFiles) {
DocumentManager.setCurrentDocument(doc);
Expand Down
18 changes: 13 additions & 5 deletions src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ define(function (require, exports, module) {
EditorManager = require("editor/EditorManager"),
CSSInlineEditor = require("editor/CSSInlineEditor"),
JSUtils = require("language/JSUtils"),
WorkingSetView = require("project/WorkingSetView"),
WorkingSetSort = require("project/WorkingSetSort"),
PaneViewListView = require("project/PaneViewListView"),
PaneViewListSort = require("project/PaneViewListSort"),
DocumentCommandHandlers = require("document/DocumentCommandHandlers"),
FileViewController = require("project/FileViewController"),
FileSyncManager = require("project/FileSyncManager"),
Expand Down Expand Up @@ -103,6 +103,7 @@ define(function (require, exports, module) {
NativeApp = require("utils/NativeApp"),
DeprecationWarning = require("utils/DeprecationWarning"),
ViewCommandHandlers = require("view/ViewCommandHandlers"),
MainViewManager = require("view/MainViewManager"),
_ = require("thirdparty/lodash");

// DEPRECATED: In future we want to remove the global CodeMirror, but for now we
Expand All @@ -116,7 +117,7 @@ define(function (require, exports, module) {
return CodeMirror;
}
});

// Load modules that self-register and just need to get included in the main project
require("command/DefaultMenus");
require("document/ChangedDocumentTracker");
Expand All @@ -137,6 +138,9 @@ define(function (require, exports, module) {
require("file/NativeFileSystem");
require("file/NativeFileError");

// Compatibility shim for PanelManager to WorkspaceManager migration
require("view/PanelManager");

PerfUtils.addMeasurement("brackets module dependencies resolved");

// Local variables
Expand Down Expand Up @@ -182,6 +186,7 @@ define(function (require, exports, module) {
LanguageManager : LanguageManager,
LiveDevelopment : require("LiveDevelopment/LiveDevelopment"),
LiveDevServerManager : require("LiveDevelopment/LiveDevServerManager"),
MainViewManager : MainViewManager,
Menus : Menus,
MultiRangeInlineEditor : require("editor/MultiRangeInlineEditor").MultiRangeInlineEditor,
NativeApp : NativeApp,
Expand All @@ -191,7 +196,7 @@ define(function (require, exports, module) {
RemoteAgent : require("LiveDevelopment/Agents/RemoteAgent"),
ScrollTrackMarkers : require("search/ScrollTrackMarkers"),
UpdateNotification : require("utils/UpdateNotification"),
WorkingSetView : WorkingSetView,
PaneViewListView : PaneViewListView,

doneLoading : false
};
Expand Down Expand Up @@ -242,6 +247,9 @@ define(function (require, exports, module) {

// Load the initial project after extensions have loaded
extensionLoaderPromise.always(function () {
// Signal that extensions are loaded
AppInit._dispatchReady(AppInit.EXTENSIONS_READY);

// Finish UI initialization
ViewCommandHandlers.restoreFontSize();
var initialProjectPath = ProjectManager.getInitialProjectPath();
Expand All @@ -259,7 +267,7 @@ define(function (require, exports, module) {
if (ProjectManager.isWelcomeProjectPath(initialProjectPath)) {
FileSystem.resolve(initialProjectPath + "index.html", function (err, file) {
if (!err) {
var promise = CommandManager.execute(Commands.FILE_ADD_TO_WORKING_SET, { fullPath: file.fullPath });
var promise = CommandManager.execute(Commands.CMD_ADD_TO_PANE_VIEW_LIST, { fullPath: file.fullPath });
promise.then(deferred.resolve, deferred.reject);
} else {
deferred.reject();
Expand Down
Loading