File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
test/kotlin/platform/mcp/at Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 2121package com.demonwav.mcdev.platform.mcp.at.format
2222
2323import com.demonwav.mcdev.platform.mcp.at.gen.psi.AtTypes
24+ import com.demonwav.mcdev.util.children
2425import com.intellij.formatting.Alignment
2526import com.intellij.formatting.Block
2627import com.intellij.formatting.Indent
2728import com.intellij.formatting.Spacing
2829import com.intellij.formatting.SpacingBuilder
2930import com.intellij.formatting.Wrap
3031import com.intellij.lang.ASTNode
31- import com.intellij.lang.tree.util.children
3232import com.intellij.psi.TokenType
3333import com.intellij.psi.codeStyle.CodeStyleSettings
3434import 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
2727import com.demonwav.mcdev.platform.mcp.McpModuleSettings
2828import com.demonwav.mcdev.platform.mcp.McpModuleType
2929import com.demonwav.mcdev.platform.mcp.at.AtElementFactory.Keyword
30- import com.demonwav.mcdev.util.runWriteActionAndWait
3130import com.intellij.codeInsight.lookup.Lookup
31+ import com.intellij.openapi.application.runWriteActionAndWait
3232import org.intellij.lang.annotations.Language
3333import org.junit.jupiter.api.Assertions.assertNotNull
3434import org.junit.jupiter.api.BeforeEach
You can’t perform that action at this time.
0 commit comments