any idea why the visual studio code project directory ui displays differently for this scenario? - visual-studio-code

I'm working on a React project in Visual Studio Code. For some reason, the subdirectory structure that I just added displays subdirs via slashes () instead of rendering the subdirs in a treeview:
Any idea why VS Code would do this? Other subdir structures in the project display as normal treeviews as expected

Probably because those folders are empty and contain empty folders also
Try adding files to them it won't display that way anymore
NB: There's no big deal with that display
Now if you want it to display normally:
Select Preferences,then Settings. Then Search for "compact folders" and uncheck the checkbox

Related

VS Code: Is it possible to theme the selected folder in explorer view?

While using VS Code in larger projects, I have trouble seeing which file and folder I have open.
My current explorer looks like this:
I can see a selected folder, but that quickly becomes difficult to see when I am in a project with hundreds of folders and/or files.
I'd like the selected folder to look like this. (Purely to illustrate this I've selected all the files in the current folder)
But with the open file highlighted somehow.
Is it possible to theme the explorer view in this way?

Hide unnecessary folders and files from project panel, in Android Studio

When we create a project in Android Studio there will be many files and folders that not necessary to deal with them while coding.I want to hide it from the project panel and look clean.
How can I hide selected folders and files from the project panel and show them only when I need it?
I want to hide selected folders below, and get them back when needed:
What you can do is to mark the directory as Excluded:
and then disable the option to show them:
or... you can play around with scopes in IntelliJ and select that instead of "Project".
Go to File -> Settings. Then under Editor section, select File Types.
There's a section at the bottom to enter ignored files and folders. This may help you.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/205824519-Is-there-a-way-to-hide-non-project-files-from-project-file-browser

Cannot see folders sub folders and files in Vs

I just started using Visual Studio Code Version 1.15.1 and for some reason, after closing all the folders in the navigation explorer side bar, I cannot get it back to display the folder structure and files in the project, even after closing and reopening. The files and folders are available and I can see them fine in OSX Sierra. Also the VS code window title shows the name of the project.
You can get it back by right clicking on the sidebar "Explorer" header, and selecting "Folders". See the gif here: https://github.com/Microsoft/vscode/issues/32962#issuecomment-324866098
This has confused several people so we've decided to remove the ability to hide the "Folders" view. Continuing discussion on the general UI is here: https://github.com/Microsoft/vscode/issues/31485

Can I do this with a custom Visual Studio Code Extension?

I would like to have an additional feature in Visual Studio Code - essentially the "Scope to This" from the full Visual Studio Solution Explorer.
It is basically a context menu (right click) entry in the File Explorer of Visual Studio Code - which then should limit which files and folders are displayed.
Is such a thing possible with a Visual Studio Code Extension?
I never built an extension for VS Code before and would like to know if this is even possible or if I would just waste my time.
According to the API docs, there is no way to filter visible files in the Explorer like it can usually be done with the files.exclude setting. However, it is possible to open another folder with the workspace.openFolder complex command. This will probably also close all opened editors, and forget about the original workspace root path.
Your extension would need to remember the initial root path and opened editors to undo this "Scope to This" menu, and reopening everything every time could cause quite some lag.
You can't customize the normal explorer view.
However, you can do something like this with custom views. It allows you to create a new explorer view that can list what you want and behave as you want.
For an example implementation, check the vscode-code-outline.
If you can add a context menu entry separately too.

Filter Empty Directories in Package Explorer View

Is there a way in eclipse to filter/hide empty directory trees in the package explorer view?
This is different than filtering directories like '.svn' or maven's target, or filtering empty packages. It's more trying to clean up empty directories trees that show up as a result of filter rules.
Context- We have a generic project in our workspace that uses filters to ignore non text based files(mp3s, jpgs, etc). It allows us to quickly edit our files in eclipse. The problem is because of the filters there are a lot of empty folders present. If eclipse can ignore any empty folders due to filters it would make the project cleaner.
Update- I filed a bug report in eclipse's buzilla system for those that wish to have this feature:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334052
In Eclipse SDK (I use 3.6.2), to hide empty folders in the "Package Explorer":
At the top-right of the Package Explorer view, there's a downward-pointing triangle. If you hover your mouse pointer over it you'll see "View Menu".
Click the "View Menu"
Selected "Filters"
Put a check next to "Empty Packages"
Click OK
now your empty folders don't show any more.
This doesn't seem to be possible and could make for a good bug report.
As bug 157336 (build output contains unnecessary empty directories) comments:
"foo/bar/" is treated as "foo/bar/**".
So, as I understand it foo/bar/** should exclude the content of the directory and foo/bar should additionally exclude the directory itself.
Meaning you might have to add every empty directory yourself to the Exclude list, which is not practical.
Another solution would be to give Mylyn a try and see if its task context switching could hide any folder you don't need in the current task for you.