Package ro.sync.ecss.extensions.api
Interface AuthorAccessDeprecated
-
- All Known Subinterfaces:
AuthorAccess
@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface AuthorAccessDeprecated
Contains methods that are deprecated in theAuthorAccess
and should no longer be used.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addAuthorListener(AuthorListener listener)
Deprecated.java.io.File
chooseFile(java.lang.String title, java.lang.String[] allowedExtensions, java.lang.String filterDescr)
Deprecated.java.io.File
chooseFile(java.lang.String title, java.lang.String[] allowedExtensions, java.lang.String filterDescr, boolean openForSave)
Deprecated.java.net.URL
chooseURL(java.lang.String title, java.lang.String[] allowedExtensions, java.lang.String filterDescr)
Deprecated.java.lang.String
correctURL(java.lang.String url)
Deprecated.UseUtilAccess.correctURL(String)
instead.void
deleteSelection()
Deprecated.UseWSAuthorEditorPageBase.deleteSelection()
instead.java.lang.String
escapeAttributeValue(java.lang.String attributeValue)
Deprecated.UseAuthorUtilAccess.escapeAttributeValue(String)
instead.java.lang.Object[]
evaluateXPath(java.lang.String xpathExpression, boolean ignoreTexts, boolean ignoreCData, boolean ignoreComments)
Deprecated.AuthorNode[]
findNodesByXPath(java.lang.String xpathExpression, boolean ignoreTexts, boolean ignoreCData, boolean ignoreComments)
Deprecated.int
getCaretOffset()
Deprecated.Use
instead.WSTextBasedEditorPage.getCaretOffset()
AuthorChangeTrackingController
getChangeTrackingController()
Deprecated.Use
instead.AuthorAccess.getReviewController()
java.net.URL
getEditorLocation()
Deprecated.UseWSEditorBase.getEditorLocation()
instead.java.lang.Object
getParentFrame()
Deprecated.UseWorkspaceUtilities.getParentFrame()
instead.java.lang.String
getSelectedText()
Deprecated.Use
instead.WSAuthorEditorPageBase.getSelectedText()
int
getSelectionEnd()
Deprecated.Use
instead.WSAuthorEditorPageBase.getSelectionEnd()
int
getSelectionStart()
Deprecated.Use
instead.WSAuthorEditorPageBase.getSelectionStart()
AuthorElement
getTableCellAbove(AuthorElement cellElement)
Deprecated.UseAuthorTableAccess.getTableCellAbove(AuthorElement)
instead.AuthorElement
getTableCellAt(int row, int column, AuthorElement tableElement)
Deprecated.AuthorElement
getTableCellBelow(AuthorElement cellElement)
Deprecated.UseAuthorTableAccess.getTableCellBelow(AuthorElement)
instead.int[]
getTableCellIndex(AuthorElement authorElement)
Deprecated.UseAuthorTableAccess.getTableCellIndex(AuthorElement)
instead.int[]
getTableColSpanIndices(AuthorElement cellElement)
Deprecated.int
getTableNumberOfColumns(AuthorElement tableElement)
Deprecated.AuthorElement
getTableRow(int index, AuthorElement tableElement)
Deprecated.UseAuthorTableAccess.getTableRow(int, AuthorElement)
instead.int
getTableRowCount(AuthorElement tableElement)
Deprecated.UseAuthorTableAccess.getTableRowCount(AuthorElement)
instead.int[]
getWordAtCaret()
Deprecated.UseWSTextBasedEditorPage.getWordAtCaret()
instead.boolean
hasSelection()
Deprecated.UseWSAuthorEditorPageBase.hasSelection()
instead.boolean
inInlineContext(int offset)
Deprecated.UseAuthorDocumentController.inInlineContext(int)
instead.void
insertMultipleElements(AuthorElement parentElement, java.lang.String[] elementNames, int[] offsets, java.lang.String namespace)
Deprecated.void
insertText(java.lang.String text, int offset)
Deprecated.UseAuthorDocumentController.insertText(int, String)
instead.void
insertXMLFragment(java.lang.String xmlFragment, int offset)
Deprecated.void
insertXMLFragment(java.lang.String xmlFragment, java.lang.String xpathLocation, java.lang.String relativePosition)
Deprecated.boolean
isStandalone()
Deprecated.UseWorkspace.isStandalone()
instead.boolean
isTrackingChanges()
Deprecated.UseChangeTrackingController.isTrackingChanges()
instead.java.io.File
locateFile(java.net.URL url)
Deprecated.UseUtilAccess.locateFile(URL)
instead.java.lang.String
makeRelative(java.net.URL baseURL, java.net.URL childURL)
Deprecated.UseUtilAccess.makeRelative(URL, URL)
instead.void
multipleDelete(AuthorElement parentElement, int[] startOffsets, int[] endOffsets)
Deprecated.org.xml.sax.XMLReader
newNonValidatingXMLReader()
Deprecated.UseAuthorUtilAccess.newNonValidatingXMLReader()
instead.void
removeAuthorListener(AuthorListener listener)
Deprecated.void
removeClonedElementAttribute(AuthorElement element, java.lang.String attrName)
Deprecated.UseAuthorElement.removeAttribute(String)
instead.java.net.URL
resolvePath(java.net.URL baseURL, java.lang.String relativeLocation, boolean entityResolve, boolean uriResolve)
Deprecated.void
select(int startOffset, int endOffset)
Deprecated.UseWSAuthorEditorPageBase.select(int, int)
instead.void
selectWord()
Deprecated.UseWSTextBasedEditorPage.selectWord()
instead.void
setCaretPosition(int offset)
Deprecated.UseWSTextBasedEditorPage.setCaretPosition(int)
instead.void
setClonedElementAttribute(AuthorElement element, java.lang.String name, AttrValue attributeValue)
Deprecated.UseAuthorElement.setAttribute(String, AttrValue)
instead.int
showConfirmDialog(java.lang.String title, java.lang.String message, java.lang.String[] buttonNames, int[] buttonIds)
Deprecated.void
showErrorMessage(java.lang.String message)
Deprecated.UseWorkspaceUtilities.showErrorMessage(String)
instead.void
surroundInFragment(java.lang.String xmlFragment, int startOffset, int endOffset)
Deprecated.void
surroundInText(java.lang.String header, java.lang.String footer, int startOffset, int endOffset)
Deprecated.void
toggleTrackChanges()
Deprecated.UseChangeTrackingController.toggleTrackChanges()
instead.AuthorViewToModelInfo
viewToModel(int x, int y)
Deprecated.UseWSAuthorEditorPageBase.viewToModel(int, int)
instead.
-
-
-
Method Detail
-
getSelectionStart
@Deprecated int getSelectionStart()
Deprecated.Use
instead.WSAuthorEditorPageBase.getSelectionStart()
Get the offset of the selection start. It is inclusive.- Returns:
- The offset of the selection start, 0 based.
-
getSelectionEnd
@Deprecated int getSelectionEnd()
Deprecated.Use
instead.WSAuthorEditorPageBase.getSelectionEnd()
Get the offset of the selection end. It is exclusive.- Returns:
- The offset of the selection end, zero based.
-
getSelectedText
@Deprecated java.lang.String getSelectedText()
Deprecated.Use
instead.WSAuthorEditorPageBase.getSelectedText()
Get the selected text. The text does not contains XML tags.- Returns:
- The selected text or the empty string if no selection is present.
-
getCaretOffset
@Deprecated int getCaretOffset()
Deprecated.Use
instead. For example if you have an AuthorAccess object then use authorAccess.getEditorAccess().getCaretOffset().WSTextBasedEditorPage.getCaretOffset()
The current caret offset.- Returns:
- The caret offset, 0 based.
-
insertText
@Deprecated void insertText(java.lang.String text, int offset)
Deprecated.UseAuthorDocumentController.insertText(int, String)
instead.Inserts a text at the offset. After the operation is performed the caret will be positioned at the end of the inserted text.- Parameters:
text
- The text to insert.offset
- The offset of the insertion point, 0 based.
-
insertXMLFragment
@Deprecated void insertXMLFragment(java.lang.String xmlFragment, int offset) throws AuthorOperationException
Deprecated.Insert an XML fragment at the given offset. After the operation is performed the caret will be positioned at the end of the inserted XML fragment.- Parameters:
xmlFragment
- The XML fragment.offset
- The offset of the insertion point, 0 based.- Throws:
AuthorOperationException
- If it could not be inserted.
-
insertXMLFragment
@Deprecated void insertXMLFragment(java.lang.String xmlFragment, java.lang.String xpathLocation, java.lang.String relativePosition) throws AuthorOperationException
Deprecated.Insert an XML fragment at the node specified by the xpathLocation and relativePosition. Note: if thexpathLocation
is not specified then the XML fragment will be inserted at the caret position(relativePosition
is ignored).
After the operation is performed the caret will be positioned at the end of the inserted XML fragment.- Parameters:
xmlFragment
- The XML fragment.xpathLocation
- The xpath location.relativePosition
- The position relative to the node identified by the xpath location. Can be one of the constants: AuthorConstants.POSITION_BEFORE, AuthorConstants.POSITION_AFTER, AuthorConstants.POSITION_INSIDE.- Throws:
AuthorOperationException
- If it could not be inserted.
-
deleteSelection
@Deprecated void deleteSelection()
Deprecated.UseWSAuthorEditorPageBase.deleteSelection()
instead.Delete the selected text, if any.
-
hasSelection
@Deprecated boolean hasSelection()
Deprecated.UseWSAuthorEditorPageBase.hasSelection()
instead.- Returns:
true
If there is a selection,false
otherwise.
-
selectWord
@Deprecated void selectWord()
Deprecated.UseWSTextBasedEditorPage.selectWord()
instead.Select the word at caret.
-
surroundInFragment
@Deprecated void surroundInFragment(java.lang.String xmlFragment, int startOffset, int endOffset) throws AuthorOperationException
Deprecated.Surround the given offsets inxmlFragment
. If endOffset < startOffset thexmlFragment
will be inserted atstartOffset
.- Parameters:
xmlFragment
- The XML fragment which will surround the given offsets. The first XML fragment leaf(deepest on the first branch) will be the surround point.startOffset
- The start offset of the fragment to be surrounded, 0 based and inclusive.endOffset
- The end offset of the fragment to be surrounded, 0 based and inclusive.- Throws:
AuthorOperationException
- If the fragment between the offsets could not be surrounded.
-
surroundInText
@Deprecated void surroundInText(java.lang.String header, java.lang.String footer, int startOffset, int endOffset)
Deprecated.Surround the given offsets in plain text(without XML parsing) by inserting the header at the start offset and the footer at the endOffset.- Parameters:
header
- The header to be inserted before the surrounded text.footer
- The footer to be inserted after the surrounded text.startOffset
- The start offset of the text to be surrounded, 0 based.endOffset
- The end offset of the text to be surrounded, zero based.
-
setCaretPosition
@Deprecated void setCaretPosition(int offset)
Deprecated.UseWSTextBasedEditorPage.setCaretPosition(int)
instead.Move the caret to the specified offset.- Parameters:
offset
- The offset where the caret should be positioned, 0 based.
-
select
@Deprecated void select(int startOffset, int endOffset)
Deprecated.UseWSAuthorEditorPageBase.select(int, int)
instead.Select the interval between start and end offset.- Parameters:
startOffset
- Inclusive start offsetendOffset
- Exclusive end offset
-
getWordAtCaret
@Deprecated int[] getWordAtCaret()
Deprecated.UseWSTextBasedEditorPage.getWordAtCaret()
instead.Compute the offsets of the word that contains the caret position.- Returns:
- An array with the start and end offsets of the word at caret.
null
if the offsets couldn't be obtained.
-
getParentFrame
@Deprecated java.lang.Object getParentFrame()
Deprecated.UseWorkspaceUtilities.getParentFrame()
instead.Returns the parent frame.- Returns:
- The parent frame (
or @link java.awt.Frame (when running as a JApplet)
) of the Oxygen application or the parent shell(Shell) if this is the Eclipse implementation.
-
makeRelative
@Deprecated java.lang.String makeRelative(java.net.URL baseURL, java.net.URL childURL)
Deprecated.UseUtilAccess.makeRelative(URL, URL)
instead.Make the child path relative to the parent.The child path is relatively expressed to the base file. If is not possible, the child URL is returned.
Ex: Base: "file://c:/projects/exml/base.prx", Child "file://c:/projects/exml/test/someTest.xml"
Result: "test/someTest.xml"
- Parameters:
baseURL
- The base URL.childURL
- The child URL.- Returns:
- The relative path or the
childURL
if a relative path cannot be computed.
-
escapeAttributeValue
@Deprecated java.lang.String escapeAttributeValue(java.lang.String attributeValue)
Deprecated.UseAuthorUtilAccess.escapeAttributeValue(String)
instead.Escape an attribute value so that the XML remains wellformed.- Parameters:
attributeValue
- The attribute value.- Returns:
- The escaped value.
-
getEditorLocation
@Deprecated java.net.URL getEditorLocation()
Deprecated.UseWSEditorBase.getEditorLocation()
instead.Get the editor location.- Returns:
- The editor location.
-
locateFile
@Deprecated java.io.File locateFile(java.net.URL url)
Deprecated.UseUtilAccess.locateFile(URL)
instead.Locate the file on disk corresponding to the URL.- Parameters:
url
- The URL to be checked.- Returns:
- The corresponding file or
null
if URL is remote.
-
chooseFile
@Deprecated java.io.File chooseFile(java.lang.String title, java.lang.String[] allowedExtensions, java.lang.String filterDescr, boolean openForSave)
Deprecated.Choose a file.- Parameters:
title
- The file chooser title.allowedExtensions
- Allowed file extensions.filterDescr
- Description for this file filter.openForSave
- True to show the file chooser for saving, false to use it for opening- Returns:
- The chosen file or
null
if user canceled the dialog...
-
chooseFile
@Deprecated java.io.File chooseFile(java.lang.String title, java.lang.String[] allowedExtensions, java.lang.String filterDescr)
Deprecated.Choose a file.- Parameters:
title
- The file chooser title.allowedExtensions
- Allowed file extensions.filterDescr
- Description for this file filter.- Returns:
- The chosen file or
null
if user canceled the dialog...
-
chooseURL
@Deprecated java.net.URL chooseURL(java.lang.String title, java.lang.String[] allowedExtensions, java.lang.String filterDescr)
Deprecated.Choose an url.- Parameters:
title
- The file chooser title.allowedExtensions
- Allowed extensions.filterDescr
- Description for this file filter.- Returns:
- The chosen url or
null
if user canceled the dialog...
-
getTableCellAbove
@Deprecated AuthorElement getTableCellAbove(AuthorElement cellElement)
Deprecated.UseAuthorTableAccess.getTableCellAbove(AuthorElement)
instead.Find the cell included into the previous row that has the same column index.- Parameters:
cellElement
- The table cell element.- Returns:
- The cell above. Can be
null
.
-
getTableCellBelow
@Deprecated AuthorElement getTableCellBelow(AuthorElement cellElement)
Deprecated.UseAuthorTableAccess.getTableCellBelow(AuthorElement)
instead.Find the cell included into the next row that has the same column index.- Parameters:
cellElement
- The table cell element.- Returns:
- The cell bellow. Can be
null
.
-
getTableCellIndex
@Deprecated int[] getTableCellIndex(AuthorElement authorElement)
Deprecated.UseAuthorTableAccess.getTableCellIndex(AuthorElement)
instead.Obtain the table row and column index for the given element.- Parameters:
authorElement
- The element.- Returns:
- an array with row index on the first position and column index on the second one.
0 based. Can be
null
.
-
getTableCellAt
@Deprecated AuthorElement getTableCellAt(int row, int column, AuthorElement tableElement)
Deprecated.Obtain the element at the given row and column in the table.- Parameters:
row
- The row, 0 based.column
- The column, 0 based.tableElement
- The table element.- Returns:
- The element at the specified location. Can be
null
if it could not be found.
-
getTableRow
@Deprecated AuthorElement getTableRow(int index, AuthorElement tableElement)
Deprecated.UseAuthorTableAccess.getTableRow(int, AuthorElement)
instead.Find the table row element for the given index.- Parameters:
index
- The index of the row to find, 0 based.tableElement
- The table element.- Returns:
- The table row. Can be
null
.
-
getTableRowCount
@Deprecated int getTableRowCount(AuthorElement tableElement)
Deprecated.UseAuthorTableAccess.getTableRowCount(AuthorElement)
instead.Get the row count for the table.- Parameters:
tableElement
- The table element.- Returns:
- The row count.
-
getTableNumberOfColumns
@Deprecated int getTableNumberOfColumns(AuthorElement tableElement)
Deprecated.Returns the number of columns for the given table element.- Parameters:
tableElement
- The table element.- Returns:
- The number of columns.
-
getTableColSpanIndices
@Deprecated int[] getTableColSpanIndices(AuthorElement cellElement)
Deprecated.For the given cell find the start column and the end column defining the column span. The indices are 0 based.- Parameters:
cellElement
- The table cell element.- Returns:
- The column span indices. Can be
null
.
-
isStandalone
@Deprecated boolean isStandalone()
Deprecated.UseWorkspace.isStandalone()
instead.Returns information about the Oxygen underlying implementation.- Returns:
true
if this is the standalone Oxygen version,false
if this is the Oxygen Eclipse plugin version.
-
inInlineContext
@Deprecated boolean inInlineContext(int offset) throws javax.swing.text.BadLocationException
Deprecated.UseAuthorDocumentController.inInlineContext(int)
instead.Test if the context at the givenoffset
is inline or not. For example a text paragraph determines an inline context, and for an offset inside this paragraph the method will returntrue
. For an offset between two paragraphs(block boxes) the method will returnsfalse
.- Parameters:
offset
- The offset in the document, zero based.- Returns:
- Returns
true
if the given offset is inside an inline context.false
otherwise. - Throws:
javax.swing.text.BadLocationException
- When the offset does not exists in document model.
-
insertMultipleElements
@Deprecated void insertMultipleElements(AuthorElement parentElement, java.lang.String[] elementNames, int[] offsets, java.lang.String namespace)
Deprecated.Insert multiple empty elements at the given offsets. The offsets and elements must be in the document order.- Parameters:
parentElement
- The element that will be the parent of the inserted elements.elementNames
- The element names to be inserted.offsets
- The absolute offsets where the elements will be inserted.namespace
- The namespace of the new inserted elements.null
for default namespace.
-
multipleDelete
@Deprecated void multipleDelete(AuthorElement parentElement, int[] startOffsets, int[] endOffsets)
Deprecated.Deletes the given intervals. The offsets must be in document order and the intervals must not intersect with one another.- Parameters:
parentElement
- The element that contains all the deleted intervals.startOffsets
- The start offset for each interval. Must be in document order.endOffsets
- The end offset for each interval. Must be in document order.
-
removeClonedElementAttribute
@Deprecated void removeClonedElementAttribute(AuthorElement element, java.lang.String attrName)
Deprecated.UseAuthorElement.removeAttribute(String)
instead.Remove the attribute from a cloned element. Warning: Use this only when the element is not from the existing content. All operations on nodes from the document model must be done through the AuthorDocumentController.- Parameters:
element
- Element node.attrName
- The attribute name to remove.
-
setClonedElementAttribute
@Deprecated void setClonedElementAttribute(AuthorElement element, java.lang.String name, AttrValue attributeValue)
Deprecated.UseAuthorElement.setAttribute(String, AttrValue)
instead.Set the attribute value for a cloned element. Warning: Use this only when the element is not from the existing content. All operations on nodes from the document model must be done through the AuthorDocumentController.- Parameters:
element
- Element node.name
- Name of the attribute to be set.attributeValue
- The attribute value to set. Must not benull
.
-
showConfirmDialog
@Deprecated int showConfirmDialog(java.lang.String title, java.lang.String message, java.lang.String[] buttonNames, int[] buttonIds)
Deprecated.Shows a question message.- Parameters:
title
- The dialog title.message
- The message to be presented to the user.buttonNames
- The names of the buttons representing the choices.buttonIds
- The id for each button. Used to identify which button was pressed. All ids must be greater or equal to 0.- Returns:
- the id of the pressed button or -1 if the dialog was closed by other means.
-
newNonValidatingXMLReader
@Deprecated org.xml.sax.XMLReader newNonValidatingXMLReader()
Deprecated.UseAuthorUtilAccess.newNonValidatingXMLReader()
instead.Creates an XML Reader without validation.- Returns:
- A new XML Reader.
-
correctURL
@Deprecated java.lang.String correctURL(java.lang.String url)
Deprecated.UseUtilAccess.correctURL(String)
instead.Corrects the given URL.- Parameters:
url
- The URL to be corrected.- Returns:
- The corrected URL.
-
showErrorMessage
@Deprecated void showErrorMessage(java.lang.String message)
Deprecated.UseWorkspaceUtilities.showErrorMessage(String)
instead.Presents the error message.- Parameters:
message
- The error message to be presented.
-
resolvePath
@Deprecated java.net.URL resolvePath(java.net.URL baseURL, java.lang.String relativeLocation, boolean entityResolve, boolean uriResolve)
Deprecated.Try to resolve a relative href to an absolute path by passing through catalog.- Parameters:
baseURL
- The URL of the current opened XML file.relativeLocation
- The relative href.entityResolve
- True to pass through catalog entity resolveruriResolve
- True to pass through catalog URI resolver.- Returns:
- The absolute URL.
-
findNodesByXPath
@Deprecated AuthorNode[] findNodesByXPath(java.lang.String xpathExpression, boolean ignoreTexts, boolean ignoreCData, boolean ignoreComments) throws AuthorOperationException
Deprecated.Finds the author nodes selected by the given XPath expression. The result of this function is an array of AuthorNode's selected by the given XPath expression. Author text nodes, Author CDATA section nodes and Author comment nodes can be ignored for performance reasons.
For example executing the expression://node()
But the result of calling the function with the expression:count(//node())
- Parameters:
xpathExpression
- The XPath expression.ignoreTexts
- Iftrue
Author text nodes will not be returned.ignoreCData
- Iftrue
Author CDATA sections will not be returned.ignoreComments
- Iftrue
Author comments will not be returned.- Returns:
- The Author nodes selected by the XPath expression.
- Throws:
AuthorOperationException
- If the XPath expression failed to be evaluated.
-
evaluateXPath
@Deprecated java.lang.Object[] evaluateXPath(java.lang.String xpathExpression, boolean ignoreTexts, boolean ignoreCData, boolean ignoreComments) throws AuthorOperationException
Deprecated.Evaluates an XPath expression. This functions returns the result of the given XPath expression as an array of Object's. Author DOM text nodes, DOM CDATA sections and DOM comments wrappers can be ignored for performance reasons.
For example, executing the expression://node()
while evaluating the expression:count(//node())
Evaluating the expression://node(), count(//node())
- Parameters:
xpathExpression
- The XPath expression.ignoreTexts
- Iftrue
DOM text nodes will not be returned.ignoreCData
- Iftrue
DOM CDATA sections will not be returned.ignoreComments
- Iftrue
DOM comments will not be returned.- Returns:
- An array of objects representing the XPath result.
- Throws:
AuthorOperationException
- If the XPath expression failed to be evaluated.
-
addAuthorListener
@Deprecated void addAuthorListener(AuthorListener listener)
Deprecated.Add an Author listener to be notified about changes regarding document and document structure.- Parameters:
listener
- The listener to be added.
-
removeAuthorListener
@Deprecated void removeAuthorListener(AuthorListener listener)
Deprecated.Remove an Author listener.- Parameters:
listener
- The listener to be removed.
-
viewToModel
@Deprecated AuthorViewToModelInfo viewToModel(int x, int y)
Deprecated.UseWSAuthorEditorPageBase.viewToModel(int, int)
instead.Get the position in the document corresponding to the point in the viewport.- Parameters:
x
- The "x" coordinate relative to the viewport origin.y
- The "y" coordinate relative to the viewport origin.- Returns:
- The information about the view-at-position.
-
isTrackingChanges
@Deprecated boolean isTrackingChanges()
Deprecated.UseChangeTrackingController.isTrackingChanges()
instead.Returntrue
if the current editor is in change tracking mode- Returns:
true
if the current editor is in change tracking mode
-
toggleTrackChanges
@Deprecated void toggleTrackChanges()
Deprecated.UseChangeTrackingController.toggleTrackChanges()
instead.Toggle the track changes mode.
-
getChangeTrackingController
@Deprecated AuthorChangeTrackingController getChangeTrackingController()
Deprecated.Use
instead.AuthorAccess.getReviewController()
The change tracking controller used to toggle change tracking on and off and check its state.- Returns:
- The change tracking controller. Cannot be
null
.
-
-