jtulach commented on code in PR #9736:
URL: https://github.com/apache/netbeans/pull/9736#discussion_r4410914931


##########
ide/generic.project/src/org/netbeans/modules/generic/project/ui/wizard/GpWizardIterator.java:
##########
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.netbeans.modules.generic.project.ui.wizard;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import javax.swing.JComponent;
+import javax.swing.event.ChangeListener;
+import org.netbeans.api.templates.TemplateRegistration;
+import org.netbeans.modules.generic.project.GenericProject;
+import org.netbeans.spi.project.ui.support.ProjectChooser;
+import org.openide.WizardDescriptor;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.NbBundle.Messages;
+
+/**
+ * The "New Generic Project" wizard. Instantiating it creates the project
+ * directory with the {@link GenericProject#MARKER_FILE} — or, if "keep
+ * repository clean" is selected, as a local project in NB's user config.
+ */
+@TemplateRegistration(
+        folder = "Project/Generic", // NOI18N
+        displayName = "#GpWizard_displayName", // NOI18N
+        description = "GpTemplateDescription.html", // NOI18N
+        iconBase = GenericProject.ICON,
+        position = 1000
+)
+@Messages("GpWizard_displayName=New Generic Project")
+public final class GpWizardIterator implements 
WizardDescriptor.InstantiatingIterator<WizardDescriptor> {

Review Comment:
   > cannot work until the API/SPI layer is available
   
   - the 
[commit](https://github.com/apache/netbeans/commit/1eef00d24bcd37ed3a07e6b0e2267c39c6e0f466)
 certainly works! I have tested the behavior
   - the necessary file API is already there - enough to [create .nbpg 
file](https://github.com/apache/netbeans/commit/1eef00d24bcd37ed3a07e6b0e2267c39c6e0f466#r207017099)
   
   > nothing against it but this will be easier to add if there is an API
   
   - there is an API!
   - the fact that the module recognizes `.nbgp` files is the API.
   - please document it in `arch.xml` as `group="java.io.File` API
   
   > stack PRs, finish one at least before starting the next.
   
   - finishing a PR is a good idea
   - too bad I have a problem with the wizard integration...
   - ...I don't think it provides good UX and it shouldn't be integrated in my 
opinion...
   - that's why I am proposing a [better 
alternative](https://github.com/apache/netbeans/commit/1eef00d24bcd37ed3a07e6b0e2267c39c6e0f466)
 that already works better than the wizard



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to