You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "matthiasblaesing (via GitHub)" <gi...@apache.org> on 2023/03/17 19:25:26 UTC

[GitHub] [netbeans] matthiasblaesing opened a new pull request, #5673: Maven indexing: Retain download index setting even if index setting is disabled

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

   When the maven general indexing is disabled, the setting for the index download is lost and forced to be false. Instead of loosing the value a new preferences getter is introduced, that calculates the effective value based on the two components:
   
   - general indexing
   - download index
   
   Only if both settings are true, the effective value will be true.


-- 
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 #5673: Maven indexing: Retain download index setting even if index setting is disabled

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5673:
URL: https://github.com/apache/netbeans/pull/5673#issuecomment-1474547580

   > When the maven general indexing is disabled, the setting for the index download is lost and forced to be false.
   
   this was intended though. Disabling indexing disables everything and this makes it visible in the UI to the user. If the user clicks the chckbox within a setting it restores the old setting from memory, on apply it sets the setting and it becomes the new one.


-- 
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 #5673: Maven indexing: Retain download index setting even if index setting is disabled

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #5673:
URL: https://github.com/apache/netbeans/pull/5673#issuecomment-1474307747

   Additional info, that might not be obvious: the check if remote indexing is enabled is not necessary in the `ProjectOpenedHookImpl` as the indexer will ignore the request if indexing is not enabled
   


-- 
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 a diff in pull request #5673: Maven indexing: Retain download index setting even if index setting is disabled

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on code in PR #5673:
URL: https://github.com/apache/netbeans/pull/5673#discussion_r1140971664


##########
java/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java:
##########
@@ -653,7 +653,7 @@ private static boolean isDiag() {
     //spawn the indexing into a separate thread..
     private boolean spawnIndexLoadedRepo(final RepositoryInfo repo) {
 
-        if (!RepositoryPreferences.isIndexDownloadEnabled() && repo.isRemoteDownloadable()) {
+        if (!RepositoryPreferences.isIndexDownloadEnabledEffective() && repo.isRemoteDownloadable()) {

Review Comment:
   I did not change the logic here. Local repositories will report `repo.isRemoteDownloadable()` with false and thus the whole block will not be entered, indexing will continue. It would be cleaner to user `! isLocal()` here, but as said, I did not touch that logic.



-- 
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 merged pull request #5673: Maven indexing: Retain download index setting even if index setting is disabled

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing merged PR #5673:
URL: https://github.com/apache/netbeans/pull/5673


-- 
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 #5673: Maven indexing: Retain download index setting even if index setting is disabled

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #5673:
URL: https://github.com/apache/netbeans/pull/5673#issuecomment-1474775286

   > why do we want to retain the download setting if indexing is turned off completely?
   
   Because a user could use this setting to temporarily prevent maven index downloading to burn through his CPU. If I uncheck on setting and $other setting is changed as a side effect and not automatically changed back, I as a user would be very surprised.
   
   To turn off maven indexing, I have a single click, to return to the previous setting I have to do multiple clicks. Why?
   
   > I don't like it that the grayed out check box can be still shown as selected with this approach. I think this sends the wrong message through the UI. That is the reason why the options window itself unchecked that box. This does also make sense settings wise - for me at least. ![index-settings-off](https://user-images.githubusercontent.com/114367/226077892-2b960df6-4b6e-4756-bfac-d048d9055a67.png)
   
   I disagree here. The checkbox still reflects the value the user (or the default) set. It just becomes meaningless, because the feature is turned of completly.
   
   I think this new behavior is in line with other instances in options:
   
   - The configuration values for multi-row tabs retain their value, when disabled and show it to the user:
   ![image](https://user-images.githubusercontent.com/2179736/226095054-5623b644-8d83-48e8-9934-c15c16dca3a7.png)
   - Code folding retains the value of the collapse settings when code folding is not enabled:
   ![image](https://user-images.githubusercontent.com/2179736/226095128-37e2210c-0dce-4645-985f-98f684145a43.png)
   - Hightlighting does the same:
   ![image](https://user-images.githubusercontent.com/2179736/226095168-0f35b007-eae5-42e4-bfc6-07f4550e5c07.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 #5673: Maven indexing: Retain download index setting even if index setting is disabled

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5673:
URL: https://github.com/apache/netbeans/pull/5673#discussion_r1152681392


##########
java/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java:
##########
@@ -653,7 +653,7 @@ private static boolean isDiag() {
     //spawn the indexing into a separate thread..
     private boolean spawnIndexLoadedRepo(final RepositoryInfo repo) {
 
-        if (!RepositoryPreferences.isIndexDownloadEnabled() && repo.isRemoteDownloadable()) {
+        if (!RepositoryPreferences.isIndexDownloadEnabledEffective() && repo.isRemoteDownloadable()) {

Review Comment:
   you are right, i thought that was a different method.



-- 
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 #5673: Maven indexing: Retain download index setting even if index setting is disabled

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5673:
URL: https://github.com/apache/netbeans/pull/5673#discussion_r1140888554


##########
java/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java:
##########
@@ -653,7 +653,7 @@ private static boolean isDiag() {
     //spawn the indexing into a separate thread..
     private boolean spawnIndexLoadedRepo(final RepositoryInfo repo) {
 
-        if (!RepositoryPreferences.isIndexDownloadEnabled() && repo.isRemoteDownloadable()) {
+        if (!RepositoryPreferences.isIndexDownloadEnabledEffective() && repo.isRemoteDownloadable()) {

Review Comment:
   I don't think this is correct. This would disable local indexing too if downloads are off.



-- 
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 #5673: Maven indexing: Retain download index setting even if index setting is disabled

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #5673:
URL: https://github.com/apache/netbeans/pull/5673#issuecomment-1490701278

   Thank you for the review. Lets get this in.


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