You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Jaroslav Tulach (Jira)" <ji...@apache.org> on 2020/04/02 18:41:00 UTC
[jira] [Commented] (NETBEANS-4078) Can't create new Java project
without installing nb-javac while running JDK 11
[ https://issues.apache.org/jira/browse/NETBEANS-4078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073984#comment-17073984 ]
Jaroslav Tulach commented on NETBEANS-4078:
-------------------------------------------
Toni was adding these checkboxes. The fix is going to be somewhere along these lines, but I haven't had enough time to find it:
{code:java}
netbeans$ git diff
diff --git a/ergonomics/ide.ergonomics/java.properties b/ergonomics/ide.ergonomics/java.properties
index c7c7252c4096..d4041e4dd0ff 100644
--- a/ergonomics/ide.ergonomics/java.properties
+++ b/ergonomics/ide.ergonomics/java.properties
@@ -20,7 +20,7 @@ project.file.../java.base/share/classes/java/lang/Object.java=org.netbeans.modul
projectImporter=Eclipse
mainModule=org.netbeans.modules.java.kit
-extra.modules=org.netbeans.modules.nbjavac
+extra.modules=org.netbeans.modules.nbjavac.*
extra.modules.recommended.min.jdk=9
extra.modules.1=org\\.netbeans\\.libs\\.javafx\\.(linux|win|macosx)
extra.modules.1.recommended.max.jdk=11
diff --git a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java
index be78b576f36a..d10ff6e38a1b 100644
--- a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java
+++ b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java
@@ -27,6 +27,7 @@ import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
@@ -353,11 +354,25 @@ public class ConfigurationPanel extends JPanel implements Runnable {
}//GEN-LAST:event_activateButtonActionPerformed
private void downloadButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_downloadButtonActionPerformed
- OperationContainer<InstallSupport> op = OperationContainer.createForInstall();
- op.add(featureInstall);
- if (PluginManager.openInstallWizard(op)) {
- activateButtonActionPerformed(null);
+ Set<UpdateElement> install = new HashSet<>(featureInstall);
+ Iterator<UpdateElement> it = install.iterator();
+ KEEP: while (it.hasNext()) {
+ UpdateElement ue = it.next();
+ for (FeatureInfo.ExtraModuleInfo f : extrasFilter) {
+ if (f.matches(ue.getCodeName())) {
+ continue KEEP;
+ }
+ }
+ it.remove();
+ }
+ if (!install.isEmpty()) {
+ OperationContainer<InstallSupport> op = OperationContainer.createForInstall();
+ op.add(install);
+ if (!PluginManager.openInstallWizard(op)) {
+ return;
+ }
}
+ activateButtonActionPerformed(null);
}//GEN-LAST:event_downloadButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
diff --git a/java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java b/java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java
index f00d9c0f3ae2..948b70f9e28d 100644
--- a/java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java
+++ b/java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java
@@ -543,12 +543,11 @@ public final class ClassPathProviderImpl implements ClassPathProvider, ActiveJ2S
if(moduleInfoFile.exists()) {
ClassPath useModuleInfoCP = hasModuleInfoCP.get();
LOGGER.log(Level.FINER, "ModuleInfoSelector {0} for project {1}: has module-info.java", new Object [] {logDesc, proj.getProjectDirectory().getPath()}); // NOI18N
- if (useModuleInfoCP.findResource("java/lang/AssertionError.class") != null) { //NOI18N
- FileObject moduleInfo = FileUtil.toFileObject(moduleInfoFile);
- SourceLevelQuery.Result q = SourceLevelQuery.getSourceLevel2(moduleInfo);
- if (!q.getSourceLevel().startsWith("1.")) { //NOI18N
- break;
- }
+ FileObject moduleInfo = FileUtil.toFileObject(moduleInfoFile);
+ SourceLevelQuery.Result q = SourceLevelQuery.getSourceLevel2(moduleInfo);
+ if (!q.getSourceLevel().startsWith("1.")) { //NOI18N
+ ret = useModuleInfoCP;
+ break;
}
}
}
{code}
> Can't create new Java project without installing nb-javac while running JDK 11
> ------------------------------------------------------------------------------
>
> Key: NETBEANS-4078
> URL: https://issues.apache.org/jira/browse/NETBEANS-4078
> Project: NetBeans
> Issue Type: Bug
> Reporter: John McDonnell
> Assignee: Anton Epple
> Priority: Major
> Attachments: Screenshot 2020-03-29 at 07.38.33.png, Screenshot 2020-03-29 at 07.48.32.png
>
>
> *Steps to reproduce*
> 1. With JDK 11 (probably really JDK 8+), run Apache NetBeans 12 beta-2
> 2. Attempt to create a new Java/Maven project
> 3. On the Finding Feature page, do not select the option "The nb-javac Java editing support library"
> !Screenshot 2020-03-29 at 07.38.33.png|width=544,height=386!
> 4. Click Download and Activate
> !Screenshot 2020-03-29 at 07.48.32.png|width=571,height=513!
> Since I'm running JDK 11 I would expect that nb-javac isn't mandatory, and as its not checked it shouldn't be included in the list of plugins to install
>
> *Environment*
> *Product Version:* Apache NetBeans IDE 12.0-beta2
> *Java:* 11.0.5; OpenJDK 64-Bit Server VM 11.0.5+10-LTS
> *Runtime:* OpenJDK Runtime Environment 11.0.5+10-LTS
> *System:* Mac OS X version 10.15.3 running on x86_64; UTF-8; en_GB (nb)
> *User directory:* /Users/john/Library/Application Support/NetBeans/12.0-beta2
> *Cache directory:* /Users/john/Library/Caches/NetBeans/12.0-beta2
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists