File: symref.el.html

Semantic Symbol Reference API.

Semantic's native parsing tools do not handle symbol references. Tracking such information is a task that requires a huge amount of space and processing not appropriate for an Emacs Lisp program.

Many desired tools used in refactoring, however, need to have such references available to them. This API aims to provide a range of functions that can be used to identify references. The API is backed by an OO system that is used to allow multiple external tools to provide the information.

The default implementation uses a find/grep combination to do a search. This works ok in small projects. For larger projects, it is important to find an alternate tool to use as a back-end to symref.

See the command: semantic-symref for an example app using this api.

TO USE THIS TOOL

The following functions can be used to find different kinds of references.

 semantic-symref-find-references-by-name
 semantic-symref-find-file-references-by-name
 semantic-symref-find-text

All the search routines return a class of type semantic-symref-result(var)/semantic-symref-result(fun). You can reference the various slots, but you will need the following methods to get extended information.

 semantic-symref-result-get-files
 semantic-symref-result-get-tags

ADD A NEW EXTERNAL TOOL

To support a new external tool, subclass semantic-symref-tool-baseclass(var)/semantic-symref-tool-baseclass(fun) and implement the methods. The baseclass provides support for managing external processes that produce parsable output.

Your tool should then create an instance of semantic-symref-result(var)/semantic-symref-result(fun).

Defined variables (4)

semantic-symref-last-resultThe last calculated symref result.
semantic-symref-recently-opened-buffersList of buffers opened by ‘semantic-symref-result-get-tags’.
semantic-symref-toolThe active symbol reference tool name.
semantic-symref-tool-alistAlist of tools usable by ‘semantic-symref’.

Defined functions (21)

semantic-symref-calculate-rootdir()
semantic-symref-cleanup-recent-buffers-fcn()
semantic-symref-data-debug-last-result()
semantic-symref-detect-symref-tool()
semantic-symref-find-file-references-by-name(NAME &optional SCOPE)
semantic-symref-find-references-by-name(NAME &optional SCOPE TOOL-RETURN)
semantic-symref-find-tags-by-completion(NAME &optional SCOPE)
semantic-symref-find-tags-by-name(NAME &optional SCOPE)
semantic-symref-find-tags-by-regexp(NAME &optional SCOPE)
semantic-symref-find-text(TEXT &optional SCOPE)
semantic-symref-hit-to-tag-via-buffer(HIT SEARCHTXT SEARCHTYPE &optional OPEN-BUFFERS)
semantic-symref-hit-to-tag-via-db(HIT SEARCHTXT SEARCHTYPE)
semantic-symref-instantiate(&rest ARGS)
semantic-symref-result(&rest SLOTS)
semantic-symref-result--eieio-childp(OBJ)
semantic-symref-result-child-p(OBJ)
semantic-symref-result-p(OBJ)
semantic-symref-tool-baseclass(&rest _)
semantic-symref-tool-baseclass--eieio-childp(OBJ)
semantic-symref-tool-baseclass-child-p(OBJ)
semantic-symref-tool-baseclass-p(OBJ)

Defined faces (0)