-
Notifications
You must be signed in to change notification settings - Fork 843
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
[NETBEANS-4116] Add Java Platform ComboBox Support to the Java Platform UI API #2064
Conversation
Just a side note to this change, I think that the JavaPlatform.getProperties.get("platform.ant.name") would be worth to have it's own API in JavaPlatform like a String JavaPlatform.getInternalID(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My personal preference for composing UI is to write a Node based model and then let the UI select proper Explorer View to display it. In this case one would use ChoiceView. Writing models using Node
is flexible and generic. Node written models can be rendered using any explorer view and even mounted into bigger hierarchies. To follow that vision I would just expose factory
Node PlatformsCustomizer.createPlatformSelectionNode() { }
However I am aware that many find this node+explorer vision too generic and rather work directly with Swing components: approving.
java/java.platform.ui/src/org/netbeans/api/java/platform/PlatformComboBoxModel.java
Outdated
Show resolved
Hide resolved
groovy/gradle.java/src/org/netbeans/modules/gradle/java/customizer/CompileOptionsPanel.java
Outdated
Show resolved
Hide resolved
@JaroslavTulach thank you for the advises and the approval! I'd consider to create a Node based model, though unfortunately, I'm in rush finishing the new Gradle project wizards for 12.0 (if the RM would allow to put that in). This thing is just a side work coming out of that. BTW: Can I have your opinion on the "platform.ant.name" thing I mentioned earlier on this thread? |
I'm trying to add some unit tests at least for the model. |
@lkishalmi is this 12.0 or is this "do not merge" in your opinion? Inclined to agree with @JaroslavTulach that this should be Node-based. |
Removed 12.0 for milestone. Work is more demanding than usual, I gave up chasing 12.0. This one would have been required for my Gradle Template improvements which, I still did not have time to finish. Might consider on the Node based solution later... |
There are similar implementations at least 3 places in NetBeans. This PR moves the one used in Gradle to be a reusable part of the Java Project UI API.
Theoretically it would be easy to transform the existing uses to this new API, though I'd have a review first and even after that it might not be an urgent task to do.