revert cli converter to stream parsing
This commit is contained in:
committed by
Yan Zhulanow
parent
996636aa62
commit
2f97e7fadb
+1
-2
@@ -40,8 +40,7 @@ class CliAndroidUIXmlParser(val project: Project, override val searchPath: Strin
|
|||||||
val ids: MutableCollection<AndroidWidget> = ArrayList()
|
val ids: MutableCollection<AndroidWidget> = ArrayList()
|
||||||
val handler = AndroidXmlHandler({ id, wClass -> ids.add(AndroidWidget(id, wClass)) })
|
val handler = AndroidXmlHandler({ id, wClass -> ids.add(AndroidWidget(id, wClass)) })
|
||||||
try {
|
try {
|
||||||
val source = InputSource(ByteArrayInputStream(file.getText()!!.getBytes("utf-8")))
|
saxParser.parse(file.getVirtualFile()?.getInputStream()!!, handler)
|
||||||
saxParser.parse(source, handler)
|
|
||||||
return produceKotlinProperties(KotlinStringWriter(), ids).toString()
|
return produceKotlinProperties(KotlinStringWriter(), ids).toString()
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
LOG.error(e)
|
LOG.error(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user