API method to check for warnings and undo
Posted: Thu Jun 09, 2011 1:17 am
Hello,
I'm trying to do two things...
1) Check for warnings. (They'll only be for track change issues, and unfortunately Oxygen doesn't always throw a warning when track changes are messed up. An example is when the XML is missing a start or end tag for change tracking, such as when an oxy_insert_start and _end set are nested inside another insert--which should never happen but it does occasionally. While I'm at it, how come some of these warnings and track-change highlighting mishaps when the tags go missing only show once the document is closed and reopened?)
I don't need specific warning/error checking--I just want to be able to check in my doOperation override after some action has been performed, whether or not that action unexpectedly caused an error or warning to pop up (no exception is thrown--must be a validation related warning/error, but where is it defined what throws an error since the <?oxy_....?> tags aren't in the DTD?). Is this implemented anywhere in the API, or is there a workaround that would allow me to detect whether or not a warning or error exists?
2) (If #1 is possible) Undo the operation if there is indeed an error or warning. Is it easier to simulate the CTRL+Z keypress, or shall I go through the AuthorActionsProvider?
With that class, I did a .getAuthorCommonActions().toString() and noted that the following key/value existed in the Map. The toString method yielded:
Edit/Edit_Undo=ro.sync.ecss.component.i.e.e.f@f5b1fb
But I'm unsure what to send to .invokeAction() This undo functionality should remain static, no? It seems like I shouldn't have to get the Map of common actions each time, search it for undo, then send that element to invoke it.
Thank you!
I'm trying to do two things...
1) Check for warnings. (They'll only be for track change issues, and unfortunately Oxygen doesn't always throw a warning when track changes are messed up. An example is when the XML is missing a start or end tag for change tracking, such as when an oxy_insert_start and _end set are nested inside another insert--which should never happen but it does occasionally. While I'm at it, how come some of these warnings and track-change highlighting mishaps when the tags go missing only show once the document is closed and reopened?)
I don't need specific warning/error checking--I just want to be able to check in my doOperation override after some action has been performed, whether or not that action unexpectedly caused an error or warning to pop up (no exception is thrown--must be a validation related warning/error, but where is it defined what throws an error since the <?oxy_....?> tags aren't in the DTD?). Is this implemented anywhere in the API, or is there a workaround that would allow me to detect whether or not a warning or error exists?
2) (If #1 is possible) Undo the operation if there is indeed an error or warning. Is it easier to simulate the CTRL+Z keypress, or shall I go through the AuthorActionsProvider?
With that class, I did a .getAuthorCommonActions().toString() and noted that the following key/value existed in the Map. The toString method yielded:
Edit/Edit_Undo=ro.sync.ecss.component.i.e.e.f@f5b1fb
But I'm unsure what to send to .invokeAction() This undo functionality should remain static, no? It seems like I shouldn't have to get the Map of common actions each time, search it for undo, then send that element to invoke it.
Thank you!