Skip to content

#788: Add support for IDE_OPTIONS variable per IDE commandlet - #2247

Open
Ali-Shariati-Najafabadi wants to merge 7 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/788-ide-options-flags
Open

#788: Add support for IDE_OPTIONS variable per IDE commandlet#2247
Ali-Shariati-Najafabadi wants to merge 7 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/788-ide-options-flags

Conversation

@Ali-Shariati-Najafabadi

@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #788

Implemented changes:

  • Added support for «IDE»_OPTIONS (e.g. INTELLIJ_OPTIONS, ECLIPSE_OPTIONS, VSCODE_OPTIONS, ANDROID_STUDIO_OPTIONS, PYCHARM_OPTIONS) to pass additional command-line arguments when starting an IDE, analogue to the existing global IDE_OPTIONS
  • Implemented once in IdeToolCommandlet.runTool(List<String>) so it applies to all IDE commandlets (Eclipse, IntelliJ, Android Studio, PyCharm, VSCode/VSCodium) without per-tool duplication
  • Scoped to only the actual IDE-launch call, not internal calls like plugin installation or repository import
  • Registered the new variables in IdeVariables.java and documented them in variables.adoc

Testing instructions

  1. Set e.g. INTELLIJ_OPTIONS=nosplash in conf/ide.properties
  2. Run ide intellij and verify the extra argument is passed to the IDE binary
  3. Automated coverage: mvn -Dtest=EclipseTest,IntellijTest,VscodeTest test in the cli module

Checklist for this PR

  • 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"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Aug 3, 2026
@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi moved this from 🆕 New to 🏗 In progress in IDEasy board Aug 3, 2026
@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi added enhancement New feature or request android-studio Android Studio IDE from Jet-Brains vscode Microsoft visual studio code eclipse related to Eclipse IDE intellij IntelliJ IDE from Jet-Brains pycharm python IDE integration labels Aug 3, 2026
@hohwille hohwille moved this from 🏗 In progress to Team Review in IDEasy board Aug 3, 2026
@coveralls

coveralls commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 32148921752

Coverage increased (+0.03%) to 72.941%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

8 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 7 84.0%
com/devonfw/tools/ide/variable/IdeVariables.java 1 94.74%

Coverage Stats

Coverage Status
Relevant Lines: 17574
Covered Lines: 13371
Line Coverage: 76.08%
Relevant Branches: 7771
Covered Branches: 5116
Branch Coverage: 65.83%
Branches in Coverage %: Yes
Coverage Strength: 3.24 hits per line

💛 - Coveralls

@samuelkos17 samuelkos17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice and clean implementation! I've followed your testing instructions and everything worked perfectly and all tests passed. I've no recommendations for any changes so i'll move this to In Review 😄

@samuelkos17 samuelkos17 moved this from Team Review to 👀 In review in IDEasy board Aug 6, 2026
@hohwille hohwille added this to the release:2026.08.002 milestone Aug 18, 2026

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Ali-Shariati-Najafabadi thanks for your PR. Nice implementation of the story including test coverage. Good job 👍
I only left some small remarks for rework.

Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java Outdated
Comment on lines +129 to +143
/** {@link VariableDefinition} for additional command-line arguments to start eclipse. */
VariableDefinitionString ECLIPSE_OPTIONS = new VariableDefinitionString("ECLIPSE_OPTIONS", null);

/** {@link VariableDefinition} for additional command-line arguments to start intellij. */
VariableDefinitionString INTELLIJ_OPTIONS = new VariableDefinitionString("INTELLIJ_OPTIONS", null);

/** {@link VariableDefinition} for additional command-line arguments to start android studio. */
VariableDefinitionString ANDROID_STUDIO_OPTIONS = new VariableDefinitionString("ANDROID_STUDIO_OPTIONS", null);

/** {@link VariableDefinition} for additional command-line arguments to start pycharm. */
VariableDefinitionString PYCHARM_OPTIONS = new VariableDefinitionString("PYCHARM_OPTIONS", null);

/** {@link VariableDefinition} for additional command-line arguments to start vscode. */
VariableDefinitionString VSCODE_OPTIONS = new VariableDefinitionString("VSCODE_OPTIONS", null);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should only create variables when they are actually referenced.
There are also no variables ECLIPSE_VERSION or ECLIPSE_EDITION for example.
BTW: It seems I missed this in the review for these «TOOL»_VM_ARGS that also do not make any sense.
Please also note that when we add a new IDE it will work out of the box and therefore nobody will think of adding a NEW_IDE_OPTIONS and NEW_IDE_VM_ARGS variable here so only add variables that we actually need here. Also we have spyder as IDE that was not added as variable here (see #2293).

@@ -1 +1,2 @@
M2_REPO=~/.m2/repository
ECLIPSE_OPTIONS=nosplash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is just a mocked test. However, tests should be realistic.
The correct option in eclipse is actually -nosplash so this test is IMHO confusing.
https://equinox.eclipseprojects.io/launcher/starting_eclipse_commandline.html#launcher-arguments

Fun fact: I tested the option with recent eclipse and with ide eclipse -nosplash it was showing the splash screen. However, when just running eclipse -nosplash it was working.
IMHO this reveals another problem with this feature: It seems the order of the arguments are relevant.
Seems IDEasy is somewhat buggy in this regard (already without this PR).

…dlet.java

Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android-studio Android Studio IDE from Jet-Brains eclipse related to Eclipse IDE enhancement New feature or request intellij IntelliJ IDE from Jet-Brains pycharm python IDE integration vscode Microsoft visual studio code

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Add more starting flags to IDE commandlets

5 participants