You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "jdaugherty (via GitHub)" <gi...@apache.org> on 2026/10/12 14:58:13 UTC

[PR] Model @Scaffold: inherited superclass, in-body method hints, Structure view [grails-intellij-plugin]

jdaugherty opened a new pull request, #446:
URL: https://github.com/apache/grails-intellij-plugin/pull/446

   `@Scaffold` generates no methods. Grails' ScaffoldingControllerInjector and ScaffoldingServiceInjector replace the class's superclass at compile time (Object becomes RestfulController<Domain> or GormService<Domain>, or the base named in the annotation) and add a no-arg constructor. The IDE knew nothing of this, so a scaffolded controller showed no actions, a hand written `def show()` carried no "overrides" marker, and nothing told the user what the annotation had done.
   
   ScaffoldTransformationSupport sets the same superclass on the PSI through the Groovy astTransformationSupport extension point, reading the annotation the way the injectors do: @Scaffold(Domain), @Scaffold(Base<Domain>), @Scaffold(value = Base, domain = Domain), the `domain` attribute alone, and the deprecated `static scaffold = Domain`. A class with its own superclass is left alone, as the compiler rejects it. Completion, navigation, the override gutter marker and the structure view's inherited members then come from the platform.
   
   ScaffoldInlayHintsProvider shows what was added: `extends RestfulController<Quest>` after the class name, and the inherited methods as greyed lines above the class's closing brace, indented like its own members, with the base's type parameter replaced by the domain. Above each method a comment names the annotation responsible, as written in the file (`// @Scaffold(Quest) - inherited from RestfulController<Quest>`), and links back to it; a blank line separates the groups. A method the class declares drops out, leaving the platform's override marker. Compiled Groovy bases carry trait methods and property accessors as public methods, so the listing skips @Generated members, accessors and `$` names.
   
   ScaffoldStructureViewExtension lists the same methods under the class node in the Structure view, greyed and located in the base, without "Show Inherited"; with that toggle on the platform lists them itself, so the extension adds nothing then.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Model @Scaffold: inherited superclass, in-body method hints, Structure view [grails-intellij-plugin]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty merged PR #446:
