Class ShellCompletionProvider

  • All Implemented Interfaces:
    org.fife.ui.autocomplete.CompletionProvider, org.fife.ui.rtextarea.ToolTipSupplier

    public class ShellCompletionProvider
    extends CCompletionProvider
    A completion provider for Unix shell scripts.
    Version:
    1.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static boolean useLocalManPages
      Whether local man pages should be used for function descriptions.
      • Fields inherited from class org.fife.ui.autocomplete.CompletionProviderBase

        EMPTY_STRING
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addShorthandCompletions​(org.fife.ui.autocomplete.DefaultCompletionProvider codeCP)
      Adds shorthand completions to the code completion provider.
      protected org.fife.ui.autocomplete.CompletionProvider createStringCompletionProvider()
      Returns the completion provider to use when the caret is in a string.
      char getParameterListEnd()
      char getParameterListStart()
      static boolean getUseLocalManPages()
      Returns whether the local system's man pages should be used for descriptions of functions.
      protected java.lang.String getXmlResource()
      Returns the name of the XML resource to load (on classpath or a file).
      static void setUseLocalManPages​(boolean use)
      Sets whether the local system's man pages should be used for descriptions of functions.
      • Methods inherited from class org.fife.ui.autocomplete.LanguageAwareCompletionProvider

        clearParameterizedCompletionParams, getAlreadyEnteredText, getCommentCompletionProvider, getCompletionsAt, getCompletionsImpl, getDefaultCompletionProvider, getDocCommentCompletionProvider, getParameterizedCompletions, getParameterListSeparator, getStringCompletionProvider, getToolTipText, isAutoActivateOkay, setCommentCompletionProvider, setDefaultCompletionProvider, setDocCommentCompletionProvider, setParameterizedCompletionParams, setStringCompletionProvider
      • Methods inherited from class org.fife.ui.autocomplete.CompletionProviderBase

        getCompletions, getListCellRenderer, getParameterChoicesProvider, getParent, setAutoActivationRules, setListCellRenderer, setParameterChoicesProvider, setParent
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • useLocalManPages

        private static boolean useLocalManPages
        Whether local man pages should be used for function descriptions.
    • Constructor Detail

      • ShellCompletionProvider

        public ShellCompletionProvider()
        Constructor.
    • Method Detail

      • addShorthandCompletions

        protected void addShorthandCompletions​(org.fife.ui.autocomplete.DefaultCompletionProvider codeCP)
        Adds shorthand completions to the code completion provider.
        Overrides:
        addShorthandCompletions in class CCompletionProvider
        Parameters:
        codeCP - The code completion provider.
      • getParameterListEnd

        public char getParameterListEnd()
        Specified by:
        getParameterListEnd in interface org.fife.ui.autocomplete.CompletionProvider
        Overrides:
        getParameterListEnd in class org.fife.ui.autocomplete.LanguageAwareCompletionProvider
      • getParameterListStart

        public char getParameterListStart()
        Specified by:
        getParameterListStart in interface org.fife.ui.autocomplete.CompletionProvider
        Overrides:
        getParameterListStart in class org.fife.ui.autocomplete.LanguageAwareCompletionProvider
      • getUseLocalManPages

        public static boolean getUseLocalManPages()
        Returns whether the local system's man pages should be used for descriptions of functions. If this returns false, or man cannot be found (e.g. if this is Windows), a shorter description will be used instead.
        Returns:
        Whether to use the local man pages in function descriptions.
        See Also:
        setUseLocalManPages(boolean)
      • getXmlResource

        protected java.lang.String getXmlResource()
        Returns the name of the XML resource to load (on classpath or a file).
        Overrides:
        getXmlResource in class CCompletionProvider
        Returns:
        The resource to load.
      • setUseLocalManPages

        public static void setUseLocalManPages​(boolean use)
        Sets whether the local system's man pages should be used for descriptions of functions. If this is set to false, or man cannot be found (e.g. if this is Windows), a shorter description will be used instead.
        Parameters:
        use - Whether to use the local man pages in function descriptions.
        See Also:
        getUseLocalManPages()