mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
Merge branch 'master' of git.labs.intellij.net:idea/community
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// "Add constructor parameter" "true"
|
||||
class A {
|
||||
private final int field;
|
||||
private int j;
|
||||
|
||||
A(int field) {
|
||||
this(0, field);
|
||||
}
|
||||
|
||||
A(int j, int field) {
|
||||
this.j = j;
|
||||
this.field = field;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Add constructor parameter" "true"
|
||||
class A {
|
||||
private final int <caret>field;
|
||||
private int j;
|
||||
|
||||
A() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
A(int j) {
|
||||
this.j = j;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Suppress for class" "false"
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
class Test {
|
||||
@javax.annotation.Generated(value = "unknown")
|
||||
public static void main(String[] args) {
|
||||
ActionListener listener = new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int <caret>i = 0;
|
||||
System.out.println(i);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class C {
|
||||
void foo() {
|
||||
if (a) {
|
||||
call();
|
||||
} else if (b) {
|
||||
call();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class C {
|
||||
void foo() {
|
||||
if (a) {
|
||||
if (b) {
|
||||
call();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class C {
|
||||
void foo() {
|
||||
if ((a) |<caret>| (b)) {
|
||||
call();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class C {
|
||||
void foo() {
|
||||
if ((a) &<caret>& (b)) {
|
||||
call();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class Test {
|
||||
void f() {
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
int j = 0;
|
||||
if (j == 0 && <selection>j < 0 && j > 0</selection>) {
|
||||
assert false;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
class Test {
|
||||
void f() {
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
int j = 0;
|
||||
if (j == 0 && newMethod(j)) {
|
||||
assert false;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private boolean newMethod(int j) {
|
||||
return j < 0 && j > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class ExpData {
|
||||
void foo(String s) {
|
||||
s = "";
|
||||
System.out.println(<caret>s.substring(2));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
public class ExpData {
|
||||
void foo(String s) {
|
||||
System.out.println("".substring(2));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class ExpData {
|
||||
void foo(int i) {
|
||||
i = 0;
|
||||
System.out.println(<caret>i++);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class A {
|
||||
void bar(int i){
|
||||
method(1);
|
||||
method(i, "a");
|
||||
method(1, "a", "b");
|
||||
}
|
||||
|
||||
void m<caret>(String... args) {
|
||||
method(1, args);
|
||||
}
|
||||
|
||||
void method(int i, String... args) {
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
class A {
|
||||
void bar(int i){
|
||||
m(new String[0]);
|
||||
method(i, "a");
|
||||
m("a", "b");
|
||||
}
|
||||
|
||||
void m(String... args) {
|
||||
method(1, args);
|
||||
}
|
||||
|
||||
void method(int i, String... args) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class A {
|
||||
void bar(int i){
|
||||
method(i);
|
||||
method(i, "a");
|
||||
method(i, "a", "b");
|
||||
}
|
||||
|
||||
void m<caret>(int i, String... args) {
|
||||
method(i, args);
|
||||
}
|
||||
|
||||
void method(int i, String... args) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class A {
|
||||
void bar(int i){
|
||||
m(i, new String[0]);
|
||||
m(i, "a");
|
||||
m(i, "a", "b");
|
||||
}
|
||||
|
||||
void m(int i, String... args) {
|
||||
method(i, args);
|
||||
}
|
||||
|
||||
void method(int i, String... args) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class A {
|
||||
{
|
||||
method(1);
|
||||
method(1, "a");
|
||||
method(1, "a", "b");
|
||||
}
|
||||
|
||||
void m<caret>(String... args) {
|
||||
method(1, args);
|
||||
}
|
||||
|
||||
void method(int i, String... args) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class A {
|
||||
{
|
||||
m(new String[0]);
|
||||
m("a");
|
||||
m("a", "b");
|
||||
}
|
||||
|
||||
void m(String... args) {
|
||||
method(1, args);
|
||||
}
|
||||
|
||||
void method(int i, String... args) {
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public class X {
|
||||
}
|
||||
|
||||
class MyClass1 {}
|
||||
|
||||
/**
|
||||
* {@link #MyClass1Impl()}
|
||||
*/
|
||||
class MyClass1Impl extends MyClass1 {
|
||||
MyClass1Impl() {
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public class X {
|
||||
}
|
||||
|
||||
class MyClass {}
|
||||
|
||||
/**
|
||||
* {@link #MyClassImpl()}
|
||||
*/
|
||||
class MyClassImpl extends MyClass {
|
||||
MyClassImpl() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class Test {
|
||||
void foo(Object o) {
|
||||
<selection>((A)o).doSmth();</selection>
|
||||
}
|
||||
}
|
||||
|
||||
class A {void doSmth(){}}
|
||||
@@ -0,0 +1,14 @@
|
||||
class Test {
|
||||
void foo(Object o) {
|
||||
<selection>
|
||||
if (true) {
|
||||
((A1)o).doSmth();
|
||||
} else {
|
||||
o.toString();
|
||||
}
|
||||
</selection>
|
||||
}
|
||||
}
|
||||
|
||||
class A {void doSmth(){}}
|
||||
class A1 extends A {}
|
||||
@@ -0,0 +1,15 @@
|
||||
class Test {
|
||||
void foo(Object o) {
|
||||
<selection>
|
||||
if (true) {
|
||||
((A1)o).doSmth();
|
||||
} else {
|
||||
((A2)o).doSmth();
|
||||
}
|
||||
</selection>
|
||||
}
|
||||
}
|
||||
|
||||
class A {void doSmth(){}}
|
||||
class A1 extends A {}
|
||||
class A2 extends A {}
|
||||
Reference in New Issue
Block a user