Skip to content

#2173: store JetBrains vmoptions under $IDE_HOME/.ide/<ide>/<workspace>#2208

Draft
quando632 wants to merge 6 commits into
devonfw:mainfrom
quando632:feature/2173-jetbrains-metadata
Draft

#2173: store JetBrains vmoptions under $IDE_HOME/.ide/<ide>/<workspace>#2208
quando632 wants to merge 6 commits into
devonfw:mainfrom
quando632:feature/2173-jetbrains-metadata

Conversation

@quando632

@quando632 quando632 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

This PR fixes part of #2173 (part of #2142)

Moves the JetBrains VM options out of the workspace into $IDE_HOME/.ide/«ide»/«workspace» for IntelliJ, PyCharm and Android Studio, solved once in their shared superclass.

Stacked on #2175 (#2172getIdeMetadataPath()); its commit appears here until #2175 is merged, then rebase onto main.

Scope note (important)

During implementation the .idea folder and the *.properties files turned out to be entangled with the workspace-template-merge mechanism / IntelliJ's project-root convention (and idea.properties is an empty template merged into the workspace relocating only its env var gives no benefit). So this PR intentionally covers only the vmoptions, which are the one metadata written directly by code and thus cleanly relocatable. .idea + *.properties are split out into a dedicated design spike (see follow-up issue) as agreed on #2142.

Implemented changes

  • IdeaBasedIdeToolCommandlet.runTool: the .«prefix».vmoptions file is now written to getIdeMetadataPath() instead of the workspace (env var points at the same new path). Covers IntelliJ (.idea.vmoptions), PyCharm (.pycharm.vmoptions) and Android Studio (.studio.vmoptions) via the shared superclass.
  • Migration Mig202608002 (target 2026.08.002): backs up the stale .*.vmoptions files from every workspace (they are regenerated at the new location from the «IDE»_VM_ARGS variable on next launch). Registered in IdeMigrator.
  • Updated IntellijTest, PycharmTest, AndroidStudioTest to assert the new location; added Mig202608002Test.

Testing instructions

  1. cd cli && mvn -Dtest=IntellijTest,PycharmTest,AndroidStudioTest,Mig202608002Test,IdeMigratorTest test all pass.
  2. Manual: set INTELLIJ_VM_ARGS in your project, run ide intellij, verify .idea.vmoptions is created under $IDE_HOME/.ide/intellij/«workspace»/ and not in the workspace.

Checklist for this PR

Coordination note

IdeMigrator requires strictly ascending migration versions. VSCode subtask #2201 adds Mig202608001; this PR adds Mig202608002. On merge, ensure they are registered in ascending order (001 before 002).

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 30092296095

Coverage increased (+0.01%) to 72.572%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

11 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 7 78.69%
com/devonfw/tools/ide/migration/IdeMigrator.java 3 89.83%
com/devonfw/tools/ide/version/VersionSegment.java 1 90.03%

Coverage Stats

Coverage Status
Relevant Lines: 16974
Covered Lines: 12844
Line Coverage: 75.67%
Relevant Branches: 7592
Covered Branches: 4984
Branch Coverage: 65.65%
Branches in Coverage %: Yes
Coverage Strength: 3.21 hits per line

💛 - Coveralls

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

Labels

None yet

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

2 participants