DropDrage / Simple_Compose_Preview_Generator

Plugin for generation Jetpack Compose Preview functions
Mozilla Public License 2.0
0 stars 0 forks source link

Action preview #11

Closed DropDrage closed 3 weeks ago

DropDrage commented 1 month ago
editor?.apply {
    val shortenReferences = ShortenReferences.RETAIN_COMPANION
    val codeStyleManager = CodeStyleManager.getInstance(project)
    val reformatted = codeStyleManager.reformat(shortenReferences.process(previewPsi))
    document.insertString(document.textLength, reformatted.text) //ToDo position should depend on writer
}