How to show all files in Intellij IDEA project view? - intellij-idea

In new version 2017.3 they added this feature and I can't find menu to turn it off.

Despite the post's title, I assume you are asking for a menu entry to fully collapse a partially or fully expanded project in Intellij Idea (i.e. "How to un-show all files...", not "How to show all files...").
I don't know of any menu entry to do that. However, you can just hold down the left arrow key to completely collapse the entire project as long as you have any node in your project selected (per my comment to this SO post: Intellij, project navigation. Expand all folder and file tree).
If you just tap the left arrow key instead of holding it down it will collapse the structure for the currently selected node.
For the key mapping see File -> Settings... -> Keymap -> Editor Actions -> Left.

Related

IntelliJ 2019 scroll to source missing from project options menu

My question consist of 2 parts:
After update to 2019 version of IntelliJ Scroll to Source option from project panel is missing, after some web search I'm unable to find it. Is it missing? Default?
I'd like to set "scroll to source" so that whenever I'm opening tab it's highlighted in project, but exclude redirect to external libraries like java's or node_modules (they tend to be several classes long and make scrolling time-consuming). Excluding those libraries from project would be kind of a way perhaps?
The actions have been renamed improve an user experience for those who move from other IDEs: Autoscroll to Source -> Open Files with Single Click, Autoscroll from Source -> Always Select Opened File; see IDEA-217044.
Note that Scroll from Source button (currently called Select Opened File) is only available if Always Select Opened FIle is disabled.
There is no way to disable auto-scrolling to libraries; please vote for IDEA-200580 to be notified on any progress with this feature request.

Can I use the module structure (collapse Java package paths) for the Project Pane -> Changed Files view in IntelliJ?

When I use the "Project Pane -> Project" view in IntelliJ, my Java package paths are collapsed based on the Modules in my Project Structure (e.g. com.company.project). I would like to use IntelliJ for code reviews, so I've checked out the changes locally and am looking at the "Project Pane -> Changed Files" view, but this doesn't pick up the project structure, so each folder takes an extra line. Can I get the best of both worlds here?
I figured this out with the help of this answer about expanding the folders (which I also wanted to do) How to expand folded package chain in Intellij IDEA?
Right click on "1:Project" to see the options for the project pane and then check "Flatten Packages".

How to enable sidebar changelog in WebStorm?

Today I added Material Theme plugin to WebStorm and I believe this is the reason behind changelist not appearing on the sidebar.
To be precise, this is what happens in IntelliJ when I make change to a specific line of code and click on the yellow bar that appeared after I removed the semicolon:
The change I made can also be seen under VCS -> Local History -> Show History menu option, which shows the diff between the previous and current version of that file.
However, performing the same action in WebStorm doesn't show the changelist/diff on the sidebar:
which means that the only way I can see it is by going to VCS -> Local History -> Show History which is very tedious:
I found being able to quickly revert/lookup the changes on the fly by clicking on that coloured bar really handy, could someone tell me if there is a setting in the IDE that enables that? I looked up and down but couldn't find anything relevant, perhaps I wasn't looking for the right keyword.
Thanks in advance.
Change markers are there for me when using Material UI plugin. Do you have Highlight modified lines in gutter enabled in Settings | Editor | General?

IntelliJ IDEA: Show containing folder in 'project' sidebar.

I'm using IntelliJ IDEA 12.1.6., and I'm trying to figure out how to make a file's parent folder show in the 'project' sidebar when I open it. I'm pretty sure I had it set up that way in the past, but I can't find the relevant setting. I've tried googling to no avail. Any ideas?
Autoscroll from source option can be enabled under the gear icon in the Project tool window.
Doesn't the Projects sidebar show the project's entire directory structure?
As an alternative, if you go to View -> Navigation Bar, you can see the selected file's path on the top left.
For those reading now, the suggestions here don't seem to be in the current version of intellij.
I had to go Right click on the folder -> Open Module Settings -> remove the obviously incorrect content root -> re-add the obviously correct content root.

Adding an entry in a submenu of a popup

I'm building a plugin, and adding an entry to the context menu (right-click on a folder in the project tree).
So far it works, following this tutorial:
http://www.eclipse.org/articles/article.php?file=Article-JFaceWizards/index.html
The problem is that it's adding my entry in the root of the context menu. Since my entry refers to a "New XXX" wizard, I want it to go to the "New" submenu.
It seems like I would have to set the correct locationURI or menuPath in my plugin.xml. However I can't find the locationURI or menuPath corresponding to that submenu. How can I find that?
The new contributions are menu ID based, not menu path based. So it should be something like:
<menuContribution
locationURI="menu:file?after=additions" />
See this SO answer for an example of locationUri.
See Menu Extension for more. The exact id is either:
found in the existing plugin.xml from the menu or
determined with plugin Spy
See "How to add items in popup menu?" (from justinmreina) for more on adding an entry to a menu.
If you've created a plugin for a 'New XXX' wizard, you can add it inside the 'New' menu that you see when you right-click inside the Navigator by customizing the perspective.
Go to Window -> Customize Perspective and click on the Shortcuts tab. You should see 'New XXX'. Select it and you're good to go.