Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions platform/platform-resources/src/idea/LangActions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,7 @@
<reference ref="AddAnotherBookmark"/>
<reference ref="EditBookmark"/>
<reference ref="ToggleBookmark"/>
<!--Sherlock: Remove bookmarks from editor tab menu
<add-to-group group-id="EditorTabPopupMenu" anchor="after" relative-to-action="ReopenClosedTab"/>
-->
</group>

<group id="BookmarkOpenTabsGroup" popup="false" searchable="false">
Expand All @@ -339,9 +337,7 @@
<reference ref="ShowBookmarks"/>
<reference ref="ShowTypeBookmarks"/>
<separator/>
<!--Sherlock: Remove Bookmarks from Edit Menu
<add-to-group group-id="EditMenu" anchor="after" relative-to-action="Macros"/>
-->
</group>

<action id="GotoDeclarationOnly" class="com.intellij.codeInsight.navigation.actions.GotoDeclarationOnlyAction"/>
Expand Down Expand Up @@ -879,9 +875,7 @@
<separator/>
<reference ref="ProjectViewPopupMenuRefactoringGroup"/>
<separator/>
<!--Sherlock: Remove bookmarks from project view pop-up menu
<reference ref="popup@ExpandableBookmarkContextMenu"/>
-->
<separator/>
<reference ref="ProjectViewPopupMenuModifyGroup"/>
<separator/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
<xi:include href="/META-INF/XmlPlugin.xml"/>
<xi:include href="/META-INF/SherlockPlatformCustomization.xml"/>
<xi:include href="/META-INF/essential-modules.xml"/>
<xi:include href="/META-INF/override-actions.xml"/>
</idea-plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<idea-plugin>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting tradeoff.

If the actions are visible under Settings > Keymap, then are they also visible under Shift + Shift > Actions menu? TBH, I wouldn't want them to be discoverable at all, but especially on the action search menu.

I can see how this makes IntelliJ merges simpler (or, rather, more trivial) as we won't have any merge conflicts at all. Yet, I think we can still have new buttons/groups leaking in during an IntelliJ merge. So, either way, we really need a test that verifies which menu groups and menu items are available in Sherlock (or rather, that verifies that no other items/groups exist).

Together with that test, this change would be more powerful to, e.g., if the test fails with an unexpected menu item, fixing it would require adding one line somewhere in this file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are they also visible under Shift + Shift > Actions menu?

So when you start typing "bookmarks", they won't be visible but eventually they'll be visible but greyed out like this-
Screenshot 2025-06-10 at 12 16 15 PM

this happens because IntelliJ "auto-selects" the "Include non-project items" checkbox when it doesn't find anything. If I manually deselect it, it removes those entries as well -

Screenshot 2025-06-10 at 12 27 17 PM

TBH, I wouldn't want them to be discoverable at all,

I agree, but it is not possible to remove them from KeyMap unless we remove the entire code of a particular action from the platform.

but especially on the action search menu.

A potential solution for this could be to disable the enabling of "Include non-project items" and make it manual only.

we really need a test that verifies which menu groups and menu items are available in Sherlock (or rather, that verifies that no other items/groups exist).

That's a nice idea! But I wonder how much work that's going to be considering there are so many actions in Sherlock and eventually we'd have to merge this to Studio (where nothing gets checked). Let's talk more about this test offline.

<!-- These actions are not required to be visible in Sherlock UI.
Note: The actions will still be visible under Settings > Keymap
-->
<actions>
<!--Bookmarks-->
<group overrides="true" id="Bookmarks" class="com.intellij.openapi.actionSystem.EmptyActionGroup"/>
<group overrides="true" id="popup@BookmarkContextMenu" class="com.intellij.openapi.actionSystem.EmptyActionGroup"/>
<group overrides="true" id="BookmarkOpenTabsGroup" class="com.intellij.openapi.actionSystem.EmptyActionGroup"/>
<group overrides="true" id="EditBookmarksGroup" class="com.intellij.openapi.actionSystem.EmptyActionGroup"/>
<group overrides="true" id="Bookmarks.Goto" class="com.intellij.openapi.actionSystem.EmptyActionGroup"/>
<group overrides="true" id="Bookmarks.Toggle" class="com.intellij.openapi.actionSystem.EmptyActionGroup"/>
<group overrides="true" id="Bookmarks.ToolWindow.PopupMenu" class="com.intellij.openapi.actionSystem.EmptyActionGroup"/>
<group overrides= "true" id="GoToErrorGroup" class="com.intellij.openapi.actionSystem.EmptyActionGroup"/>

<action overrides="true" id="AddAnotherBookmark" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="EditBookmark" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkWithMnemonic" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="DeleteMnemonicFromBookmark" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarkOpenTabs" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ShowBookmarks" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ShowTypeBookmarks" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoNextBookmark" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoNextBookmarkInEditor" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoPreviousBookmark" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoPreviousBookmarkInEditor" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark0" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark1" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark2" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark3" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark4" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark5" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark6" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark7" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark8" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmark9" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkA" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkB" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkC" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkD" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkE" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkF" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkG" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkH" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkI" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkJ" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkK" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkL" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkM" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkN" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkO" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkP" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkQ" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkR" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkS" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkT" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkU" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkV" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkW" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkX" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkY" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="GotoBookmarkZ" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark0" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark1" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark2" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark3" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark4" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark5" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark6" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark7" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark8" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmark9" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkA" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkB" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkC" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkD" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkE" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkF" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkG" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkH" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkI" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkJ" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkK" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkL" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkM" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkN" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkO" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkP" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkQ" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkR" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkS" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkT" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkU" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkV" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkW" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkX" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkY" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="ToggleBookmarkZ" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.DefaultGroup" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.Rename" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.Delete" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.DeleteType" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.ChooseType" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.MoveUp" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.MoveDown" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.SortGroupBookmarks" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="OpenBookmarkGroup" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.Create" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.ShowPreview" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.GroupLineBookmarks" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.RewriteBookmarkType" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.AskBeforeDeletingLists" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.OpenInPreviewTab" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.AutoscrollToSource" class="com.intellij.openapi.actionSystem.EmptyAction"/>
<action overrides="true" id="BookmarksView.AutoscrollFromSource" class="com.intellij.openapi.actionSystem.EmptyAction"/>
</actions>
</idea-plugin>