smart primitive constant completion to work in binary expressions like |

This commit is contained in:
peter
2010-08-26 16:47:32 +01:00
parent ce2b00c138
commit acac73de5e
6 changed files with 94 additions and 23 deletions
@@ -0,0 +1,15 @@
class Foo {
public static final int FOO_FOO;
public static final int FOO_BAR;
Foo(int a) {}
void foo(int x);
}
public class Bar {
{
new Foo(2 | Foo.FOO_BAR<caret>)
}
}
@@ -0,0 +1,15 @@
class Foo {
public static final int FOO_FOO;
public static final int FOO_BAR;
Foo(int a) {}
void foo(int x);
}
public class Bar {
{
new Foo(2 | FB<caret>)
}
}
@@ -0,0 +1,15 @@
class Foo {
public static final int FOO_FOO;
public static final int FOO_BAR;
Foo(int a) {}
void foo(int x);
}
public class Bar {
{
new Foo(2 + Foo.FOO_BAR<caret>)
}
}
@@ -0,0 +1,15 @@
class Foo {
public static final int FOO_FOO;
public static final int FOO_BAR;
Foo(int a) {}
void foo(int x);
}
public class Bar {
{
new Foo(2 + FB<caret>)
}
}
@@ -636,6 +636,8 @@ public class SmartTypeCompletionTest extends LightCompletionTestCase {
public void testUseIntConstantsFromTargetClass() throws Throwable { doTest(); }
public void testUseIntConstantsFromTargetClassReturnValue() throws Throwable { doTest(); }
public void testUseIntConstantsFromConstructedClass() throws Throwable { doTest(); }
public void testUseIntConstantsInPlus() throws Throwable { doTest(); }
public void testUseIntConstantsInOr() throws Throwable { doTest(); }
public void testExtraSemicolonAfterMethodParam() throws Throwable {
CodeStyleSettings styleSettings = CodeStyleSettingsManager.getSettings(getProject());