Class WSEditorChangeListener
java.lang.Object
ro.sync.exml.workspace.api.listeners.WSEditorChangeListener
Notified when an editor is added, removed or the editor page is changed
- Since:
- 11.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaneditorAboutToBeClosed(URL editorLocation) An editor will be closed.voideditorAboutToBeOpened(URL editorLocation) An editor will be opened.booleaneditorAboutToBeOpenedVeto(URL editorLocation) An editor will be opened.voideditorActivated(URL editorLocation) An editor was activated.voideditorClosed(URL editorLocation) An editor was closed.voideditorDeactivated(URL editorLocation) An editor was de-activated.voideditorOpened(URL editorLocation) An editor was opened.voideditorPageChanged(URL editorLocation) The current page for an editor has changed.voideditorRelocated(URL previousEditorLocation, URL newEditorLocation) An editor was relocated to a new location.booleaneditorsAboutToBeClosed(URL[] editorLocations) A group of opened documents will be closed by using a batch close operation (like "Close All" or "Close Others").voideditorSelected(URL editorLocation) An editor was selected in the tabbed pane.
-
Constructor Details
-
WSEditorChangeListener
public WSEditorChangeListener()
-
-
Method Details
-
editorAboutToBeOpenedVeto
An editor will be opened. You can reject the opening of the editor by returningfalse. If the open is not rejected then theeditorAboutToBeOpened(URL)and theneditorOpened(URL)methods will be called. If you want to open another file instead, you must start a thread which calls the API to open the other file and then returnfalse. Calling API to open another resource directly on this callback will block Oxygen. This method is not called in the Eclipse plugin.- Parameters:
editorLocation- The editor's location.- Returns:
trueto proceed with the open,falseto reject the open of the editor.- Since:
- 12.2
-
editorAboutToBeOpened
An editor will be opened. If the open does not fail, then theeditorOpened(URL)method will be called.- Parameters:
editorLocation- The editor's location- Since:
- 12.1
-
editorOpened
An editor was opened.- Parameters:
editorLocation- The editor's location
-
editorClosed
An editor was closed.- Parameters:
editorLocation- The editor's location
-
editorSelected
An editor was selected in the tabbed pane.- Parameters:
editorLocation- The editor's location. Can benullif no editor is opened or a switch between editors is pending.
-
editorPageChanged
The current page for an editor has changed. This means the user switched for example from the Text to the Author page. An XML Editor usually has 3 pages: Text, Grid and Author.- Parameters:
editorLocation- The editor's location
-
editorActivated
An editor was activated. It is the selected editor but also the editor in which the focus is present.- Parameters:
editorLocation- The editor's location- Since:
- 12.2
-
editorDeactivated
An editor was de-activated. Focus is no longer present in it. Maybe the editor was already closed.- Parameters:
editorLocation- The editor's location- Since:
- 12.2
-
editorAboutToBeClosed
An editor will be closed. You can reject the close of the editor by returningfalse.- Parameters:
editorLocation- The editor's location- Returns:
trueto proceed with the close,falseto reject the close of the editor. This method is not called in the Eclipse plugin.- Since:
- 12.2
-
editorRelocated
An editor was relocated to a new location. Probably Save As was called on the opened editor.- Parameters:
previousEditorLocation- The previous editor's locationnewEditorLocation- The current editor's location In the standalone Oxygen version the listener is usually called after the end user has used the "Save as" or "Save to URL" actions and saved the editor contents somewhere else. This method is not called in the Eclipse plugin.- Since:
- 12.2
-
editorsAboutToBeClosed
A group of opened documents will be closed by using a batch close operation (like "Close All" or "Close Others"). This event is triggered before the application will try to check which of these editors are modified and to show a batch save dialog for them. You can reject the close of the editor by returningfalse. If the callback is not rejected, you will also receive individual "editorAboutToBeClosed" and "editorClosed" callbacks for each of the editors while they are being individually closed. This callback is only received in the Oxygen standalone application so it is not received in the Oxygen Eclipse Plugin.- Parameters:
editorLocations- The locations of the editors which will be batch closed.- Returns:
trueto proceed with the close,falseto reject the close of the editor. This method is not called in the Eclipse plugin.- Since:
- 18
-