Repository navigation
Migrate live templates to declarative XML for dynamic loading - #9207
Merged
auto-submit[bot] merged 2 commits intoNov 24, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request migrates Flutter live templates and the DART_TOPLEVEL context registration to declarative XML extensions in plugin.xml to support dynamic plugin loading without IDE restarts. It removes the deprecated FlutterLiveTemplatesProvider implementation, simplifies DartToplevelTemplateContextType to avoid deprecated APIs, and enables the NOT_DYNAMIC failure level verification in build.gradle.kts. Additionally, it updates baseline verifications, simplifies the baseline checking script, and introduces comprehensive unit tests in FlutterLiveTemplatesTest.java. I have no feedback to provide as there are no review comments.
com.intellij.defaultLiveTemplatesProvider was the sole remaining non-dynamic extension point blocking dynamic plugin installation and unloading without IDE restarts. Replace FlutterLiveTemplatesProvider with declarative <defaultLiveTemplates> and enforce NOT_DYNAMIC gate. Also migrate DartToplevelTemplateContextType from the deprecated 3-arg DartTemplateContextType constructor to the 1-arg overload paired with baseContextId="DART" in plugin.xml, and ratchet 252-262 baselines. Part of: flutter#8361 Tested: ./gradlew test verifyPlugin
jwren
force-pushed
the
flutter-verifier-03-templates-dynamic
branch
from
November 13, 2026 21:16
a8a2fed to
c50787c
Compare
jwren
marked this pull request as ready for review
November 13, 2026 21:16
…to flutter-verifier-03-templates-dynamic
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
Eliminates two deprecated live-template API usages and removes the last non-dynamic extension point in
flutter-intellij, unlocking full Dynamic Plugin eligibility (252–262) without IDE restarts:<defaultLiveTemplates>& Dynamic Plugin Gate: DeletesFlutterLiveTemplatesProvider(DefaultLiveTemplatesProviderimplementation, which registered the non-dynamiccom.intellij.defaultLiveTemplatesProviderextension) in favor of<defaultLiveTemplates file="liveTemplates/flutter_miscellaneous.xml"/>inplugin.xml, and uncommentsVerifyPluginTask.FailureLevel.NOT_DYNAMICinbuild.gradle.kts.DartToplevelTemplateContextType: Migrates from the deprecated 3-argDartTemplateContextType(String, String, Class)constructor to the 1-argDartTemplateContextType("Top-level")constructor withbaseContextId="DART"inplugin.xml, and removes the now-obsoleteDartTemplateContextType.<init>sednormalization intool/check_verifier_baselines.sh.FlutterLiveTemplatesTestverifying declarative registration of all 7 Flutter live templates (stless,stful,inh,stanim,thof,ihof,mdof),DART_TOPLEVEL->DARTcontext inheritance, and PSI context matching (top-level vs. class body, comments, and non-Dart files).DefaultLiveTemplatesProvider,DartTemplateContextType.<init>, andDynamic Plugin Status) out oftool/baseline/{252,253,261}/verifier-baseline.txt, and updatessrc/io/flutter/template/ABOUT.mdandCHANGELOG.md.Part of #8361
Verification
./gradlew compileJava compileKotlin compileTestJava compileTestKotlin test --tests io.flutter.template.FlutterLiveTemplatesTest(Passed)./gradlew test(Full test suite passed)./gradlew verifyPluginProjectConfiguration verifyPluginStructure verifyPluginSignature verifyPlugin(Dynamic Plugin Eligibility: Plugin can probably be enabled or disabled without IDE restartacross252,253,261, and262;FailureLevel.NOT_DYNAMICactive;3findings removed per IDE)Review the contribution guidelines below:
AUTHORSfile.CHANGELOG.mdif appropriate.Contribution guidelines:
our contributor guide and
the Flutter organization contributor guide
for general expectations for PRs.
dart format.practices (discussion).