Reveal in Tree View (and other context menu items)


The “Reveal in Tree View” option is available from new files, from anywhere in the settings, in TimeCop… in DepricationCop, … uselessly.
It could be useful to have “Reveal in Tree View” available , in tab context menus, where it isn’t.
Wait, except if that tab is the settings pane and thus has no presence in the tree view!? Is there some reason for that?

Also, there’s no clipboard-related menu items and (fixed in master, I think) all the context menus in the developer tools are completely gone. (could be fixed in master)


The way that Atom decides what is in the context menu is done like everything else, you specify the classes that the menu applies to:

Do you have some suggestions on how this code could be improved?


Yes, it should be much more specific. It should only be available when it actually does something useful.
Something like '.workspace.has-path .pane' were such things to exist. (Except this would still fall short for files outside of the tree.) Atom’s menus are a nice idea, but lead to this sort of problem because you can’t just add a bit of code for a conditional menu, you’d probably have to change some core packages to add classes like those.
Maybe conditional menus could be added; if so, we’d want the conditions to be easily defined where the implementation is, that way the “checking if we can do something useful” can be coupled together (so as not to get out of sync)


Sounds like you have a Pull Request all planned out :grinning: