File tree 3 files changed +27
-2
lines changed
test/kotlin/platform/mcp/at
3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 21
21
package com.demonwav.mcdev.platform.mcp.at.format
22
22
23
23
import com.demonwav.mcdev.platform.mcp.at.gen.psi.AtTypes
24
+ import com.demonwav.mcdev.util.children
24
25
import com.intellij.formatting.Alignment
25
26
import com.intellij.formatting.Block
26
27
import com.intellij.formatting.Indent
27
28
import com.intellij.formatting.Spacing
28
29
import com.intellij.formatting.SpacingBuilder
29
30
import com.intellij.formatting.Wrap
30
31
import com.intellij.lang.ASTNode
31
- import com.intellij.lang.tree.util.children
32
32
import com.intellij.psi.TokenType
33
33
import com.intellij.psi.codeStyle.CodeStyleSettings
34
34
import com.intellij.psi.formatter.common.AbstractBlock
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Minecraft Development for IntelliJ
3
+ *
4
+ * https://mcdev.io/
5
+ *
6
+ * Copyright (C) 2024 minecraft-dev
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published
10
+ * by the Free Software Foundation, version 3.0 only.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ package com.demonwav.mcdev.util
22
+
23
+ import com.intellij.lang.ASTNode
24
+
25
+ fun ASTNode.children (): Sequence <ASTNode > = generateSequence(firstChildNode) { it.treeNext }
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ import com.demonwav.mcdev.platform.PlatformType
27
27
import com.demonwav.mcdev.platform.mcp.McpModuleSettings
28
28
import com.demonwav.mcdev.platform.mcp.McpModuleType
29
29
import com.demonwav.mcdev.platform.mcp.at.AtElementFactory.Keyword
30
- import com.demonwav.mcdev.util.runWriteActionAndWait
31
30
import com.intellij.codeInsight.lookup.Lookup
31
+ import com.intellij.openapi.application.runWriteActionAndWait
32
32
import org.intellij.lang.annotations.Language
33
33
import org.junit.jupiter.api.Assertions.assertNotNull
34
34
import org.junit.jupiter.api.BeforeEach
You can’t perform that action at this time.
0 commit comments