Adding missing @Override annotations (part 3). Adding RRA/RWA/RUI annotations. Some refactoring - #78
Conversation
…otations. Some refactoring.
|
@claude review pr with inline comments |
|
Claude finished @unv-unv's task in 2m 58s —— View job PR Review — #78 (Adding missing
|
| ); | ||
| } | ||
|
|
||
| @RequiredReadAction |
There was a problem hiding this comment.
This PR is about adding missing @Override annotations, but update(AnActionEvent) overrides AnAction.update and only got @RequiredReadAction here — the @Override is missing. Every other update(AnActionEvent) override in this repo (e.g. RemoveDynamicAction, ExpandAllAction, MvcActionGroup) carries @Override, so this one is inconsistent.
| @RequiredReadAction | |
| @Override | |
| @RequiredReadAction |
| /** | ||
| * @author Dmitry.Krasilschikov | ||
| * @date 16.03.2007 | ||
| * @since 16.03.2007 |
There was a problem hiding this comment.
Elsewhere in this PR the @date → @since conversions were also normalized to ISO-8601 (e.g. GrInterfaceDefinition now reads @since 2007-03-18, GrExtendsClauseImpl @since 2007-03-26). This one kept the old dd.MM.yyyy layout, so it's inconsistent.
| * @since 16.03.2007 | |
| * @since 2007-03-16 |
|
@claude review pr with inline comments |
|
Claude finished @unv-unv's task in 2m 18s —— View job PR Review — #78 (inline comments)
SummaryLarge but overwhelmingly mechanical and safe change. The bulk is: adding compiler-verified The Actionable (2 inline suggestions posted)
Non-blocking observations (out of scope, no change requested)
Overall: LGTM once the two nits above are addressed (or consciously skipped). Nice cleanup. |
| ); | ||
| } | ||
|
|
||
| @RequiredReadAction |
There was a problem hiding this comment.
This PR is specifically about adding missing @Override annotations, yet update(AnActionEvent) — which overrides AnAction.update — only received @RequiredReadAction; the @Override is missing. Every other update(AnActionEvent) override in this repo carries it, so this one is inconsistent.
| @RequiredReadAction | |
| @Override | |
| @RequiredReadAction |
| /** | ||
| * @author Dmitry.Krasilschikov | ||
| * @date 16.03.2007 | ||
| * @since 16.03.2007 |
There was a problem hiding this comment.
Elsewhere in this PR the @date/@autor headers converted to @since were normalized to ISO-8601 (e.g. GrInterfaceDefinition → @since 2007-03-18, GrExtendsClauseImpl → @since 2007-03-26). This one kept the old dd.MM.yyyy layout, so it's inconsistent.
| * @since 16.03.2007 | |
| * @since 2007-03-16 |
|
@claude review pr with inline comments |
|
Claude finished @unv-unv's task in 2m 37s —— View job PR Review — #78 (inline comments)
SummaryStill a large but overwhelmingly mechanical and safe change: compiler-verified Both nits from my previous reviews are now resolved:
I verified the Actionable (2 inline suggestions posted)
Non-blocking observations (pre-existing, out of scope)
Overall: LGTM. The two remaining items are minor consistency nits; feel free to apply or consciously skip. Nice cleanup. |
| return false; | ||
| @Override | ||
| public Coroutine<?, ?> updateAsync(AnActionEvent e) { | ||
| return ActionSafeReadLock.run(e, presentation -> e.getPresentation().setEnabledAndVisible(isEnabled(e))).toCoroutine(); |
There was a problem hiding this comment.
This updateAsync binds the lambda parameter presentation but then calls e.getPresentation() instead of using it. GroovyShellActionBase (rewritten to updateAsync in this same PR) uses the bound presentation handle — this is the intended safe-read-lock presentation to mutate. Recommend using it here too for consistency:
| return ActionSafeReadLock.run(e, presentation -> e.getPresentation().setEnabledAndVisible(isEnabled(e))).toCoroutine(); | |
| return ActionSafeReadLock.run(e, presentation -> presentation.setEnabledAndVisible(isEnabled(e))).toCoroutine(); |
| return ActionSafeReadLock.run(e, presentation -> { | ||
| Module module = e.getData(Module.KEY); | ||
|
|
||
| e.getPresentation().setEnabledAndVisible(module != null && LibrariesUtil.hasGroovySdk(module)); |
There was a problem hiding this comment.
Same nit as ExcludeFromStubGenerationAction: the lambda binds presentation but the body calls e.getPresentation() instead. Use the bound presentation for consistency with GroovyShellActionBase.updateAsync in this PR:
| e.getPresentation().setEnabledAndVisible(module != null && LibrariesUtil.hasGroovySdk(module)); | |
| presentation.setEnabledAndVisible(module != null && LibrariesUtil.hasGroovySdk(module)); |
|
@claude review pr with inline comments |
|
Claude finished @unv-unv's task in 2m 49s —— View job PR Review — #78 (inline comments)
SummaryStill a large but overwhelmingly mechanical and safe change: compiler-verified All items from previous reviews are now resolved:
I verified the Actionable (1 inline suggestion posted)
Non-blocking observations (out of scope)
Overall: LGTM. One remaining minor consistency nit; feel free to apply or consciously skip. Nice cleanup. |
| } | ||
|
|
||
| @Override | ||
| @RequiredReadAction |
There was a problem hiding this comment.
Consistency nit (fits this PR's RRA/RWA theme): this bindToElement got @RequiredReadAction, but every other bindToElement touched in this PR is annotated @RequiredWriteAction (e.g. GrDocParameterReferenceImpl, GrDocMemberReferenceImpl), and it's the write-side counterpart of handleElementRename just above (which correctly got @RequiredWriteAction). Recommend matching:
| @RequiredReadAction | |
| @RequiredWriteAction |
|
@claude review pr with inline comments |
|
Claude finished @unv-unv's task in 2m 58s —— View job PR Review — #78 (inline comments)
SummaryStill a large but overwhelmingly mechanical and safe change: compiler-verified All items from previous reviews remain resolved ( I re-verified the behavior-sensitive rewrites:
I found no PR-introduced correctness/behavioral bugs. Actionable (1 inline suggestion posted)
Non-blocking observations (out of scope)
Overall: LGTM. Only one trivial formatting nit remains; feel free to apply or skip. Nice cleanup. |
| } else { | ||
| presentation.setEnabled(true); | ||
| } | ||
| e.getPresentation().setEnabled(myPackagesList.getSelectedIndex() != -1); |
There was a problem hiding this comment.
Minor formatting nit: the update body is indented 6 spaces while the rest of this file uses 2-space indentation. Fits this PR's consistency theme:
| e.getPresentation().setEnabled(myPackagesList.getSelectedIndex() != -1); | |
| e.getPresentation().setEnabled(myPackagesList.getSelectedIndex() != -1); |
No description provided.