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 TypeMethodDescriptionvoid
addAuthorListener
(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.void
Deprecated.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.int
Deprecated.Use
instead.WSTextBasedEditorPage.getCaretOffset()
Deprecated.Use
instead.AuthorAccess.getReviewController()
Deprecated.UseWSEditorBase.getEditorLocation()
instead.Deprecated.UseWorkspaceUtilities.getParentFrame()
instead.Deprecated.Use
instead.WSAuthorEditorPageBase.getSelectedText()
int
Deprecated.Use
instead.WSAuthorEditorPageBase.getSelectionEnd()
int
Deprecated.Use
instead.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.int
getTableNumberOfColumns
(AuthorElement tableElement) Deprecated.getTableRow
(int index, AuthorElement tableElement) Deprecated.UseAuthorTableAccess.getTableRow(int, AuthorElement)
instead.int
getTableRowCount
(AuthorElement tableElement) Deprecated.UseAuthorTableAccess.getTableRowCount(AuthorElement)
instead.int[]
Deprecated.UseWSTextBasedEditorPage.getWordAtCaret()
instead.boolean
Deprecated.UseWSAuthorEditorPageBase.hasSelection()
instead.boolean
inInlineContext
(int offset) Deprecated.UseAuthorDocumentController.inInlineContext(int)
instead.void
insertMultipleElements
(AuthorElement parentElement, String[] elementNames, int[] offsets, String namespace) Deprecated.void
insertText
(String text, int offset) Deprecated.UseAuthorDocumentController.insertText(int, String)
instead.void
insertXMLFragment
(String xmlFragment, int offset) Deprecated.void
insertXMLFragment
(String xmlFragment, String xpathLocation, String relativePosition) Deprecated.boolean
Deprecated.UseWorkspace.isStandalone()
instead.boolean
Deprecated.UseChangeTrackingController.isTrackingChanges()
instead.locateFile
(URL url) Deprecated.UseUtilAccess.locateFile(URL)
instead.makeRelative
(URL baseURL, URL childURL) Deprecated.UseUtilAccess.makeRelative(URL, URL)
instead.void
multipleDelete
(AuthorElement parentElement, int[] startOffsets, int[] endOffsets) Deprecated.Deprecated.UseAuthorUtilAccess.newNonValidatingXMLReader()
instead.void
removeAuthorListener
(AuthorListener listener) Deprecated.void
removeClonedElementAttribute
(AuthorElement element, String attrName) Deprecated.UseAuthorElement.removeAttribute(String)
instead.resolvePath
(URL baseURL, String relativeLocation, boolean entityResolve, boolean uriResolve) Deprecated.void
select
(int startOffset, int endOffset) Deprecated.UseWSAuthorEditorPageBase.select(int, int)
instead.void
Deprecated.UseWSTextBasedEditorPage.selectWord()
instead.void
setCaretPosition
(int offset) Deprecated.UseWSTextBasedEditorPage.setCaretPosition(int)
instead.void
setClonedElementAttribute
(AuthorElement element, String name, AttrValue attributeValue) Deprecated.UseAuthorElement.setAttribute(String, AttrValue)
instead.int
showConfirmDialog
(String title, String message, String[] buttonNames, int[] buttonIds) Deprecated.void
showErrorMessage
(String message) Deprecated.UseWorkspaceUtilities.showErrorMessage(String)
instead.void
surroundInFragment
(String xmlFragment, int startOffset, int endOffset) Deprecated.void
surroundInText
(String header, String footer, int startOffset, int endOffset) Deprecated.void
Deprecated.UseChangeTrackingController.toggleTrackChanges()
instead.viewToModel
(int x, int y) Deprecated.UseWSAuthorEditorPageBase.viewToModel(int, int)
instead.
-
Method Details
-
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.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.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.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.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 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.UseWSAuthorEditorPageBase.deleteSelection()
instead.Delete the selected text, if any. -
hasSelection
Deprecated.UseWSAuthorEditorPageBase.hasSelection()
instead.- Returns:
true
If there is a selection,false
otherwise.
-
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 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.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.
null
if 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
childURL
if 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
null
if 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
null
if 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
null
if 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
null
if 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
null
if 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:
true
if this is the standalone Oxygen version,false
if this is the Oxygen Eclipse plugin version.
-
inInlineContext
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:
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.null
for 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://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 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://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.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.Returntrue
if the current editor is in change tracking mode- Returns:
true
if the current editor is in change tracking mode
-
toggleTrackChanges
Deprecated.UseChangeTrackingController.toggleTrackChanges()
instead.Toggle the track changes mode. -
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
.
-
AuthorDocumentController.addAuthorListener(AuthorListener)
intead.