GH-1429: find parent method or type declaration from within deeper nested ast nodes
Fixes GH-1429
This commit is contained in:
@@ -207,6 +207,14 @@ public class DependsOnCompletionProviderTest {
|
||||
assertCompletions("@DependsOn({\"bean1\",<*>\"bean2\"})", 1, "@DependsOn({\"bean1\",\"bean3\",<*>\"bean2\"})");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDependsOnCompletionWithinQuotesExcludeDefaultBeanNameFromComponent() throws Exception {
|
||||
Bean componentBean = new Bean("testDependsOnClass", "org.test.TestDependsOnClass", new Location(tempJavaDocUri, new Range(new Position(1,1), new Position(1, 20))), null, null, null, false);
|
||||
springIndex.updateBeans(project.getElementName(), new Bean[] {bean1, bean2, componentBean});
|
||||
|
||||
assertCompletions("@DependsOn(\"<*>\")", 2, "@DependsOn(\"bean1<*>\")");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDependsOnCompletionExcludeDefaultBeanNameFromComponent() throws Exception {
|
||||
Bean componentBean = new Bean("testDependsOnClass", "org.test.TestDependsOnClass", new Location(tempJavaDocUri, new Range(new Position(1,1), new Position(1, 20))), null, null, null, false);
|
||||
|
||||
Reference in New Issue
Block a user