Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hotkey for expand/collapse project tree #3083

Merged
merged 6 commits into from Nov 17, 2016
Merged

Add hotkey for expand/collapse project tree #3083

merged 6 commits into from Nov 17, 2016

Conversation

vzhukovs
Copy link
Contributor

Add ability to expand or collapse project tree by calling hotkey:

Linux/Windows:

  • Ctrl+[ for expand all
  • Ctrl+] for collapse all

OSX:

  • Command+[ for expand all
  • Command+] for collapse all

Related issue: codenvy/qa#347

Needed for QA internal purposes.

@vparfonov review it, please.

* @since 5.0.0
*/
public abstract class TreeCollapseAction extends Action {

Copy link
Contributor

Choose a reason for hiding this comment

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

TreeCollapseAction -> CollapseTreeAction

* @since 5.0.0
*/
public abstract class TreeExpandAction extends Action {

Copy link
Contributor

Choose a reason for hiding this comment

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

TreeExpandAction -> ExpandTreeAction

@codenvy-ci
Copy link

}
});

final TreeExpander treeExpander = new TreeExpander() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Move it to dedicate class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,65 @@
/*******************************************************************************
Copy link
Contributor

Choose a reason for hiding this comment

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

What reason have this class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a factory for common actions, at this moment for collapse/expand tree. It can be used to create dynamic actions that should not be registered in the ActionManager but displayed on the any tree you want.

@vzhukovs
Copy link
Contributor Author

For now, it is possible to call expand/collapse all actions via calling native js function:

IDE.ProjectExplorer.expandAll() and IDE.ProjectExplorer.collapseAll()

@vzhukovs vzhukovs added this to the 5.0.0-M8 milestone Nov 17, 2016
@vzhukovs vzhukovs self-assigned this Nov 17, 2016
@vzhukovs vzhukovs added the kind/enhancement A feature request - must adhere to the feature request template. label Nov 17, 2016
@vzhukovs vzhukovs merged commit 5fb8ed5 into master Nov 17, 2016
@vzhukovs vzhukovs deleted the tree_expander branch November 17, 2016 13:03
@codenvy-ci
Copy link

Build # 1053 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1053/ to view the results.

JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
* Add hotkey for expand/collapse project tree

* Add unit tests for the actions

* Move project explorer tree expander to dedicate class

* Expose external JS API

* Typo fix

* Add new line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants