mbien commented on code in PR #9324:
URL: https://github.com/apache/netbeans/pull/9324#discussion_r3045061863
##########
ide/versioning.core/src/org/netbeans/modules/versioning/core/VersioningAnnotationProvider.java:
##########
@@ -295,77 +295,83 @@ void refreshAnnotations(Set<VCSFileProxy> files) {
}
void refreshAnnotations(Set<VCSFileProxy> files, boolean removeFromCache) {
- if (files == null) {
- LOG.log(Level.FINE, "refreshing all annotations"); //NOI18N
- refreshAllAnnotationsTask.schedule(2000);
- return;
- }
-
- if (removeFromCache) {
- LOG.log(Level.FINE, "refreshing annotations for {0}", files);
//NOI18N
- if (LOG.isLoggable(Level.FINEST)) {
- LOG.log(Level.FINEST, "refreshing annotations called from:",
new Exception()); //NOI18N
- }
- }
-
- for (VCSFileProxy file : files) {
- // try to limit the number of normalizeFile calls:
- // let's find the closest existent FO, then list it's parents with
FileObject.getParent();
- FileObject fo = file.toFileObject();
- if (fo == null) {
- fo = getExistingParent(file);
- } else {
- // file exists, plan it to refresh
- addToMap(filesToRefresh, fo, removeFromCache);
- fo = fo.getParent();
+
+ final RequestProcessor.Task refreshAnnotationsTask = rp.create(() -> {
+
+ if (files == null) {
+ LOG.log(Level.FINE, "refreshing all annotations"); //NOI18N
+ refreshAllAnnotationsTask.schedule(2000);
+ return;
}
Review Comment:
first if check could be before the task in the `refreshAnnotations()` 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists