java.lang.Object
org.gjt.sp.jedit.syntax.ModeProvider
This class works like a singleton, the instance is initialized by jEdit.
- Since:
- jEdit 4.3pre10
- Version:
- $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
- Author:
- Matthieu Casanova
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Do not call this method.void
addUserMode
(Mode mode, Path target) Do not call this method.protected void
Returns the edit mode with the specified name.getModeForFile
(String filename, String firstLine) Get the appropriate mode that must be used for the filegetModeForFile
(String filepath, String filename, String firstLine) Get the appropriate mode that must be used for the fileMode[]
getModes()
Returns an array of installed edit modes.void
void
loadMode
(Mode mode, XModeHandler xmh) void
boolean
removeMode
(String name) Will only remove user modes.
-
Field Details
-
instance
-
-
Constructor Details
-
ModeProvider
public ModeProvider()
-
-
Method Details
-
removeAll
public void removeAll() -
removeMode
Will only remove user modes.- Returns:
- true if the mode was removed, false otherwise.
- Throws:
IOException
-
getMode
Returns the edit mode with the specified name.- Parameters:
name
- The edit mode- Since:
- jEdit 4.3pre10
-
getModeForFile
Get the appropriate mode that must be used for the file- Parameters:
filename
- the filenamefirstLine
- the first line of the file- Returns:
- the edit mode, or null if no mode match the file
- Since:
- jEdit 4.3pre12
-
getModeForFile
Get the appropriate mode that must be used for the file- Parameters:
filepath
- the filepath, can benull
filename
- the filename, can benull
firstLine
- the first line of the file- Returns:
- the edit mode, or null if no mode match the file
- Since:
- jEdit 4.5pre1
-
getModes
Returns an array of installed edit modes.- Since:
- jEdit 4.3pre10
-
addMode
Do not call this method. It is only public so that classes in the org.gjt.sp.jedit.syntax package can access it.- Parameters:
mode
- The edit mode- Since:
- jEdit 4.3pre10
- See Also:
-
addUserMode
Do not call this method. It is only public so that classes in the org.gjt.sp.jedit.syntax package can access it.- Parameters:
mode
- The edit mode- Throws:
IOException
- Since:
- jEdit 4.3pre10
- See Also:
-
loadMode
-
loadMode
-
error
-