public class ZExplorerEditUtilities
extends java.lang.Object
| Constructor and Description |
|---|
ZExplorerEditUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static IExecutionContext |
getExecutionContext(org.eclipse.ui.IEditorPart pEditorPart)
Attempts to get an
IExecutionContext from the editor part. |
static IMvsResource |
getMVSResource(org.eclipse.ui.IEditorPart pPart)
Attempts to get an MVS resource from an editor part.
|
static ISystemImage |
getRemoteSystem(org.eclipse.ui.IEditorPart pPart)
Attempts to get the remote system image from an editor part.
|
static ISystemImage |
getRemoteSystem(org.eclipse.core.resources.IFile pFile)
Attempts to get the remote system image from a file which is potentially
opened in an editor.
|
static org.eclipse.ui.IEditorPart |
openInEditor(IMvsResource pRes,
boolean pEdit,
org.eclipse.core.runtime.IProgressMonitor pMon)
Opens an
IMvsResource in an editor. |
static org.eclipse.ui.IEditorPart |
openInEditor(IMvsResource pRes,
boolean pEdit,
org.eclipse.core.runtime.IProgressMonitor pMon,
boolean pAllowExternalEditor)
Opens an
IMvsResource in an editor. |
static org.eclipse.ui.IEditorPart |
openInEditor(java.lang.String pDSN,
boolean pEdit,
ISystemImage pImg,
org.eclipse.core.runtime.IProgressMonitor pMon)
Opens an
IMvsResource in an editor. |
static org.eclipse.ui.IEditorPart |
openInEditor(java.lang.String pFileName,
java.lang.String pExtension,
java.io.InputStream pIs,
ISystemImage pImg,
boolean pEdit)
Creates a local file resource of the given stream and opens it in an
editor (read-only).
|
static void |
runEditPostProcess(ISavableResource pRes,
org.eclipse.core.resources.IFile pFile,
boolean isResLock,
org.eclipse.core.runtime.IProgressMonitor pMon)
run after edit process (unlock and delete resource)
|
static void |
showInvalidCharactersMessage(java.lang.String pResourceName)
Pop-up a warning dialog to inform the user for the detection of non
displayable characters in the file.
|
public static org.eclipse.ui.IEditorPart openInEditor(java.lang.String pDSN,
boolean pEdit,
ISystemImage pImg,
org.eclipse.core.runtime.IProgressMonitor pMon)
throws ZExplorerException
IMvsResource in an editor.pDSN - a full qualified MVS data set or member namepEdit - whether the resource shall be opened in edit mode.
true will set an exclusive access for the file on
the remote system.pImg - the remote system image. Currently only z/Server system images
are allowedpMon - the progress monitorZExplorerException - if exception occurred during creation or opening the filepublic static org.eclipse.ui.IEditorPart openInEditor(IMvsResource pRes,
boolean pEdit,
org.eclipse.core.runtime.IProgressMonitor pMon)
throws ZExplorerException
IMvsResource in an editor.pRes - the resource that shall be openedpEdit - whether the resource shall be opened in edit mode.
true will set an exclusive access for the file on
the remote system.pMon - the progress monitorZExplorerException - ZServerFileUtilities#getContents(ISystemImage, String, boolean,
ERecallMethod, org.eclipse.core.runtime.IProgressMonitor)public static org.eclipse.ui.IEditorPart openInEditor(IMvsResource pRes,
boolean pEdit,
org.eclipse.core.runtime.IProgressMonitor pMon,
boolean pAllowExternalEditor)
throws ZExplorerException
IMvsResource in an editor.pRes - the resource that shall be openedpEdit - whether the resource shall be opened in edit mode.
true will set an exclusive access for the file on
the remote system.pMon - the progress monitorpAllowExternalEditor - whether to allow an external editor to be used. If
true, null will be returned and AWM
will not be able to save, dequeue or remove the cached file
properly. When set to false and an external
editor was opened (or opening the editor was canceled), an
exception will be thrownnull if an external editor was
opened or if opening was canceledZExplorerException - if exception occurred during creation or opening the file, or
if an external editor was opened but
pAllowExternalEditor was set to
falseZServerFileUtilities#getContents(ISystemImage, String, boolean,
ERecallMethod, org.eclipse.core.runtime.IProgressMonitor)public static void showInvalidCharactersMessage(java.lang.String pResourceName)
pResourceName - the file namepublic static org.eclipse.ui.IEditorPart openInEditor(java.lang.String pFileName,
java.lang.String pExtension,
java.io.InputStream pIs,
ISystemImage pImg,
boolean pEdit)
throws TaurusCoreException
The local resource will be removed after the editor is closed.
pFileName - the name of the file that should be createdpExtension - a file extension (without '.')pIs - the content of the filepImg - the system imagepEdit - read only flagEditorPart of the editor that has been openedTaurusCoreException - if exception occurred during creation or opening the filepublic static void runEditPostProcess(ISavableResource pRes, org.eclipse.core.resources.IFile pFile, boolean isResLock, org.eclipse.core.runtime.IProgressMonitor pMon)
pRes - resource to be unlockpFile - file to be deleteisResLock - whether the resource should be unlockpMon - progress monitorpublic static ISystemImage getRemoteSystem(org.eclipse.core.resources.IFile pFile)
pFile - a fileISystemImage or null if none can be found
or the associated system image is a LocalSystemImagepublic static ISystemImage getRemoteSystem(org.eclipse.ui.IEditorPart pPart)
pPart - an editor partISystemImage or null if none can be found
or the associated system image is a LocalSystemImagepublic static IMvsResource getMVSResource(org.eclipse.ui.IEditorPart pPart)
pPart - an editor partnullpublic static IExecutionContext getExecutionContext(org.eclipse.ui.IEditorPart pEditorPart)
IExecutionContext from the editor part. Only
works, if the editor part has been opened via a modeled AWM action.
Note that a context can be returned even for non-remote edit sessions.
pEditorPart - an editor partnullCopyright © 2015 Micro Focus GmbH. All rights reserved.