Replacing consulo.ide.impl.idea.openapi.module.ModuleUtil with consulo.language.util.ModuleUtilCore#9
Merged
VISTALL merged 1 commit intoconsulo:masterfrom Apr 19, 2026
Conversation
…o.language.util.ModuleUtilCore.
There was a problem hiding this comment.
Pull request overview
This PR removes usage of the legacy consulo.ide.impl.idea.openapi.module.ModuleUtil API in Spring/Web-related code, switching call sites to newer module resolution APIs (PsiElement#getModule() / PsiFile#getModule() and consulo.language.util.ModuleUtilCore).
Changes:
- Replaced
ModuleUtil.findModuleForPsiElement(...)withgetModule()in several Web/Webflow module lookups. - Migrated test-only usage of
ModuleUtil.KEY_MODULEtoModuleUtilCore.KEY_MODULE. - Updated Spring Security role reference provider to use
ModuleUtilCore.findModuleForPsiElement(...).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
webflow/src/com/intellij/spring/webflow/model/xml/WebflowModelFactory.java |
Uses psiFile.getModule() instead of ModuleUtil.findModuleForPsiElement(...). |
webflow/src/com/intellij/spring/webflow/model/converters/WebflowScopeVariableReference.java |
Resolves module via myElement.getModule() instead of ModuleUtil. |
web/src/com/intellij/spring/web/mvc/SpringMVCVariablesProvider.java |
Uses containingFile.getModule() instead of ModuleUtil. |
web/src/com/intellij/spring/web/mvc/SpringMVCModel.java |
Uses element.getModule() instead of ModuleUtil. |
web/src/com/intellij/spring/model/actions/patterns/dataAccess/JpaEntityManagerBeanGenerateProvider.java |
Uses psiFile.getModule() instead of ModuleUtil. |
spring-tests/tests/com/intellij/spring/model/xml/custom/CustomNamespaceMetadataTest.java |
Switches ModuleUtil.KEY_MODULE to ModuleUtilCore.KEY_MODULE. |
spring-tests/tests/com/intellij/spring/model/xml/custom/CustomNamespaceHandlerTest.java |
Switches ModuleUtil.KEY_MODULE to ModuleUtilCore.KEY_MODULE. |
spring-security/src/com/intellij/spring/security/references/SpringSecurityRolePsiReferenceProvider.java |
Switches to ModuleUtilCore.findModuleForPsiElement(...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.