URL: https://github.com/apache/grails-intellij-plugin/pull/446


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Model @Scaffold: inherited superclass, in-body method hints, Structure view [grails-intellij-plugin]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #446:
URL: https://github.com/apache/grails-intellij-plugin/pull/446#issuecomment-6128633909

   ## [Codecov](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `77.09497%` with `41 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 50.1855%. Comparing base ([`efcbecc`](https://app.codecov.io/gh/apache/grails-intellij-plugin/commit/efcbeccc78211f36ed1cd4c6dc75eb4e3bbd600f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`78eca5b`](https://app.codecov.io/gh/apache/grails-intellij-plugin/commit/78eca5b3aada50877bdb2fe02939ddb5d3b3e237?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 3 commits behind head on main.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [.../intellij/plugin/feature/scaffold/Scaffolding.java](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&filepath=plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgrails%2Fintellij%2Fplugin%2Ffeature%2Fscaffold%2FScaffolding.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ncmFpbHMvaW50ZWxsaWovcGx1Z2luL2ZlYXR1cmUvc2NhZmZvbGQvU2NhZmZvbGRpbmcuamF2YQ==) | 71.4286% | [1 Missing and 23 partials :warning: ](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...n/feature/scaffold/ScaffoldInlayHintsProvider.java](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&filepath=plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgrails%2Fintellij%2Fplugin%2Ffeature%2Fscaffold%2FScaffoldInlayHintsProvider.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ncmFpbHMvaW50ZWxsaWovcGx1Z2luL2ZlYXR1cmUvc2NhZmZvbGQvU2NhZmZvbGRJbmxheUhpbnRzUHJvdmlkZXIuamF2YQ==) | 84.0000% | [0 Missing and 8 partials :warning: ](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...ature/scaffold/ScaffoldStructureViewExtension.java](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&filepath=plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgrails%2Fintellij%2Fplugin%2Ffeature%2Fscaffold%2FScaffoldStructureViewExtension.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ncmFpbHMvaW50ZWxsaWovcGx1Z2luL2ZlYXR1cmUvc2NhZmZvbGQvU2NhZmZvbGRTdHJ1Y3R1cmVWaWV3RXh0ZW5zaW9uLmphdmE=) | 74.1936% | [5 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...eature/scaffold/ScaffoldTransformationSupport.java](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&filepath=plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgrails%2Fintellij%2Fplugin%2Ffeature%2Fscaffold%2FScaffoldTransformationSupport.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ncmFpbHMvaW50ZWxsaWovcGx1Z2luL2ZlYXR1cmUvc2NhZmZvbGQvU2NhZmZvbGRUcmFuc2Zvcm1hdGlvblN1cHBvcnQuamF2YQ==) | 92.8571% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446/graphs/tree.svg?width=650&height=150&src=pr&token=52A1VY5RSZ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##                 main       #446        +/-   ##
   ==================================================
   + Coverage     49.9918%   50.1855%   +0.1937%     
     Complexity        551        551                
   ==================================================
     Files             699        703         +4     
     Lines           24354      24533       +179     
     Branches         6368       6422        +54     
   ==================================================
   + Hits            12175      12312       +137     
   - Misses           9363       9370         +7     
   - Partials         2816       2851        +35     
   ```
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...eature/scaffold/ScaffoldTransformationSupport.java](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&filepath=plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgrails%2Fintellij%2Fplugin%2Ffeature%2Fscaffold%2FScaffoldTransformationSupport.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ncmFpbHMvaW50ZWxsaWovcGx1Z2luL2ZlYXR1cmUvc2NhZmZvbGQvU2NhZmZvbGRUcmFuc2Zvcm1hdGlvblN1cHBvcnQuamF2YQ==) | `92.8571% <92.8571%> (ø)` | |
   | [...n/feature/scaffold/ScaffoldInlayHintsProvider.java](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&filepath=plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgrails%2Fintellij%2Fplugin%2Ffeature%2Fscaffold%2FScaffoldInlayHintsProvider.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ncmFpbHMvaW50ZWxsaWovcGx1Z2luL2ZlYXR1cmUvc2NhZmZvbGQvU2NhZmZvbGRJbmxheUhpbnRzUHJvdmlkZXIuamF2YQ==) | `84.0000% <84.0000%> (ø)` | |
   | [...ature/scaffold/ScaffoldStructureViewExtension.java](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&filepath=plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgrails%2Fintellij%2Fplugin%2Ffeature%2Fscaffold%2FScaffoldStructureViewExtension.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ncmFpbHMvaW50ZWxsaWovcGx1Z2luL2ZlYXR1cmUvc2NhZmZvbGQvU2NhZmZvbGRTdHJ1Y3R1cmVWaWV3RXh0ZW5zaW9uLmphdmE=) | `74.1936% <74.1936%> (ø)` | |
   | [.../intellij/plugin/feature/scaffold/Scaffolding.java](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446?src=pr&el=tree&filepath=plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgrails%2Fintellij%2Fplugin%2Ffeature%2Fscaffold%2FScaffolding.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ncmFpbHMvaW50ZWxsaWovcGx1Z2luL2ZlYXR1cmUvc2NhZmZvbGQvU2NhZmZvbGRpbmcuamF2YQ==) | `71.4286% <71.4286%> (ø)` | |
   
   ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/apache/grails-intellij-plugin/pull/446/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Model @Scaffold: inherited superclass, in-body method hints, Structure view [grails-intellij-plugin]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #446:
URL: https://github.com/apache/grails-intellij-plugin/pull/446#issuecomment-6126825284

   @fernando88to would you be willing to review this functionality?  for people that use the scaffolding annotation, this change adds support to illustrate what methods are auto generated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org