|
wex v26.04.0
|
Offers ctags handling. More...
#include <wex/ctags/ctags.h>
Public Member Functions | |
| ctags (factory::stc *stc, bool open=true) | |
| Constructor. | |
| const std::string | auto_complete (const std::string &text, const ctags_entry &filter=ctags_entry()) |
| Tries to auto_complete text using the tags file. | |
| int | separator () const |
| Separator used by auto_complete. | |
Static Public Member Functions | |
| static bool | close () |
| Closes ctags file. | |
| static bool | find (const std::string &tag, ctags_entry &filter) |
| Find the tags matching `tag', and fills the matches container. | |
| 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 Public Attributes | |
| static std::string | DEFAULT_TAGFILE = "tags" |
| Default tagfile. | |
Offers ctags handling.
|
explicit |
Constructor.
Uses stc component for presenting ctags results, and opens default tag file, if tag file is not yet opened.
| 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.
| text | text to be completed |
| filter | filter on ctags extension entry, default no filter |
|
static |
Closes ctags file.
Returns false if file was not opened.
|
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. // Otherwise shows a dialog to select a file from the matches. Returns false if dialog was cancelled or ctags file not yet open. */ static bool find( / tag to find const std::string& tag, / a possible active stc factory::stc* stc = nullptr);
/** 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.
| tag | tag |
| filter | tag filter to be filled |
|
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.