show the type for new AnAction().registerCustomShortcutSet (IDEA-87048)

This commit is contained in:
peter
2012-06-07 15:56:00 +02:00
parent 2a20b2d5bd
commit 7b23eb7655
2 changed files with 21 additions and 10 deletions
@@ -221,6 +221,7 @@ class Test {
myFixture.addClass('interface Runnable2 { void run(); }')
myFixture.addClass('interface Runnable3 { void run(); }')
myFixture.addClass('interface Runnable4 { void run(); }')
myFixture.addClass('abstract class MyAction { public abstract void run(); public void registerVeryCustomShortcutSet() {} }')
def text = """\
class Test {
void test() {
@@ -244,6 +245,11 @@ class Test {
System.out.println();
}
});
new MyAction() {
public void run() {
System.out.println();
}
}.registerVeryCustomShortcutSet();
}
void foo(Object o) {}
@@ -257,6 +263,7 @@ class Test {
assert foldingModel.getCollapsedRegionAtOffset(text.indexOf("Runnable2(")).placeholderText == '(Runnable2) () -> { '
assert foldingModel.getCollapsedRegionAtOffset(text.indexOf("Runnable3(")).placeholderText == '(Runnable3) () -> { '
assert foldingModel.getCollapsedRegionAtOffset(text.indexOf("Runnable4(")).placeholderText == '() -> { '
assert foldingModel.getCollapsedRegionAtOffset(text.indexOf("MyAction(")).placeholderText == '(MyAction) () -> { '
}
public void "test no closure folding when the method throws an unresolved exception"() {