groovy-website
groovy-website copied to clipboard
Bring back SwingBuilder widgets list
While Codehaus was still hosting the Groovy documentation, there was an alphabetical widgets list for the SwingBuilder DSL plus detail pages, e.g. for tabbedPane. Now, I can only find those pages on archive.org. Please bring that lost part of the documentation back into the main Groovy documentation. It is super difficult to discover the available widgets and their paramateters from an IDE, especialls for developers who are not Swing buffs already. IntelliSense in my IDE does not help much there. SwingBuilder is still available in a Groovy module even in Groovy 4, so it would make sense to documents it, too.
I think that page was always getting out of date and we had hoped to generate it manually somehow but up until now haven't achieved that. The workaround is to look for all the registerFactory and registerBeanFactory method calls within the SwingBuilder source file. An automatically generated file would be missing the helpful "Notes" column but would at least be a start. In reality, this file hasn't changed much in recent times, so generating it isn't as crucial as it might have once been.
@paulk-asert, so what is your plan? I cannot say anything intelligent about how difficult it would be to generate those pages and keep them up to date. I just know that presently, I have no clue how to use those Swing builder classes and discoverability in my IDE is close to zero. Looking at the Swing builder source code is not such an appealing option. If your goal is to auto-generate the documentation, I guess it would make sense for it to live in the source code. Maybe there even is a way to put the notes there for the hypothetical generator to discover.
The plan is to provide the info you are after, but like all things in an open source community project, it will happen when someone in the community finds the time. I hope to take a look myself sometime in the coming weeks but someone else might beat me to it.
I'm using Intellij and I can see autocompletion for all of them
@jagedn, yeah, I know they are there, but I was talking about discoverability. If I already know what I am searching for and start typing a widget name, I can spot them. Otherwise, just pressing Ctrl+Space, I see an overwhelming number of options - constants, Groovy API etc. - and can scroll down the list for minutes. Also, even if I find what I want, Ctrl-Q does not show any helpful documentation:
Well, yeah, so now I know that all those methods have java.util.Map attributes arguments lists.
Then, inside an arguments list, it is similar. If I just want to see which options there are at all via Ctrl+Space, I need to spot the ones with a trailing colon while scrolling the list. This is all feasible, but not very nice. Maybe I should rather blame the IDE or my lack of knowledge about how to optimally configure IntelliSense in IntelliJ IDEA, but it does not make things easier. The named parameters also have no documentation I could open with Ctrl-Q:
This is why I opened this issue in order to bring back some helpful, old-school API description for all widgets and their options into the Groovy documentation. If widget, option and especially documentation (Javadoc, Groovydoc) discoverability in my IDE was adequate, I would maybe not need that. But for now, I do.