Class DtSelectionService

java.lang.Object
com._1c.g5.v8.dt.internal.ui.DtSelectionService
All Implemented Interfaces:
IDtSelectionService, IManagedService, EventListener, org.eclipse.ui.IPageListener, org.eclipse.ui.IPartListener2, org.eclipse.ui.ISelectionListener, org.eclipse.ui.IWindowListener

@LifecycleService(name="DT_SELECTION_SERVICE") public class DtSelectionService extends Object implements IDtSelectionService, org.eclipse.ui.IWindowListener, org.eclipse.ui.ISelectionListener, org.eclipse.ui.IPageListener, org.eclipse.ui.IPartListener2
Global DT selection service implementation.
  • Constructor Details

    • DtSelectionService

      public DtSelectionService()
  • Method Details

    • activate

      public void activate()
      Specified by:
      activate in interface IManagedService
    • deactivate

      public void deactivate()
      Specified by:
      deactivate in interface IManagedService
    • getEditorModel

      public org.eclipse.emf.ecore.EObject getEditorModel(org.eclipse.ui.IWorkbenchWindow window)
      Specified by:
      getEditorModel in interface IDtSelectionService
      Parameters:
      window - workbench window.
      Returns:
      the active DT editor model for a given window if any, null otherwise.
    • getEditorFeature

      public org.eclipse.emf.ecore.EStructuralFeature getEditorFeature(org.eclipse.ui.IWorkbenchWindow window)
      Specified by:
      getEditorFeature in interface IDtSelectionService
      Parameters:
      window - workbench window.
      Returns:
      the active DT editor feature for a given window if any, null otherwise.
    • getEditorSelection

      public ISelection getEditorSelection(org.eclipse.ui.IWorkbenchWindow window)
      Specified by:
      getEditorSelection in interface IDtSelectionService
      Parameters:
      window - workbench window.
      Returns:
      the active DT editor selection for a given window if any, null otherwise.
    • getSelection

      public ISelection getSelection(org.eclipse.ui.IWorkbenchWindow window)
      Specified by:
      getSelection in interface IDtSelectionService
      Parameters:
      window - workbench window.
      Returns:
      the active selection for a given window if any, null otherwise. This selection is provided by Eclipse selection service.
    • getSelectionForPropertyView

      public ISelection getSelectionForPropertyView(org.eclipse.ui.IWorkbenchWindow window, ISelection selection)
      Description copied from interface: IDtSelectionService
      Obtains a selection suitable for use by the Property View.
      Specified by:
      getSelectionForPropertyView in interface IDtSelectionService
      Parameters:
      window - workbench window.
      selection - original selection reported by Property View.
      Returns:
      obtained selection.
    • getSelectionForNewWizard

      public ISelection getSelectionForNewWizard(org.eclipse.ui.IWorkbenchWindow window, ISelection selection)
      Description copied from interface: IDtSelectionService
      Obtains a selection suitable for use by the New Wizard.
      Specified by:
      getSelectionForNewWizard in interface IDtSelectionService
      Parameters:
      window - workbench window.
      selection - original selection reported by Wizard.
      Returns:
      obtained selection.
    • windowActivated

      public void windowActivated(org.eclipse.ui.IWorkbenchWindow window)
      Specified by:
      windowActivated in interface org.eclipse.ui.IWindowListener
    • windowDeactivated

      public void windowDeactivated(org.eclipse.ui.IWorkbenchWindow window)
      Specified by:
      windowDeactivated in interface org.eclipse.ui.IWindowListener
    • windowClosed

      public void windowClosed(org.eclipse.ui.IWorkbenchWindow window)
      Specified by:
      windowClosed in interface org.eclipse.ui.IWindowListener
    • windowOpened

      public void windowOpened(org.eclipse.ui.IWorkbenchWindow window)
      Specified by:
      windowOpened in interface org.eclipse.ui.IWindowListener
    • selectionChanged

      public void selectionChanged(org.eclipse.ui.IWorkbenchPart part, ISelection selection)
      Specified by:
      selectionChanged in interface org.eclipse.ui.ISelectionListener
    • pageActivated

      public void pageActivated(org.eclipse.ui.IWorkbenchPage page)
      Specified by:
      pageActivated in interface org.eclipse.ui.IPageListener
    • pageClosed

      public void pageClosed(org.eclipse.ui.IWorkbenchPage page)
      Specified by:
      pageClosed in interface org.eclipse.ui.IPageListener
    • pageOpened

      public void pageOpened(org.eclipse.ui.IWorkbenchPage page)
      Specified by:
      pageOpened in interface org.eclipse.ui.IPageListener
    • partActivated

      public void partActivated(org.eclipse.ui.IWorkbenchPartReference partRef)
      Specified by:
      partActivated in interface org.eclipse.ui.IPartListener2
    • partBroughtToTop

      public void partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference partRef)
      Specified by:
      partBroughtToTop in interface org.eclipse.ui.IPartListener2
    • partClosed

      public void partClosed(org.eclipse.ui.IWorkbenchPartReference partRef)
      Specified by:
      partClosed in interface org.eclipse.ui.IPartListener2
    • partDeactivated

      public void partDeactivated(org.eclipse.ui.IWorkbenchPartReference partRef)
      Specified by:
      partDeactivated in interface org.eclipse.ui.IPartListener2
    • partOpened

      public void partOpened(org.eclipse.ui.IWorkbenchPartReference partRef)
      Specified by:
      partOpened in interface org.eclipse.ui.IPartListener2
    • partHidden

      public void partHidden(org.eclipse.ui.IWorkbenchPartReference partRef)
      Specified by:
      partHidden in interface org.eclipse.ui.IPartListener2
    • partVisible

      public void partVisible(org.eclipse.ui.IWorkbenchPartReference partRef)
      Specified by:
      partVisible in interface org.eclipse.ui.IPartListener2
    • partInputChanged

      public void partInputChanged(org.eclipse.ui.IWorkbenchPartReference partRef)
      Specified by:
      partInputChanged in interface org.eclipse.ui.IPartListener2
    • start

      @LifecycleParticipant(phase=LINKING) public void start()
      Participates the linking phase.
      Adds listeners to the Workbench windows.

      For more information see LifecyclePhase.LINKING

      See Also:
    • stop

      @LifecycleParticipant(phase=UNLINKING) public void stop()
      Participates the linking phase.
      Removes listeners from the Workbench windows.

      For more information see LifecyclePhase.LINKING

      See Also: