Skip to content

Cleanup GUI context injection for NlsService #2589

Closed

Description

@laim2003

Task summary

In PR #2548, NlsService was changed to support an injected IdeContext so that NlsServiceTest can run in an isolated environment without being influenced by the IDE_OPTIONS environment variable.

However, when NlsService is created by the GUI without an injected context, it still lazily creates an IdeContextConsole in createUserEnvironmentVariables(). This was identified during review as an existing architectural hack that should be fixed.

Refactor the GUI integration so that NlsService always receives an appropriate IdeContext through dependency injection. Once all GUI call sites have been updated, remove the fallback lazy creation of IdeContextConsole from NlsService.

Acceptance criteria:

  • GUI call sites create or provide the appropriate IdeContext when constructing NlsService.
  • NlsService no longer needs a fallback IdeContextConsole when no context is injected.
  • Existing locale handling and IDE_OPTIONS isolation behavior remain unchanged.
  • Relevant unit and GUI tests continue to pass.

Additional context

Related pull request: #2548

The review discussion identifying this cleanup is available at #2548 (comment).

Relevant code:

  • NlsService.java

Activity

  1. added theissue type on Sep 30, 2026
  2. added
    enhancementNew feature or request
    GUIGraphical User Interface of IDEasy (aka dashboard) build with JavaFx
    nlsnative language support (i18n, l10n)
    on Sep 30, 2026
  3. added this to the release:2026.10.001 milestone on Oct 14, 2026
  4. laim2003 commented on Oct 14, 2026

    @laim2003
    ContributorAuthor

    Will be closed by: #2648

  5. added 2 commits that reference this issue on Oct 15, 2026
  6. added a commit that references this issue on Oct 20, 2026
  7. moved this from 🏗 In progress to ✅ Done in IDEasy boardon Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

GUIGraphical User Interface of IDEasy (aka dashboard) build with JavaFxenhancementNew feature or requestnlsnative language support (i18n, l10n)

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions