mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not return todos count for file outside of content roots
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -81,7 +81,7 @@ public class IndexTodoCacheManagerImpl implements TodoCacheManager {
|
||||
|
||||
@Override
|
||||
public int getTodoCount(@NotNull final VirtualFile file, @NotNull final IndexPatternProvider patternProvider) {
|
||||
if (myProject.isDefault()) {
|
||||
if (myProject.isDefault() || !ProjectFileIndex.getInstance(myProject).isInContent(file)) {
|
||||
return 0;
|
||||
}
|
||||
if (file instanceof VirtualFileWindow) return -1;
|
||||
@@ -91,7 +91,7 @@ public class IndexTodoCacheManagerImpl implements TodoCacheManager {
|
||||
|
||||
@Override
|
||||
public int getTodoCount(@NotNull final VirtualFile file, @NotNull final IndexPattern pattern) {
|
||||
if (myProject.isDefault()) {
|
||||
if (myProject.isDefault() || !ProjectFileIndex.getInstance(myProject).isInContent(file)) {
|
||||
return 0;
|
||||
}
|
||||
if (file instanceof VirtualFileWindow) return -1;
|
||||
|
||||
Reference in New Issue
Block a user