create property:both getter nad setter from usage (IDEA-73186); return cursor to the initial state

This commit is contained in:
anna
2012-07-12 21:01:39 +02:00
parent b2530c8d58
commit f3f98b6f54
10 changed files with 172 additions and 5 deletions
@@ -1,6 +1,7 @@
// "Create Getter" "true"
public class Test {
Integer field;
public foo() {
getField();
}
@@ -0,0 +1,16 @@
// "Create Property" "true"
class Calculator {
int i;
public void printError() {
setI(0);
}
public void setI(int i) {
this.i = i;
}
public int getI() {
return i;
}
}
@@ -0,0 +1,16 @@
// "Create Property" "true"
class Calculator {
private int i;
public void printError() {
setI(0);
}
public void setI(int i) {
this.i = i;
}
public int getI() {
return i;
}
}
@@ -0,0 +1,8 @@
// "Create Property" "false"
class Calculator {
int i;
public void printError() {
set<caret>I(0);
}
public int getI() {return i;}
}
@@ -0,0 +1,7 @@
// "Create Property" "true"
class Calculator {
int i;
public void printError() {
set<caret>I(0);
}
}
@@ -0,0 +1,6 @@
// "Create Property" "true"
class Calculator {
public void printError() {
set<caret>I(0);
}
}