Don't include tag prefix and suffix

Just include the tag name in the symbols view
instead of the lengthy namespace prefix and signature
suffix.

Refs #134
This commit is contained in:
Kevin Sawicki
2013-02-05 10:04:37 -08:00
parent 1b2c7faed9
commit 7ecafb1594

View File

@@ -6,40 +6,13 @@ class TagGenerator
constructor: (@path, @callback) ->
parsePrefix: (section = "") ->
if section.indexOf('class:') is 0
section.substring(6)
else if section.indexOf('namespace:') is 0
section.substring(10)
else if section.indexOf('file:') is 0
section.substring(5)
else if section.indexOf('signature:') is 0
section.substring(10)
else if section.indexOf('struct:') is 0
section.substring(7)
else
section
parseTagLine: (line) ->
sections = line.split('\t')
return null if sections.length < 4
label = sections[0]
line = parseInt(sections[2]) - 1
if sections.length > 5
if prefix = @parsePrefix(sections[4])
label = "#{prefix}::#{label}"
if suffix = @parsePrefix(sections[5])
label = "#{label}#{suffix}"
if sections.length > 3
position: new Point(parseInt(sections[2]) - 1)
name: sections[0]
else
if suffix = @parsePrefix(sections[4])
label = "#{label}#{suffix}"
tag =
position: new Point(line, 0)
name: label
return tag
null
generate: ->
options =