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/11/01 09:24:54 UTC

[GitHub] [netbeans] neilcsmith-net opened a new pull request, #4899: Fix maven classpath listening

neilcsmith-net opened a new pull request, #4899:
URL: https://github.com/apache/netbeans/pull/4899

   Rebase of @timboudreau #4868 onto delivery.  Would like to get into rc3 so needs to merge soon.  Didn't want to force push to Tim's branch without OK.


-- 
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 #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   let me check this in the ide in case i didn't count the brackets properly
   edit: 
   yes 'anno' was the third param which is the source. 
   So where did the prop name `ClassPath.PROP_ROOTS` go? not important?



-- 
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 #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   it was 'anno' before the change. Since this is a last minute fix, it's probably safer to not change this too, right?



-- 
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 closed pull request #4899: Fix maven classpath listening

Posted by GitBox <gi...@apache.org>.
neilcsmith-net closed pull request #4899: Fix maven classpath listening
URL: https://github.com/apache/netbeans/pull/4899


-- 
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 #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   @sdedic no idea. Justification for that is covered by Tim in description for #4868



-- 
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 #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   let me check this in the ide in case i didn't count the brackets properly
   edit: yes anno was the third param which is the source



-- 
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 #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   @sdedic have merged to proceed with rc3.  If you have concerns about this reacting to too many changes, we can review before release vote.



-- 
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 #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   let me check this in the ide in case i didn't count the brackets properly



-- 
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] sdedic commented on a diff in pull request #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   Should be the 2nd parameter of `WeakListeners.propertyChange` the event source, `proj.getProjectWatcher()` in this case ?



-- 
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] sdedic commented on a diff in pull request #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   Is there a reason to react on all propchanges on project, not only PROP_PROJECT (= reload of project file) ? 



-- 
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 #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   @mbien from the docs, the property name should be passed to both `WeakListeners::propertyChange` and `addPropertyChangeListener`. As not used for the latter, I assume this might have been firing for all properties but only trying to remove a listener on `ClassPath.PROP_ROOTS`?!
   
   @sdedic is right, that second weak listener should be passed `proj::getProjectWatcher`, or `null`.  I think the underlying code can handle events from alternative sources though, so shouldn't cause a problem?
   
   I (or one of you) can add a second commit here to tidy this up, but need a call ASAP if we're going to get in rc3.
   
   cc @timboudreau 



-- 
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] sdedic commented on a diff in pull request #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   Should be the 2nd parameter the event source, `proj.getProjectWatcher()` in this case ?



-- 
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 #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   let me check this in the ide in case i didn't count the brackets properly
   edit: yes 'anno' was the third param which is the source



-- 
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 #4899: Fix maven classpath listening

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


##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -721,18 +722,14 @@ public AnnotationPathSelector(NbMavenProjectImpl proj, ClassPath anno, Supplier<
             this.annotationCP = anno;
             this.compileClassPath = compile;
             
-            anno.addPropertyChangeListener(WeakListeners.propertyChange(
-                    e -> {
-                        active = null;
-                        support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-                    }, ClassPath.PROP_ROOTS, anno
-            ));
-//            proj.getProjectWatcher().addPropertyChangeListener((e) -> {
-//                if (NbMavenProject.PROP_PROJECT.equals(e.getPropertyName())) {
-//                    active = null;
-//                    support.firePropertyChange(PROP_ACTIVE_CLASS_PATH, null, null);
-//                }
-//            });
+            anno.addPropertyChangeListener(WeakListeners.propertyChange(this, anno));
+            proj.getProjectWatcher().addPropertyChangeListener(WeakListeners.propertyChange(this, anno));

Review Comment:
   @sdedic added a second commit that fixes the source passed to WeakListeners.  Other than that are you happy with @timboudreau changes going in to 16-rc3?



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