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

Commit

Permalink
Merge pull request #10500 from adobe/kai/fix-deprecation-warnings
Browse files Browse the repository at this point in the history
Get rid of deprecation warnings in LiveDevMultiBrowser
  • Loading branch information
JeffryBooher committed Feb 5, 2015
2 parents 408dedf + 86f94ef commit eb7bc01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
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);
return MainViewManager.getWorkingSet(MainViewManager.ALL_PANES)
.filter(function (file) {
// Legacy didn't allow for files with custom viewers
Expand Down

0 comments on commit eb7bc01

Please sign in to comment.