Class Ctags

java.lang.Object
org.opengrok.indexer.analysis.Ctags
All Implemented Interfaces:
Resettable

public class Ctags extends Object implements Resettable
Provides Ctags by having a running subprocess of ctags.
Author:
Chandan
  • Constructor Details

  • Method Details

    • isClosed

      public boolean isClosed()
      Gets a value indicating if a subprocess of ctags was started, and it is not alive.
      Returns:
      true if the instance should be considered closed and no longer usable.
    • setLangMap

      public void setLangMap(LangMap langMap)
    • getTabSize

      public int getTabSize()
    • setTabSize

      public void setTabSize(int tabSize)
    • setCTagsExtraOptionsFile

      public void setCTagsExtraOptionsFile(String ctagsExtraOptionsFile)
    • 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:
      reset in interface Resettable
    • close

      public void close()
      reset(), and close any running ctags instance.
    • getArgv

      public List<String> 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
      Run ctags program on a file.
      Parameters:
      file - file path to process
      Returns:
      valid instance of Definitions or null on error
      Throws:
      IOException - I/O exception
      InterruptedException - interrupted command