mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-55600
This commit is contained in:
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -127,7 +127,8 @@ public class PostfixLiveTemplate extends CustomLiveTemplateBase {
|
||||
newContext = addSemicolonIfNeeded(editor, editor.getDocument(), newContext, currentOffset - key.length());
|
||||
expandTemplate(template, editor, newContext);
|
||||
}
|
||||
else {
|
||||
// don't care about errors in multiCaret mode
|
||||
else if (editor.getCaretModel().getAllCarets().size() == 1) {
|
||||
LOG.error("Template not found by key: " + key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
class A {
|
||||
Object foo;
|
||||
Object bar;
|
||||
|
||||
public static void main(String[] args) {
|
||||
foo == null<caret>
|
||||
|
||||
bar<caret>
|
||||
|
||||
bar == null<caret>
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
class A {
|
||||
Object foo;
|
||||
Object bar;
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (foo == null) {
|
||||
|
||||
}
|
||||
|
||||
bar.if
|
||||
|
||||
if (bar == null) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
@@ -156,6 +156,10 @@ public class TemplatesCompletionTest extends CompletionAutoPopupTestCase {
|
||||
checkResultByFile();
|
||||
}
|
||||
|
||||
public void testMultiCaret() {
|
||||
doCompleteTest(".if", '\t');
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return JavaTestUtil.getRelativeJavaTestDataPath() + "/codeInsight/template/postfix/completion";
|
||||
|
||||
Reference in New Issue
Block a user