Refactoring: make "replace call with binary operator" an inspection

This commit is contained in:
Mikhail Glukhikh
2017-12-20 16:02:15 +03:00
parent 6d4b5bc48f
commit ada7287c66
69 changed files with 320 additions and 321 deletions
@@ -0,0 +1,4 @@
<html><body>
This inspection reports function calls that can be replaced with binary operators, especially comparison-related.
Example: <code>2.compareTo(1) > 0</code> can be replaced by <code>2 > 1</code>.
</body></html>
@@ -1,4 +0,0 @@
<html><body>
This inspection reports equals() and compareTo() calls that can be replaced with binary comparison.
Example: <code>2.compareTo(1) > 0</code> can be replaced by <code>2 > 1</code>.
</body></html>
@@ -1,6 +0,0 @@
a + b
a - b
a * b
a / b
a % b
a .. b
@@ -1,6 +0,0 @@
a.plus(b)
a.minus(b)
a.times(b)
a.div(b)
a.mod(b)
a.rangeTo(b)
@@ -1,6 +0,0 @@
<html>
<body>
This intention replaces any calls to infix operators
(<code>plus</code>, <code>minus</code>, <code>div</code>, <code>times</code>, <code>mod</code>, <code>rangeTo</code>) with their respective infixes.
</body>
</html>