You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Java IDEs have a feature in their tree-view controls to collapse directories that only have one entry in them underneath src. So the above would look like this:
@lloeki points out that the GitHub website now offers this feature. I'm not picky on the visual representation, just think it would be great if the option was available.
Just tossing an idea in the air, as the feature here might be slightly different. There is a case to be made for simple grouping and one for logical grouping. Here:
\src
\com
\example
\project1
\project2
Simple grouping would result in
\src
\com.example
\project1
\project2
whereas logical grouping would result in:
\src
\com.example.project1
\com.example.project2
This example takes Java and the above notation as an example, but I'm not too fond of the dot as a separator. Here's why.
Go also has a similar structure in its workspace (output of tree(1), note the dots in the dir names):
Maybe a threshold (default: 1) of number of children could give us something interesting (in the latter case it'd be at least 5 for github.com not to collapse). The alternative would be to have Atom recognise typical project layouts and do true logical mapping, and in that case it'd indeed map directories to Java package names, as hinted by the slash-to-dot conversion.
Regarding the separator, the argument for keeping slash is more obvious here (I actually used Unicode's DIVISION BAR in my original issue). Also, whitespace between slashes and names may hint at and allow for each name to be independently selectable regardless of collapsing, allowing for right-click action (possibly wanting to create a subdir or a new file halfway through the collapsed hierarchy).
👍 For this feature. I started working on android and java projects and this woudl be a great feature. I'd suggest
\src
\com
\example
\project1
\project2
would become
\src\com\example
\project1
\project2
you could colorize the \com\example to highlight it's collapsed. Using . ie 'period' would confuse directories names /com.mycompany.stuff/ which i also have to deal with from time to time.
👍 Would be cool to have. Maybe it would be easier if this package exported a service that other packages could make use of to add such a feature? Seems to me that it would be in spirit with the whole "seperation of concerns into packages" paradigm that the community seems to embrace 😄
never have I once thought to myself "Oh, I wish the trees were bigger and more expanded, so that I may scroll more" It's a bit of an essential feature for many projects and too many addons I depend on are half baked and frequently push buggy updates.
Because we lack this feature, I'm forced to use the "Autohide Tree View" which has broken 3 times in the past month and has to annoying bugs relating to selection, accidental file deletion and renaming. But it's better than nothing.
In other words, it makes more sense to make Java style empty hierarchies default.
For those who are still searching on how to collapse directory,
Open Package settings of tree-view
Go to Settings and enable Collapse directories
This is not enabled by default, which it should have been.
Reacted by Rocco Nicholls, Raiss, lch277, Patrick Stillhart, Bharani Arul, Felix Carreño B., Arun Chaitanya Miriappalli, Francis Labelle, Akshat Sharma, Alvin B and 12 more
Reacted by Francis Labelle, yhpark, Andrew Jones, Alexey Smirnov, AndreiRares, Lucas Alves, Caleb Stanford, Billy T. Hernandez, torbeneims-luh, David Bears and 1 more
This is not enabled by default, which it should have been.
@Dinesh-V Thanks for the feedback. There are still edge-case bugs caused by the feature as implemented (such as #670 and #1015, among others). Perhaps you would like to help make the feature bullet proof so that turning the feature on by default is an option? At this stage, we may still opt to leave it off by default but we certainly aren't going to enable it by default as the feature is currently implemented.
Activity
Grimeh commentedon May 1, 2014
Would love this feature, +1
[-]Concatenate Java-style empty hierarchies[/-][+]Collapse Java-style empty hierarchies[/+]lee-dohm commentedon Feb 18, 2015
@lloeki points out that the GitHub website now offers this feature. I'm not picky on the visual representation, just think it would be great if the option was available.
lloeki commentedon Feb 18, 2015
Just tossing an idea in the air, as the feature here might be slightly different. There is a case to be made for simple grouping and one for logical grouping. Here:
Simple grouping would result in
whereas logical grouping would result in:
This example takes Java and the above notation as an example, but I'm not too fond of the dot as a separator. Here's why.
Go also has a similar structure in its workspace (output of tree(1), note the dots in the dir names):
Here simple grouping would output:
An arguably more balanced logical grouping would give:
Maybe a threshold (default: 1) of number of children could give us something interesting (in the latter case it'd be at least 5 for
github.comnot to collapse). The alternative would be to have Atom recognise typical project layouts and do true logical mapping, and in that case it'd indeed map directories to Java package names, as hinted by the slash-to-dot conversion.Regarding the separator, the argument for keeping slash is more obvious here (I actually used Unicode's DIVISION BAR in my original issue). Also, whitespace between slashes and names may hint at and allow for each name to be independently selectable regardless of collapsing, allowing for right-click action (possibly wanting to create a subdir or a new file halfway through the collapsed hierarchy).
billbonney commentedon Mar 17, 2015
👍 For this feature. I started working on android and java projects and this woudl be a great feature. I'd suggest
would become
you could colorize the \com\example to highlight it's collapsed. Using . ie 'period' would confuse directories names /com.mycompany.stuff/ which i also have to deal with from time to time.
qayshp commentedon Mar 18, 2015
👍
geoffnin commentedon Apr 16, 2015
👍
DDoS commentedon Apr 19, 2015
👍
zet4 commentedon May 4, 2015
👍
FossPrime commentedon Jun 24, 2015
👍 Reference to the Gedit feature request... I almost need this feature more then Linux retina support.
https://bugzilla.gnome.org/show_bug.cgi?id=750707
sandokandias commentedon Aug 1, 2015
jonasws commentedon Aug 7, 2015
👍 Would be cool to have. Maybe it would be easier if this package exported a service that other packages could make use of to add such a feature? Seems to me that it would be in spirit with the whole "seperation of concerns into packages" paradigm that the community seems to embrace 😄
FossPrime commentedon Aug 7, 2015
never have I once thought to myself "Oh, I wish the trees were bigger and more expanded, so that I may scroll more" It's a bit of an essential feature for many projects and too many addons I depend on are half baked and frequently push buggy updates.
Because we lack this feature, I'm forced to use the "Autohide Tree View" which has broken 3 times in the past month and has to annoying bugs relating to selection, accidental file deletion and renaming. But it's better than nothing.
In other words, it makes more sense to make Java style empty hierarchies default.
cebor commentedon Aug 14, 2015
👍
flyisland commentedon Aug 25, 2015
+1
arkadiyt commentedon Aug 28, 2015
👍
chrissphinx commentedon Sep 12, 2015
👍
dabbeg commentedon Sep 18, 2015
+1
flako-dd commentedon Sep 25, 2015
One of the issues that keeps me from using Atom on bigger Java projects and use a much heavier IDE instead, so +1
leesei commentedon Oct 28, 2015
👍
tgvdinesh commentedon Mar 4, 2017
For those who are still searching on how to collapse directory,
This is not enabled by default, which it should have been.
lee-dohm commentedon Mar 6, 2017
@Dinesh-V Thanks for the feedback. There are still edge-case bugs caused by the feature as implemented (such as #670 and #1015, among others). Perhaps you would like to help make the feature bullet proof so that turning the feature on by default is an option? At this stage, we may still opt to leave it off by default but we certainly aren't going to enable it by default as the feature is currently implemented.
trubelik commentedon Mar 3, 2018
Still have a problem with .DS_Store files 😔 Why the "ignored files" option is ignored by the Collapse directories?
winstliu commentedon Mar 5, 2018
@MartinTrubelik please open a new issue and we'll take a look 🙇.