Skip to content

Commit b37a518

Browse files
committed
check valid virtual file
1 parent f4cec7d commit b37a518

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

jvm-common/src/main/kotlin/org/digma/intellij/plugin/idea/navigation/JvmNavigationDiscoveryManager.kt

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,6 @@ import kotlin.time.Duration.Companion.minutes
3838
import kotlin.time.Duration.Companion.seconds
3939

4040

41-
//todo:
42-
//on startup find candidates from the index and put in set.
43-
//register listener on the index to listen for new and updated candidates.
44-
//run a task that takes files from the set: builds FileInfo that contains MethodInfos with spans and endpoints.
45-
//send the FileInfo to JvmSpanNavigationProvider and JvmEndpointNavigationProvider, each will take what they need from the FileInfo.
46-
//dismiss the FileInfo. todo: think if i want to keep the FileInfo
47-
//run maintenance task that checks all files in JvmSpanNavigationProvider and JvmEndpointNavigationProvider , if a file doesn't have
48-
// index anymore assume its deleted and remove the discovery
49-
50-
//todo: what to do with deleted files, or files that had spans and now edited and don't have spans anymore?
51-
// when a file is deleted the index listener will not be called, so we can't remove it from the set.'
52-
// when a file was a candidate and edited and now is not a candidate the listener will not be called.
53-
// possible solutions:
54-
// 1) in the index keep an in memory list of all candidates , when a file in indexed and has no keys keys and was a candidate before fire an event of file removed.
55-
// this is a clean solution but keeps an in memory set of VirtualFiles
56-
// !! this option is not good because after the index is read and project restart there will not be indexing for files that were indexed before so can't save them in memory.
57-
// 2) run a maintenance task every minute that check all files in the discovery, query the index if the file still has keys, if not, remove it from the discovery.
58-
// this needs to travers all files in the discovery, or the manager should keep a list of discovered files.
59-
60-
6141
@Suppress("LightServiceMigrationCode")
6242
class JvmNavigationDiscoveryManager(private val project: Project, private val cs: CoroutineScope) : Disposable, CandidateFilesDetectionIndexListener {
6343

0 commit comments

Comments
 (0)