You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/08/25 20:56:33 UTC

[GitHub] [netbeans] errael opened a new pull request #2331: [NETBEANS-4718] Disallow FXML controller in default package when modu…

errael opened a new pull request #2331:
URL: https://github.com/apache/netbeans/pull/2331


   …lar java
   
   I encouraged someone to file this bug, then they went and assigned it to me, sigh. Anyway, I suspect there are widespread problems with the `JavaFX 2 support` netbeans module related to modular java, but this is a fix for the reported problem (and I'll be filing some other bugs). In the wizard, a validation message is shown, next is disabled when there's module-info and the default package is selected for the controller.
   
   I couldn't find any general module-info handling libraries. It looks like separate projects do their own thing.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] sdedic commented on a change in pull request #2331: [NETBEANS-4718] Disallow FXML controller in default package when modu…

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2331:
URL: https://github.com/apache/netbeans/pull/2331#discussion_r488215514



##########
File path: javafx/javafx2.project/src/org/netbeans/modules/javafx2/project/JFXProjectUtils.java
##########
@@ -1776,5 +1779,17 @@ public Void run() throws Exception {
             }
         }
     }
+
+    private static final String MODULE_INFO = "module-info.java"; // NOI18N
+
+    // as in org.netbeans.modules.maven.api.ModuleInfoUtils.hasModuleInfoInSource;
+    public static boolean hasModuleInfo(SourceGroupSupport support) {
+        for (File sourceRoot : support.getSourceGroupsAsFiles()) {
+            if (new File(sourceRoot, MODULE_INFO).exists()) {

Review comment:
       I would prefer working with `FileObjects`, rather than converting to `File`s, although it does not make probably big difference here. Consider 
   ```
   for (FileObject sourceRoot : support.getSourceGroups()) {
     if (sourceRoot.getFileObject(MODULE_INFO) != null) {
        ...
     }
   }
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] matthiasblaesing commented on pull request #2331: [NETBEANS-4718] Disallow FXML controller in default package when modu…

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #2331:
URL: https://github.com/apache/netbeans/pull/2331#issuecomment-694136935


   This is reviewed, unittests come back green, lets get this in. Thank you for your work.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] errael commented on a change in pull request #2331: [NETBEANS-4718] Disallow FXML controller in default package when modu…

Posted by GitBox <gi...@apache.org>.
errael commented on a change in pull request #2331:
URL: https://github.com/apache/netbeans/pull/2331#discussion_r488246925



##########
File path: javafx/javafx2.project/src/org/netbeans/modules/javafx2/project/JFXProjectUtils.java
##########
@@ -1776,5 +1779,17 @@ public Void run() throws Exception {
             }
         }
     }
+
+    private static final String MODULE_INFO = "module-info.java"; // NOI18N
+
+    // as in org.netbeans.modules.maven.api.ModuleInfoUtils.hasModuleInfoInSource;
+    public static boolean hasModuleInfo(SourceGroupSupport support) {
+        for (File sourceRoot : support.getSourceGroupsAsFiles()) {
+            if (new File(sourceRoot, MODULE_INFO).exists()) {

Review comment:
       Excellent. Thanks. Had to go through SourceGroupProxy, but...
   
   @sdedic could you re-review with suggested changes?
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] matthiasblaesing merged pull request #2331: [NETBEANS-4718] Disallow FXML controller in default package when modu…

Posted by GitBox <gi...@apache.org>.
matthiasblaesing merged pull request #2331:
URL: https://github.com/apache/netbeans/pull/2331


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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