|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(java.lang.String name)
Creates a new edit mode. |
Method Summary | |
boolean |
accept(java.lang.String fileName,
java.lang.String firstLine)
Returns if the edit mode is suitable for editing the specified file. |
boolean |
getBooleanProperty(java.lang.String key)
Returns the value of a boolean property. |
java.lang.String |
getName()
Returns the internal name of this edit mode. |
java.lang.Object |
getProperty(java.lang.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(java.util.Hashtable props)
Should only be called by XModeHandler . |
void |
setProperty(java.lang.String key,
java.lang.Object value)
Sets a mode property. |
void |
setTokenMarker(TokenMarker marker)
Sets the token marker for this mode. |
java.lang.String |
toString()
Returns a string representation of this edit mode. |
void |
unsetProperty(java.lang.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(java.lang.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 java.lang.Object getProperty(java.lang.String key)
key
- The property namepublic boolean getBooleanProperty(java.lang.String key)
key
- The property namepublic void setProperty(java.lang.String key, java.lang.Object value)
key
- The property namevalue
- The property valuepublic void unsetProperty(java.lang.String key)
key
- The property namepublic void setProperties(java.util.Hashtable props)
XModeHandler
.
public boolean accept(java.lang.String fileName, java.lang.String firstLine)
fileName
- The buffer's namefirstLine
- The first line of the bufferpublic java.lang.String getName()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |