Skip to content

Commit

Permalink
Added custom lsp request to get specifcation dirs.
Browse files Browse the repository at this point in the history
  • Loading branch information
BugDiver committed May 28, 2018
1 parent 2150e31 commit 0403334
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/infoGatherer/specDetails.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,10 @@ func (s *SpecInfoGatherer) GetAvailableSpecDetails(specs []string) []*SpecDetail
return details
}

func (s *SpecInfoGatherer) GetSpecDirs() []string {
return s.SpecDirs
}

// Steps returns the list of all the steps in the gauge project. Duplicate steps are filtered
func (s *SpecInfoGatherer) Steps() []*gauge.Step {
s.stepsCache.mutex.RLock()
Expand Down
3 changes: 3 additions & 0 deletions api/lang/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type infoProvider interface {
Tags() []string
SearchConceptDictionary(string) *gauge.Concept
GetAvailableSpecDetails(specs []string) []*infoGatherer.SpecDetail
GetSpecDirs() []string
}

var provider infoProvider
Expand Down Expand Up @@ -234,6 +235,8 @@ func (h *LangHandler) Handle(ctx context.Context, conn jsonrpc2.JSONRPC2, req *j
return generateConcept(req)
case "gauge/getRunnerLanguage":
return lRunner.lspID, nil
case "gauge/specDirs":
return provider.GetSpecDirs(), nil
default:
return nil, nil
}
Expand Down

0 comments on commit 0403334

Please sign in to comment.