This is an automated email from the ASF dual-hosted git repository.

dbalek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new c8807bbc1d Set "--add-modules ALL-MODULE-PATH" when compiling MX 
project. (#4597)
c8807bbc1d is described below

commit c8807bbc1d26f644a0d59f08fdabaca78ebab70d
Author: Dusan Balek <[email protected]>
AuthorDate: Mon Sep 12 14:20:20 2022 +0200

    Set "--add-modules ALL-MODULE-PATH" when compiling MX project. (#4597)
---
 .../modules/java/mx/project/SuiteProject.java      | 27 +++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git 
a/java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteProject.java
 
b/java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteProject.java
index ee2e8f9980..0de2b68736 100644
--- 
a/java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteProject.java
+++ 
b/java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteProject.java
@@ -19,9 +19,13 @@
 package org.netbeans.modules.java.mx.project;
 
 import java.io.File;
+import java.util.Arrays;
+import java.util.List;
 import java.util.concurrent.Future;
+import javax.swing.event.ChangeListener;
 import org.netbeans.modules.java.mx.project.suitepy.MxSuite;
 import org.netbeans.api.project.Project;
+import org.netbeans.spi.java.queries.CompilerOptionsQueryImplementation;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileUtil;
 import org.openide.util.Exceptions;
@@ -46,7 +50,8 @@ final class SuiteProject implements Project {
                 new SuiteLogicalView(this),
                 new SuiteClassPathProvider(this, jdks),
                 new SuiteProperties(),
-                new SuiteActionProvider(this)
+                new SuiteActionProvider(this),
+                new SuiteCompilerOptionsQueryImpl()
             );
         } catch (RuntimeException ex) {
             throw Exceptions.attachMessage(ex, "Error parsing " + suitePy);
@@ -104,4 +109,24 @@ final class SuiteProject implements Project {
         return null;
     }
 
+    private class SuiteCompilerOptionsQueryImpl implements 
CompilerOptionsQueryImplementation {
+
+        private CompilerOptionsQueryImplementation.Result RESULT = new 
Result() {
+            @Override
+            public List<? extends String> getArguments() {
+                return Arrays.asList("--add-modules", "ALL-MODULE-PATH");
+            }
+
+            @Override
+            public void addChangeListener(ChangeListener listener) {}
+
+            @Override
+            public void removeChangeListener(ChangeListener listener) {}
+        };
+
+        @Override
+        public CompilerOptionsQueryImplementation.Result getOptions(FileObject 
file) {
+            return RESULT;
+        }
+    }
 }


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