Skip to content

refactor(facet): migrate FacetConfiguration persistence to PersistentStateComponent#68

Open
lukaszlenart wants to merge 1 commit intomainfrom
refactor/facet-persistent-state-component
Open

refactor(facet): migrate FacetConfiguration persistence to PersistentStateComponent#68
lukaszlenart wants to merge 1 commit intomainfrom
refactor/facet-persistent-state-component

Conversation

@lukaszlenart
Copy link
Copy Markdown
Member

@lukaszlenart lukaszlenart commented Apr 5, 2026

Summary

  • Replace deprecated FacetConfiguration.readExternal()/writeExternal() overrides in StrutsFacetConfiguration with PersistentStateComponent<Element>, the migration path documented in the IntelliJ Platform SDK
  • Uses PersistentStateComponent<Element> (raw JDOM) to preserve the exact existing XML structure (<fileset>, <file>, <propertiesKeys> tags) for full backward compatibility with saved .iml facet configuration
  • Removes redundant ModificationTracker interface (already inherited from SimpleModificationTracker superclass)
  • Adds 7 focused persistence round-trip tests covering file sets, removed flag, properties key toggle, malformed input handling, and XML structure verification
  • Updates framework-initialization.md and CHANGELOG.md to reflect the new API

Test plan

  • ./gradlew test --tests "StrutsFacetConfigurationTest" -x rat — all 7 new tests pass
  • ./gradlew test -x rat — full test suite passes with no regressions
  • ./gradlew compileJava — zero deprecation warnings from StrutsFacetConfiguration
  • Verify plugin loads existing Struts facet configuration from a project that was saved with the old persistence format

Made with Cursor

…StateComponent

Replace deprecated readExternal()/writeExternal() overrides in
StrutsFacetConfiguration with PersistentStateComponent<Element>,
following the migration path documented in the IntelliJ Platform SDK.

Uses PersistentStateComponent<Element> to preserve the exact existing
XML structure (fileset/file/propertiesKeys tags) for full backward
compatibility with saved .iml facet configuration.

Also removes redundant ModificationTracker interface (already inherited
from SimpleModificationTracker superclass).

Made-with: Cursor
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

🔌 Plugin artifact ready for testing!

Download from Actions artifacts

Artifact: struts2-261.18970.1

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant