Class Abbrevs


  • public class Abbrevs
    extends java.lang.Object
    Abbreviation manager.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ENCODING  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addGlobalAbbrev​(java.lang.String abbrev, java.lang.String expansion)
      Adds an abbreviation to the global abbreviation list.
      static void addModeAbbrev​(java.lang.String mode, java.lang.String abbrev, java.lang.String expansion)
      Adds a mode-specific abbrev.
      static boolean expandAbbrev​(View view, boolean add)
      Expands the abbrev at the caret position in the specified view.
      static boolean getExpandOnInput()  
      static java.util.Hashtable<java.lang.String,​java.lang.String> getGlobalAbbrevs()  
      static java.util.Hashtable<java.lang.String,​java.util.Hashtable<java.lang.String,​java.lang.String>> getModeAbbrevs()  
      static void setExpandOnInput​(boolean expandOnInput)
      Sets if abbreviations should be expanded after the user finishes typing a word.
      static void setGlobalAbbrevs​(java.util.Hashtable<java.lang.String,​java.lang.String> globalAbbrevs)
      Sets the global abbreviation set.
      static void setModeAbbrevs​(java.util.Hashtable<java.lang.String,​java.util.Hashtable<java.lang.String,​java.lang.String>> modes)
      Sets the mode-specific abbreviation set.
      • Methods inherited from class java.lang.Object

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

      • getExpandOnInput

        public static boolean getExpandOnInput()
        Returns:
        if abbreviations should be expanded after the user finishes typing a word.
      • setExpandOnInput

        public static void setExpandOnInput​(boolean expandOnInput)
        Sets if abbreviations should be expanded after the user finishes typing a word.
        Parameters:
        expandOnInput - If true, typing a non-alphanumeric character will automatically attempt to expand the current abbrev
      • expandAbbrev

        public static boolean expandAbbrev​(View view,
                                           boolean add)
        Expands the abbrev at the caret position in the specified view.
        Parameters:
        view - The view
        add - If true and abbrev not found, will ask user if it should be added
        Returns:
        if expanded
        Since:
        jEdit 2.6pre4
      • getGlobalAbbrevs

        public static java.util.Hashtable<java.lang.String,​java.lang.String> getGlobalAbbrevs()
        Returns:
        the global abbreviation set.
        Since:
        jEdit 2.3pre1
      • setGlobalAbbrevs

        public static void setGlobalAbbrevs​(java.util.Hashtable<java.lang.String,​java.lang.String> globalAbbrevs)
        Sets the global abbreviation set.
        Parameters:
        globalAbbrevs - The new global abbrev set
        Since:
        jEdit 2.3pre1
      • getModeAbbrevs

        public static java.util.Hashtable<java.lang.String,​java.util.Hashtable<java.lang.String,​java.lang.String>> getModeAbbrevs()
        Returns:
        the mode-specific abbreviation set.
        Since:
        jEdit 2.3pre1
      • setModeAbbrevs

        public static void setModeAbbrevs​(java.util.Hashtable<java.lang.String,​java.util.Hashtable<java.lang.String,​java.lang.String>> modes)
        Sets the mode-specific abbreviation set.
        Parameters:
        modes - The new mode abbrev set
        Since:
        jEdit 2.3pre1
      • addGlobalAbbrev

        public static void addGlobalAbbrev​(java.lang.String abbrev,
                                           java.lang.String expansion)
        Adds an abbreviation to the global abbreviation list.
        Parameters:
        abbrev - The abbreviation
        expansion - The expansion
        Since:
        jEdit 3.1pre1
      • addModeAbbrev

        public static void addModeAbbrev​(java.lang.String mode,
                                         java.lang.String abbrev,
                                         java.lang.String expansion)
        Adds a mode-specific abbrev.
        Parameters:
        mode - The edit mode
        abbrev - The abbrev
        expansion - The expansion
        Since:
        jEdit 3.1pre1