Class CapitalizeWordsOperation
java.lang.Object
ro.sync.ecss.extensions.commons.operations.text.FormSelectedTextOperation
ro.sync.ecss.extensions.commons.operations.text.CapitalizeWordsOperation
- All Implemented Interfaces:
AuthorOperation
,Extension
@API(type=INTERNAL,
src=PUBLIC)
public class CapitalizeWordsOperation
extends FormSelectedTextOperation
The class provides an operation for forming words over a selection.
If the start character of a word is lower case, it will be changed to upper case.
-
Field Summary
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorOperation
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isDelimiterBeforeTextNode
(AuthorAccess authorAccess, int contentOffset) Decides if there is a sentence delimiter before the text node.protected char[]
processTextContent
(char[] charArray, boolean isDelimiterBefore) Process char array and upper case first letter of containing words.Methods inherited from class ro.sync.ecss.extensions.commons.operations.text.FormSelectedTextOperation
doOperation, getArguments, isWordDelimiter
-
Constructor Details
-
CapitalizeWordsOperation
public CapitalizeWordsOperation()
-
-
Method Details
-
isDelimiterBeforeTextNode
protected boolean isDelimiterBeforeTextNode(AuthorAccess authorAccess, int contentOffset) throws BadLocationException, AuthorOperationException Description copied from class:FormSelectedTextOperation
Decides if there is a sentence delimiter before the text node.- Specified by:
isDelimiterBeforeTextNode
in classFormSelectedTextOperation
contentOffset
- The offset where search is started.- Returns:
true
if the there is a sentence delimiter before the text node orfalse
if a non-delimiter character was found.- Throws:
BadLocationException
AuthorOperationException
- See Also:
-
processTextContent
protected char[] processTextContent(char[] charArray, boolean isDelimiterBefore) Process char array and upper case first letter of containing words.- Specified by:
processTextContent
in classFormSelectedTextOperation
- Parameters:
charArray
- The character array that must be processed.isDelimiterBefore
-true
if we have a delimiter before the given char array,false
otherwise.
-
getDescription
- Returns:
- The description of the extension.
- See Also:
-