mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix(lsp): invalid inferred file extensions in FileProvider
This commit is contained in:
@@ -63,7 +63,9 @@ import java.nio.file.Path
|
||||
*/
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(manifest = Config.DEFAULT_VALUE_STRING)
|
||||
abstract class LSPTest {
|
||||
abstract class LSPTest(
|
||||
private val sourceFileExt: String,
|
||||
) {
|
||||
|
||||
protected lateinit var toolingServer: IToolingApiServer
|
||||
protected lateinit var toolingProject: IProject
|
||||
@@ -162,7 +164,7 @@ abstract class LSPTest {
|
||||
}
|
||||
|
||||
open fun openFile(fileName: String) {
|
||||
file = FileProvider.sourceFile(fileName).normalize()
|
||||
file = FileProvider.sourceFile(fileName, sourceFileExt).normalize()
|
||||
contents = FileProvider.contents(file!!)
|
||||
|
||||
dispatchEvent(DocumentOpenEvent(file!!, contents.toString(), 0))
|
||||
|
||||
Reference in New Issue
Block a user