Skip to content

Commit 8eb9338

Browse files
committed
style(Üintellij): some code reformatting
1 parent 97081a5 commit 8eb9338

File tree

6 files changed

+43
-41
lines changed

6 files changed

+43
-41
lines changed

intellij-client/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ org.gradle.caching = true
3636

3737

3838
kotlin.daemon.jvmargs=-Xmx4096m
39+
kotlin.code.style=official

intellij-client/src/main/kotlin/dev/robotcode/robotcode4ij/editor/RobotCodeBraceMatcher.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ private val PAIRS = arrayOf(
1515
)
1616

1717
class RobotCodeBraceMatcher : PairedBraceMatcher {
18-
18+
1919
override fun getPairs(): Array<BracePair> {
2020
return PAIRS
2121
}
22-
22+
2323
override fun isPairedBracesAllowedBeforeType(lbraceType: IElementType, contextType: IElementType?): Boolean {
2424
return true
2525
}
26-
26+
2727
override fun getCodeConstructStart(file: PsiFile?, openingBraceOffset: Int): Int {
2828
return openingBraceOffset
2929
}

intellij-client/src/main/kotlin/dev/robotcode/robotcode4ij/execution/RobotCodeRunLineMarkerContributor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package dev.robotcode.robotcode4ij.execution
33
import com.intellij.execution.lineMarker.RunLineMarkerContributor
44
import com.intellij.icons.AllIcons
55
import com.intellij.psi.PsiElement
6+
import com.intellij.psi.util.elementType
67
import dev.robotcode.robotcode4ij.psi.FILE
78
import dev.robotcode.robotcode4ij.psi.TESTCASE_NAME
8-
import com.intellij.psi.util.elementType
99

1010
class RobotCodeRunLineMarkerContributor : RunLineMarkerContributor() {
1111
override fun getInfo(element: PsiElement): Info? {

intellij-client/src/main/kotlin/dev/robotcode/robotcode4ij/highlighting/RobotCodeHighlighterProvider.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import dev.robotcode.robotcode4ij.psi.HEADER
2323
import dev.robotcode.robotcode4ij.psi.KEYWORD_CALL
2424
import dev.robotcode.robotcode4ij.psi.KEYWORD_NAME
2525
import dev.robotcode.robotcode4ij.psi.OPERATOR
26-
import dev.robotcode.robotcode4ij.psi.RobotTextMateElementType
2726
import dev.robotcode.robotcode4ij.psi.SETTING
2827
import dev.robotcode.robotcode4ij.psi.TESTCASE_NAME
2928
import dev.robotcode.robotcode4ij.psi.VARIABLE

intellij-client/src/main/kotlin/dev/robotcode/robotcode4ij/highlighting/RobotTextMateHighlightingLexer.kt

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,44 @@ class RobotTextMateHighlightingLexer : TextMateHighlightingLexer(
2727
TextMateBundleHolder.descriptor, Registry.get("textmate.line.highlighting.limit").asInteger()
2828
) {
2929
companion object {
30-
val mapping = mapOf(
31-
"comment.line.robotframework" to COMMENT_LINE,
32-
"comment.line.rest.robotframework" to COMMENT_LINE,
33-
"comment.block.robotframework" to COMMENT_BLOCK,
34-
"punctuation.definition.variable.begin.robotframework" to VARIABLE_BEGIN,
35-
"punctuation.definition.variable.end.robotframework" to VARIABLE_END,
36-
"punctuation.definition.envvar.begin.robotframework" to ENVIRONMENT_VARIABLE_BEGIN,
37-
"punctuation.definition.envvar.end.robotframework" to ENVIRONMENT_VARIABLE_END,
38-
39-
"entity.name.function.testcase.name.robotframework" to TESTCASE_NAME,
40-
"entity.name.function.keyword.name.robotframework" to KEYWORD_NAME,
41-
42-
"keyword.other.header.robotframework" to HEADER,
43-
"keyword.other.header.settings.robotframework" to HEADER,
44-
"keyword.other.header.variable.robotframework" to HEADER,
45-
"keyword.other.header.testcase.robotframework" to HEADER,
46-
"keyword.other.header.task.robotframework" to HEADER,
47-
"keyword.other.header.keyword.robotframework" to HEADER,
48-
"keyword.other.header.comment.robotframework" to HEADER,
49-
50-
"keyword.control.settings.robotframework" to SETTING,
51-
"keyword.control.settings.documentation.robotframework" to SETTING,
52-
53-
"entity.name.function.keyword-call.robotframework" to KEYWORD_CALL,
54-
"keyword.control.flow.robotframework" to CONTROL_FLOW,
55-
56-
"keyword.other.robotframework" to SETTING,
57-
58-
"variable.name.readwrite.robotframework" to VARIABLE,
59-
"keyword.operator.robotframework" to OPERATOR,
60-
61-
"constant.character.robotframework" to ARGUMENT,
62-
"string.unquoted.argument.robotframework" to ARGUMENT,
63-
64-
"keyword.operator.continue.robotframework" to CONTINUATION,
30+
val mapping by lazy {
31+
mapOf(
32+
"comment.line.robotframework" to COMMENT_LINE,
33+
"comment.line.rest.robotframework" to COMMENT_LINE,
34+
"comment.block.robotframework" to COMMENT_BLOCK,
35+
"punctuation.definition.variable.begin.robotframework" to VARIABLE_BEGIN,
36+
"punctuation.definition.variable.end.robotframework" to VARIABLE_END,
37+
"punctuation.definition.envvar.begin.robotframework" to ENVIRONMENT_VARIABLE_BEGIN,
38+
"punctuation.definition.envvar.end.robotframework" to ENVIRONMENT_VARIABLE_END,
39+
40+
"entity.name.function.testcase.name.robotframework" to TESTCASE_NAME,
41+
"entity.name.function.keyword.name.robotframework" to KEYWORD_NAME,
42+
43+
"keyword.other.header.robotframework" to HEADER,
44+
"keyword.other.header.settings.robotframework" to HEADER,
45+
"keyword.other.header.variable.robotframework" to HEADER,
46+
"keyword.other.header.testcase.robotframework" to HEADER,
47+
"keyword.other.header.task.robotframework" to HEADER,
48+
"keyword.other.header.keyword.robotframework" to HEADER,
49+
"keyword.other.header.comment.robotframework" to HEADER,
50+
51+
"keyword.control.settings.robotframework" to SETTING,
52+
"keyword.control.settings.documentation.robotframework" to SETTING,
53+
54+
"entity.name.function.keyword-call.robotframework" to KEYWORD_CALL,
55+
"keyword.control.flow.robotframework" to CONTROL_FLOW,
56+
57+
"keyword.other.robotframework" to SETTING,
58+
59+
"variable.name.readwrite.robotframework" to VARIABLE,
60+
"keyword.operator.robotframework" to OPERATOR,
61+
62+
"constant.character.robotframework" to ARGUMENT,
63+
"string.unquoted.argument.robotframework" to ARGUMENT,
64+
65+
"keyword.operator.continue.robotframework" to CONTINUATION,
6566
)
67+
}
6668
}
6769

6870
override fun getTokenType(): IElementType? {

intellij-client/src/main/kotlin/dev/robotcode/robotcode4ij/psi/RobotSuiteFile.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import com.intellij.extapi.psi.PsiFileBase
44
import com.intellij.openapi.fileTypes.FileType
55
import com.intellij.psi.FileViewProvider
66
import dev.robotcode.robotcode4ij.RobotFrameworkLanguage
7-
import dev.robotcode.robotcode4ij.RobotSuiteFileType
87
import dev.robotcode.robotcode4ij.RobotResourceFileType
8+
import dev.robotcode.robotcode4ij.RobotSuiteFileType
99

1010
class RobotSuiteFile(viewProvider: FileViewProvider) : PsiFileBase(
1111
viewProvider,

0 commit comments

Comments
 (0)