Offers ctags handling.
More...
#include <wex/ctags/ctags.h>
|
static bool | close () |
| Closes ctags file.
|
|
static bool | find (const std::string &tag, factory::stc *stc=nullptr) |
| Find the tags matching ‘tag’, and fills the matches container.
|
|
static bool | find (const std::string &tag, ctags_entry &filter) |
| Finds the tag matching 'tag' and uses it to fill the supplied entries.
|
|
static bool | next () |
| Jumps to next match from a previous find.
|
|
static bool | open (const std::string &filename=DEFAULT_TAGFILE) |
| Opens ctags file.
|
|
static bool | previous () |
| Jumps to previous match from a previous find.
|
|
|
static std::string | DEFAULT_TAGFILE = "tags" |
| Default tagfile.
|
|
◆ ctags()
Constructor.
Uses stc component for presenting ctags results, and opens default tag file, if tag file is not yet opened.
◆ auto_complete()
const std::string wex::ctags::auto_complete |
( |
const std::string & | text, |
|
|
const ctags_entry & | filter = ctags_entry() ) |
Tries to auto_complete text using the tags file.
Returns a string with matches separated by the separator character, or empty string if no match is found.
- Parameters
-
text | text to be completed |
filter | filter on ctags extension entry, default no filter |
◆ close()
static bool wex::ctags::close |
( |
| ) |
|
|
static |
Closes ctags file.
Returns false if file was not opened.
◆ find() [1/2]
static bool wex::ctags::find |
( |
const std::string & | tag, |
|
|
ctags_entry & | filter ) |
|
static |
Finds the tag matching 'tag' and uses it to fill the supplied entries.
Returns false if ctags file not yet opened. Returns true if a matching tag is found, and can be used as a master.
- Parameters
-
tag | tag |
filter | tag filter to be filled |
◆ find() [2/2]
static bool wex::ctags::find |
( |
const std::string & | tag, |
|
|
factory::stc * | stc = nullptr ) |
|
static |
Find the tags matching ‘tag’, and fills the matches container.
Returns true if a matching tag is found, and calls frame open_file if name matches and there is no next match in another file. If the name is empty, next is invoked. Returns false if dialog was cancelled or ctags file not yet open.
- Parameters
-
tag | tag to find |
stc | a possible active stc |
◆ open()
static bool wex::ctags::open |
( |
const std::string & | filename = DEFAULT_TAGFILE | ) |
|
|
static |
Opens ctags file.
Default uses standard ctags file, but you can choose your own name. This file is searched for in the current dir, and if not found in the config dir. You can also specify an absolute filename. Returns false if no ctags file is opened.