Skip to content

Commit

Permalink
Update target platform to 4.21 build I20210621-1800
Browse files Browse the repository at this point in the history
- Related #1800
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=574338

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
  • Loading branch information
rgrunber committed Jun 22, 2021
1 parent 8997d4a commit 5483c3a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.jdt.source.feature.group" version="0.0.0"/>
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/eclipse/updates/4.21-I-builds/I20210617-1800/"/>
<repository location="https://download.eclipse.org/eclipse/updates/4.21-I-builds/I20210621-1800/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtend.sdk.feature.group" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,33 @@ public void testSnippet_ifelse2() throws JavaModelException {
assertTrue(items.size() > 0);
}

// https://github.com/eclipse/eclipse.jdt.ls/issues/1800
@Test
public void testSnippet_if2() throws JavaModelException {
//@formatter:off
ICompilationUnit unit = getWorkingCopy(
"src/org/sample/Test.java",
"public class Test {\n"
+ " private boolean flag;\n"
+ " private void test(List<String> c) {\n"
+ " if (flag) {\n"
+ " \n"
+ " List<String> scs = c.subList(0, 1);\n"
+ " }\n"
+ " }\n"
+ " String test() {\n"
+ " return null;\n"
+ " } \n"
+ "}"
);
//@formatter:on
int[] loc = findCompletionLocation(unit, " ");
CompletionList list = server.completion(JsonMessageHelper.getParams(createCompletionRequest(unit, loc[0], loc[1]))).join().getRight();
assertNotNull(list);
List<CompletionItem> items = new ArrayList<>(list.getItems());
assertTrue(items.size() > 1);
}

@Test
public void testSnippet_ifelse() throws JavaModelException {
//@formatter:off
Expand Down

0 comments on commit 5483c3a

Please sign in to comment.