Griffon
  1. Griffon
  2. GRIFFON-553

Intellij GDSL for Swing building should include named parameters

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: builders
    • Labels:
      None
    • Environment:
      IntelliJ 11.1.3
    • Number of attachments :
      1

      Description

      While the GDSL for the swing plugin defines all of the methods and their return types, it does not define any parameters. Therefore, all calls in IntelliJ show up as warnings.

      There used to be a swingbuilder.gdsl in the IDEA groovy plugin of community edition source, but maybe GSDL isn't expressive enough for SwingBuilder because at some point in the history that file was removed and there are a pair of Java classes that implement this, the main one being:

      https://github.com/JetBrains/intellij-community/blob/master/plugins/groovy/src/org/jetbrains/plugins/groovy/swingBuilder/SwingBuilderNonCodeMemberContributor.java

      This issue is my first introduction to GDSL (I didn't even know it existed prior to now), but I tried to with some GDSL that says that the GriffonView delegates to SwingBuilder. It only partially worked, I tried something like:

      contributor( ctx ) {
        delegatesTo(findClass('groovy.swing.SwingBuilder'))
      }
      

      (I didn't know how to set up the ctx properly, so for testing I just used scriptSource with my script's name). I knew that the GDSL was triggering because all of the "real" methods appeared in the view like "registerWindows" but none of the dynamic methods (like "button").

        Activity

        Show
        Andres Almiray added a comment - Fixed with https://github.com/griffon/griffon-swing-plugin/commit/a3936fb879f58884d3e2b241ce8d1812f3164502 https://github.com/griffon/griffon/commit/76cffeff9e7e1f1b848df2b42410ac5c23ccfe3f

          People

          • Assignee:
            Andres Almiray
            Reporter:
            Jason Winnebeck
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: