File tree Expand file tree Collapse file tree 9 files changed +1
-94
lines changed
java/org/domaframework/doma/intellij/psi
kotlin/org/domaframework/doma/intellij Expand file tree Collapse file tree 9 files changed +1
-94
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,6 @@ public SqlElCommentExprImpl(@NotNull ASTNode node) {
4141 super (node );
4242 }
4343
44- @ Override
45- public @ NotNull ASTNode getNode () {
46- return super .getNode ();
47- }
48-
4944 @ Override
5045 public @ NotNull IElementType getTokenType () {
5146 return getNode ().getElementType ();
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -60,26 +60,21 @@ class CommonPathParameter(
6060 entry.sourceFolders.map { folder ->
6161 val file = folder.file
6262 if (file != null ) {
63- println (" file:${file.name} " )
6463 when (folder.rootType) {
6564 JavaSourceRootType .SOURCE -> {
6665 moduleSourceDirectories.add(file)
67- println (" moduleSourceDirectory:$file " )
6866 }
6967
7068 JavaSourceRootType .TEST_SOURCE -> {
7169 moduleTestSourceDirectories.add(file)
72- println (" moduleTestSourceDirectory:$file " )
7370 }
7471
7572 JavaResourceRootType .RESOURCE -> {
7673 moduleResourceDirectories.add(file)
77- println (" moduleResourceDirectory:$file " )
7874 }
7975
8076 JavaResourceRootType .TEST_RESOURCE -> {
8177 moduleTestResourceDirectories.add(file)
82- println (" moduleTestResourceDirectory:$file " )
8378 }
8479 }
8580 }
Original file line number Diff line number Diff line change @@ -67,15 +67,6 @@ class PsiParentClass(
6767 m.hasModifierProperty(PsiModifier .PUBLIC )
6868 }
6969
70- fun findStaticField (fieldName : String ): PsiField ? =
71- fields
72- ?.filter { f ->
73- f.hasModifierProperty(PsiModifier .STATIC ) &&
74- PropertyModifyUtil .filterPrivateField(f, type)
75- }?.firstOrNull { f ->
76- f.name == fieldName
77- }
78-
7970 fun searchStaticField (fieldName : String ): List <PsiField >? =
8071 fields
8172 ?.filter { f ->
@@ -84,15 +75,6 @@ class PsiParentClass(
8475 PropertyModifyUtil .filterPrivateField(f, type)
8576 }
8677
87- fun findStaticMethod (methodName : String ): PsiMethod ? =
88- methods
89- ?.filter { m ->
90- m.hasModifierProperty(PsiModifier .STATIC ) &&
91- m.hasModifierProperty(PsiModifier .PUBLIC )
92- }?.firstOrNull { m ->
93- m.name == methodName
94- }
95-
9678 fun searchStaticMethod (methodName : String ): List <PsiMethod >? =
9779 methods?.filter { m ->
9880 m.hasModifierProperty(PsiModifier .STATIC ) &&
Original file line number Diff line number Diff line change @@ -22,18 +22,6 @@ import com.intellij.psi.search.GlobalSearchScope
2222
2323class PsiClassTypeUtil {
2424 companion object {
25- fun getPsiTypeByList (
26- classType : PsiClassType ,
27- project : Project ,
28- useListParam : Boolean ,
29- ): PsiType ? {
30- val isIterableType = isIterableType(classType, project)
31- if (isIterableType && useListParam) {
32- return classType.parameters.firstOrNull()
33- }
34- return classType
35- }
36-
3725 fun isIterableType (
3826 type : PsiClassType ,
3927 project : Project ,
Original file line number Diff line number Diff line change 1515 */
1616package org.domaframework.doma.intellij.extension.psi
1717
18- import com.intellij.codeInsight.AnnotationUtil
1918import com.intellij.psi.PsiMethod
2019import com.intellij.psi.PsiParameter
2120
@@ -25,13 +24,3 @@ val PsiMethod.methodParameters: List<PsiParameter>
2524 get() = this .parameterList.parameters.toList()
2625
2726fun PsiMethod.searchParameter (searchName : String ): List <PsiParameter > = this .methodParameters.filter { it.name.startsWith(searchName) }
28-
29- @OptIn(ExperimentalStdlibApi ::class )
30- fun PsiMethod.getDomaAnnotationType (): DomaAnnotationType {
31- DomaAnnotationType .entries.forEach {
32- if (AnnotationUtil .findAnnotation(this , it.fqdn) != null ) {
33- return it
34- }
35- }
36- return DomaAnnotationType .Unknown
37- }
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ import org.domaframework.doma.intellij.psi.SqlCustomElCommentExpr
5151import org.domaframework.doma.intellij.psi.SqlTypes
5252
5353class SqlBlockUtil (
54- private val sqlBlock : SqlBlock ,
54+ sqlBlock : SqlBlock ,
5555) {
5656 val wrap = sqlBlock.wrap
5757 val alignment = sqlBlock.alignment
Original file line number Diff line number Diff line change 1616package org.domaframework.doma.intellij.formatter.block
1717
1818import com.intellij.formatting.Alignment
19- import com.intellij.formatting.Indent
2019import com.intellij.formatting.SpacingBuilder
2120import com.intellij.formatting.Wrap
2221import com.intellij.lang.ASTNode
@@ -41,8 +40,6 @@ open class SqlLineCommentBlock(
4140
4241 override fun buildChildren (): MutableList <AbstractBlock > = mutableListOf ()
4342
44- override fun getIndent (): Indent ? = super .getIndent()
45-
4643 override fun isLeaf (): Boolean = true
4744
4845 override fun createBlockIndentLen (): Int {
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import com.intellij.lang.ASTNode
2323import com.intellij.psi.formatter.common.AbstractBlock
2424import org.domaframework.doma.intellij.formatter.block.SqlBlock
2525import org.domaframework.doma.intellij.formatter.block.group.keyword.SqlUpdateKeywordGroupBlock
26- import org.domaframework.doma.intellij.psi.SqlTypes
2726
2827/* *
2928 * In an UPDATE statement using the row value constructor,
@@ -53,10 +52,6 @@ class SqlUpdateValueGroupBlock(
5352 override fun createBlockIndentLen (): Int {
5453 parentBlock?.let { parent ->
5554 if (parent is SqlUpdateKeywordGroupBlock ) {
56- val keywords =
57- parent.childBlocks
58- .dropLast(1 )
59- .takeWhile { parent.node.elementType == SqlTypes .KEYWORD }
6055 return parent.indent.indentLen
6156 .plus(parent.getNodeText().length)
6257 .plus(3 )
You can’t perform that action at this time.
0 commit comments