Toolbar button for opening file explorer

Answered

I'm looking for a way to place a button on the toolbar that would allow me to open the system file explorer with a single click of the mouse. I tried the options for customizing menus and toolbars but I couldn't find this particular action there. I know I can use Alt+E or use the (deep) context menu item in the project panel but what I'm most interested in is a toolbar button. How can I do this?

0
6 comments

Hi there,

If I'm getting you correctly:

1. Create an External Tools entry that would execute the command/open your system file manager: https://www.jetbrains.com/help/phpstorm/configuring-third-party-tools.html

2. Now edit the toolbar ("Settings/Preferences | Appearance & Behavior | Menus and Toolbars") and add that entry there. Can use custom icon (16x16 PNG as far as I know).

  • Main Toolbar is the one to use if you are using that one (the large one)
  • or Navigation Bar Toolbar if main one is disabled (the shorter one).

Alternatively (in addition to that) your may assign a shortcut to it and just use the keyboard instead: "Settings/Preferences | Keymap" and look for the entry under External Tools node.

P.S. If you are referring to some existing functionality (e.g. Project View panel, right click, Open In ..., Show in Explorer (I'm on Windows, hence the "Explorer"; on Mac/Linux it will be a different one) then show such action on a screenshot. When adding it to the tool bar you most likely would need to use the search field there to locate it, often under Other node

0

Thanks for suggestions - yes, I want a toolbar button for Project View panel, right click, Open In ..., Explorer (I'm on Windows). I couldn't find this action in the Menus and Toolbars settings even when using the search - I don't know why but this entry doesn't seem to exist there - maybe because right click menu actions haven't been put there?

However, your idea with External Tools definitely worked (I wasn't aware of this feature before). I added C:\Windows\explorer.exe as an external tool and I entered /select,$FilePath$ as an argument so that the file explorer would select the current file when opened. Then the tool appeared in the main menu and now it was possible to add it to the toolbar.

Additionally, I was able to do it differently, maybe a bit easier: I created a macro with only the Alt+E key press recorded and it does the same as pressing Alt+E, which opens the file explorer. It was also possible to add the macro to the toolbar because it was part of the menu.

Thanks, problem solved, however not as easy as I wished :).

1

I couldn't find this action in the Menus and Toolbars settings even when using the search - I don't know why but this entry doesn't seem to exist there - maybe because right click menu actions haven't been put there?

It is there for me (use Up/Down to navigate between the matches):

P.S. I personally prefer the standard shortcut / universal approach (as it allows to select file in other toolwindows as well): "Navigate | Select in... | Show in Explorer" -- Alt+F1, 9

0

Yes, indeed it is there, I was able to find it finally - it is present under Other. But the problem is that the search doesn't work for me well, that's why I couldn't find it initially:

For me this finds some action in the Help menu but the one I need stays hidden under the Other folder. The folder does not expand for me when I do the search. When I expand it manually and scroll down the items then I can see that the Show in Explorer item is highlighted in yellow. Something must be wrong in my installation, I guess. I think the nodes with found items should get expanded automatically otherwise I'd need to open each one separately and look for yellow highlights.

0

As I have mentioned in my previous comment: try using Up/Down keys to navigate between the matches. It navigates for me this way just fine from the initial "Show Log in Explorer" match: it expands "Other" and focuses that match from my screenshot.

0

Yes, pressing Up and Down works now that you mentioned it. I didn't discover it myself, I thought that multiple Enter presses should work - like they do in the editor's Find feature and most other programs - but they didn't. Now I know...

0

Please sign in to leave a comment.