Skip to content

#1676 import extra sdks automatically into ide #2073

Draft
vivu001 wants to merge 13 commits into
devonfw:mainfrom
vivu001:feature/1676-Import-extra-SDKs-automatically-into-IDE-
Draft

#1676 import extra sdks automatically into ide #2073
vivu001 wants to merge 13 commits into
devonfw:mainfrom
vivu001:feature/1676-Import-extra-SDKs-automatically-into-IDE-

Conversation

@vivu001

@vivu001 vivu001 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #1676

Implemented changes:

  • Read extra tool installations from $IDE_HOME/settings/ide-extra-tools.json.
  • Add jdk-extra-java.xml as the template for importing extra Java SDKs into IntelliJ. (Related PR #1676: import extra sdks automatically into ide ide-settings#88)
  • Import supported extra installations into IntelliJ, starting with extra Java SDKs.
  • Verify that configured extra installations exist before importing them into IntelliJ.
  • Use the configured extra installation name as the SDK name.
  • Import extra Java SDKs into IntelliJ using a template-based merge with jdk-extra-java.xml.
  • Synchronize IntelliJ extra SDKs during ide update so one update is enough.

Testing instructions

Preconditions

Make sure the following files are available under $IDE_HOME/settings for testing:

  • ide-extra-tools.json
{
  "java": {
    "client": {
      "version": "11.0.27_6",
	   "edition": "azul"
    },
    "process-engine": {
      "version": "21.*"
    }
  },
  "mvn": {
    "m4": {
      "version": "4.0.0-rc-5"
    }
  }
}
  • /intellij/workspace/repository/.idea/jdk-extra-java.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<application xmlns:merge="https://github.com/devonfw/IDEasy/merge" merge:strategy="combine">
  <component name="ProjectJdkTable">
    <jdk version="2" merge:id="./jdk/name[@value='$[EXTRA_JAVA_NAME]']/.." merge:strategy="override">
      <name value="$[EXTRA_JAVA_NAME]"/>
      <type value="JavaSDK"/>
      <version value="$$[EXTRA_JAVA_VERSION]"/>
      <homePath value="$[EXTRA_JAVA_HOME]"/>
      <roots>
        <annotationsPath>
          <root type="composite">
            <root type="simple" url="jar://$APPLICATION_HOME_DIR$/plugins/java/lib/resources/jdkAnnotations.jar!/"/>
          </root>
        </annotationsPath>
        <classPath>
          <root type="composite">
            <root type="simple" url="jrt://$[EXTRA_JAVA_HOME]!/java.base"/>
          </root>
        </classPath>
        <javadocPath>
          <root type="composite"/>
        </javadocPath>
        <sourcePath>
          <root type="composite">
            <root type="simple" url="jar://$[EXTRA_JAVA_HOME]/lib/src.zip!/java.se"/>
          </root>
        </sourcePath>
      </roots>
      <additional/>
    </jdk>
  </component>
</application>

Manual test

  1. Run the update command: ide update.
  2. Verify that:
  • the extra sdks are installed successfully at
/
├──/.../software/extra/java/
│  ├──/ client/
│  ├──/ process-engine/
└──/ .../
  • IntelliJ workspace configuration is updated with new SDKs in $IDE_HOME/workspaces/main/.intellij/config/options/jdk.table.xml
  1. Open IntelliJ and confirm that the configured SDK names appear as expected.
image

Automated test

Run the IntelliJ-related tests, especially the update flow test coverage:

mvn -pl cli clean test  

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

vivu001 and others added 7 commits June 23, 2026 15:12
- Load extra SDKs from ide-extra-tools.json and register supported ones in IntelliJ.
- The IntelliJ merge template is expected from the settings repository.
…utomatically-into-IDE-' into feature/1676-Import-extra-SDKs-automatically-into-IDE-
@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jun 25, 2026
@vivu001 vivu001 added enhancement New feature or request settings ide-settings repo and replated processes and features ready-to-implement labels Jun 25, 2026
@tineff96 tineff96 moved this from 🆕 New to Team Review in IDEasy board Jun 25, 2026
@coveralls

coveralls commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 28498115208

Coverage increased (+0.08%) to 71.442%

Details

  • Coverage increased (+0.08%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 27 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

27 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java 22 81.87%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 2 77.05%
com/devonfw/tools/ide/tool/intellij/Intellij.java 2 93.83%
com/devonfw/tools/ide/version/VersionSegment.java 1 90.03%

Coverage Stats

Coverage Status
Relevant Lines: 16345
Covered Lines: 12179
Line Coverage: 74.51%
Relevant Branches: 7312
Covered Branches: 4722
Branch Coverage: 64.58%
Branches in Coverage %: Yes
Coverage Strength: 3.15 hits per line

💛 - Coveralls

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

Labels

enhancement New feature or request ready-to-implement settings ide-settings repo and replated processes and features

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Import extra SDKs automatically into IDE

3 participants