@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface Workspace extends WorkspaceUtilities
Modifier and Type | Method and Description |
---|---|
boolean |
close(java.net.URL url)
Closes the editor specified by the URL.
|
boolean |
closeAll()
Closes all the editors.
|
java.net.URL |
createNewEditor(java.lang.String extension,
java.lang.String contentType,
java.lang.String content)
This is available only in the standalone Oxygen version (not available in the Oxygen Eclipse plugin).
Create a new "Untitled" editor. |
void |
delete(java.net.URL url)
Delete the resource identified by the specified
URL . |
Platform |
getPlatform()
Return the oXygen platform that is currently running.
|
boolean |
isStandalone()
Deprecated.
This method returns false also when running inside the WebApp. Use
getPlatform() instead. |
boolean |
open(java.net.URL url)
Opens the file at the specified
URL in a new editor. |
boolean |
open(java.net.URL url,
java.lang.String imposedPage)
Opens the file at the specified
URL in a new editor. |
boolean |
open(java.net.URL url,
java.lang.String imposedPage,
java.lang.String imposedContentType)
Opens the file at the specified
URL in a new editor by specifying an imposed page and an imposed content type. |
void |
refreshInProject(java.net.URL url)
In a new file appeared as a child of a folder in the project, use this method to
refresh the parent folder.
|
void |
saveAll()
Saves the content of all opened and unsaved editors.
|
void |
setParentFrameTitle(java.lang.String parentFrameTitle)
Set a title on the parent frame.
|
chooseDirectory, chooseFile, chooseFile, chooseFile, chooseFiles, chooseURL, chooseURL, chooseURLPath, chooseURLPath, clearImageCache, createJavaProcess, getDataSourceAccess, getImageUtilities, getLicenseInformationProvider, getParentFrame, getPreferencesDirectory, getTemplateManager, getUserInterfaceLanguage, getVersion, getVersionBuildID, openInExternalApplication, openInExternalApplication, showConfirmDialog, showConfirmDialog, showErrorMessage, showInformationMessage, showStatusMessage, showWarningMessage, startProcess
getColorTheme, getImageInverter
boolean open(java.net.URL url)
URL
in a new editor.
If the URL is already opened, the editor tab which contains it will be brought to front.url
- The URL of the file to be opened.true
if the operation has succeeded.boolean open(java.net.URL url, java.lang.String imposedPage)
URL
in a new editor.
If the URL is already opened, the editor tab which contains it will be brought to front.url
- The URL of the file to be opened.imposedPage
- The imposed page for opening the URL. One of the page related constants from EditorPageConstants
.true
if the operation has succeeded.boolean open(java.net.URL url, java.lang.String imposedPage, java.lang.String imposedContentType)
URL
in a new editor by specifying an imposed page and an imposed content type.
If the URL is already opened, the editor tab which contains it will be brought to front.
The imposed content type is used only in the Oxygen standalone application, it is not used in the Author Component and Eclipse plugin applications.url
- The URL of the file to be opened.imposedPage
- The imposed page for opening the URL. Can be null
to perform the default behavior.imposedContentType
- The imposed content type, one of the constants in the interface ro.sync.exml.editor.ContentTypes. null
to perform the default behavior.true
if the operation has succeeded.void saveAll()
boolean close(java.net.URL url)
If the editor has unsaved content, the user will be given the opportunity to save it.
url
- The url of the editor to be closed.true
if the editor was successfully closed, and
false
if the editor could not be closed.boolean closeAll()
If there are editors with unsaved content, the user will be given the opportunity to save them.
true
if the editors were successfully closed, and
false
if the editors are still open.void delete(java.net.URL url) throws java.io.IOException
URL
.
Currently supported protocols are:
url
- The URL from where to delete a resource.java.io.IOException
void refreshInProject(java.net.URL url)
url
- The new resourcejava.net.URL createNewEditor(java.lang.String extension, java.lang.String contentType, java.lang.String content)
extension
- The editor extension ("xml" or "dita" or "xsl" or "xsd", etc...)contentType
- The content type which can take values like: "text/xml" or "text/xsl" or "text/xsd", etc...
If NULL, the content type will be automatically detected from the extension.content
- The XML content will be used to load the new editor from.@Deprecated boolean isStandalone()
getPlatform()
instead.true
if this is the stand-alone Oxygen version or
false
if it is the Oxygen Eclipse plug-in version.Platform getPlatform()
Platform.STANDALONE
if the code is running in the oXygen
stand alone application, Platform.ECLIPSE
if the code is running in
the oXygen Eclipse plugin, and Platform.WEBAPP
if the code is
running inside the oXygen WebApp.void setParentFrameTitle(java.lang.String parentFrameTitle)
parentFrameTitle
- The new title to set on the parent frame.
If NULL, will reset to the default title.© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.