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

Automatically Expand Paths of single children: eclipse.platform#1063 #1277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Wittmaxi
Copy link

@Wittmaxi Wittmaxi commented Mar 21, 2024

Enable expanding paths of single children in one click

In some cases cases, I expect all folders to open recursively when clicking on com.wittmaxi.plugin

com.wittmaxi.plugin
└─src
└─org.foo.com
└─Bar.java

A new feature in SWT allows for this feature, this PR enables that feature in the Package Explorer.

Implements
eclipse-platform/eclipse.platform.ui#1063

An analogous PR for the Project-Explorer was merged in platform/ui.

What it does

In the project explorer and similar treeviews, when expanding a folder that contains a singular folder, I expect that folder to recursively expand as well.

Examples

In these cases, I expect all folders to open recursively

com.wittmaxi.plugin
 └─src
    └─org.foo.com
       └─Bar.java

In IntelliJ

(click on src)
grafik

A few things are yet to be discussed (help wanted!):

  • Should this be always enabled by default or should there be a preference to toggle this behavior?
  • What should be the default "auto-expansion-depth"? 10 Nodes (as I have arbitrarily set it for this PR)? Or infinitely many? Should there be a preference for those values?

For reference, this is how other tools handle this case:

  • IntelliJ will auto-expand to infinite depth (tested with 106 nested folders)
  • VScode will auto-expand the entire depth but will not actually display the folders and rather show the entire path in the folder-node: like so: "\a...\a\a\a\a"

A similar PR was created in eclipse.platform for the "project explorer": eclipse-platform/eclipse.platform.ui#1742

How to test

Create a path of folders that contains only singular children.
Close the entire path and then open the path.
With this change, the entire path will be opened at once instead of having to click open each node individually.

Author checklist

@Wittmaxi Wittmaxi force-pushed the MW_AutoExpandPathsOfSingleChildren branch from 2a8f0d3 to 469907f Compare March 21, 2024 12:41
@Wittmaxi Wittmaxi marked this pull request as draft March 21, 2024 13:00
@Wittmaxi Wittmaxi force-pushed the MW_AutoExpandPathsOfSingleChildren branch from 469907f to 736f0d0 Compare April 3, 2024 11:27
@Wittmaxi Wittmaxi marked this pull request as ready for review April 3, 2024 11:28
@Wittmaxi Wittmaxi force-pushed the MW_AutoExpandPathsOfSingleChildren branch from 15f87d0 to c08a2a8 Compare April 3, 2024 11:34
In these cases, I expect all folders to open recursively
when clicking on com.wittmaxi.plugin

com.wittmaxi.plugin
 └─src
    └─org.foo.com
       └─Bar.java

A new feature in SWT allows for this feature, this PR enables that
feature in the Package-Explorer.

Implements
eclipse-platform/eclipse.platform.ui#1063
@Wittmaxi Wittmaxi force-pushed the MW_AutoExpandPathsOfSingleChildren branch from c08a2a8 to 5d49f6d Compare April 3, 2024 11:41
@Wittmaxi Wittmaxi changed the title Automatically Expand Paths of single children #1063 Automatically Expand Paths of single children: eclipse.platform#1063 Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant