Skip to content

Commit 683b2b3

Browse files
committed
Refactor SQL block classes to enhance method naming and remove unused spacing logic
1 parent e704a75 commit 683b2b3

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/main/kotlin/org/domaframework/doma/intellij/formatter/block/SqlDataTypeBlock.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ open class SqlDataTypeBlock(
4040
0,
4141
)
4242

43-
override fun setParentGroupBlock(lastGroupBlock: SqlBlock?) {
44-
super.setParentGroupBlock(lastGroupBlock)
43+
override fun setParentGroupBlock(lastGroup: SqlBlock?) {
44+
super.setParentGroupBlock(lastGroup)
4545
indent.indentLevel = IndentType.NONE
4646
indent.indentLen = 1
4747
indent.groupIndentLen = indent.indentLen
4848

49-
if (lastGroupBlock is SqlCreateTableColumnDefinitionRawGroupBlock) {
50-
lastGroupBlock.columnDataTypeBlock = this
49+
if (lastGroup is SqlCreateTableColumnDefinitionRawGroupBlock) {
50+
lastGroup.columnDataTypeBlock = this
5151
}
5252
}
5353

src/main/kotlin/org/domaframework/doma/intellij/formatter/block/group/column/SqlRawGroupBlock.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package org.domaframework.doma.intellij.formatter.block.group.column
1717

18-
import com.intellij.formatting.Block
19-
import com.intellij.formatting.Spacing
2018
import com.intellij.lang.ASTNode
2119
import com.intellij.psi.formatter.common.AbstractBlock
2220
import org.domaframework.doma.intellij.formatter.block.SqlBlock
@@ -44,11 +42,6 @@ abstract class SqlRawGroupBlock(
4442
0,
4543
)
4644

47-
override fun getSpacing(
48-
p0: Block?,
49-
p1: Block,
50-
): Spacing? = null
51-
5245
override fun buildChildren(): MutableList<AbstractBlock> = mutableListOf()
5346

5447
override fun isLeaf(): Boolean = true

0 commit comments

Comments
 (0)