Skip to content

Module configuration support #4342

Open

Description

@petrjung

Type: Feature Request

Feature Request: Support for Classpath Configuration per Module
Summary
The Read Heat extension currently supports only a single workpsace classpath configuration. This becomes limiting in multi‑module Java projects, where each module may require a different classpath. I would like to propose extending the configuration model to align with the standard VS Code configuration hierarchy: User → Workspace → Module (new).

Problem Description
In complex Java workspaces, especially those containing multiple independent modules, the extension does not allow defining a classpath per module. As a result:

  • All modules must share the same classpath, even when they have different dependency sets.
  • Workspace‑level configuration cannot be overridden for specific modules.
  • The extension becomes difficult to use in real‑world multi‑module setups.
    For example, I may have a workspace configured on User level for JDK 21, but a specific workpsace require JDK 1.8 and each module requires a different classpath or additional libraries. Currently, there is no way to express this.

Proposed Solution
Introduce a hierarchical configuration model consistent with VS Code’s philosophy:

  1. User-level configuration
    Global defaults for all workspaces.
  2. Workspace-level configuration
    Overrides user settings for the current workspace.
  3. Module-level configuration
    A new level of configuration that applies to a specific Java module and can override both workspace and user settings.
    This would allow each module to define its own classpath while still inheriting defaults when appropriate.

Expected Behavior

  • If a module defines its own classpath, the extension uses that configuration.
  • If not, the workspace configuration is used.
  • If neither module nor workspace defines a classpath, the user-level configuration applies.
  • This mirrors how VS Code handles settings for other languages and extensions.

Benefits

  • Better support for multi-module Java projects.
  • Cleaner and more maintainable configuration.
  • Behavior consistent with VS Code’s established configuration hierarchy.
  • Allows mixed JDK environments or module-specific dependency sets.

Extension version: 1.52.0
VS Code version: Code 1.109.4 (c3a26841a84f20dfe0850d0a5a9bd01da4f003ea, 2026-02-16T15:35:57.932Z)
OS version: Windows_NT x64 10.0.26200
Modes:

Activity

  1. fbricon commented on Feb 19, 2026

    @fbricon
    Collaborator

    The extension supports Gradle or Maven multimodules already, each submodule can have its own classpath. So please give a concrete scenario, ideally including test projects and steps to reproduce.

  2. petrjung commented on Feb 19, 2026

    @petrjung
    Author

    Thanks for the clarification. That makes sense — for Gradle and Maven multimodule projects the current model works well.

    My situation is a bit different: I’m working with a legacy Ant‑based Java project targeting Java 1.8, structured as multiple modules, each with its own classpath. Since the project is not recognized as separate modules by the extension, all modules effectively share a single classpath.

    I managed to work around it by flattening everything into one classpath, so this is definitely a rare edge case.

    If it helps, I can prepare a minimal reproduction or temporarily share a private workspace, but I also understand if supporting older Ant‑based layouts is outside the intended scope of the extension. I’m completely fine with closing the request if that’s the case.

    Thanks again for the quick response and for maintaining the extension.

  3. petrjung commented on Feb 19, 2026

    @petrjung
    Author

    `{
    "java.project.sourcePaths": [
    "web/src/main/java",
    "test/src/web/java",
    "test/src/test/resources",
    "test/src/test/java",
    "test/src/performance/java",
    "service/src/main/java",
    "service/generated/src/main/java",
    "reader/src/main/java",
    "persistence/src/main/java",
    "model/src/main/java",
    "common/src/main/java",
    "client/src/main/java",
    "client/src/main/resources"
    ],
    "java.project.resourcePaths": [
    "src\main\resources",
    "common\src\main\resources",
    "model\src\main\resources",
    "persistence\src\main\resources",
    "service\src\main\resources",
    "service\generated\src\main\resources",
    "client\src\main\resources",
    "reader\src\main\resources",
    "web\src\main\resources",
    "web\generated\src\main\resources",
    "test\src\test\resources",
    "test\src\web\resources"
    ],
    "java.project.testResourcePaths": [
    "test\src\test\resources",
    "test\classes",
    "test\src\web\resources",
    "model\classes",
    "model\classes\cz\applogic\plebisicte\hbm"
    ],
    "java.project.referencedLibraries": [
    "lib\hibernate\.jar",
    "lib\jboss\
    .jar",
    "lib\tomcat\.jar",
    "lib\test\
    .jar",
    "client\src\main\distsrc\lib\*.jar"
    ],
    "jdk.advanced.disable.projectSearchLimit": true,
    "jdk.java.completion.commit.chars": [

    ],
    "jdk.hints.preferences": "",
    "jdk.inlay.enabled": [
        "var"
    ],
    "jdk.java.imports.groups": [
    
        "java",
        "javax",
        "org",
        "com",
        "cz"
    ],
    "jdk.project.jdkhome": "C:\\Java\\jdk\\1.8",
    "java.jdt.ls.java.home": "C:\\Java\\jdk\\1.8",
    "jdk.test.editor.enableShortcuts": true
    ,
    "java.configuration.runtimes": [
        {
            "name": "JavaSE-1.8",
            "path": "C:\\Java\\jdk\\1.8",
            "default": true
        }
    ],
    "java.test.defaultConfig": "JUnit",
    "java.test.config": [
        {
            "name": "JUnit",
            "workingDirectory": "${workspaceFolder}",
            "env": {
                "JAVA_HOME": "C:\\Java\\jdk\\1.8",
                "PATH": "C:\\Java\\jdk\\1.8\\bin;${env:PATH}",
                "PLEBISCITE_TEST_HOME": "${workspaceFolder}"
            },
            "vmArgs": [
                "-Xms256m",
                "-Xmx1024m",
                "-Dfile.encoding=UTF-8"
            ],
            "classpath": [
                "${workspaceFolder}/test/src/test/resources",
                "${workspaceFolder}/test/classes"
            ]
        }
    ],
    "java.format.settings.url": ".vscode/java-formatter.xml",
    "[java]": {
        "editor.defaultFormatter": "redhat.java",
        "editor.formatOnSave": true
    },
    "java.dependency.packagePresentation": "flat",
    "jdk.jdkhome": "",
    "terminal.integrated.env.windows": {
        "JAVA_HOME": "C:\\Java\\jdk\\1.8",
        "PATH": "C:\\Java\\jdk\\1.8\\bin;${env:PATH}"
    }
    

    }`

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions