mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
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:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user