forked from JetBrains/intellij-community
-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor the bookmarks groups and actions to be removed #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
sonakshisaxena1
wants to merge
1
commit into
android-graphics:main
Choose a base branch
from
sonakshisaxena1:bookmarks_empty_action
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
sherlock-platform/customization/resources/META-INF/override-actions.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| <idea-plugin> | ||
| <!-- 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> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 underShift + Shift > Actionsmenu? 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So when you start typing "bookmarks", they won't be visible but eventually they'll be visible but greyed out like this-

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 -
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.
A potential solution for this could be to disable the enabling of "Include non-project items" and make it manual only.
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.