Merge branch 'master' into live-hovers-v2

This commit is contained in:
Martin Lippert
2019-09-24 14:57:27 +02:00
117 changed files with 375 additions and 291 deletions

View File

@@ -53,7 +53,7 @@ public class SpringIndexerMultiProjectTest {
@Before
public void setup() throws Exception {
harness.intialize(null);
indexer.configureIndexer(SymbolIndexConfig.builder().scanXml(false).build()).get(5, TimeUnit.SECONDS);
indexer.configureIndexer(SymbolIndexConfig.builder().scanXml(false).build());
projectUri1 = UriUtil.toUri(new File(ProjectsHarness.class.getResource("/test-projects/test-annotation-indexing-large-multiproject-1/").toURI())).toString();
projectFinder.find(new TextDocumentIdentifier(projectUri1)).get();

View File

@@ -60,7 +60,7 @@ public class SpringIndexerTest {
@Before
public void setup() throws Exception {
harness.intialize(null);
indexer.configureIndexer(SymbolIndexConfig.builder().scanXml(false).build()).get(5, TimeUnit.SECONDS);;
indexer.configureIndexer(SymbolIndexConfig.builder().scanXml(false).build());
directory = new File(ProjectsHarness.class.getResource("/test-projects/test-annotation-indexing-parent/test-annotation-indexing/").toURI());
projectDir = directory.toURI().toString();
@@ -96,14 +96,14 @@ public class SpringIndexerTest {
@Test
public void testScanTestJavaSources() throws Exception {
indexer.configureIndexer(SymbolIndexConfig.builder().scanTestJavaSources(true).build()).get(1, TimeUnit.SECONDS);
indexer.configureIndexer(SymbolIndexConfig.builder().scanTestJavaSources(true).build());
List<? extends SymbolInformation> allSymbols = indexer.getAllSymbols("");
assertEquals(8, allSymbols.size());
String docUri = directory.toPath().resolve("src/test/java/demo/ApplicationTests.java").toUri().toString();
assertTrue(containsSymbol(allSymbols, "@SpringBootTest", docUri, 8, 0, 8, 15));
indexer.configureIndexer(SymbolIndexConfig.builder().scanTestJavaSources(false).build()).get(1, TimeUnit.SECONDS);
indexer.configureIndexer(SymbolIndexConfig.builder().scanTestJavaSources(false).build());
allSymbols = indexer.getAllSymbols("");
assertEquals(7, allSymbols.size());
assertFalse(containsSymbol(allSymbols, "@SpringBootTest", docUri, 8, 0, 8, 15));

View File

@@ -59,8 +59,7 @@ public class SpringIndexerXMLProjectTest {
indexer.configureIndexer(SymbolIndexConfig.builder()
.scanXml(true)
.xmlScanFoldersGlobs(new String[] { "**/src/main/**", "**/config" })
.build())
.get(5, TimeUnit.SECONDS);;
.build());
project = projects.mavenProject("test-annotation-indexing-xml-project");
harness.useProject(project);
@@ -124,40 +123,35 @@ public class SpringIndexerXMLProjectTest {
indexer.configureIndexer(SymbolIndexConfig.builder()
.scanXml(true)
.build())
.get(2, TimeUnit.SECONDS);;
.build());
allSymbols = indexer.getAllSymbols("");
assertEquals(0, allSymbols.size());
indexer.configureIndexer(SymbolIndexConfig.builder()
.scanXml(true)
.xmlScanFoldersGlobs(new String[] { "**/src/main/**" })
.build())
.get(2, TimeUnit.SECONDS);
.build());
allSymbols = indexer.getAllSymbols("");
assertEquals(1, allSymbols.size());
indexer.configureIndexer(SymbolIndexConfig.builder()
.scanXml(true)
.xmlScanFoldersGlobs(new String[] { "**/config", "**/src/main/**" })
.build())
.get(2, TimeUnit.SECONDS);
.build());
allSymbols = indexer.getAllSymbols("");
assertEquals(5, allSymbols.size());
indexer.configureIndexer(SymbolIndexConfig.builder()
.scanXml(true)
.xmlScanFoldersGlobs(new String[] { "**/config" })
.build())
.get(2, TimeUnit.SECONDS);
.build());
allSymbols = indexer.getAllSymbols("");
assertEquals(4, allSymbols.size());
indexer.configureIndexer(SymbolIndexConfig.builder()
.scanXml(false)
.xmlScanFoldersGlobs(new String[] { "**/config", "**/src/main/**" })
.build())
.get(2, TimeUnit.SECONDS);
.build());
allSymbols = indexer.getAllSymbols("");
assertEquals(0, allSymbols.size());
}

View File

@@ -8,7 +8,7 @@
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<properties>
<java-version>1.6</java-version>
<java-version>1.7</java-version>
<org.springframework-version>3.1.1.RELEASE</org.springframework-version>
<org.aspectj-version>1.6.10</org.aspectj-version>
<org.slf4j-version>1.6.6</org.slf4j-version>