-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documenting intentions and fixing bug in SplitIntoDeclarationAndAssig…
…nment
- Loading branch information
Showing
40 changed files
with
245 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/AddReturnTypeTagIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction()<spot>:String</spot> { | ||
var stringVar = "MyString"; | ||
return stringVar; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/AddReturnTypeTagIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction()<spot></spot> { | ||
var stringVar = "MyString"; | ||
return stringVar; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/intentionDescriptions/AddReturnTypeTagIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Resolves return type and adds it to the method declarations | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/AddTypeTagToFieldIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction() { | ||
var stringVar<spot>:String</spot> = "MyString"; | ||
return stringVar; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/AddTypeTagToFieldIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction() { | ||
var stringVar<spot></spot> = "MyString"; | ||
return stringVar; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/intentionDescriptions/AddTypeTagToFieldIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Resolves variable type and adds it to the variable declarations | ||
</body> | ||
</html> |
4 changes: 4 additions & 0 deletions
4
...main/resources/intentionDescriptions/ConvertPropertyToVariableIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package ; | ||
class SomeClass { | ||
public var variable<spot></spot>:String; | ||
} |
4 changes: 4 additions & 0 deletions
4
...ain/resources/intentionDescriptions/ConvertPropertyToVariableIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package ; | ||
class SomeClass { | ||
public var variable<spot>(default, default)</spot>:String; | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/intentionDescriptions/ConvertPropertyToVariableIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Converts a property into a variable | ||
</body> | ||
</html> |
6 changes: 6 additions & 0 deletions
6
src/main/resources/intentionDescriptions/ConvertQuotesIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package ; | ||
class SomeClass { | ||
function myFun(intValue:Int) { | ||
return <spot>'</spot>value = $intValue<spot>'</spot>; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/intentionDescriptions/ConvertQuotesIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package ; | ||
class SomeClass { | ||
function myFun(intValue:Int) { | ||
return <spot>"</spot>value = $intValue<spot>"</spot>; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/intentionDescriptions/ConvertQuotesIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Replaces double quotes with single quotes for string interpolation support | ||
</body> | ||
</html> |
5 changes: 5 additions & 0 deletions
5
...sources/intentionDescriptions/ConvertVariableToPropertyDefaultIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package ; | ||
class SomeClass { | ||
public var variable<spot>(default, default)</spot>:String; | ||
} | ||
|
4 changes: 4 additions & 0 deletions
4
...ources/intentionDescriptions/ConvertVariableToPropertyDefaultIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package ; | ||
class SomeClass { | ||
public var variable<spot></spot>:String; | ||
} |
5 changes: 5 additions & 0 deletions
5
...esources/intentionDescriptions/ConvertVariableToPropertyDefaultIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Converts a variable into a property with default accessors | ||
</body> | ||
</html> |
5 changes: 5 additions & 0 deletions
5
...esources/intentionDescriptions/ConvertVariableToPropertyGetSetIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package ; | ||
class SomeClass { | ||
public var variable<spot>(get, set)</spot>:String; | ||
} | ||
|
4 changes: 4 additions & 0 deletions
4
...sources/intentionDescriptions/ConvertVariableToPropertyGetSetIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package ; | ||
class SomeClass { | ||
public var variable<spot></spot>:String; | ||
} |
5 changes: 5 additions & 0 deletions
5
...resources/intentionDescriptions/ConvertVariableToPropertyGetSetIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Converts a variable into a property with getter and setter accessors | ||
</body> | ||
</html> |
5 changes: 5 additions & 0 deletions
5
...ources/intentionDescriptions/ConvertVariableToPropertyReadOnlyIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package ; | ||
class SomeClass { | ||
public var variable<spot>(get, never)</spot>:String; | ||
} | ||
|
4 changes: 4 additions & 0 deletions
4
...urces/intentionDescriptions/ConvertVariableToPropertyReadOnlyIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package ; | ||
class SomeClass { | ||
public var variable<spot></spot>:String; | ||
} |
5 changes: 5 additions & 0 deletions
5
...sources/intentionDescriptions/ConvertVariableToPropertyReadOnlyIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Converts a variable into a property with read-only accessors | ||
</body> | ||
</html> |
9 changes: 9 additions & 0 deletions
9
src/main/resources/intentionDescriptions/IteratorForLoopIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ; | ||
class SomeClass { | ||
function myFun() { | ||
var myArray = ["A", "B", "C"]; | ||
<spot>for (itr in myArray) { | ||
|
||
}</spot> | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/IteratorForLoopIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
function myFun() { | ||
var myArray = ["A", "B", "C"]; | ||
myArray<spot></spot> | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/intentionDescriptions/IteratorForLoopIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Introduces a for-loop using iterator from selected variable | ||
</body> | ||
</html> |
9 changes: 9 additions & 0 deletions
9
src/main/resources/intentionDescriptions/KeyValueIteratorForLoopIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ; | ||
class SomeClass { | ||
function myFun() { | ||
var myMap = ["A" => 1, "B" => 2, "C" => 3]; | ||
<spot>for (key => value in myMap) { | ||
|
||
}</spot> | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/KeyValueIteratorForLoopIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
function myFun() { | ||
var myMap = ["A" => 1, "B" => 2, "C" => 3]; | ||
myMap<spot></spot> | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/intentionDescriptions/KeyValueIteratorForLoopIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Introduces a for-each loop using key-value iterator from selected variable | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/RemoveReturnTypeTagIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction()<spot></spot> { | ||
var stringVar = "MyString"; | ||
return stringVar; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/RemoveReturnTypeTagIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction()<spot>:String</spot> { | ||
var stringVar = "MyString"; | ||
return stringVar; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/intentionDescriptions/RemoveReturnTypeTagIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Removes type information from method declaration | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/RemoveTypeTagFromFieldIntention/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction() { | ||
var stringVar<spot></spot> = "MyString"; | ||
return stringVar; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/resources/intentionDescriptions/RemoveTypeTagFromFieldIntention/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction() { | ||
var stringVar<spot>:String</spot> = "MyString"; | ||
return stringVar; | ||
} | ||
} | ||
|
5 changes: 5 additions & 0 deletions
5
src/main/resources/intentionDescriptions/RemoveTypeTagFromFieldIntention/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Removes type information from variable declaration | ||
</body> | ||
</html> |
11 changes: 11 additions & 0 deletions
11
...onDescriptions/ReplaceImportStatementWithWildcardWithSingleClassImports/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package ; | ||
|
||
<spot>import sys.Http; | ||
import sys.FileSystem;</spot> | ||
|
||
class SomeClass { | ||
public function myFunction() { | ||
var url = Http.requestUrl("url"); | ||
var path = FileSystem.absolutePath("path"); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...nDescriptions/ReplaceImportStatementWithWildcardWithSingleClassImports/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package ; | ||
|
||
import sys.*<spot></spot>; | ||
|
||
class SomeClass { | ||
public function myFunction() { | ||
var url = Http.requestUrl("url"); | ||
var path = FileSystem.absolutePath("path"); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...ionDescriptions/ReplaceImportStatementWithWildcardWithSingleClassImports/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Replaces wildcard import statement with concrete import statements for each reference used. | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
src/main/resources/intentionDescriptions/SplitIntoDeclarationAndAssignment/after.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction() { | ||
<spot>var stringVar; | ||
stringVar = "MyString";</spot> | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...main/resources/intentionDescriptions/SplitIntoDeclarationAndAssignment/before.hx.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package ; | ||
class SomeClass { | ||
public function myFunction() { | ||
<spot>var stringVar = "MyString";</spot> | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/intentionDescriptions/SplitIntoDeclarationAndAssignment/description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Splits variable declaration and variable assignment into separate expressions | ||
</body> | ||
</html> |