mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't overwrite dots when finishing completion by ., since it's irritating
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
public class JavaClass {
|
||||
Object magic() {}
|
||||
Object magic2() {}
|
||||
|
||||
void foo() {
|
||||
mag<caret>.aaa
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
public class JavaClass {
|
||||
Object magic() {}
|
||||
Object magic2() {}
|
||||
|
||||
void foo() {
|
||||
magic().<caret>.aaa
|
||||
}
|
||||
}
|
||||
+2
@@ -881,6 +881,8 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
|
||||
public void testInstanceMagicMethod() throws Exception { doTest() }
|
||||
|
||||
public void testNoDotOverwrite() throws Exception { doTest('.') }
|
||||
|
||||
public void testNoMethodsInParameterType() {
|
||||
configure()
|
||||
assertOrderedEquals myFixture.lookupElementStrings, "final", "float"
|
||||
|
||||
@@ -93,7 +93,18 @@ public abstract class TailType {
|
||||
}
|
||||
};
|
||||
public static final TailType SPACE = new CharTailType(' ');
|
||||
public static final TailType DOT = new CharTailType('.');
|
||||
public static final TailType DOT = new TailType() {
|
||||
@Override
|
||||
public int processTail(Editor editor, int tailOffset) {
|
||||
editor.getDocument().insertString(tailOffset, ".");
|
||||
return moveCaret(editor, tailOffset, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DOT";
|
||||
}
|
||||
};
|
||||
|
||||
public static final TailType CASE_COLON = new CharTailType(':');
|
||||
public static final TailType COND_EXPR_COLON = new TailType(){
|
||||
|
||||
Reference in New Issue
Block a user