mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
postfix completion: inplace introduce variable: ensure doc committed when handler is started inside writeAction
test: switch on inplace mode in tests EA-86900 - RE: PostprocessReformattingAspect.beforeDocumentChanged
This commit is contained in:
@@ -86,6 +86,11 @@ public class IntroduceVariablePostfixTemplate extends PostfixTemplateWithExpress
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isInplaceAvailableInTestMode() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -422,6 +422,7 @@ public class JavaVariableInplaceIntroducer extends AbstractJavaInplaceIntroducer
|
||||
finally {
|
||||
myDeleteSelf = true;
|
||||
}
|
||||
PsiDocumentManager.getInstance(myProject).doPostponedOperationsAndUnblockDocument(myEditor.getDocument());
|
||||
initOccurrencesMarkers();
|
||||
return variable;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
public class Foo {
|
||||
void m(Object o) {
|
||||
int foo = 1;<caret>
|
||||
int <caret>foo = 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
void m() {
|
||||
foo(new Runnable() {public void run()}.var<caret>);
|
||||
}
|
||||
|
||||
void foo(Runnable r) {}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class Foo {
|
||||
void m() {
|
||||
Runnable foo = new Runnable() {
|
||||
public void run()
|
||||
}; foo(foo);
|
||||
}
|
||||
|
||||
void foo(Runnable r) {}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
public class Foo {
|
||||
void m(Object o) {
|
||||
boolean foo = o instanceof String;<caret>
|
||||
boolean <caret>foo = o instanceof String;
|
||||
}
|
||||
}
|
||||
@@ -34,4 +34,8 @@ public class VarPostfixTemplateTest extends PostfixTemplateTestCase {
|
||||
public void testAdd() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAnonymous() {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user