Escape soft keywords as well
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ public object AndroidConst {
|
|||||||
|
|
||||||
val IGNORED_XML_WIDGET_TYPES = setOf("requestFocus", "merge", "tag", "check")
|
val IGNORED_XML_WIDGET_TYPES = setOf("requestFocus", "merge", "tag", "check")
|
||||||
|
|
||||||
val ESCAPED_IDENTIFIERS = JetTokens.KEYWORDS.getTypes()
|
val ESCAPED_IDENTIFIERS = (JetTokens.KEYWORDS.getTypes() + JetTokens.SOFT_KEYWORDS.getTypes())
|
||||||
.map { it as? JetKeywordToken }.filterNotNull().map { it.getValue() }.toSet()
|
.map { it as? JetKeywordToken }.filterNotNull().map { it.getValue() }.toSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
@@ -30,3 +30,9 @@ val android.app.Activity.`fun`: ft<TextView, TextView?>
|
|||||||
val android.app.Fragment.`fun`: ft<TextView, TextView?>
|
val android.app.Fragment.`fun`: ft<TextView, TextView?>
|
||||||
get() = getView().findViewById(0) as? TextView
|
get() = getView().findViewById(0) as? TextView
|
||||||
|
|
||||||
|
val android.app.Activity.`set`: ft<Button, Button?>
|
||||||
|
get() = findViewById(0) as? Button
|
||||||
|
|
||||||
|
val android.app.Fragment.`set`: ft<Button, Button?>
|
||||||
|
get() = getView().findViewById(0) as? Button
|
||||||
|
|
||||||
|
|||||||
+3
@@ -21,3 +21,6 @@ val android.view.View.fragmentTag: ft<View, View?>
|
|||||||
val android.view.View.`fun`: ft<TextView, TextView?>
|
val android.view.View.`fun`: ft<TextView, TextView?>
|
||||||
get() = findViewById(0) as? TextView
|
get() = findViewById(0) as? TextView
|
||||||
|
|
||||||
|
val android.view.View.`set`: ft<Button, Button?>
|
||||||
|
get() = findViewById(0) as? Button
|
||||||
|
|
||||||
|
|||||||
+5
@@ -21,4 +21,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/set"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
Reference in New Issue
Block a user