Script, IDE: tweak extract based refactorings to behave better in scripts

Fix not being able to invoke introduce variable for top level script expression
Prohibit introduce parameter and introduce property for scripts on top level
Basic test for introduce function (produces red code atm)
This commit is contained in:
Pavel V. Talanov
2015-12-02 14:42:32 +03:00
parent ffd8863875
commit b9ce9f8576
29 changed files with 206 additions and 53 deletions
@@ -0,0 +1 @@
<selection>val y = 2 + 3</selection>
@@ -0,0 +1 @@
Cannot refactor in this place
@@ -0,0 +1,3 @@
//TODO: the result is not correct, should place function declaration before it is used
1 + 2
<selection>2 + 3</selection>
@@ -0,0 +1,7 @@
//TODO: the result is not correct, should place function declaration before it is used
1 + 2
__dummyTestFun__()
fun __dummyTestFun__() {
2 + 3
}