Class EditorUtils
java.lang.Object
de.funfried.netbeans.plugins.external.formatter.ui.editor.EditorUtils
- Author:
- bahlef
-
Method Summary
Modifier and TypeMethodDescriptiongetChangedElements
(org.netbeans.modules.editor.indent.spi.Context context) static StyledDocument
toStyledDocument
(Document document) Returns the givenDocument
as aStyledDocument
ornull
if the givenDocument
isn't aStyledDocument
.
-
Method Details
-
getChangedElements
@NonNull public static SortedSet<Pair<Integer,Integer>> getChangedElements(org.netbeans.modules.editor.indent.spi.Context context) - Parameters:
context
- theContext
- Returns:
- the
Context.indentRegions()
from the givenContext
as aSortedSet
-
toStyledDocument
Returns the givenDocument
as aStyledDocument
ornull
if the givenDocument
isn't aStyledDocument
.- Parameters:
document
- theDocument
- Returns:
- the given
Document
as aStyledDocument
ornull
if the givenDocument
isn't aStyledDocument
-