PT 155476005 - Support for jumpy completions

This commit is contained in:
nsingh
2018-06-06 18:11:41 -07:00
parent 1a8f536b60
commit 0c09c7d423
14 changed files with 548 additions and 226 deletions

View File

@@ -1401,23 +1401,6 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
" bar: <*>"
);
assertCompletion(
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
"other:\n" +
"foo.nested.nested.b<*>"
,
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
" nested:\n" +
" bar: <*>\n"+
"other:\n"
);
assertCompletion(
"foo:\n" +
" nested:\n" +
@@ -1433,22 +1416,6 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
" bar: <*>\n"
);
assertCompletion(
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
"other:\n" +
"foo.nested.bar.b<*>"
,
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
" bar: <*>\n" +
"other:\n"
);
assertCompletion(
"foo:\n" +
" nested:\n" +
@@ -1465,6 +1432,62 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
}
@Test public void testJumpyInsertion() throws Exception {
String[] names = {"foo", "nested", "bar"};
int levels = 4;
generateNestedProperties(levels, names, "");
assertCompletion(
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
"other:\n" +
"foo.nested.bar.b<*>"
,
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
" bar: <*>\n" +
"other:"
);
assertCompletion(
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
"other:\n" +
"foo.nested.nested.b<*>"
,
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
" nested:\n" +
" bar: <*>\n"+
"other:"
);
assertCompletion(
"foo.nested.nested.b<*>\n" +
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
"other:"
,
"foo:\n" +
" nested:\n" +
" bar:\n" +
" foo:\n" +
" nested:\n" +
" bar: <*>\n"+
"other:"
);
}
@Test public void testBooleanValueCompletion() throws Exception {
defaultTestData();
assertCompletions(