Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Get rid of deprecation warnings in LiveDevMultiBrowser #10500

Merged
merged 2 commits into from
Feb 5, 2015
Merged
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
12 changes: 7 additions & 5 deletions src/LiveDevelopment/LiveDevMultiBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ define(function (require, exports, module) {
var STATUS_RELOADING = exports.STATUS_RELOADING = 5;
var STATUS_RESTARTING = exports.STATUS_RESTARTING = 6;

var Dialogs = require("widgets/Dialogs"),
var CommandManager = require("command/CommandManager"),
Commands = require("command/Commands"),
Dialogs = require("widgets/Dialogs"),
DefaultDialogs = require("widgets/DefaultDialogs"),
DocumentManager = require("document/DocumentManager"),
EditorManager = require("editor/EditorManager"),
Expand Down Expand Up @@ -698,14 +700,14 @@ define(function (require, exports, module) {
otherDocumentsInWorkingFiles;

if (doc && !doc._masterEditor) {
otherDocumentsInWorkingFiles = DocumentManager.getWorkingSet().length;
DocumentManager.addToWorkingSet(doc.file);
otherDocumentsInWorkingFiles = MainViewManager.getWorkingSetSize(MainViewManager.ALL_PANES);
MainViewManager.addToWorkingSet(MainViewManager.ACTIVE_PANE, doc.file);

if (!otherDocumentsInWorkingFiles) {
DocumentManager.setCurrentDocument(doc);
CommandManager.execute(Commands.CMD_OPEN, { fullPath: doc.file.fullPath });
}
}

// wait for server (StaticServer, Base URL or file:)
prepareServerPromise
.done(function () {
Expand Down
2 changes: 1 addition & 1 deletion src/document/DocumentManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ define(function (require, exports, module) {
* @return {Array.<File>}
*/
function getWorkingSet() {
DeprecationWarning.deprecationWarning("Use MainViewManager.getViews() instead of DocumentManager.getWorkingSet()", true);
DeprecationWarning.deprecationWarning("Use MainViewManager.getWorkingSet() instead of DocumentManager.getWorkingSet()", true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, btw!

return MainViewManager.getWorkingSet(MainViewManager.ALL_PANES)
.filter(function (file) {
// Legacy didn't allow for files with custom viewers
Expand Down