mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
committed by
GitHub
parent
8ac221c834
commit
1f3800697c
@@ -183,7 +183,7 @@ interface ActionItem {
|
||||
}
|
||||
|
||||
fun forId(id: String): Location {
|
||||
return values().first { it.id == id }
|
||||
return entries.first { it.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,10 +348,8 @@ open class EditorHandlerActivity : ProjectHandlerActivity(), IEditorHandler {
|
||||
|
||||
override fun getEditorForFile(file: File): CodeEditorView? {
|
||||
for (i in 0 until editorViewModel.getOpenedFileCount()) {
|
||||
val editor = binding.editorContainer.getChildAt(i) as CodeEditorView
|
||||
if (file == editor.file) {
|
||||
return editor
|
||||
}
|
||||
val editor = binding.editorContainer.getChildAt(i) as? CodeEditorView
|
||||
if (file == editor?.file) return editor
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user