Skip to content

Commit f53706e

Browse files
committed
Fix compiler errors
1 parent 5713a12 commit f53706e

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

src/main/kotlin/platform/mcp/at/format/AtBlock.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
package com.demonwav.mcdev.platform.mcp.at.format
2222

2323
import com.demonwav.mcdev.platform.mcp.at.gen.psi.AtTypes
24+
import com.demonwav.mcdev.util.children
2425
import com.intellij.formatting.Alignment
2526
import com.intellij.formatting.Block
2627
import com.intellij.formatting.Indent
2728
import com.intellij.formatting.Spacing
2829
import com.intellij.formatting.SpacingBuilder
2930
import com.intellij.formatting.Wrap
3031
import com.intellij.lang.ASTNode
31-
import com.intellij.lang.tree.util.children
3232
import com.intellij.psi.TokenType
3333
import com.intellij.psi.codeStyle.CodeStyleSettings
3434
import com.intellij.psi.formatter.common.AbstractBlock

src/main/kotlin/util/ast-utils.kt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 }

src/test/kotlin/platform/mcp/at/AtCompletionTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import com.demonwav.mcdev.platform.PlatformType
2727
import com.demonwav.mcdev.platform.mcp.McpModuleSettings
2828
import com.demonwav.mcdev.platform.mcp.McpModuleType
2929
import com.demonwav.mcdev.platform.mcp.at.AtElementFactory.Keyword
30-
import com.demonwav.mcdev.util.runWriteActionAndWait
3130
import com.intellij.codeInsight.lookup.Lookup
31+
import com.intellij.openapi.application.runWriteActionAndWait
3232
import org.intellij.lang.annotations.Language
3333
import org.junit.jupiter.api.Assertions.assertNotNull
3434
import org.junit.jupiter.api.BeforeEach

0 commit comments

Comments
 (0)