This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add a feature to toggle between panes in the core #10555 #12853
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
08a46b3
Added the feature to toggle between panes as requested by petetnt in …
arthur801031 2f793e7
Added the feature to toggle between panes as requested by petetnt in …
arthur801031 fc5a114
Bumping version Number to 1.9
shubhsnov b092dea
Merge pull request #12855 from adobe/adobe/shubham/VersionUpdate
swmitra 0b63bc7
Edited the files and added a unit test for this feature as requested …
arthur801031 ce4350b
Edited the files and added a unit test for this feature as requested …
arthur801031 e099010
Removed duplicate/unnecessary code in Pane.js
arthur801031 77a8f4b
Removed additional duplicate/unnecessary code in Pane.js
arthur801031 4289bd5
Edited 'should switch pane when alt-w is pressed' function in MainVie…
arthur801031 8211931
Revert package.json and src/config.json to previous commit
arthur801031 40586ae
Added the feature to toggle between panes as requested by petetnt in …
arthur801031 569698f
Added the feature to toggle between panes as requested by petetnt in …
arthur801031 8823a85
Edited the files and added a unit test for this feature as requested …
arthur801031 567668a
Removed duplicate/unnecessary code in Pane.js
arthur801031 77ee794
Removed additional duplicate/unnecessary code in Pane.js
arthur801031 88b333e
Edited 'should switch pane when alt-w is pressed' function in MainVie…
arthur801031 717d13e
Revert package.json and src/config.json to previous commit
arthur801031 0848104
Modified test code to test CMD_SWITCH_PANE_FOCUS
arthur801031 954f39c
Modified test code to test CMD_SWITCH_PANE_FOCUS
arthur801031 8e5d581
Removed unnecessary code in MainViewManager-test.js
arthur801031 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,8 @@ define(function (require, exports, module) { | |
AsyncUtils = require("utils/Async"), | ||
ViewUtils = require("utils/ViewUtils"), | ||
Resizer = require("utils/Resizer"), | ||
Pane = require("view/Pane").Pane; | ||
Pane = require("view/Pane").Pane, | ||
KeyBindingManager = brackets.getModule("command/KeyBindingManager"); | ||
|
||
/** | ||
* Preference setting name for the MainView Saved State | ||
|
@@ -844,6 +845,19 @@ define(function (require, exports, module) { | |
return result.promise(); | ||
} | ||
|
||
/** | ||
* Switch between panes | ||
*/ | ||
function switchPaneFocus() { | ||
var $firstPane = $('#first-pane'), $secondPane = $('#second-pane'); | ||
if($firstPane.hasClass('active-pane')) { | ||
$secondPane.click(); | ||
} | ||
else { | ||
$firstPane.click(); | ||
} | ||
} | ||
|
||
/** | ||
* DocumentManager.pathDeleted Event handler to remove a file | ||
* from the MRU list | ||
|
@@ -1616,6 +1630,10 @@ define(function (require, exports, module) { | |
// get an event handler for workspace events and we don't listen | ||
// to the event before we've been initialized | ||
WorkspaceManager.on("workspaceUpdateLayout", _updateLayout); | ||
|
||
// Listen to key Alt-W to toggle between panes | ||
CommandManager.register(Strings.CMD_SWITCH_PANE_FOCUS, Commands.CMD_SWITCH_PANE_FOCUS, switchPaneFocus); | ||
KeyBindingManager.addBinding(Commands.CMD_SWITCH_PANE_FOCUS, {key: 'Alt-W'}); | ||
} | ||
|
||
/** | ||
|
@@ -1658,8 +1676,8 @@ define(function (require, exports, module) { | |
|
||
return result; | ||
} | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert this change as it's only unintentional whitespace modification. |
||
/** | ||
* Setup a ready event to initialize ourself | ||
*/ | ||
|
@@ -1729,6 +1747,7 @@ define(function (require, exports, module) { | |
|
||
exports.getAllOpenFiles = getAllOpenFiles; | ||
exports.focusActivePane = focusActivePane; | ||
exports.switchPaneFocus = switchPaneFocus; | ||
|
||
// Layout | ||
exports.setLayoutScheme = setLayoutScheme; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs rebase against master so we don't have these duplicate files,
git fetch upstream master && git rebase upstream/master
.