|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gjt.sp.jedit.Mode
An edit mode defines specific settings for editing some type of file. One instance of this class is created for each supported edit mode.
Constructor Summary | |
Mode(String name)
Creates a new edit mode. |
Method Summary | |
boolean |
accept(String fileName,
String firstLine)
Returns if the edit mode is suitable for editing the specified file. |
boolean |
getBooleanProperty(String key)
Returns the value of a boolean property. |
String |
getName()
Returns the internal name of this edit mode. |
Object |
getProperty(String key)
Returns a mode property. |
TokenMarker |
getTokenMarker()
Returns the token marker for this mode. |
void |
init()
Initializes the edit mode. |
void |
loadIfNecessary()
Loads the mode from disk if it hasn't been loaded already. |
void |
setProperties(Hashtable props)
Should only be called by XModeHandler . |
void |
setProperty(String key,
Object value)
Sets a mode property. |
void |
setTokenMarker(TokenMarker marker)
Sets the token marker for this mode. |
String |
toString()
Returns a string representation of this edit mode. |
void |
unsetProperty(String key)
Unsets a mode property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Mode(String name)
name
- The name used in mode listings and to query mode
propertiesgetProperty(String)
Method Detail |
public void init()
public TokenMarker getTokenMarker()
public void setTokenMarker(TokenMarker marker)
marker
- The new token markerpublic void loadIfNecessary()
public Object getProperty(String key)
key
- The property namepublic boolean getBooleanProperty(String key)
key
- The property namepublic void setProperty(String key, Object value)
key
- The property namevalue
- The property valuepublic void unsetProperty(String key)
key
- The property namepublic void setProperties(Hashtable props)
XModeHandler
.
public boolean accept(String fileName, String firstLine)
fileName
- The buffer's namefirstLine
- The first line of the bufferpublic String getName()
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |