java.lang.Object
org.gjt.sp.jedit.Abbrevs
Abbreviation manager.
- Version:
- $Id: Abbrevs.java 24211 2015-12-10 03:33:28Z daleanson $
- Author:
- Slava Pestov
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addGlobalAbbrev
(String abbrev, String expansion) Adds an abbreviation to the global abbreviation list.static void
addModeAbbrev
(String mode, String abbrev, 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
static void
setExpandOnInput
(boolean expandOnInput) Sets if abbreviations should be expanded after the user finishes typing a word.static void
setGlobalAbbrevs
(Hashtable<String, String> globalAbbrevs) Sets the global abbreviation set.static void
Sets the mode-specific abbreviation set.
-
Field Details
-
ENCODING
- See Also:
-
-
Method Details
-
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
Expands the abbrev at the caret position in the specified view.- Parameters:
view
- The viewadd
- If true and abbrev not found, will ask user if it should be added- Returns:
- if expanded
- Since:
- jEdit 2.6pre4
-
getGlobalAbbrevs
- Returns:
- the global abbreviation set.
- Since:
- jEdit 2.3pre1
-
setGlobalAbbrevs
Sets the global abbreviation set.- Parameters:
globalAbbrevs
- The new global abbrev set- Since:
- jEdit 2.3pre1
-
getModeAbbrevs
- Returns:
- the mode-specific abbreviation set.
- Since:
- jEdit 2.3pre1
-
setModeAbbrevs
Sets the mode-specific abbreviation set.- Parameters:
modes
- The new mode abbrev set- Since:
- jEdit 2.3pre1
-
addGlobalAbbrev
Adds an abbreviation to the global abbreviation list.- Parameters:
abbrev
- The abbreviationexpansion
- The expansion- Since:
- jEdit 3.1pre1
-
addModeAbbrev
Adds a mode-specific abbrev.- Parameters:
mode
- The edit modeabbrev
- The abbrevexpansion
- The expansion- Since:
- jEdit 3.1pre1
-