Skip to content

Commit 8ee159a

Browse files
committed
Refactor DocumentGenerator to remove unnecessary parameters from constructors
1 parent a9a7fab commit 8ee159a

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/main/kotlin/org/domaframework/doma/intellij/document/generator/DocumentDaoParameterGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DocumentDaoParameterGenerator(
3030
val originalElement: PsiElement,
3131
val project: Project,
3232
val result: MutableList<String?>,
33-
) : DocumentGenerator(originalElement, project, result) {
33+
) : DocumentGenerator() {
3434
override fun generateDocument() {
3535
var topParentType: PsiParentClass? = null
3636
val selfSkip = isSelfSkip(originalElement)

src/main/kotlin/org/domaframework/doma/intellij/document/generator/DocumentGenerator.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@
1515
*/
1616
package org.domaframework.doma.intellij.document.generator
1717

18-
import com.intellij.openapi.project.Project
1918
import com.intellij.psi.PsiElement
2019
import org.domaframework.doma.intellij.common.psi.PsiParentClass
2120
import org.domaframework.doma.intellij.common.sql.foritem.ForItem
2221
import org.domaframework.doma.intellij.extension.psi.getForItem
2322

24-
abstract class DocumentGenerator(
25-
originalElement: PsiElement?,
26-
project: Project,
27-
result: MutableList<String?>,
28-
) {
23+
abstract class DocumentGenerator {
2924
abstract fun generateDocument()
3025

3126
protected fun isSelfSkip(targetElement: PsiElement): Boolean {

src/main/kotlin/org/domaframework/doma/intellij/document/generator/DocumentStaticFieldGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DocumentStaticFieldGenerator(
3333
val result: MutableList<String?>,
3434
val staticFieldAccessExpr: SqlElStaticFieldAccessExpr,
3535
val file: PsiFile,
36-
) : DocumentGenerator(originalElement, project, result) {
36+
) : DocumentGenerator() {
3737
override fun generateDocument() {
3838
val fieldAccessBlocks = staticFieldAccessExpr.accessElements
3939
val staticElement = PsiStaticElement(fieldAccessBlocks, file)

0 commit comments

Comments
 (0)