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 13:59:54 UTC
[GitHub] [netbeans] sdedic commented on a diff in pull request #4899: Fix maven classpath listening
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