|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gjt.sp.jedit.buffer.FoldHandler
Interface for obtaining the fold level of a specified line.
Plugins can provide fold handlers by defining entries in their
services.xml
files like so:
<SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="name"> new MyFoldHandler(); </SERVICE>See
ServiceManager
for details.
Field Summary | |
static java.lang.String |
SERVICE
The service type. |
Constructor Summary | |
protected |
FoldHandler(java.lang.String name)
|
Method Summary | |
boolean |
equals(java.lang.Object o)
Returns if the specified fold handler is equal to this one. |
static FoldHandler |
getFoldHandler(java.lang.String name)
Returns the fold handler with the specified name, or null if there is no registered handler with that name. |
static FoldHandler[] |
getFoldHandlers()
Deprecated. Call ServiceManager.getServiceNames(
"org.gjt.sp.jedit.buffer.FoldHandler" ); instead. See
ServiceManager . |
abstract int |
getFoldLevel(Buffer buffer,
int lineIndex,
javax.swing.text.Segment seg)
Returns the fold level of the specified line. |
static java.lang.String[] |
getFoldModes()
Returns an array containing the names of all registered fold handlers. |
java.lang.String |
getName()
Returns the internal name of this FoldHandler |
int |
hashCode()
|
static void |
registerFoldHandler(FoldHandler handler)
Deprecated. Write a services.xml file instead;
see ServiceManager . |
java.lang.String |
toString()
|
static void |
unregisterFoldHandler(FoldHandler handler)
Deprecated. Write a services.xml file instead;
see ServiceManager . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String SERVICE
ServiceManager
.
Constructor Detail |
protected FoldHandler(java.lang.String name)
Method Detail |
public java.lang.String getName()
public abstract int getFoldLevel(Buffer buffer, int lineIndex, javax.swing.text.Segment seg)
buffer
- The buffer in questionlineIndex
- The line indexseg
- A segment the fold handler can use to obtain any
text from the buffer, if necessary
public boolean equals(java.lang.Object o)
o
- The objectpublic int hashCode()
public static void registerFoldHandler(FoldHandler handler)
services.xml
file instead;
see ServiceManager
.
public static void unregisterFoldHandler(FoldHandler handler)
services.xml
file instead;
see ServiceManager
.
public static FoldHandler[] getFoldHandlers()
ServiceManager.getServiceNames(
"org.gjt.sp.jedit.buffer.FoldHandler" );
instead. See
ServiceManager
.
public static FoldHandler getFoldHandler(java.lang.String name)
name
- The name of the desired fold handlerpublic static java.lang.String[] getFoldModes()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |