Skip to content

Commit

Permalink
Add name field in project vertex (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
CsCherrYY authored Sep 8, 2020
1 parent 0146a58 commit 4c3bd42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private void buildIndex(IPath path, IProgressMonitor monitor, LsifService lsif)
JavaLanguageServerPlugin.logException(e.getMessage(), e);
}

Project projVertex = lsif.getVertexBuilder().project();
Project projVertex = lsif.getVertexBuilder().project(javaProject.getElementName());
LsifEmitter.getInstance().emit(projVertex);
LsifEmitter.getInstance().emit(
lsif.getVertexBuilder().event(Event.EventScope.Project, Event.EventKind.BEGIN, projVertex.getId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public Event event(String scope, String kind, String data) {
return new Event(generator.next(), scope, kind, data);
}

public Project project() {
return new Project(generator.next());
public Project project(String name) {
return new Project(generator.next(), name);
}

public Document document(String uri) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ public class Project extends Vertex {

private String kind;

public Project(String id) {
private String name;

public Project(String id, String name) {
super(id, Vertex.PROJECT);
this.kind = IConstant.JAVA_ID;
this.name = name;
}

public String getKind() {
Expand Down

0 comments on commit 4c3bd42

Please sign in to comment.