com.microfocus.zserver.zexplorer.ui

## Class ZExplorerPartListener

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

- All Implemented Interfaces:
    org.eclipse.ui.IPartListener

      public class ZExplorerPartListener
      extends java.lang.Object
      implements org.eclipse.ui.IPartListener

  Monitors editor parts opened a ZOS resource. If a part is closed, it will dequeue the given resource (if necessary) and remove the local copy.
  Author:
    Ralf Pakosch, Christelle Biahmou

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZExplorerPartListener()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addEditorPart(ZExplorerEditorPart pEditorPart)` add the editor part to the zExplorer editor part list.
    `void` | `closeAllEditorParts()` close all open editor parts monitored by Taurus and clear the Taurus editor part monitor maps
    `static boolean` | `contains(java.lang.String pTitle)`
    `static ZExplorerEditorPart` | `getEditorPart(org.eclipse.ui.IEditorPart pEditorPart)` Gets the `ZExplorerEditorPart` for a editor part.
    `static ZExplorerEditorPart` | `getEditorPart(org.eclipse.core.resources.IFile pFile)` Gets the `ZExplorerEditorPart` for a file.
    `static java.util.List<org.eclipse.ui.IEditorPart>` | `getOpenEditors()`
    `static boolean` | `isFileOpen(org.eclipse.core.resources.IFile pFile)` check if the given file opened by the zExplorer is still open in an editor page
    `void` | `partActivated(org.eclipse.ui.IWorkbenchPart pPart)`
    `void` | `partBroughtToTop(org.eclipse.ui.IWorkbenchPart pPart)`
    `void` | `partClosed(org.eclipse.ui.IWorkbenchPart pPart)`
    `void` | `partDeactivated(org.eclipse.ui.IWorkbenchPart pPart)`
    `void` | `partOpened(org.eclipse.ui.IWorkbenchPart pPart)`

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

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

- - ### Constructor Detail

    - #### ZExplorerPartListener

          public ZExplorerPartListener()

  - ### Method Detail

    - #### addEditorPart

          public static void addEditorPart(ZExplorerEditorPart pEditorPart)

      add the editor part to the zExplorer editor part list.
      Parameters:
        `pEditorPart` - editor part to be added

    - #### partActivated

          public void partActivated(org.eclipse.ui.IWorkbenchPart pPart)

      Specified by:
        `partActivated` in interface `org.eclipse.ui.IPartListener`

    - #### partBroughtToTop

          public void partBroughtToTop(org.eclipse.ui.IWorkbenchPart pPart)

      Specified by:
        `partBroughtToTop` in interface `org.eclipse.ui.IPartListener`

    - #### closeAllEditorParts

          public void closeAllEditorParts()

      close all open editor parts monitored by Taurus and clear the Taurus editor part monitor maps

    - #### getOpenEditors

          public static java.util.List<org.eclipse.ui.IEditorPart> getOpenEditors()

      Returns:
        a list of open editors that contain files opened by the zExplorer

    - #### getEditorPart

          public static ZExplorerEditorPart getEditorPart(org.eclipse.core.resources.IFile pFile)

      Gets the `ZExplorerEditorPart` for a file.
      Parameters:
        `pFile` - the file that is opened in an Eclipse editor
      Returns:
        the associated `ZExplorerEditorPart` or `null` if no editor part is currently opened for the file

    - #### getEditorPart

          public static ZExplorerEditorPart getEditorPart(org.eclipse.ui.IEditorPart pEditorPart)

      Gets the `ZExplorerEditorPart` for a editor part.
      Parameters:
        `pEditorPart` - the editor part
      Returns:
        the associated `ZExplorerEditorPart` or `null` if the given editor part is not monitored by `ZExplorerPartListener`. Uses

    - #### isFileOpen

          public static boolean isFileOpen(org.eclipse.core.resources.IFile pFile)

      check if the given file opened by the zExplorer is still open in an editor page
      Parameters:
        `pFile` - file to be checked
      Returns:
        `true`if the given file is opened

    - #### partClosed

          public void partClosed(org.eclipse.ui.IWorkbenchPart pPart)

      Specified by:
        `partClosed` in interface `org.eclipse.ui.IPartListener`

    - #### partDeactivated

          public void partDeactivated(org.eclipse.ui.IWorkbenchPart pPart)

      Specified by:
        `partDeactivated` in interface `org.eclipse.ui.IPartListener`

    - #### contains

          public static boolean contains(java.lang.String pTitle)

      Parameters:
        `pTitle` - the title of the editor part
      Returns:
        `true` if the the listener monitors the editor part with the given title
      See Also:
        `IWorkbenchPart.getTitle()`

    - #### partOpened

          public void partOpened(org.eclipse.ui.IWorkbenchPart pPart)

      Specified by:
        `partOpened` in interface `org.eclipse.ui.IPartListener`

Copyright © 2015 Micro Focus GmbH. All rights reserved.