Skip to content

Replacing consulo.ide.impl.idea.openapi.module.ModuleUtil with consulo.language.util.ModuleUtilCore#9

Merged
VISTALL merged 1 commit intoconsulo:masterfrom
unv-unv:eliminating-module-util
Apr 19, 2026
Merged

Replacing consulo.ide.impl.idea.openapi.module.ModuleUtil with consulo.language.util.ModuleUtilCore#9
VISTALL merged 1 commit intoconsulo:masterfrom
unv-unv:eliminating-module-util

Conversation

@unv-unv
Copy link
Copy Markdown
Contributor

@unv-unv unv-unv commented Apr 19, 2026

No description provided.

@VISTALL VISTALL requested a review from Copilot April 19, 2026 12:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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(...) with getModule() in several Web/Webflow module lookups.
  • Migrated test-only usage of ModuleUtil.KEY_MODULE to ModuleUtilCore.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.

@VISTALL VISTALL merged commit 04113cb into consulo:master Apr 19, 2026
5 checks passed
@unv-unv unv-unv deleted the eliminating-module-util branch April 19, 2026 12:45
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.

3 participants