return ((PsiTryStatement)element).getFinallyBlock();
}
+ if (element instanceof PsiSynchronizedStatement) {
+ return ((PsiSynchronizedStatement)element).getBody();
+ }
+
if (element instanceof PsiMethod) {
PsiCodeBlock methodBody = ((PsiMethod)element).getBody();
if (methodBody != null) return methodBody;
--- /dev/null
+public class Bar {
+ {
+ String foo1 = "";
+ String foo2 = "";
+ synchronized (foo<caret>)
+ }
+}
\ No newline at end of file
--- /dev/null
+public class Bar {
+ {
+ String foo1 = "";
+ String foo2 = "";
+ synchronized (foo1) {
+ <caret>
+ }
+ }
+}
\ No newline at end of file
myFixture.performEditorAction(IdeActions.ACTION_CHOOSE_LOOKUP_ITEM_COMPLETE_STATEMENT)
checkResult()
}
+ void testSynchronizedArgumentSmartEnter() { doTest(Lookup.COMPLETE_STATEMENT_SELECT_CHAR as String) }
public void testImportStringValue() throws Throwable {
myFixture.addClass("package foo; public class StringValue {}")