Skip to content

Commit 58efab4

Browse files
committed
Use isIncluded locally too
1 parent 91bd63d commit 58efab4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/src/main/kotlin/org/javacs/kt/SourceFiles.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class SourceFiles(
7474
private val open = mutableSetOf<URI>()
7575

7676
fun open(uri: URI, content: String, version: Int) {
77-
if (exclusions.isURIIncluded(uri)) {
77+
if (isIncluded(uri)) {
7878
files[uri] = SourceVersion(content, version, languageOf(uri), isTemporary = false)
7979
open.add(uri)
8080
}
@@ -98,7 +98,7 @@ class SourceFiles(
9898
}
9999

100100
fun edit(uri: URI, newVersion: Int, contentChanges: List<TextDocumentContentChangeEvent>) {
101-
if (exclusions.isURIIncluded(uri)) {
101+
if (isIncluded(uri)) {
102102
val existing = files[uri]!!
103103
var newText = existing.content
104104

@@ -143,7 +143,7 @@ class SourceFiles(
143143
null
144144
}
145145

146-
private fun isSource(uri: URI): Boolean = exclusions.isURIIncluded(uri) && languageOf(uri) != null
146+
private fun isSource(uri: URI): Boolean = isIncluded(uri) && languageOf(uri) != null
147147

148148
private fun languageOf(uri: URI): Language? {
149149
val fileName = uri.filePath?.fileName?.toString() ?: return null

0 commit comments

Comments
 (0)