|
org.netbeans.modules.editor.guards/1 1.12.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.spi.editor.guards.support.AbstractGuardedSectionsProvider
public abstract class AbstractGuardedSectionsProvider
The helper class that simplifies writing particular GuardedSectionsProvider
implementations. Subclasses have to implement just readSections(char[])
and writeSections(java.util.List methods.
| Nested Class Summary | |
|---|---|
class |
AbstractGuardedSectionsProvider.Result
|
| Constructor Summary | |
|---|---|
protected |
AbstractGuardedSectionsProvider(GuardedEditorSupport editor)
Creates an AbstractGuardedSectionsProvider. |
| Method Summary | |
|---|---|
Reader |
createGuardedReader(InputStream stream,
Charset charset)
Creates a reader able to read persisted sections. |
Writer |
createGuardedWriter(OutputStream stream,
Charset charset)
Creates a writer able to write persisted sections. |
InteriorSection |
createInteriorSection(String name,
int headerBegin,
int headerEnd,
int footerBegin,
int footerEnd)
Creates an interior section object to represent section read by the readSections. |
SimpleSection |
createSimpleSection(String name,
int begin,
int end)
Creates a simple section object to represent section read by the readSections. |
abstract AbstractGuardedSectionsProvider.Result |
readSections(char[] content)
This should be implemented to extract guarded sections out of the passed content. |
abstract char[] |
writeSections(List<GuardedSection> sections,
char[] content)
This should be implemented to persist a list of guarded sections inside the passed content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractGuardedSectionsProvider(GuardedEditorSupport editor)
editor - an editor abstraction| Method Detail |
|---|
public final Reader createGuardedReader(InputStream stream,
Charset charset)
GuardedSectionsProvider
createGuardedReader in interface GuardedSectionsProviderstream - stream containing persisted sectionscharset - charset to decode read bytes, null implies
the system default charset.
public Writer createGuardedWriter(OutputStream stream,
Charset charset)
GuardedSectionsProvider
createGuardedWriter in interface GuardedSectionsProviderstream - stream where the output should be writtencharset - charset used by the writer
public abstract char[] writeSections(List<GuardedSection> sections,
char[] content)
sections - guarded sections to persistcontent - content
public abstract AbstractGuardedSectionsProvider.Result readSections(char[] content)
content - content including guarded sections
public final SimpleSection createSimpleSection(String name,
int begin,
int end)
throws BadLocationException
readSections.
name - the section namebegin - the start offsetend - the end offset
BadLocationException - if the given position does not
represent a valid location in the associated document
public final InteriorSection createInteriorSection(String name,
int headerBegin,
int headerEnd,
int footerBegin,
int footerEnd)
throws BadLocationException
readSections.
name - the section nameheaderBegin - begin the start offset of the first guarded partheaderEnd - end the end offset of the first guarded partfooterBegin - begin the start offset of the second guarded partfooterEnd - end the end offset of the second guarded part
BadLocationException - if the given position does not
represent a valid location in the associated document
|
org.netbeans.modules.editor.guards/1 1.12.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||