docs: add SwingBridge interoperability section#5603
Open
taefi wants to merge 2 commits into
Open
Conversation
Documents the SwingBridge interop API and tooling that lets a hybrid Vaadin/Swing application call across the boundary type-safely. New section under modernization-toolkit/swing-bridge/interop/ covers calling Swing methods (@ExposedMethod, BridgeHandle), handling Swing events (@VaadinCallback, Dispatch modes), sharing domain types across the classloader split, and higher-order patterns (LOV dialog, navigation guard, runInAppContext). Bumps the doc-wide :swing-bridge-version: attribute to 1.2.0 so coordinates and download URLs render consistently for the release that ships these APIs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-5603.fly.dev Built from d28eaa4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
articles/tools/modernization-toolkit/swing-bridge/interop/covering the SwingBridge interop API and tooling that lets a hybrid Vaadin/Swing application call across the boundary type-safely.index.adoc— mental model, ingredients table, decision tree, shipped-vs-roadmap status, and a "Prerequisites → Adding the Annotations JAR" recipe for Maven, Gradle, Ant, and IDE-managed Swing projects.calling-swing-methods.adoc—@ExposedMethod, the four invocation shapes,WINDOW/SINGLETON/STATIC_ONLYdiscovery,@InstanceProvider, andBridgeHandle.onReady/requestAsync/isReady.listening-to-swing-events.adoc—@VaadinCallback, the threeDispatchmodes, setter-vs-adder/remover wiring, and theRegistrationcleanup pattern.sharing-domain-types.adoc— the parent-first classloader invariant and the three domain-type strategies (Type 3 / 3+ shipped; Type 1 / Type 2 explicitly flagged roadmap).patterns.adoc— Vaadin-rendered LOV dialog,BeforeLeaveObservernavigation guard, calling a bridge from a view that doesn't host the Swing component, and theSwingBridge.runInAppContext(...)AppContext escape hatch.:swing-bridge-version:inarticles/_vaadin-version.adocfrom1.1.2to1.2.0so every doc that resolves the attribute (Maven coordinates, Gradle, the direct-downloadcurlURL, installation-from-scratch, etc.) shows the release version that ships these APIs.All API and annotation names match the live source on the
internalize-swing-bridge-toolkitbranch ofvaadin/vaadin-swing-bridge(PRs #190 / #191): packages undercom.vaadin.swingbridge.interop.*, static entry pointSwingBridge.interop(), typed handle viaSwingBridge.interop().of(MyBridge.class). Type 1 / Type 2 codegen Mojos are described as roadmap only, not as recipes.Test plan
npm run dspublisher:startand confirm the SwingBridge section sidebar shows the new "Interoperability" subsection with index + four pages in the order: Calling Swing Methods, Listening to Swing Events, Sharing Domain Types, Patterns and Cookbook.@ExposedMethod,@VaadinCallback, andSwingBridgein monospace.<<...#>>xrefs).1.2.0(from the_vaadin-version.adocattribute), and thecurlURL ishttps://maven.vaadin.com/vaadin-addons/com/vaadin/swing-bridge-annotations/1.2.0/swing-bridge-annotations-1.2.0.jar.articles/tools/modernization-toolkit/swing-bridge/installation-from-scratch.adocstill renders cleanly with the bumped1.2.0Maven<swing-bridge.version>.🤖 Generated with Claude Code