[groovy] refactor 'change to operator' inspection
authorDaniil Ovchinnikov <daniil.ovchinnikov@jetbrains.com>
Tue, 15 Nov 2016 14:23:13 +0000 (17:23 +0300)
committerDaniil Ovchinnikov <daniil.ovchinnikov@jetbrains.com>
Tue, 15 Nov 2016 19:32:19 +0000 (22:32 +0300)
commitbb564f63f7f490278d51241057b2a21dc3f8ff1f
tree056e9362de4e54f52406bf5e8920524e6621e193
parentec9304c6a4a1c6a944234bed86eaa7a351b8256c
[groovy] refactor 'change to operator' inspection

- use strings instead of IElementTypes
- get rid of call transformation
- simplify weird builder
- highlight only method reference instead of whole method call
- @NotNull
15 files changed:
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/GroovyInspectionBundle.properties
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/ChangeToOperatorInspection.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/data/ReplacementData.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/AsBooleanTransformation.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/BinaryTransformation.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/CompareToTransformation.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/EqualsTransformation.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/GetAtTransformation.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/IsCaseTransformation.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/PutAtTransformation.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/SimpleBinaryTransformation.java [moved from plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/CallTransformation.java with 63% similarity]
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/Transformation.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/Transformations.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/UnaryTransformation.java
plugins/groovy/test/org/jetbrains/plugins/groovy/inspections/GrChangeToOperatorTest.groovy