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 the
AuthorAccess
and should no longer be used.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuthorListener(AuthorListener listener) Deprecated.chooseFile(String title, String[] allowedExtensions, String filterDescr) Deprecated.chooseFile(String title, String[] allowedExtensions, String filterDescr, boolean openForSave) Deprecated.Deprecated.correctURL(String url) Deprecated.UseUtilAccess.correctURL(String)instead.voidDeprecated.UseWSAuthorEditorPageBase.deleteSelection()instead.escapeAttributeValue(String attributeValue) Deprecated.UseAuthorUtilAccess.escapeAttributeValue(String)instead.Object[]evaluateXPath(String xpathExpression, boolean ignoreTexts, boolean ignoreCData, boolean ignoreComments) Deprecated.findNodesByXPath(String xpathExpression, boolean ignoreTexts, boolean ignoreCData, boolean ignoreComments) Deprecated.intDeprecated.Useinstead.WSTextBasedEditorPage.getCaretOffset()Deprecated.Useinstead.AuthorAccess.getReviewController()Deprecated.UseWSEditorBase.getEditorLocation()instead.Deprecated.UseWorkspaceUtilities.getParentFrame()instead.Deprecated.Useinstead.WSAuthorEditorPageBase.getSelectedText()intDeprecated.Useinstead.WSAuthorEditorPageBase.getSelectionEnd()intDeprecated.Useinstead.WSAuthorEditorPageBase.getSelectionStart()getTableCellAbove(AuthorElement cellElement) Deprecated.UseAuthorTableAccess.getTableCellAbove(AuthorElement)instead.getTableCellAt(int row, int column, AuthorElement tableElement) Deprecated.getTableCellBelow(AuthorElement cellElement) Deprecated.UseAuthorTableAccess.getTableCellBelow(AuthorElement)instead.int[]getTableCellIndex(AuthorElement authorElement) Deprecated.UseAuthorTableAccess.getTableCellIndex(AuthorElement)instead.int[]getTableColSpanIndices(AuthorElement cellElement) Deprecated.intgetTableNumberOfColumns(AuthorElement tableElement) Deprecated.getTableRow(int index, AuthorElement tableElement) Deprecated.UseAuthorTableAccess.getTableRow(int, AuthorElement)instead.intgetTableRowCount(AuthorElement tableElement) Deprecated.UseAuthorTableAccess.getTableRowCount(AuthorElement)instead.int[]Deprecated.UseWSTextBasedEditorPage.getWordAtCaret()instead.booleanDeprecated.UseWSAuthorEditorPageBase.hasSelection()instead.booleaninInlineContext(int offset) Deprecated.UseAuthorDocumentController.inInlineContext(int)instead.voidinsertMultipleElements(AuthorElement parentElement, String[] elementNames, int[] offsets, String namespace) Deprecated.voidinsertText(String text, int offset) Deprecated.UseAuthorDocumentController.insertText(int, String)instead.voidinsertXMLFragment(String xmlFragment, int offset) Deprecated.voidinsertXMLFragment(String xmlFragment, String xpathLocation, String relativePosition) Deprecated.booleanDeprecated.UseWorkspace.isStandalone()instead.booleanDeprecated.UseChangeTrackingController.isTrackingChanges()instead.locateFile(URL url) Deprecated.UseUtilAccess.locateFile(URL)instead.makeRelative(URL baseURL, URL childURL) Deprecated.UseUtilAccess.makeRelative(URL, URL)instead.voidmultipleDelete(AuthorElement parentElement, int[] startOffsets, int[] endOffsets) Deprecated.Deprecated.UseAuthorUtilAccess.newNonValidatingXMLReader()instead.voidremoveAuthorListener(AuthorListener listener) Deprecated.voidremoveClonedElementAttribute(AuthorElement element, String attrName) Deprecated.UseAuthorElement.removeAttribute(String)instead.resolvePath(URL baseURL, String relativeLocation, boolean entityResolve, boolean uriResolve) Deprecated.voidselect(int startOffset, int endOffset) Deprecated.UseWSAuthorEditorPageBase.select(int, int)instead.voidDeprecated.UseWSTextBasedEditorPage.selectWord()instead.voidsetCaretPosition(int offset) Deprecated.UseWSTextBasedEditorPage.setCaretPosition(int)instead.voidsetClonedElementAttribute(AuthorElement element, String name, AttrValue attributeValue) Deprecated.UseAuthorElement.setAttribute(String, AttrValue)instead.intshowConfirmDialog(String title, String message, String[] buttonNames, int[] buttonIds) Deprecated.voidshowErrorMessage(String message) Deprecated.UseWorkspaceUtilities.showErrorMessage(String)instead.voidsurroundInFragment(String xmlFragment, int startOffset, int endOffset) Deprecated.voidsurroundInText(String header, String footer, int startOffset, int endOffset) Deprecated.voidDeprecated.UseChangeTrackingController.toggleTrackChanges()instead.viewToModel(int x, int y) Deprecated.UseWSAuthorEditorPageBase.viewToModel(int, int)instead.
-
Method Details
-
getSelectionStart
Deprecated.Useinstead.WSAuthorEditorPageBase.getSelectionStart()Get the offset of the selection start. It is inclusive.- Returns:
- The offset of the selection start, 0 based.
-
getSelectionEnd
Deprecated.Useinstead.WSAuthorEditorPageBase.getSelectionEnd()Get the offset of the selection end. It is exclusive.- Returns:
- The offset of the selection end, zero based.
-
getSelectedText
Deprecated.Useinstead.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.Useinstead. 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.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.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(String xmlFragment, String xpathLocation, String relativePosition) throws AuthorOperationException Deprecated.Insert an XML fragment at the node specified by the xpathLocation and relativePosition. Note: if thexpathLocationis not specified then the XML fragment will be inserted at the caret position(relativePositionis 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.UseWSAuthorEditorPageBase.deleteSelection()instead.Delete the selected text, if any. -
hasSelection
Deprecated.UseWSAuthorEditorPageBase.hasSelection()instead.- Returns:
trueIf there is a selection,falseotherwise.
-
selectWord
Deprecated.UseWSTextBasedEditorPage.selectWord()instead.Select the word at caret. -
surroundInFragment
@Deprecated void surroundInFragment(String xmlFragment, int startOffset, int endOffset) throws AuthorOperationException Deprecated.Surround the given offsets inxmlFragment. If endOffset < startOffset thexmlFragmentwill 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.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.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.UseWSAuthorEditorPageBase.select(int, int)instead.Select the interval between start and end offset.- Parameters:
startOffset- Inclusive start offsetendOffset- Exclusive end offset
-
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.
nullif the offsets couldn't be obtained.
-
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.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
childURLif a relative path cannot be computed.
-
escapeAttributeValue
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.UseWSEditorBase.getEditorLocation()instead.Get the editor location.- Returns:
- The editor location.
-
locateFile
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
nullif URL is remote.
-
chooseFile
@Deprecated File chooseFile(String title, String[] allowedExtensions, 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
nullif user canceled the dialog...
-
chooseFile
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
nullif user canceled the dialog...
-
chooseURL
Deprecated.Choose an url.- Parameters:
title- The file chooser title.allowedExtensions- Allowed extensions.filterDescr- Description for this file filter.- Returns:
- The chosen url or
nullif user canceled the dialog...
-
getTableCellAbove
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.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.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.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
nullif it could not be found.
-
getTableRow
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.UseAuthorTableAccess.getTableRowCount(AuthorElement)instead.Get the row count for the table.- Parameters:
tableElement- The table element.- Returns:
- The row count.
-
getTableNumberOfColumns
Deprecated.Returns the number of columns for the given table element.- Parameters:
tableElement- The table element.- Returns:
- The number of columns.
-
getTableColSpanIndices
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.UseWorkspace.isStandalone()instead.Returns information about the Oxygen underlying implementation.- Returns:
trueif this is the standalone Oxygen version,falseif this is the Oxygen Eclipse plugin version.
-
inInlineContext
Deprecated.UseAuthorDocumentController.inInlineContext(int)instead.Test if the context at the givenoffsetis 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
trueif the given offset is inside an inline context.falseotherwise. - Throws:
BadLocationException- When the offset does not exists in document model.
-
insertMultipleElements
@Deprecated void insertMultipleElements(AuthorElement parentElement, String[] elementNames, int[] offsets, 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.nullfor default namespace.
-
multipleDelete
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.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, 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(String title, String message, 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.UseAuthorUtilAccess.newNonValidatingXMLReader()instead.Creates an XML Reader without validation.- Returns:
- A new XML Reader.
-
correctURL
Deprecated.UseUtilAccess.correctURL(String)instead.Corrects the given URL.- Parameters:
url- The URL to be corrected.- Returns:
- The corrected URL.
-
showErrorMessage
Deprecated.UseWorkspaceUtilities.showErrorMessage(String)instead.Presents the error message.- Parameters:
message- The error message to be presented.
-
resolvePath
@Deprecated URL resolvePath(URL baseURL, 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(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:
will return an array with all the AuthorNode's in the document.//node()
But the result of calling the function with the expression:
will return an empty array.count(//node())- Parameters:
xpathExpression- The XPath expression.ignoreTexts- IftrueAuthor text nodes will not be returned.ignoreCData- IftrueAuthor CDATA sections will not be returned.ignoreComments- IftrueAuthor 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 Object[] evaluateXPath(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:
will return an array with all the Author DOM Node wrappers in the document.//node()
while evaluating the expression:
will return an array having a single component representing the number of nodes in the document.count(//node())
Evaluating the expression:
will return an array containing all the Author DOM Node wrappers in the document and having as last component the total number of nodes.//node(), count(//node())- Parameters:
xpathExpression- The XPath expression.ignoreTexts- IftrueDOM text nodes will not be returned.ignoreCData- IftrueDOM CDATA sections will not be returned.ignoreComments- IftrueDOM 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.Add an Author listener to be notified about changes regarding document and document structure.- Parameters:
listener- The listener to be added.
-
removeAuthorListener
Deprecated.Remove an Author listener.- Parameters:
listener- The listener to be removed.
-
viewToModel
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.UseChangeTrackingController.isTrackingChanges()instead.Returntrueif the current editor is in change tracking mode- Returns:
trueif the current editor is in change tracking mode
-
toggleTrackChanges
Deprecated.UseChangeTrackingController.toggleTrackChanges()instead.Toggle the track changes mode. -
getChangeTrackingController
Deprecated.Useinstead.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.
-
AuthorDocumentController.addAuthorListener(AuthorListener)intead.