Skip to content
This repository

Linkify class declarations. #91

Closed
wants to merge 2 commits into from

2 participants

James Abbatiello Erik Rose
James Abbatiello
Collaborator

For example in:
class Foo
class Foo {};
the first "Foo" will be hyperlinked.

James Abbati... added some commits
James Abbatiello Linkify class declarations.
For example in:
  class Foo
  class Foo {};
the first "Foo" will be hyperlinked.
42e6571
James Abbatiello Merge branch 'testing' of https://github.com/mozilla/dxr into class-decl a5d62e0
Erik Rose
Owner

Merged in aa75f42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Feb 05, 2013
James Abbatiello Linkify class declarations.
For example in:
  class Foo
  class Foo {};
the first "Foo" will be hyperlinked.
42e6571
Feb 06, 2013
James Abbatiello Merge branch 'testing' of https://github.com/mozilla/dxr into class-decl a5d62e0
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 17 additions and 0 deletions. Show diff stats Hide diff stats

  1. +17 0 dxr/plugins/clang/htmlifier.py
17 dxr/plugins/clang/htmlifier.py
@@ -99,6 +99,23 @@ def refs(self):
99 99 for start, end, qualname, kind in self.conn.execute(sql, args):
100 100 yield start, end, self.type_menu(qualname, kind)
101 101
  102 + # Extents for types declared here
  103 + sql = """
  104 + SELECT decldef.extent_start,
  105 + decldef.extent_end,
  106 + types.qualname,
  107 + types.kind,
  108 + (SELECT path FROM files WHERE files.id = types.file_id),
  109 + types.file_line
  110 + FROM decldef, types
  111 + WHERE decldef.defid = types.id
  112 + AND decldef.file_id = ?
  113 + """
  114 + for start, end, qualname, kind, path, line in self.conn.execute(sql, args):
  115 + menu = self.type_menu(qualname, kind)
  116 + self.add_jump_definition(menu, path, line)
  117 + yield start, end, menu
  118 +
102 119 # Extents for typedefs defined here
103 120 sql = """
104 121 SELECT extent_start, extent_end, qualname

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.