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

Commit 1e0e4bc

Browse files
committed
Merge pull request #5429 from WebsiteDeveloper/remove-preferences-migration
Issue: #3217 Remove preferences migration code
2 parents 7dcc479 + 70c1723 commit 1e0e4bc

File tree

10 files changed

+171
-213
lines changed

10 files changed

+171
-213
lines changed

src/LiveDevelopment/main.js

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
/*
22
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
3-
*
3+
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
5-
* copy of this software and associated documentation files (the "Software"),
6-
* to deal in the Software without restriction, including without limitation
7-
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8-
* and/or sell copies of the Software, and to permit persons to whom the
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
99
* Software is furnished to do so, subject to the following conditions:
10-
*
10+
*
1111
* The above copyright notice and this permission notice shall be included in
1212
* all copies or substantial portions of the Software.
13-
*
13+
*
1414
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1616
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19-
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2020
* DEALINGS IN THE SOFTWARE.
21-
*
21+
*
2222
*/
2323

2424

@@ -142,7 +142,7 @@ define(function main(require, exports, module) {
142142

143143
/** Called on status change */
144144
function _showStatusChangeReason(reason) {
145-
// Destroy the previous twipsy (options are not updated otherwise)
145+
// Destroy the previous twipsy (options are not updated otherwise)
146146
_$btnGoLive.twipsy("hide").removeData("twipsy");
147147

148148
// If there was no reason or the action was an explicit request by the user, don't show a twipsy
@@ -178,7 +178,7 @@ define(function main(require, exports, module) {
178178
});
179179
$(LiveDevelopment).on("statusChange", function statusChange(event, status, reason) {
180180
// status starts at -1 (error), so add one when looking up name and style
181-
// See the comments at the top of LiveDevelopment.js for details on the
181+
// See the comments at the top of LiveDevelopment.js for details on the
182182
// various status codes.
183183
_setLabel(_$btnGoLive, null, _statusStyle[status + 1], _statusTooltip[status + 1]);
184184
_showStatusChangeReason(reason);
@@ -195,7 +195,7 @@ define(function main(require, exports, module) {
195195
function _setupGoLiveMenu() {
196196
$(LiveDevelopment).on("statusChange", function statusChange(event, status) {
197197
// Update the checkmark next to 'Live Preview' menu item
198-
// Add checkmark when status is STATUS_ACTIVE; otherwise remove it
198+
// Add checkmark when status is STATUS_ACTIVE; otherwise remove it
199199
CommandManager.get(Commands.FILE_LIVE_FILE_PREVIEW).setChecked(status === LiveDevelopment.STATUS_ACTIVE);
200200
CommandManager.get(Commands.FILE_LIVE_HIGHLIGHT).setEnabled(status === LiveDevelopment.STATUS_ACTIVE);
201201
});
@@ -257,8 +257,6 @@ define(function main(require, exports, module) {
257257

258258
// init prefs
259259
prefs = PreferencesManager.getPreferenceStorage(module, {highlight: true});
260-
//TODO: Remove preferences migration code
261-
PreferencesManager.handleClientIdChange(prefs, "com.adobe.brackets.live-development");
262260

263261
config.highlight = prefs.getValue("highlight");
264262

src/brackets.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ define(function (require, exports, module) {
216216
// an old version that might not have set the "afterFirstLaunch" pref.)
217217
var prefs = PreferencesManager.getPreferenceStorage(module),
218218
deferred = new $.Deferred();
219-
//TODO: Remove preferences migration code
220-
PreferencesManager.handleClientIdChange(prefs, "com.adobe.brackets.startup");
221219

222220
if (!params.get("skipSampleProjectLoad") && !prefs.getValue("afterFirstLaunch")) {
223221
prefs.setValue("afterFirstLaunch", "true");

src/document/DocumentManager.js

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
/*
22
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
3-
*
3+
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
5-
* copy of this software and associated documentation files (the "Software"),
6-
* to deal in the Software without restriction, including without limitation
7-
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8-
* and/or sell copies of the Software, and to permit persons to whom the
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
99
* Software is furnished to do so, subject to the following conditions:
10-
*
10+
*
1111
* The above copyright notice and this permission notice shall be included in
1212
* all copies or substantial portions of the Software.
13-
*
13+
*
1414
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1616
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19-
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2020
* DEALINGS IN THE SOFTWARE.
21-
*
21+
*
2222
*/
2323

2424

@@ -28,15 +28,15 @@
2828
/**
2929
* DocumentManager maintains a list of currently 'open' Documents. It also owns the list of files in
3030
* the working set, and the notion of which Document is currently shown in the main editor UI area.
31-
*
31+
*
3232
* Document is the model for a file's contents; it dispatches events whenever those contents change.
3333
* To transiently inspect a file's content, simply get a Document and call getText() on it. However,
3434
* to be notified of Document changes or to modify a Document, you MUST call addRef() to ensure the
3535
* Document instance 'stays alive' and is shared by all other who read/modify that file. ('Open'
3636
* Documents are all Documents that are 'kept alive', i.e. have ref count > 0).
3737
*
3838
* To get a Document, call getDocumentForPath(); never new up a Document yourself.
39-
*
39+
*
4040
* Secretly, a Document may use an Editor instance to act as the model for its internal state. (This
4141
* is unavoidable because CodeMirror does not separate its model from its UI). Documents are not
4242
* modifiable until they have a backing 'master Editor'. Creation of the backing Editor is owned by
@@ -54,7 +54,7 @@
5454
*
5555
* - dirtyFlagChange -- When any Document's isDirty flag changes. The 2nd arg to the listener is the
5656
* Document whose flag changed.
57-
* - documentSaved -- When a Document's changes have been saved. The 2nd arg to the listener is the
57+
* - documentSaved -- When a Document's changes have been saved. The 2nd arg to the listener is the
5858
* Document that has been saved.
5959
* - documentRefreshed -- When a Document's contents have been reloaded from disk. The 2nd arg to the
6060
* listener is the Document that has been refreshed.
@@ -72,7 +72,7 @@
7272
* The 2nd arg to the listener is the array of removed FileEntry objects.
7373
* - workingSetSort -- When the workingSet array is reordered without additions or removals.
7474
* Listener receives no arguments.
75-
*
75+
*
7676
* - workingSetDisableAutoSorting -- Dispatched in addition to workingSetSort when the reorder was caused
7777
* by manual dragging and dropping. Listener receives no arguments.
7878
*
@@ -82,7 +82,7 @@
8282
*
8383
* These are jQuery events, so to listen for them you do something like this:
8484
* $(DocumentManager).on("eventname", handler);
85-
*
85+
*
8686
* Document objects themselves also dispatch some events - see Document docs for details.
8787
*/
8888
define(function (require, exports, module) {
@@ -182,7 +182,7 @@ define(function (require, exports, module) {
182182
return _workingSet.slice(0);
183183
}
184184

185-
/**
185+
/**
186186
* Returns the index of the file matching fullPath in the working set.
187187
* Returns -1 if not found.
188188
* @param {!string} fullPath
@@ -198,7 +198,7 @@ define(function (require, exports, module) {
198198
});
199199
}
200200

201-
/**
201+
/**
202202
* Returns the index of the file matching fullPath in _workingSetAddedOrder.
203203
* Returns -1 if not found.
204204
* @param {!string} fullPath
@@ -465,7 +465,7 @@ define(function (require, exports, module) {
465465
* Changes currentDocument to the given Document, firing currentDocumentChange, which in turn
466466
* causes this Document's main editor UI to be shown in the editor pane, updates the selection
467467
* in the file tree / working set UI, etc. This call may also add the item to the working set.
468-
*
468+
*
469469
* @param {!Document} document The Document to make current. May or may not already be in the
470470
* working set.
471471
*/
@@ -543,7 +543,7 @@ define(function (require, exports, module) {
543543
.fail(function () {
544544
// File chosen to be switched to could not be opened, and the original file
545545
// is still in editor. Close it again so code will try to open the next file,
546-
// or empty the editor if there are no other files.
546+
// or empty the editor if there are no other files.
547547
closeFullEditor(file);
548548
});
549549
} else {
@@ -843,7 +843,7 @@ define(function (require, exports, module) {
843843
* @param {boolean} isFolder True if path is a folder; False if it is a file.
844844
*/
845845
function notifyPathNameChanged(oldName, newName, isFolder) {
846-
// Update open documents. This will update _currentDocument too, since
846+
// Update open documents. This will update _currentDocument too, since
847847
// the current document is always open.
848848
var keysToDelete = [];
849849
CollectionUtils.forEach(_openDocuments, function (doc, path) {
@@ -875,7 +875,7 @@ define(function (require, exports, module) {
875875
}
876876

877877
/**
878-
* Called after a file or folder has been deleted. This function is responsible
878+
* Called after a file or folder has been deleted. This function is responsible
879879
* for updating underlying model data and notifying all views of the change.
880880
*
881881
* @param {string} path The path of the file/folder that has been deleted
@@ -980,8 +980,6 @@ define(function (require, exports, module) {
980980

981981
// Setup preferences
982982
_prefs = PreferencesManager.getPreferenceStorage(module);
983-
//TODO: Remove preferences migration code
984-
PreferencesManager.handleClientIdChange(_prefs, "com.adobe.brackets.DocumentManager");
985983

986984
// Performance measurements
987985
PerfUtils.createPerfMeasurement("DOCUMENT_MANAGER_GET_DOCUMENT_FOR_PATH", "DocumentManager.getDocumentForPath()");

0 commit comments

Comments
 (0)