Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back SwingBuilder widgets list #46

Open
kriegaex opened this issue Sep 26, 2023 · 5 comments
Open

Bring back SwingBuilder widgets list #46

kriegaex opened this issue Sep 26, 2023 · 5 comments

Comments

@kriegaex
Copy link

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.

@paulk-asert
Copy link
Contributor

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.

@kriegaex kriegaex changed the title Bring back SwingBuildet widgets list Bring back SwingBuilder widgets list Sep 26, 2023
@kriegaex
Copy link
Author

kriegaex commented Oct 2, 2023

@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.

@paulk-asert
Copy link
Contributor

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.

@jagedn
Copy link

jagedn commented Oct 2, 2023

I'm using Intellij and I can see autocompletion for all of them

imagen

imagen

imagen

@kriegaex
Copy link
Author

kriegaex commented Oct 10, 2023

@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:

image

image

image

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:

image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants