Replace TemplateContextType.isInContext deprecated method - #528
Replace TemplateContextType.isInContext deprecated method#528juan-mora-google wants to merge 2 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the isInContext method in DartTemplateContextType to accept a TemplateActionContext parameter instead of PsiFile and offset, aligning with modern IntelliJ Platform APIs. The review feedback correctly points out that the @Override annotation was omitted during this refactoring and should be restored to maintain compile-time safety.
5c9f552 to
ed57493
Compare
|
Looks reasonable to me and I see tests are passing! Can you add to the description how we can manually test that this is working? e.g. what user activity would trigger this code path, what should happen, and what could we expect if this change has broken it? (I'm going to add to our PR template to note that this is relevant for most PRs) |
These are the steps to repro:
3. Test the "Happy Path" (It should work)
4. Test the "Negative Path" (It should not work)
|
|
Closing this PR due to CLA problems |
Description
Replaced deprecated method
isInContextfromTemplateContextTypeclass inDartTemplateContextType.javafileTesting steps:
1. Run the IDE in Sandbox mode with the plugin
2. Prepare a Live Template for testing
Inside the Sandbox IDE window:
Editor>Live Templates.Live Template.dtest) and some template code (e.g.,print('hello');).Dartoption (which matches thecontextIdregistered in theplugin.xml) and check it.3. Test the "Happy Path" (It should work)
file.getLanguage() instanceof DartLanguageevaluated to true.4. Test the "Negative Path" (It should not work)
Contribution guidelines:
dart format.