Package org.opengrok.indexer.analysis
Class Ctags
java.lang.Object
org.opengrok.indexer.analysis.Ctags
- All Implemented Interfaces:
Resettable
Provides Ctags by having a running subprocess of ctags.
- Author:
- Chandan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()reset(), and close any running ctags instance.@Nullable DefinitionsRunctagsprogram on a file.getArgv()Gets the command-line arguments used to run ctags.intlongbooleanisClosed()Gets a value indicating if a subprocess of ctags was started, and it is not alive.voidreset()Resets the instance for use for another file but without closing any running ctags instance.voidsetCTagsExtraOptionsFile(String ctagsExtraOptionsFile) voidsetLangMap(LangMap langMap) voidsetTabSize(int tabSize) voidsetTimeout(long timeout)
-
Constructor Details
-
Ctags
public Ctags()Initializes an instance with the currentAnalyzerGuru.getLangMap().
-
-
Method Details
-
isClosed
public boolean isClosed()Gets a value indicating if a subprocess of ctags was started, and it is not alive.- Returns:
trueif the instance should be considered closed and no longer usable.
-
setLangMap
-
getTabSize
public int getTabSize() -
setTabSize
public void setTabSize(int tabSize) -
setCTagsExtraOptionsFile
-
setTimeout
public void setTimeout(long timeout) -
getTimeout
public long getTimeout() -
reset
public void reset()Resets the instance for use for another file but without closing any running ctags instance.- Specified by:
resetin interfaceResettable
-
close
public void close()reset(), and close any running ctags instance. -
getArgv
Gets the command-line arguments used to run ctags.- Returns:
- a defined (immutable) list
-
doCtags
@Nullable public @Nullable Definitions doCtags(String file) throws IOException, InterruptedException Runctagsprogram on a file.- Parameters:
file- file path to process- Returns:
- valid instance of
Definitionsornullon error - Throws:
IOException- I/O exceptionInterruptedException- interrupted command
-