diff --git a/CHANGELOG.md b/CHANGELOG.md index fd4b440..7c1dada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,42 +3,46 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.1.7 +### Changed +- Default to the current working directory if `repo.path` is not specified. [#30](https://github.com/Microsoft/lsif-java/issues/30) + ## 0.1.6 ### Changed -- Improve the indexing performance[PR#27](https://github.com/Microsoft/lsif-java/pull/27) +- Improve the indexing performance. [PR#27](https://github.com/Microsoft/lsif-java/pull/27) ### Fixed - [Fix Bugs](https://github.com/Microsoft/lsif-java/issues?q=is%3Aissue+is%3Aclosed+milestone%3A0.1.6+label%3Abug) ## 0.1.5 ### Changed -- Improve the indexing performance[#12](https://github.com/Microsoft/lsif-java/issues/12) +- Improve the indexing performance. [#12](https://github.com/Microsoft/lsif-java/issues/12) ### Fixed - [Fix Bugs](https://github.com/Microsoft/lsif-java/issues?q=is%3Aissue+is%3Aclosed+label%3Abug+milestone%3A0.1.5) ## 0.1.4 ### Fixed -- Fix an NPE in ImplementationsVisitor when get the implementation ranges +- Fix an NPE in ImplementationsVisitor when get the implementation ranges. ### Changed -- Visit SimpleType and SimpleName in HoverVisitor and ReferencesVisitor +- Visit SimpleType and SimpleName in HoverVisitor and ReferencesVisitor. ## 0.1.3 ### Added -- Add SimpleType, SingleVariableDeclaration, VariableDeclarationFragment and MethodInvocation into ReferencesVisitor +- Add SimpleType, SingleVariableDeclaration, VariableDeclarationFragment and MethodInvocation into ReferencesVisitor. ### Fixed -- Stop enlisting the vertices and edges if the element does not have hover information +- Stop enlisting the vertices and edges if the element does not have hover information. ## 0.1.2 ### Changed -- Change the output format +- Change the output format. ## 0.1.1 ### Fixed - Fix the typo for `metaData`. -- Remove the duplicated `hoverResults` +- Remove the duplicated `hoverResults`. ## 0.1.0 -Initialize the Java LSIF Indexer +Initialize the Java LSIF Indexer. diff --git a/README.md b/README.md index 0fda649..3ff8ff9 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ A first draft specification can be found [here](https://github.com/Microsoft/lan - Run the tools: - `> ./index.bat "-Dintellinav.repo.path="` + `> ./index.bat "-Drepo.path="` > Note: More information can be found [here](./cmd/README.md). diff --git a/cmd/README.md b/cmd/README.md index 322d862..5087a2b 100644 --- a/cmd/README.md +++ b/cmd/README.md @@ -4,19 +4,21 @@ The LSIF Java Indexer currently supports Maven or Gradle managed project. You can find `pom.xml` or `build.gradle` file in the project's base path. ## Parameters -- `-Dintellinav.repo.path`=`[path of repo]` +- `-Drepo.path`=`[path of repo]` -- `-Dintellinav.output.format`=`[format]` +- `-Doutput.format`=`[format]` - Supported values: line, json. Default: line ## Example Invoke the `index.bat` with the path of the target repo: ```bat -> ./index.bat "-Dintellinav.repo.path=D:\Workspace\spring-petclinic" +> ./index.bat "-Drepo.path=D:\Workspace\spring-petclinic" ``` +> Note: If this parameter is not specified, the indexer will ues the current working directory as the target repo path. + ```bat -> ./index.bat "-Dintellinav.repo.path=D:\Workspace\spring-petclinic" "-Dintellinav.output.format=json" +> ./index.bat "-Drepo.path=D:\Workspace\spring-petclinic" "-Doutput.format=json" ``` ## Changelog diff --git a/cmd/index.bat b/cmd/index.bat index 6ff5048..889bd8c 100644 --- a/cmd/index.bat +++ b/cmd/index.bat @@ -21,14 +21,14 @@ goto End :Help @echo Parameters: -@echo. -Dintellinav.repo.path=[path of repo] +@echo. -Drepo.path=[path of repo] @echo. -@echo. -Dintellinav.output.format=[format] +@echo. -Doutput.format=[format] @echo. Supported values: line, json. Default: line @echo. @echo Example: -@echo. index.bat "-Dintellinav.repo.path=D:\Workspace\spring-petclinic" +@echo. index.bat "-Drepo.path=D:\Workspace\spring-petclinic" @echo. -@echo. index.bat "-Dintellinav.repo.path=D:\Workspace\spring-petclinic" "-Dintellinav.output.format=json" +@echo. index.bat "-Drepo.path=D:\Workspace\spring-petclinic" "-Doutput.format=json" :End diff --git a/com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/emitter/LsifEmitter.java b/com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/emitter/LsifEmitter.java index 426e5a9..a4fef93 100644 --- a/com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/emitter/LsifEmitter.java +++ b/com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/emitter/LsifEmitter.java @@ -15,7 +15,7 @@ private static class LsifEmitterHolder { private static final Emitter INSTANCE = createEmitter(); private static Emitter createEmitter() { - final String format = System.getProperty("intellinav.output.format", "line" /* default */); + final String format = System.getProperty("output.format", "line" /* default */); switch (format) { case "json": return new JsonEmitter(); diff --git a/com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/indexer/Indexer.java b/com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/indexer/Indexer.java index 174b21e..6099a02 100644 --- a/com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/indexer/Indexer.java +++ b/com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/indexer/Indexer.java @@ -51,7 +51,11 @@ public class Indexer { private WorkspaceHandler handler; public Indexer() { - this.handler = new WorkspaceHandler(System.getProperty("intellinav.repo.path")); + String repoPath = System.getProperty("repo.path"); + if (repoPath == null) { + repoPath = System.getProperty("user.dir"); + } + this.handler = new WorkspaceHandler(repoPath); } public void generateLsif() throws JavaModelException {