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

Better Gradle Project Creation Wizard #7257

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

lkishalmi
Copy link
Contributor

Well, This one was in my plans for months. I put together some better alternative of the Gradle project creation wizard.
image

When we switched using gradle init created project many of the previous dialog entries got defunct (like group, description and version inputs), other features never got exposed, like selecting a text framework.

I hope this one could go in NB22, though the API changes has to be yet documented.

@lkishalmi lkishalmi added the Gradle [ci] enable "build tools" tests label Apr 11, 2024
@lkishalmi lkishalmi added this to the NB22 milestone Apr 11, 2024
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it - please wait with merge till master is stable

thoughts I had while testing:

It wasn't obvious to me that gradle would download a cached JDK (temurin) if I select something which isn't known to NB. It makes sense but the project opening took a bit. A note on the wizard panel might help. The note could also mention that the user could alternatively use the java platform manager of NB.

Should .gradle files activate the groovy cluster for syntax coloring?

@mbien mbien self-requested a review April 12, 2024 03:05
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found a problem: the Browse... button doesn't do anything

@lkishalmi
Copy link
Contributor Author

found a problem: the Browse... button doesn't do anything

I've totally forgotten to implement that.

@lkishalmi
Copy link
Contributor Author

The syntax coloring became kind of "optional" many releases ago. If Groovy modules are enabled, then it is "on" otherwise not. Keeping the extide and groovy clusters loosely coupled.

@mbien
Copy link
Member

mbien commented Apr 13, 2024

The syntax coloring became kind of "optional" many releases ago. If Groovy modules are enabled, then it is "on" otherwise not. Keeping the extide and groovy clusters loosely coupled.

I don't understand. Why can't .gradle be an extension which enables the groovy features? Its just a groovy file, no?

@lkishalmi
Copy link
Contributor Author

The syntax coloring became kind of "optional" many releases ago. If Groovy modules are enabled, then it is "on" otherwise not. Keeping the extide and groovy clusters loosely coupled.

I don't understand. Why can't .gradle be an extension which enables the groovy features? Its just a groovy file, no?

Maybe someone knows what to add here:

project.xpath.nbproject/project.xml=project/configuration/buildExtensions/extension[@id='groovy']

@mbien
Copy link
Member

mbien commented Apr 13, 2024

not sure but if it does what I think it does then this might be worth a try

project.xpath.nbproject/project.xml=project/configuration/buildExtensions/extension[@id='jfx' or @id='jfx2' or @id='jfx3']

@lkishalmi lkishalmi merged commit e7545a9 into apache:master Apr 13, 2024
36 checks passed
@lkishalmi
Copy link
Contributor Author

not sure but if it does what I think it does then this might be worth a try

project.xpath.nbproject/project.xml=project/configuration/buildExtensions/extension[@id='jfx' or @id='jfx2' or @id='jfx3']

Checked. I think that one is matching Ant based build extensions like this:

<extension file="groovy-build.xml" id="groovy">

@mbien
Copy link
Member

mbien commented Apr 14, 2024

we might have to revert this:

java.lang.NullPointerException: The f parameter cannot be null
	at org.openide.util.Parameters.notNull(Parameters.java:64)
	at org.netbeans.api.templates.CreateFromTemplateImpl.prepare(CreateFromTemplateImpl.java:115)
	at org.netbeans.api.templates.CreateFromTemplateImpl.lambda$build$0(CreateFromTemplateImpl.java:86)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494)
	at org.netbeans.api.templates.CreateFromTemplateImpl.build(CreateFromTemplateImpl.java:84)
	at org.netbeans.api.templates.FileBuilder.build(FileBuilder.java:267)
	at org.netbeans.modules.java.lsp.server.explorer.ProjectViewTest.createSimpleProject(ProjectViewTest.java:331)
	at org.netbeans.modules.java.lsp.server.explorer.ProjectViewTest.createAndFindProjectNode(ProjectViewTest.java:367)
	at org.netbeans.modules.java.lsp.server.explorer.ProjectViewTest.testProjectExplorerExists(ProjectViewTest.java:465)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:79)
	at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:484)
	at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:405)
	at java.base/java.lang.Thread.run(Thread.java:840)

edit. -> #7267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gradle [ci] enable "build tools" tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants