Skip to content

Commit

Permalink
Revert "Add a useRelativePath option"
Browse files Browse the repository at this point in the history
This reverts commit b24eb29.
  • Loading branch information
unknown committed May 15, 2017
1 parent 247113e commit 655b982
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
3 changes: 1 addition & 2 deletions lib/gtags-symbols-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class GtagsSymbolsView extends SelectListView
@div "Project: #{item['project']}", class: 'secondary-line'
else
@div "#{item['signature']}", class: 'primary-line'
item_path = if atom.config.get('atom-gtags.useRelativePath') then item['relative_path'] else item['path']
@div "#{Path.basename(item['path'])} @ #{item_path}: #{item['line']}", class: 'secondary-line'
@div "#{Path.basename(item['path'])} @ #{item['path']}: #{item['line']}", class: 'secondary-line'

getFilterKey: ->
# console.log "getFilterKey: #{@filterKey}"
Expand Down
22 changes: 9 additions & 13 deletions lib/gtags-symbols.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ GtagsEnv = null
BuildCmdByOptions = {}

FilterKeyByOptions =
"-x": "path"
"-xr": "path"
"-xf": "symbol"
"-xc": "symbol"
"-ax": "path"
"-axr": "path"
"-axf": "symbol"
"-axc": "symbol"


module.exports =
Expand All @@ -31,13 +31,13 @@ class GtagsSymbols

# Public
getDefinitions: (symbolName, symbolFile="") ->
return @gtagsCommand("-x", symbolName)
return @gtagsCommand("-ax", symbolName)

getReferences: (symbolName, symbolFile="") ->
return @_gtagsCommand("-xr", symbolName, Path.dirname(symbolFile))
return @_gtagsCommand("-axr", symbolName, Path.dirname(symbolFile))

getSymbolsOfFile: (path) ->
return @_gtagsCommand("-xf", path, Path.dirname(path))
return @_gtagsCommand("-axf", path, Path.dirname(path))

singleFileUpdate: (path) ->
{symbols, status} = @_gtagsCommand("-p", "", Path.dirname(path))
Expand All @@ -53,7 +53,7 @@ class GtagsSymbols
return {'symbols': {}, 'status': {}}

getCompletions: (prefix) ->
return @gtagsCommand("-xc", prefix)
return @gtagsCommand("-axc", prefix)

buildTags: (path, onCompleted=null) ->
return @_buildTags("build", path, onCompleted)
Expand Down Expand Up @@ -93,10 +93,6 @@ class GtagsSymbols
if @hasTagsFile(path)
{symbols, status} = @_gtagsCommand(options, arg, path)
if symbols?.length > 0
for sym in symbols
relative_path = sym['path']
sym['path'] = "#{path}/#{relative_path}"
sym['relative_path'] = relative_path
syms.push(symbols...)
stas = status
console.log symbols
Expand Down Expand Up @@ -128,7 +124,7 @@ class GtagsSymbols

symbols = global.stdout.toString().match(/[^\r\n]+/g)
console.log symbols
if options is "-xc"
if options is "-axc"
for s in symbols
result.push({"symbol":s})
return {'symbols': result, 'status': {}}
Expand Down
4 changes: 0 additions & 4 deletions lib/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ module.exports = AtomGtags =
type: 'boolean'
default: true

useRelativePath:
type: 'boolean'
default: true

provider: null
gtagsListView: null
modalPanel: null
Expand Down

0 comments on commit 655b982

Please sign in to comment.