Skip to content

Conversation

@xterao
Copy link
Collaborator

@xterao xterao commented May 20, 2025

Fix project info retrieval off the EDT: instead of accessing project info at IDE startup, fetch the current active project when the settings screen is displayed.

@xterao xterao added this to the 0.8.0 Release milestone May 20, 2025
@xterao xterao requested a review from Copilot May 20, 2025 06:52
@xterao xterao self-assigned this May 20, 2025
@xterao xterao added bug Something isn't working fix Bug fixes labels May 20, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where project info was being accessed off the EDT by deferring the retrieval of the active project until the settings screen is displayed. Key changes include:

  • Removing the early disabling of the custom function panel in SettingComponent.
  • Updating DomaToolsConfigurable to fetch the active project upon component creation and disable the panel when no project is available.
  • Enhancing ActiveProjectHelper to differentiate project retrieval logic based on the EDT state.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/main/kotlin/org/domaframework/doma/intellij/setting/SettingComponent.kt Removed redundant code that disabled the custom function panel when no active project was available.
src/main/kotlin/org/domaframework/doma/intellij/setting/DomaToolsConfigurable.kt Updated createComponent to fetch the current active project at display time and disable the panel if needed.
src/main/kotlin/org/domaframework/doma/intellij/common/helper/ActiveProjectHelper.kt Refined active project retrieval logic to handle EDT and non-EDT scenarios.

@xterao xterao linked an issue May 20, 2025 that may be closed by this pull request
@xterao xterao force-pushed the fix/must-be-called-on-edt branch from 959eb71 to d55e246 Compare May 21, 2025 06:50
@xterao xterao merged commit 3ccc5c5 into main May 21, 2025
3 checks passed
@xterao xterao deleted the fix/must-be-called-on-edt branch May 21, 2025 07:45
@xterao xterao linked an issue May 26, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Correct Project Selection When Updating State via Settings Assert: must be called on EDT

2 participants