Package com._1c.g5.v8.dt.internal.ui
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.
-
Field Summary
Fields inherited from interface com._1c.g5.v8.dt.ui.IDtSelectionService
SERVICE_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
void
org.eclipse.emf.ecore.EStructuralFeature
getEditorFeature
(org.eclipse.ui.IWorkbenchWindow window) org.eclipse.emf.ecore.EObject
getEditorModel
(org.eclipse.ui.IWorkbenchWindow window) getEditorSelection
(org.eclipse.ui.IWorkbenchWindow window) getSelection
(org.eclipse.ui.IWorkbenchWindow window) getSelectionForNewWizard
(org.eclipse.ui.IWorkbenchWindow window, ISelection selection) Obtains a selection suitable for use by the New Wizard.getSelectionForPropertyView
(org.eclipse.ui.IWorkbenchWindow window, ISelection selection) Obtains a selection suitable for use by the Property View.void
pageActivated
(org.eclipse.ui.IWorkbenchPage page) void
pageClosed
(org.eclipse.ui.IWorkbenchPage page) void
pageOpened
(org.eclipse.ui.IWorkbenchPage page) void
partActivated
(org.eclipse.ui.IWorkbenchPartReference partRef) void
partBroughtToTop
(org.eclipse.ui.IWorkbenchPartReference partRef) void
partClosed
(org.eclipse.ui.IWorkbenchPartReference partRef) void
partDeactivated
(org.eclipse.ui.IWorkbenchPartReference partRef) void
partHidden
(org.eclipse.ui.IWorkbenchPartReference partRef) void
partInputChanged
(org.eclipse.ui.IWorkbenchPartReference partRef) void
partOpened
(org.eclipse.ui.IWorkbenchPartReference partRef) void
partVisible
(org.eclipse.ui.IWorkbenchPartReference partRef) void
selectionChanged
(org.eclipse.ui.IWorkbenchPart part, ISelection selection) void
start()
Participates thelinking
phase.
Adds listeners to the Workbench windows.void
stop()
Participates thelinking
phase.
Removes listeners from the Workbench windows.void
windowActivated
(org.eclipse.ui.IWorkbenchWindow window) void
windowClosed
(org.eclipse.ui.IWorkbenchWindow window) void
windowDeactivated
(org.eclipse.ui.IWorkbenchWindow window) void
windowOpened
(org.eclipse.ui.IWorkbenchWindow window)
-
Constructor Details
-
DtSelectionService
public DtSelectionService()
-
-
Method Details
-
activate
public void activate()- Specified by:
activate
in interfaceIManagedService
-
deactivate
public void deactivate()- Specified by:
deactivate
in interfaceIManagedService
-
getEditorModel
public org.eclipse.emf.ecore.EObject getEditorModel(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
getEditorModel
in interfaceIDtSelectionService
- 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 interfaceIDtSelectionService
- Parameters:
window
- workbench window.- Returns:
- the active DT editor feature for a given window if any,
null
otherwise.
-
getEditorSelection
- Specified by:
getEditorSelection
in interfaceIDtSelectionService
- Parameters:
window
- workbench window.- Returns:
- the active DT editor selection for a given window if any,
null
otherwise.
-
getSelection
- Specified by:
getSelection
in interfaceIDtSelectionService
- 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 interfaceIDtSelectionService
- 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 interfaceIDtSelectionService
- 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 interfaceorg.eclipse.ui.IWindowListener
-
windowDeactivated
public void windowDeactivated(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowDeactivated
in interfaceorg.eclipse.ui.IWindowListener
-
windowClosed
public void windowClosed(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowClosed
in interfaceorg.eclipse.ui.IWindowListener
-
windowOpened
public void windowOpened(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowOpened
in interfaceorg.eclipse.ui.IWindowListener
-
selectionChanged
- Specified by:
selectionChanged
in interfaceorg.eclipse.ui.ISelectionListener
-
pageActivated
public void pageActivated(org.eclipse.ui.IWorkbenchPage page) - Specified by:
pageActivated
in interfaceorg.eclipse.ui.IPageListener
-
pageClosed
public void pageClosed(org.eclipse.ui.IWorkbenchPage page) - Specified by:
pageClosed
in interfaceorg.eclipse.ui.IPageListener
-
pageOpened
public void pageOpened(org.eclipse.ui.IWorkbenchPage page) - Specified by:
pageOpened
in interfaceorg.eclipse.ui.IPageListener
-
partActivated
public void partActivated(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partActivated
in interfaceorg.eclipse.ui.IPartListener2
-
partBroughtToTop
public void partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partBroughtToTop
in interfaceorg.eclipse.ui.IPartListener2
-
partClosed
public void partClosed(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partClosed
in interfaceorg.eclipse.ui.IPartListener2
-
partDeactivated
public void partDeactivated(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partDeactivated
in interfaceorg.eclipse.ui.IPartListener2
-
partOpened
public void partOpened(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partOpened
in interfaceorg.eclipse.ui.IPartListener2
-
partHidden
public void partHidden(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partHidden
in interfaceorg.eclipse.ui.IPartListener2
-
partVisible
public void partVisible(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partVisible
in interfaceorg.eclipse.ui.IPartListener2
-
partInputChanged
public void partInputChanged(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partInputChanged
in interfaceorg.eclipse.ui.IPartListener2
-
start
Participates thelinking
phase.
Adds listeners to the Workbench windows.For more information see
LifecyclePhase.LINKING
- See Also:
-
stop
Participates thelinking
phase.
Removes listeners from the Workbench windows.For more information see
LifecyclePhase.LINKING
- See Also:
-