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 2022/06/07 21:23:06 UTC

[GitHub] [netbeans] mbien opened a new pull request, #4205: JDK downloader improvements

mbien opened a new pull request, #4205:
URL: https://github.com/apache/netbeans/pull/4205

   originally I only wanted to add a column so that users can distinguish musl builds from libc builds, but I noticed a few other issues I could fix.
   
    - layout did not resize properly which also caused the scrollbars in the advanced tab to not work
    - there were several issues with components not being centered or not having gaps between each other
    - added the LibC column too and a filter for CPU arch
    - misc changes like giving components proper names
   
   more details in the individual commits
   
   looks similar, just with a bit more functionality and a working layout (try to resize the version shipping with NB 14). "Quick" tab and loading panel got some minor updates too:
   ![JDK_downloader](https://user-images.githubusercontent.com/114367/172482645-35e61ce5-a953-4310-8558-0c77492b4049.png)
   
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902900602


##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -68,28 +68,31 @@ private synchronized DiscoClient getDisco() {
     private Client() {
     }
 
-    public synchronized final List<MajorVersion> getAllMajorVersions() {
+    /**
+     * Returns all major versions which are still maintained (excludes EA releases).
+     */
+    public synchronized final List<MajorVersion> getAllMaintainedMajorVersions() {
         if (majorVersions == null) {
-            majorVersions = Collections.unmodifiableList(
-                    getDisco().getAllMajorVersions(false).stream()
-                            .filter(majorVersion -> majorVersion.isMaintained())
-                            .filter(majorVersion -> majorVersion.isEarlyAccessOnly() != Boolean.TRUE)
-                            .collect(Collectors.toList()));
+            majorVersions = getDisco().getAllMajorVersions(
+                    Optional.of(true),   // maintained
+                    Optional.of(false),  // EA
+                    Optional.of(true),   // GA
+                    Optional.of(false)); // build
         }
         return majorVersions;
     }
 
-    public synchronized MajorVersion getLatestLts(boolean b) {
-        return getDisco().getLatestLts(b);
+    public synchronized MajorVersion getLatestLts(boolean includeEA) {
+        return getDisco().getLatestLts(includeEA);
     }
 
-    public synchronized MajorVersion getLatestSts(boolean b) {
-        return getDisco().getLatestSts(b);
+    public synchronized MajorVersion getLatestSts(boolean includeEA) {
+        return getDisco().getLatestSts(includeEA);
     }
 
     public synchronized List<Pkg> getPkgs(final Distribution distribution, final VersionNumber versionNumber, final Latest latest, final OperatingSystem operatingSystem,
             final Architecture architecture, final ArchiveType archiveType, final PackageType packageType,
-            final Boolean javafxBundled) {
+            final boolean ea, final boolean javafxBundled) {

Review Comment:
   but looking at it again, I believe i simply thought it would be weird (and potentially error prone) to use boolean for ea and Boolean for JavaFX. Thats why I changed both. We also do actually set FX always to false and the API is also not public so we know all call sites - it can be easily changed in the next round.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r892480979


##########
java/java.disco/src/org/netbeans/modules/java/disco/BundleTableModel.java:
##########
@@ -41,57 +69,37 @@ public BundleTableModel(final List<Pkg> bundles) {
     }
 
 
-    public List<Pkg> getBundles() { return bundles; }
+    public List<Pkg> getBundles() {
+        return bundles;
+    }
+
     public void setBundles(final List<Pkg> bundles) {
         this.bundles = bundles;
         this.fireTableDataChanged();
     }
 
-    public @NonNull String getColumnName(final int col) {
-        switch(col) {
-            case 0 :
-            case 1 :
-            case 2 :
-            case 3 :
-            case 4 :
-            case 5 : return columnNames[col];
-            default: throw new IllegalArgumentException("Column not found " + col);
-        }
+    @Override
+    public int getRowCount() {

Review Comment:
   should I move it back?



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r892314391


##########
java/java.disco/src/org/netbeans/modules/java/disco/ArchitectureListCellRenderer.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.java.disco;
+
+import eu.hansolo.jdktools.Architecture;

Review Comment:
   @emilianbold The API was split out in DiscoClient v2 (as used from NetBeans 14). DiscoClient is still under `org.foojay` but has a dependency on https://github.com/HanSolo/jdktools



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1151391485

   > > looks like I broke the JDK 8 build.
   > 
   > You are most probably seeing this: #4211 I noticed, that rerunning test often did not change anything. But I saw this randomly fail on all java versions.
   
   I just noticed, thanks for confirming, thats why I kept restarting it till it is green (4th run worked). I just replied on the ML before seeing your comment here @matthiasblaesing 


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r904002882


##########
java/java.disco/src/org/netbeans/modules/java/disco/QuickPkgSelection.java:
##########
@@ -57,6 +59,9 @@ public QuickPkgSelection(QuickPanel.QuickSelection quick) {
                     switch (OS.getOperatingSystem()) {
                         case WINDOWS:
                             return ArchiveType.MSI == p.getArchiveType() || ArchiveType.EXE == p.getArchiveType();
+                        case LINUX:

Review Comment:
   this would simplify things for sure. looking through the classes I noticed there were attempts to use the shell and an external process to extract the files. I thought maybe its ultimately planned to install things the same way.
   But i am a linux user - and never install JDKs (or NetBeans) personally so i don't really care about this feature ;)



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902691182


##########
java/java.disco/src/org/netbeans/modules/java/disco/QuickPkgSelection.java:
##########
@@ -57,6 +59,9 @@ public QuickPkgSelection(QuickPanel.QuickSelection quick) {
                     switch (OS.getOperatingSystem()) {
                         case WINDOWS:
                             return ArchiveType.MSI == p.getArchiveType() || ArchiveType.EXE == p.getArchiveType();
+                        case LINUX:

Review Comment:
   Finally getting a chance to look through these changes. This doesn't look right?  Should be returning things like DEB and RPM? However, how do we return the right one of those anyway?  I do wonder if "installers" should be left for the advanced panel and we remove that option entirely here?



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] emilianbold commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
emilianbold commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r892297945


##########
java/java.disco/src/org/netbeans/modules/java/disco/BundleTableModel.java:
##########
@@ -41,57 +69,37 @@ public BundleTableModel(final List<Pkg> bundles) {
     }
 
 
-    public List<Pkg> getBundles() { return bundles; }
+    public List<Pkg> getBundles() {
+        return bundles;
+    }
+
     public void setBundles(final List<Pkg> bundles) {
         this.bundles = bundles;
         this.fireTableDataChanged();
     }
 
-    public @NonNull String getColumnName(final int col) {
-        switch(col) {
-            case 0 :
-            case 1 :
-            case 2 :
-            case 3 :
-            case 4 :
-            case 5 : return columnNames[col];
-            default: throw new IllegalArgumentException("Column not found " + col);
-        }
+    @Override
+    public int getRowCount() {

Review Comment:
   Minor remark: I wish the order of methods would have been kept the same. Diff would have been easier.



##########
java/java.disco/src/org/netbeans/modules/java/disco/ArchitectureListCellRenderer.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.java.disco;
+
+import eu.hansolo.jdktools.Architecture;

Review Comment:
   I thought this used `org.foojay`? But perhaps newer JARs switched to `eu.hansolo`...



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902877507


##########
java/java.disco/src/org/netbeans/modules/java/disco/QuickPkgSelection.java:
##########
@@ -57,6 +59,9 @@ public QuickPkgSelection(QuickPanel.QuickSelection quick) {
                     switch (OS.getOperatingSystem()) {
                         case WINDOWS:
                             return ArchiveType.MSI == p.getArchiveType() || ArchiveType.EXE == p.getArchiveType();
+                        case LINUX:

Review Comment:
   you mean the linux branch of the switch? yes, it will download an archive via quick panel no matter what the selected radio button option was. For linux installers the user would have to use the advanced panel. There are simply too many linux installer formats to be able to automatically pick one and then also correctly fire up the UI for that. Extracting always works.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1149739890

   Generally looks good.  Can take a better look next week (busy with installers atm) but merge before then if you want to.
   
   I was considering looking at a bigger revamp of this UI in NB15.  Updating to Disco v2 threw up some quirks and missing info.  Possibly also worth comparing with other IDE plugins (eg. https://marketplace.eclipse.org/content/discoeclipse ) and I would say online use at https://foojay.io/download/ (except doesn't work at all for me in Firefox!)
   
   A key question might be whether we should only support listing and downloading JDKs that can be registered in the running IDE?  Or at least shouldn't register ones that cannot run.
   
   Maybe keep advanced as is, but we add a few options on to quick selection (eg. vendor), and possibly move to selection box over slider?  The slider ran out of space hence change of min version in NB14! :smile:


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1151314930

   looks like I broke the JDK 8 build.


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien merged pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien merged PR #4205:
URL: https://github.com/apache/netbeans/pull/4205


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r908491100


##########
java/java.disco/src/org/netbeans/modules/java/disco/QuickPkgSelection.java:
##########
@@ -57,6 +59,9 @@ public QuickPkgSelection(QuickPanel.QuickSelection quick) {
                     switch (OS.getOperatingSystem()) {
                         case WINDOWS:
                             return ArchiveType.MSI == p.getArchiveType() || ArchiveType.EXE == p.getArchiveType();
+                        case LINUX:

Review Comment:
   Back looking at this.  Yes, the shell extraction appears mainly to be about execution permissions, judging from [this comment](https://github.com/apache/netbeans/blob/master/java/java.disco/src/org/netbeans/modules/java/disco/archive/JDKCommonsUnzip.java#L32). That can't work as it misses out `jspawnhelper` at least. I'm working on porting the extraction and detection solution from NBPackage that does use commons compress.
   
   Also a Linux user, and don't see the utility for installing the JDK here.  OTOH, I do like my NetBeans as a DEB! :wink: 



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902897537


##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -68,28 +68,31 @@ private synchronized DiscoClient getDisco() {
     private Client() {
     }
 
-    public synchronized final List<MajorVersion> getAllMajorVersions() {
+    /**
+     * Returns all major versions which are still maintained (excludes EA releases).
+     */
+    public synchronized final List<MajorVersion> getAllMaintainedMajorVersions() {
         if (majorVersions == null) {
-            majorVersions = Collections.unmodifiableList(
-                    getDisco().getAllMajorVersions(false).stream()
-                            .filter(majorVersion -> majorVersion.isMaintained())
-                            .filter(majorVersion -> majorVersion.isEarlyAccessOnly() != Boolean.TRUE)
-                            .collect(Collectors.toList()));
+            majorVersions = getDisco().getAllMajorVersions(
+                    Optional.of(true),   // maintained
+                    Optional.of(false),  // EA
+                    Optional.of(true),   // GA
+                    Optional.of(false)); // build
         }
         return majorVersions;
     }
 
-    public synchronized MajorVersion getLatestLts(boolean b) {
-        return getDisco().getLatestLts(b);
+    public synchronized MajorVersion getLatestLts(boolean includeEA) {
+        return getDisco().getLatestLts(includeEA);
     }
 
-    public synchronized MajorVersion getLatestSts(boolean b) {
-        return getDisco().getLatestSts(b);
+    public synchronized MajorVersion getLatestSts(boolean includeEA) {
+        return getDisco().getLatestSts(includeEA);
     }
 
     public synchronized List<Pkg> getPkgs(final Distribution distribution, final VersionNumber versionNumber, final Latest latest, final OperatingSystem operatingSystem,
             final Architecture architecture, final ArchiveType archiveType, final PackageType packageType,
-            final Boolean javafxBundled) {
+            final boolean ea, final boolean javafxBundled) {

Review Comment:
   we do always set it, makes the results more reliable - but I can't remember what the issue was.
   `ea ? asList(ReleaseStatus.GA, ReleaseStatus.EA) : asList(ReleaseStatus.GA)`



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r903623416


##########
java/java.disco/src/org/netbeans/modules/java/disco/QuickPkgSelection.java:
##########
@@ -57,6 +59,9 @@ public QuickPkgSelection(QuickPanel.QuickSelection quick) {
                     switch (OS.getOperatingSystem()) {
                         case WINDOWS:
                             return ArchiveType.MSI == p.getArchiveType() || ArchiveType.EXE == p.getArchiveType();
+                        case LINUX:

Review Comment:
   Well, I had started on sketching a UI rewrite (which I'll now shelve most of) but I had planned to remove this option from the quick panel, and still think we should do so. Considering the point of this wizard is to register a platform, the download installer option doesn't actually allow for that. I think we should keep the quick panel to download and register only.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1162068531

   > > I swear the quick select panel didn't have 19 on it yesterday. For some reason the API returns it as maintained now :(
   > 
   > I've noticed similar in the past (and reported upstream) - likely something incorrectly parsed again. Defensive checks sound good!
   > 
   > Changes look good - sorry only just getting around to properly trying out. I guess I'm not putting in a PR to remove the slider or table now then! smile
   
   I actually chatted with han solo himself via foojay slack and we found some bugs in the current data. For example some STS releases were reported as MTS (19 EA for example, you see it in the screenshot, han said it should be fixed now). There might be also a new method soon `disco.getAllMajorVersions` taking a distribution as input parameter - which would make it significantly more useful than now since the result currently only applies to zulu.
   
   Thats also when i started to add defensive checks. For example to figure out what is EA, the code does not query if the package is EA, it simply checks if version > latest version. It also only uses LTS now, everything else is assumed to be STS without even asking. The advanced panel will still show the actual value, but this is not used for quick select - it only shows LTS and latest.


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902907965


##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -68,28 +68,31 @@ private synchronized DiscoClient getDisco() {
     private Client() {
     }
 
-    public synchronized final List<MajorVersion> getAllMajorVersions() {
+    /**
+     * Returns all major versions which are still maintained (excludes EA releases).
+     */
+    public synchronized final List<MajorVersion> getAllMaintainedMajorVersions() {
         if (majorVersions == null) {
-            majorVersions = Collections.unmodifiableList(
-                    getDisco().getAllMajorVersions(false).stream()
-                            .filter(majorVersion -> majorVersion.isMaintained())
-                            .filter(majorVersion -> majorVersion.isEarlyAccessOnly() != Boolean.TRUE)
-                            .collect(Collectors.toList()));
+            majorVersions = getDisco().getAllMajorVersions(
+                    Optional.of(true),   // maintained
+                    Optional.of(false),  // EA
+                    Optional.of(true),   // GA
+                    Optional.of(false)); // build
         }
         return majorVersions;
     }
 
-    public synchronized MajorVersion getLatestLts(boolean b) {
-        return getDisco().getLatestLts(b);
+    public synchronized MajorVersion getLatestLts(boolean includeEA) {
+        return getDisco().getLatestLts(includeEA);
     }
 
-    public synchronized MajorVersion getLatestSts(boolean b) {
-        return getDisco().getLatestSts(b);
+    public synchronized MajorVersion getLatestSts(boolean includeEA) {
+        return getDisco().getLatestSts(includeEA);
     }
 
     public synchronized List<Pkg> getPkgs(final Distribution distribution, final VersionNumber versionNumber, final Latest latest, final OperatingSystem operatingSystem,
             final Architecture architecture, final ArchiveType archiveType, final PackageType packageType,
-            final Boolean javafxBundled) {
+            final boolean ea, final boolean javafxBundled) {

Review Comment:
   ah I think I remember. Some distributions return builds even past GA is out. Thats why we have to set GA always, never leave that filter empty.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r909825904


##########
java/java.disco/src/org/netbeans/modules/java/disco/QuickPkgSelection.java:
##########
@@ -57,6 +59,9 @@ public QuickPkgSelection(QuickPanel.QuickSelection quick) {
                     switch (OS.getOperatingSystem()) {
                         case WINDOWS:
                             return ArchiveType.MSI == p.getArchiveType() || ArchiveType.EXE == p.getArchiveType();
+                        case LINUX:

Review Comment:
   @mbien thanks. Mainly just keeping you in the loop of what I'm currently working on.  No idea if there were more plan for the shell stuff either - I'd assumed it was a workaround though.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r908923683


##########
java/java.disco/src/org/netbeans/modules/java/disco/QuickPkgSelection.java:
##########
@@ -57,6 +59,9 @@ public QuickPkgSelection(QuickPanel.QuickSelection quick) {
                     switch (OS.getOperatingSystem()) {
                         case WINDOWS:
                             return ArchiveType.MSI == p.getArchiveType() || ArchiveType.EXE == p.getArchiveType();
+                        case LINUX:

Review Comment:
   @neilcsmith-net feel free to do a second pass to correct things or write me a mail to me with a list you want changed. This PR started out as me wanting to simply add another column to a table - but ended up changing a lot of other things and re-doing most of the layouts in the form designer.
   
   I am all for removing code btw, if the shell extraction code isn't needed anymore - lets remove it (I thought there were more plans for it).



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r892314391


##########
java/java.disco/src/org/netbeans/modules/java/disco/ArchitectureListCellRenderer.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.java.disco;
+
+import eu.hansolo.jdktools.Architecture;

Review Comment:
   @emilianbold The API was split out in DiscoClient v2 with NetBeans 14. DiscoClient is still under `org.foojay` but has a dependency on https://github.com/HanSolo/jdktools



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r893645710


##########
java/java.disco/src/org/netbeans/modules/java/disco/AdvancedPanel.java:
##########
@@ -88,7 +88,9 @@ protected void updateDistributions(List<Distribution> distros) {
     protected void setVersions(List<Integer> versions, Map<Integer, TermOfSupport> lts) {
         List<Integer> reversedVersions = new ArrayList<>(versions);
         reversedVersions.sort(Collections.reverseOrder());
-        ((VersionListCellRenderer) versionComboBox.getRenderer()).setLTS(lts);
+        VersionListCellRenderer renderer = (VersionListCellRenderer) versionComboBox.getRenderer();
+        renderer.setLTS(lts);
+        renderer.setEA(reversedVersions.get(0));

Review Comment:
   yep. the fist item should be always EA. Before the change it showed "19" in the combo box but the table was always empty, Post change it will show "19 (EA)" and the table should contain items since the filter (Client.java) got updated in https://github.com/apache/netbeans/pull/4205/commits/3fed2681ee8f38dd5fe8e7322f97e21ae68d294e too.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1152486213

   I swear the quick select panel didn't have 19 on it yesterday. For some reason the API returns it as maintained now :(
   
   I am going to make a small change which will limit the quick select to LTS + current only. For special wishes the user would have to sue the advanced panel. Going to add some defensive checks so that the panel does not display anything > current - no matter what the API returns.


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1151799729

   - squashed some commits (wanted to squash more but i would have to reorder them first which would involve merge conflicts in form files which I don't want to deal with)
   - removed guava dependency since it could be replaced with equivalent java 11 code
   - bumped jdktools and discoclient to the latest update release
   - made sure that everything still works
   
   I promise I won't change anything anymore :)
   
   > The slider ran out of space hence change of min version in NB14! smile
   
   @neilcsmith-net I thought about the slider and I actually quite like it. It might not run out of space again since EOL versions should disappear automatically since it lists only maintained versions. I am not sure why JDK 16 is still there. Maybe the disco db isn't up2date, or maybe some vendor has a longer "STS" period. The "MTS" versions should disappear soon too I suppose.
   
   If they don't disappear fast enough we could switch to LTS + "current" only some time in future.


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] emilianbold commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
emilianbold commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r892492825


##########
java/java.disco/src/org/netbeans/modules/java/disco/BundleTableModel.java:
##########
@@ -41,57 +69,37 @@ public BundleTableModel(final List<Pkg> bundles) {
     }
 
 
-    public List<Pkg> getBundles() { return bundles; }
+    public List<Pkg> getBundles() {
+        return bundles;
+    }
+
     public void setBundles(final List<Pkg> bundles) {
         this.bundles = bundles;
         this.fireTableDataChanged();
     }
 
-    public @NonNull String getColumnName(final int col) {
-        switch(col) {
-            case 0 :
-            case 1 :
-            case 2 :
-            case 3 :
-            case 4 :
-            case 5 : return columnNames[col];
-            default: throw new IllegalArgumentException("Column not found " + col);
-        }
+    @Override
+    public int getRowCount() {

Review Comment:
   Oh, no, don't worry about that. I figured out what you did there, I just had to diff "mentally" instead of letting the tools do it :-)



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1161845294

   > I swear the quick select panel didn't have 19 on it yesterday. For some reason the API returns it as maintained now :(
   
   I've noticed similar in the past (and reported upstream) - likely something incorrectly parsed again.  Defensive checks sound good!
   
   Changes look good - sorry only just getting around to properly trying out.  I guess I'm not putting in a PR to remove the slider or table now then! :smile:


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r908491100


##########
java/java.disco/src/org/netbeans/modules/java/disco/QuickPkgSelection.java:
##########
@@ -57,6 +59,9 @@ public QuickPkgSelection(QuickPanel.QuickSelection quick) {
                     switch (OS.getOperatingSystem()) {
                         case WINDOWS:
                             return ArchiveType.MSI == p.getArchiveType() || ArchiveType.EXE == p.getArchiveType();
+                        case LINUX:

Review Comment:
   Back looking at this.  Yes, the shell extraction appears mainly to be about execution permissions, judging from [this comment](https://github.com/apache/netbeans/blob/master/java/java.disco/src/org/netbeans/modules/java/disco/archive/JDKCommonsUnzip.java#L32). That can't work as it misses out `jspawnhelper` at least. I'm working on porting the extraction and detection solution from NBPackage.
   
   Also a Linux user, and don't see the utility for installing the JDK here.  OTOH, I do like my NetBeans as a DEB! :wink: 



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1150045830

   (neil)
   > A key question might be whether we should only support listing and downloading JDKs that can be registered in the running IDE? Or at least shouldn't register ones that cannot run.
   
   (emilian)
   > The default architecture pick was an interesting topic since the Apple M1s came around that time and people on M1 actually didn't have good M1 JDKs so they had to use X64 JDKs and run them through Rosetta. That's a minor concern nowadays.
   
   I thought about that too and came to same conclusion. Because in theory selecting cpu arch in a filter could be done by the IDE (default choice is already picked by the IDE). But i added the filter anyway for three reasons:
   
    - there might not always be a 1:1 mapping between JDK build and user hardware (see old 32bit builds etc)
    - its difficult to figure out what the system can actually run. For example my workstation here (64 bit linux kernel) can also run aarch64 (and more) since i have qemu configured that way. I can run aarch64 containers before deploying them to raspis or server grade arm systems. Mac + rossetta would be another example.
    - even without installing anything, the tool might be useful as simple JDK browser. ("which JDKs still run on X"). In fact, I almost wanted to add an OS combo box too (pre selected).
   
   > 
   > Maybe keep advanced as is, but we add a few options on to quick selection (eg. vendor), and possibly move to selection box over slider? The slider ran out of space hence change of min version in NB14! smile
   
   thats a good idea. I might give that a try and add it.
   
   thanks for the review @emilianbold  & @neilcsmith-net 


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] emilianbold commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
emilianbold commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r893350627


##########
java/java.disco/src/org/netbeans/modules/java/disco/AdvancedPanel.java:
##########
@@ -88,7 +88,9 @@ protected void updateDistributions(List<Distribution> distros) {
     protected void setVersions(List<Integer> versions, Map<Integer, TermOfSupport> lts) {
         List<Integer> reversedVersions = new ArrayList<>(versions);
         reversedVersions.sort(Collections.reverseOrder());
-        ((VersionListCellRenderer) versionComboBox.getRenderer()).setLTS(lts);
+        VersionListCellRenderer renderer = (VersionListCellRenderer) versionComboBox.getRenderer();
+        renderer.setLTS(lts);
+        renderer.setEA(reversedVersions.get(0));

Review Comment:
   Interesting. So the latest Java version also shows EAs?



-- 
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: notifications-unsubscribe@netbeans.apache.org

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 #4205: JDK downloader improvements

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

   > looks like I broke the JDK 8 build.
   
   You are most probably seeing this: https://github.com/apache/netbeans/issues/4211
   I noticed, that rerunning test did not change anything. But I saw this randomly fail on all java versions. 


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r893645710


##########
java/java.disco/src/org/netbeans/modules/java/disco/AdvancedPanel.java:
##########
@@ -88,7 +88,9 @@ protected void updateDistributions(List<Distribution> distros) {
     protected void setVersions(List<Integer> versions, Map<Integer, TermOfSupport> lts) {
         List<Integer> reversedVersions = new ArrayList<>(versions);
         reversedVersions.sort(Collections.reverseOrder());
-        ((VersionListCellRenderer) versionComboBox.getRenderer()).setLTS(lts);
+        VersionListCellRenderer renderer = (VersionListCellRenderer) versionComboBox.getRenderer();
+        renderer.setLTS(lts);
+        renderer.setEA(reversedVersions.get(0));

Review Comment:
   yep. the fist item should be always EA. Before the change it showed "19" in the combo box but the table was always empty, Post change it will show "19 (EA)" and the table should contain items since the filter (Client.java) got updated in https://github.com/apache/netbeans/pull/4205/commits/3fed2681ee8f38dd5fe8e7322f97e21ae68d294e too.
   
   `ReleaseStatus.NONE` does not return EA builds for some reason, it appears to be mapped to GA by default.
   
   A similar issue happened with the "latest" check box. The NONE filter did not work as expected (it still filters), so I changed it in https://github.com/apache/netbeans/pull/4205/commits/b9bdd54a0016a4407303b1732cd4934c68ad68fd



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r892480489


##########
java/java.disco/src/org/netbeans/modules/java/disco/BundleTableModel.java:
##########
@@ -41,57 +69,37 @@ public BundleTableModel(final List<Pkg> bundles) {
     }
 
 
-    public List<Pkg> getBundles() { return bundles; }
+    public List<Pkg> getBundles() {
+        return bundles;
+    }
+
     public void setBundles(final List<Pkg> bundles) {
         this.bundles = bundles;
         this.fireTableDataChanged();
     }
 
-    public @NonNull String getColumnName(final int col) {
-        switch(col) {
-            case 0 :
-            case 1 :
-            case 2 :
-            case 3 :
-            case 4 :
-            case 5 : return columnNames[col];
-            default: throw new IllegalArgumentException("Column not found " + col);
-        }
+    @Override
+    public int getRowCount() {

Review Comment:
   yeah sorry about that. If you look at the final result you might see why I did that. I often put similar methods next to each other so that the eye can read the file faster (since we humans are really good at matching patterns). I think I moved only one method so that all three which operate on arrays are in one spot - but It was unnecessary I agree.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902900602


##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -68,28 +68,31 @@ private synchronized DiscoClient getDisco() {
     private Client() {
     }
 
-    public synchronized final List<MajorVersion> getAllMajorVersions() {
+    /**
+     * Returns all major versions which are still maintained (excludes EA releases).
+     */
+    public synchronized final List<MajorVersion> getAllMaintainedMajorVersions() {
         if (majorVersions == null) {
-            majorVersions = Collections.unmodifiableList(
-                    getDisco().getAllMajorVersions(false).stream()
-                            .filter(majorVersion -> majorVersion.isMaintained())
-                            .filter(majorVersion -> majorVersion.isEarlyAccessOnly() != Boolean.TRUE)
-                            .collect(Collectors.toList()));
+            majorVersions = getDisco().getAllMajorVersions(
+                    Optional.of(true),   // maintained
+                    Optional.of(false),  // EA
+                    Optional.of(true),   // GA
+                    Optional.of(false)); // build
         }
         return majorVersions;
     }
 
-    public synchronized MajorVersion getLatestLts(boolean b) {
-        return getDisco().getLatestLts(b);
+    public synchronized MajorVersion getLatestLts(boolean includeEA) {
+        return getDisco().getLatestLts(includeEA);
     }
 
-    public synchronized MajorVersion getLatestSts(boolean b) {
-        return getDisco().getLatestSts(b);
+    public synchronized MajorVersion getLatestSts(boolean includeEA) {
+        return getDisco().getLatestSts(includeEA);
     }
 
     public synchronized List<Pkg> getPkgs(final Distribution distribution, final VersionNumber versionNumber, final Latest latest, final OperatingSystem operatingSystem,
             final Architecture architecture, final ArchiveType archiveType, final PackageType packageType,
-            final Boolean javafxBundled) {
+            final boolean ea, final boolean javafxBundled) {

Review Comment:
   but looking at it again, I believe i simply thought it would be weird to use boolean for ea and Boolean for JavaFX. Thats why I changed both. We also do actually set FX always to false and the API is also not public - it can be easily changed in the next round.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902697120


##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -68,28 +68,31 @@ private synchronized DiscoClient getDisco() {
     private Client() {
     }
 
-    public synchronized final List<MajorVersion> getAllMajorVersions() {
+    /**
+     * Returns all major versions which are still maintained (excludes EA releases).
+     */
+    public synchronized final List<MajorVersion> getAllMaintainedMajorVersions() {
         if (majorVersions == null) {
-            majorVersions = Collections.unmodifiableList(
-                    getDisco().getAllMajorVersions(false).stream()
-                            .filter(majorVersion -> majorVersion.isMaintained())
-                            .filter(majorVersion -> majorVersion.isEarlyAccessOnly() != Boolean.TRUE)
-                            .collect(Collectors.toList()));
+            majorVersions = getDisco().getAllMajorVersions(
+                    Optional.of(true),   // maintained
+                    Optional.of(false),  // EA
+                    Optional.of(true),   // GA
+                    Optional.of(false)); // build
         }
         return majorVersions;
     }
 
-    public synchronized MajorVersion getLatestLts(boolean b) {
-        return getDisco().getLatestLts(b);
+    public synchronized MajorVersion getLatestLts(boolean includeEA) {
+        return getDisco().getLatestLts(includeEA);
     }
 
-    public synchronized MajorVersion getLatestSts(boolean b) {
-        return getDisco().getLatestSts(b);
+    public synchronized MajorVersion getLatestSts(boolean includeEA) {
+        return getDisco().getLatestSts(includeEA);
     }
 
     public synchronized List<Pkg> getPkgs(final Distribution distribution, final VersionNumber versionNumber, final Latest latest, final OperatingSystem operatingSystem,
             final Architecture architecture, final ArchiveType archiveType, final PackageType packageType,
-            final Boolean javafxBundled) {
+            final boolean ea, final boolean javafxBundled) {

Review Comment:
   Disco does actually use `Boolean` with `null` for unspecified here! :grimacing: 



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1150630629

   - added the distribution filter on the quick select panel
   - fixed latest checkbox on adv panel (it shows now everything if unchecked, as expected)
   - EA builds are now displayed if selected (adv panel)
   - filter out musl on for quick select
   - cleared up what the radio buttons do, I actually didn't expect them to influence the package type
   
   added second screenshot to PR text


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r893645710


##########
java/java.disco/src/org/netbeans/modules/java/disco/AdvancedPanel.java:
##########
@@ -88,7 +88,9 @@ protected void updateDistributions(List<Distribution> distros) {
     protected void setVersions(List<Integer> versions, Map<Integer, TermOfSupport> lts) {
         List<Integer> reversedVersions = new ArrayList<>(versions);
         reversedVersions.sort(Collections.reverseOrder());
-        ((VersionListCellRenderer) versionComboBox.getRenderer()).setLTS(lts);
+        VersionListCellRenderer renderer = (VersionListCellRenderer) versionComboBox.getRenderer();
+        renderer.setLTS(lts);
+        renderer.setEA(reversedVersions.get(0));

Review Comment:
   yep. the fist item should be always EA. Before the change it showed "19" in the combo box but the table was always empty, Post change it will show "19 (EA)" and the table should contain items since the filter (Client.java) got updated in https://github.com/apache/netbeans/pull/4205/commits/3fed2681ee8f38dd5fe8e7322f97e21ae68d294e too.
   
   `ReleaseStatus.NONE` does not return EA builds for some reason, it appears to be mapped to GA by default.
   
   A similar issue happened with the "last" check box. The NONE filter did not work as expected (it still filters), so I changed it in https://github.com/apache/netbeans/pull/4205/commits/b9bdd54a0016a4407303b1732cd4934c68ad68fd



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1163388699

   > > it simply checks if version > latest version
   > 
   > We should perhaps look at latest version supported by the IDE for the quick panel? We discussed an API for this related to nb-javac warnings before. This was one place I thought it would also be useful.
   
   Maybe just a warning with a link to the NB download page? ;)
   
   A feature which would make me want to use the downloader would be if it could update them too. Currently I am simply using a one-liner bash script which downloads all update releases of all supported JDKs. 
   
   Might be relatively easy to implement by storing vendor, package name and version in a properties file somewhere. But the module is going to need a public api at this point, since the platform window probably going to have to interact with it somehow.


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#issuecomment-1162992346

   Yes, chatted with Gerrit a few times on this.  Have been a few issues with EA's being wrongly categorized in the past.  Getting all major versions based on distribution sounds much better!
   
   >  it simply checks if version > latest version
   
   We should perhaps look at latest version supported by the IDE for the quick panel?  We discussed an API for this related to nb-javac warnings before.  This was one place I thought it would also be useful.
   
   > It also only uses LTS now, everything else is assumed to be STS without even asking.
   
   Good call!  I think the MTS / STS distinction is a little confusing to most people (at least in quick panel)
   
   > I don't think the slider will overflow any time soon now
   
   Overflow wasn't the only issue noticed.  Time to dig through notes! :smile:  But, yes, let's keep it.


-- 
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: notifications-unsubscribe@netbeans.apache.org

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] neilcsmith-net commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r903619217


##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -68,28 +68,31 @@ private synchronized DiscoClient getDisco() {
     private Client() {
     }
 
-    public synchronized final List<MajorVersion> getAllMajorVersions() {
+    /**
+     * Returns all major versions which are still maintained (excludes EA releases).
+     */
+    public synchronized final List<MajorVersion> getAllMaintainedMajorVersions() {
         if (majorVersions == null) {
-            majorVersions = Collections.unmodifiableList(
-                    getDisco().getAllMajorVersions(false).stream()
-                            .filter(majorVersion -> majorVersion.isMaintained())
-                            .filter(majorVersion -> majorVersion.isEarlyAccessOnly() != Boolean.TRUE)
-                            .collect(Collectors.toList()));
+            majorVersions = getDisco().getAllMajorVersions(
+                    Optional.of(true),   // maintained
+                    Optional.of(false),  // EA
+                    Optional.of(true),   // GA
+                    Optional.of(false)); // build
         }
         return majorVersions;
     }
 
-    public synchronized MajorVersion getLatestLts(boolean b) {
-        return getDisco().getLatestLts(b);
+    public synchronized MajorVersion getLatestLts(boolean includeEA) {
+        return getDisco().getLatestLts(includeEA);
     }
 
-    public synchronized MajorVersion getLatestSts(boolean b) {
-        return getDisco().getLatestSts(b);
+    public synchronized MajorVersion getLatestSts(boolean includeEA) {
+        return getDisco().getLatestSts(includeEA);
     }
 
     public synchronized List<Pkg> getPkgs(final Distribution distribution, final VersionNumber versionNumber, final Latest latest, final OperatingSystem operatingSystem,
             final Architecture architecture, final ArchiveType archiveType, final PackageType packageType,
-            final Boolean javafxBundled) {
+            final boolean ea, final boolean javafxBundled) {

Review Comment:
   Agreed, not public so can be changed later - just mentioned because it was a direct mirror of upstream as far as I recall, and I thought it was weird too!



-- 
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: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #4205: JDK downloader improvements

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r902900602


##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -68,28 +68,31 @@ private synchronized DiscoClient getDisco() {
     private Client() {
     }
 
-    public synchronized final List<MajorVersion> getAllMajorVersions() {
+    /**
+     * Returns all major versions which are still maintained (excludes EA releases).
+     */
+    public synchronized final List<MajorVersion> getAllMaintainedMajorVersions() {
         if (majorVersions == null) {
-            majorVersions = Collections.unmodifiableList(
-                    getDisco().getAllMajorVersions(false).stream()
-                            .filter(majorVersion -> majorVersion.isMaintained())
-                            .filter(majorVersion -> majorVersion.isEarlyAccessOnly() != Boolean.TRUE)
-                            .collect(Collectors.toList()));
+            majorVersions = getDisco().getAllMajorVersions(
+                    Optional.of(true),   // maintained
+                    Optional.of(false),  // EA
+                    Optional.of(true),   // GA
+                    Optional.of(false)); // build
         }
         return majorVersions;
     }
 
-    public synchronized MajorVersion getLatestLts(boolean b) {
-        return getDisco().getLatestLts(b);
+    public synchronized MajorVersion getLatestLts(boolean includeEA) {
+        return getDisco().getLatestLts(includeEA);
     }
 
-    public synchronized MajorVersion getLatestSts(boolean b) {
-        return getDisco().getLatestSts(b);
+    public synchronized MajorVersion getLatestSts(boolean includeEA) {
+        return getDisco().getLatestSts(includeEA);
     }
 
     public synchronized List<Pkg> getPkgs(final Distribution distribution, final VersionNumber versionNumber, final Latest latest, final OperatingSystem operatingSystem,
             final Architecture architecture, final ArchiveType archiveType, final PackageType packageType,
-            final Boolean javafxBundled) {
+            final boolean ea, final boolean javafxBundled) {

Review Comment:
   but looking at it again, I believe i simply thought it would be weird to use boolean for ea and Boolean for JavaFX. Thats why I changed both. We also do actually set FX always to false and the API is also not public so we know all call sites - it can be easily changed in the next round.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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