Minor: add bunch directives for better discoverability banched code
This commit is contained in:
@@ -5,4 +5,5 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.scratch.output
|
||||
|
||||
// BUNCH: 183
|
||||
inline fun executeCommand(crossinline command: () -> Unit) = com.intellij.openapi.command.executeCommand(command = command)
|
||||
|
||||
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.idea.scratch.output
|
||||
|
||||
import com.intellij.openapi.command.CommandProcessor
|
||||
|
||||
// BUNCH: 183
|
||||
fun executeCommand(command: () -> Unit) {
|
||||
CommandProcessor.getInstance().executeCommand(null, command, null, null)
|
||||
}
|
||||
|
||||
@@ -9,9 +9,11 @@ package org.jetbrains.kotlin.idea.scratch.output
|
||||
|
||||
import com.intellij.openapi.editor.InlayModel
|
||||
|
||||
// BUNCH: 183
|
||||
fun InlayModel.addInlay(offset: Int, renderer: InlayScratchFileRenderer) {
|
||||
addAfterLineEndElement(offset, false, renderer)
|
||||
}
|
||||
|
||||
// BUNCH: 183
|
||||
fun InlayModel.getInlays(start: Int, end: Int) =
|
||||
getAfterLineEndElementsInRange(start, end).filter { it.renderer is InlayScratchFileRenderer }
|
||||
@@ -9,9 +9,11 @@ package org.jetbrains.kotlin.idea.scratch.output
|
||||
|
||||
import com.intellij.openapi.editor.InlayModel
|
||||
|
||||
// BUNCH: 183
|
||||
fun InlayModel.addInlay(offset: Int, renderer: InlayScratchFileRenderer) {
|
||||
addInlineElement(offset, true, renderer)
|
||||
}
|
||||
|
||||
// BUNCH: 183
|
||||
fun InlayModel.getInlays(start: Int, end: Int) =
|
||||
getInlineElementsInRange(start, end).filter { it.renderer is InlayScratchFileRenderer }
|
||||
Reference in New Issue
Block a user