com.microfocus.zserver.zexplorer.ui

## Class ZExplorerEditorPart

- java.lang.Object
- - com.microfocus.zserver.zexplorer.ui.ZExplorerEditorPart

-     public class ZExplorerEditorPart
      extends java.lang.Object

  Maps ZExplorer information with an `IFile`.
  Author:
    PrudenceB

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZExplorerEditorPart(org.eclipse.ui.IEditorPart pEditorPart, boolean pIsBackgroundParsingTurnOff, boolean pIsEplorerPart, ISystemImage pSystemImage)` The constructor
    `ZExplorerEditorPart(org.eclipse.core.resources.IFile pFile, boolean pIsBackgroundParsingTurnOff, boolean pIsEplorerPart, ISystemImage pSystemImage)` The constructor
    `ZExplorerEditorPart(IRemoteFile pRemoteFile, org.eclipse.core.resources.IFile pFile, boolean pIsBackgroundParsingTurnOff, boolean pIsEplorerPart, ISystemImage pSystemImage)` Constructor for z/Explorer parts where the `IRemoteFile` is known.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.eclipse.ui.IEditorPart` | `getEditorPart()` Gets the `IEditorPart`.
    `org.eclipse.core.resources.IFile` | `getFile()` Returns the file that is opened in the editor.
    `IRemoteFile` | `getRemoteFile()` Gets the remote file that's opened in the editor part
    `ISystemImage` | `getSystemImage()` Gets the system image that is associated to this `ZExplorerEditorPart`, which is usually the one that was used to open the editor.
    `boolean` | `isBackgroundParserTurnOff()` Gets whether the background parsing will be turn off for this `ZExplorerEditorPart`.
    `boolean` | `isZExplorerPart()` Gets whether this `ZExplorerEditorPart` was opened by calling ZExplorer actions "Edit/Browse".
    `void` | `setEditorPart(org.eclipse.ui.IEditorPart pEditorPart)` Sets the editor part of this `ZExplorerEditorPart` instance and tries to refresh (Not needed, but for more surety reason) an `IFile` on which the editor was opened.
    `void` | `setRemoteFile(IRemoteFile pRemoteFile)` Sets the remote file that's opened in the editor part.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ZExplorerEditorPart

          public ZExplorerEditorPart(IRemoteFile pRemoteFile,
                                     org.eclipse.core.resources.IFile pFile,
                                     boolean pIsBackgroundParsingTurnOff,
                                     boolean pIsEplorerPart,
                                     ISystemImage pSystemImage)

      Constructor for z/Explorer parts where the `IRemoteFile` is known.
      Parameters:
        `pRemoteFile` - the `IRemoteFile` which is opened in the editor part
        `pFile` - the file that has been used to open the editor. Can be `null` but it is highly recommended to set the file because many functions rely on identifying the ZExplorerEditorPart using `ZExplorerPartListener.getEditorPart(IFile)`.
        `pIsBackgroundParsingTurnOff` - whether the background parsing will be turn off
        `pIsEplorerPart` - whether the given file is open from the zExplorer
        `pSystemImage` - the system image used to open the file

    - #### ZExplorerEditorPart

          public ZExplorerEditorPart(org.eclipse.core.resources.IFile pFile,
                                     boolean pIsBackgroundParsingTurnOff,
                                     boolean pIsEplorerPart,
                                     ISystemImage pSystemImage)

      The constructor
      Parameters:
        `pFile` - the file that has been used to open the editor. Can be `null` but it is highly recommended to set the file because many functions rely on identifying the ZExplorerEditorPart using `ZExplorerPartListener.getEditorPart(IFile)`.
        `pIsBackgroundParsingTurnOff` - whether the background parsing will be turn off
        `pIsEplorerPart` - whether the given file is open from the zExplorer
        `pSystemImage` - the system image used to open the file

    - #### ZExplorerEditorPart

          public ZExplorerEditorPart(org.eclipse.ui.IEditorPart pEditorPart,
                                     boolean pIsBackgroundParsingTurnOff,
                                     boolean pIsEplorerPart,
                                     ISystemImage pSystemImage)

      The constructor
      Parameters:
        `pEditorPart` - the editor part of this `ZExplorerEditorPart` instance. Must not be `null`
        `pIsBackgroundParsingTurnOff` - whether the background parsing will be turn off
        `pIsEplorerPart` - whether the given file is open from the zExplorer
        `pSystemImage` - the system image used to open the file

  - ### Method Detail

    - #### getFile

          public org.eclipse.core.resources.IFile getFile()

      Returns the file that is opened in the editor.
      Returns:
        the file that is opened in the editor

    - #### isBackgroundParserTurnOff

          public boolean isBackgroundParserTurnOff()

      Gets whether the background parsing will be turn off for this `ZExplorerEditorPart`.
      Returns:
        `true` if the MF background parsing will be turned off

    - #### isZExplorerPart

          public boolean isZExplorerPart()

      Gets whether this `ZExplorerEditorPart` was opened by calling ZExplorer actions "Edit/Browse".
      Returns:
        `true` if the editor was opened from the zExplorer

    - #### getSystemImage

          public ISystemImage getSystemImage()

      Gets the system image that is associated to this `ZExplorerEditorPart`, which is usually the one that was used to open the editor.
      Returns:
        the associated `ISystemImage`

    - #### getEditorPart

          public org.eclipse.ui.IEditorPart getEditorPart()

      Gets the `IEditorPart`. Can return `null` since a `ZExplorerEditorPart` instance should be created before the editor is opened, to avoid timing issues for editors that use this instance e.g. for obtaining the result of `isBackgroundParserTurnOff()`. Even after e.g. `IDE#openEditor(org.eclipse.ui.IWorkbenchPage, IFile)` was called, it may take some time before the editor part is actually opened by the Eclipse IDE.
      Returns:
        the editor part or `null` if the editor part is not yet opened, was not set by the creator of the instance or the editor is not an Eclipse editor part

    - #### setEditorPart

          public void setEditorPart(org.eclipse.ui.IEditorPart pEditorPart)

      Sets the editor part of this `ZExplorerEditorPart` instance and tries to refresh (Not needed, but for more surety reason) an `IFile` on which the editor was opened.
      Parameters:
        `pEditorPart` - the editor part to set. Must not be `null`.
      See Also:
        `getFile()`

    - #### setRemoteFile

          public void setRemoteFile(IRemoteFile pRemoteFile)

      Sets the remote file that's opened in the editor part.
      Parameters:
        `pRemoteFile` - the remote file

    - #### getRemoteFile

          public IRemoteFile getRemoteFile()

      Gets the remote file that's opened in the editor part
      Returns:
        the remote file or `null` if none is set

Copyright © 2015 Micro Focus GmbH. All rights reserved.