Skip to content

Conversation

@sonakshisaxena1
Copy link

@sonakshisaxena1 sonakshisaxena1 commented Jun 5, 2025

This refactors the way actions and groups are being removed in Sherlock making it easier to spot and fix merge conflicts when Intellij Platform version is updated.

It will also make it easier to re-include the majority of these actions if/when we merge with Studio.

@sonakshisaxena1
Copy link
Author

@emrekultursay what do you think of this approach?
Notice that it'll still be trickier to remove things from LangExtensions.xml

@sonakshisaxena1
Copy link
Author

@emrekultursay PTAL

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants