|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.ctags.CTagReader
A class capable of reading a ctags file and searching for identifiers in it. CTags are a useful little tool for things like programmers' text editors. See http://ctags.sourceforge.net for more information.
This file is simply a translation of readtags.c from the Exuberant Ctags' source distribution into Java. This particular class is public domain.
| Field Summary | |
static java.lang.String |
EmptyString
|
static java.lang.String |
PseudoTagPrefix
|
static byte |
TAG_FOLDSORTED
|
static int |
TAG_FULLMATCH
|
static int |
TAG_IGNORECASE
|
static int |
TAG_OBSERVECASE
|
static int |
TAG_PARTIALMATCH
|
static byte |
TAG_SORTED
|
static byte |
TAG_UNSORTED
|
static int |
TAGRESULT_FAILURE
|
static int |
TAGRESULT_SUCCESS
|
| Constructor Summary | |
CTagReader()
Creates a new CTagReader. |
|
| Method Summary | |
boolean |
tagsClose()
"Closes" the current ctag file. |
java.lang.String |
tagsField(TagEntry entry,
java.lang.String key)
Retrieve the value associated with the extension field for a specified key. |
boolean |
tagsFind(TagEntry entry,
java.lang.String name,
int options)
Find the first tag matching `name'. |
boolean |
tagsFindNext(TagEntry entry)
Find the next tag matching the name and options supplied to the most recent call to tagsFind() for the same tag file. |
boolean |
tagsFirst(TagEntry entry)
Returns the first ctag from the ctag file. |
boolean |
tagsNext(TagEntry entry)
Returns the next ctag from the given ctag file. |
void |
tagsOpen(java.lang.String filePath,
TagFileInfo info)
Sets the ctag file to be read by this reader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final byte TAG_UNSORTED
public static final byte TAG_SORTED
public static final byte TAG_FOLDSORTED
public static final int TAG_FULLMATCH
public static final int TAG_PARTIALMATCH
public static final int TAG_OBSERVECASE
public static final int TAG_IGNORECASE
public static final int TAGRESULT_FAILURE
public static final int TAGRESULT_SUCCESS
public static final java.lang.String EmptyString
public static final java.lang.String PseudoTagPrefix
| Constructor Detail |
public CTagReader()
tagsOpen.
| Method Detail |
public void tagsOpen(java.lang.String filePath,
TagFileInfo info)
throws java.io.FileNotFoundException,
java.io.IOException
filePath - The ctag file from which to read.info - Will be populated with information about the ctag file.
java.io.FileNotFoundException - If the specified file does not exist or
cannot be opened for some reason.
java.io.IOException - If an I/O error occurs.
public boolean tagsFirst(TagEntry entry)
throws java.io.IOException
entry - Will contain the tag read, ??? or null if
the read fails ???
java.io.IOException
public boolean tagsNext(TagEntry entry)
throws java.io.IOException
entry - Will be the next ctag in the file, ??? or null
if the read fails???
true if a tag was read, or false if
EOF was reached.
java.io.IOException
public java.lang.String tagsField(TagEntry entry,
java.lang.String key)
entry - The tag entry gotten from a call such as tagsNext.key - The key to search for.
key, or null
if none exists.
public boolean tagsFind(TagEntry entry,
java.lang.String name,
int options)
throws java.io.IOException
entry - Will be the ctag entry found, ??? or null if it
isn't found or an error occurs???name - ???options - ???
true if the tag was found, or false
if it wasn't or file wasn't initialized.
java.io.IOException
public boolean tagsFindNext(TagEntry entry)
throws java.io.IOException
tagsFind() for the same tag file. The
structure pointed to by 'entry' will be populated with information
about the tag file entry.
java.io.IOException
public boolean tagsClose()
throws java.io.IOException
tagsOpen method again.
true if the file was closed, false
if this reader wasn't even initialized so there was no reason
to call close.
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||