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 TypeMethodDescriptionvoidactivate()voidorg.eclipse.emf.ecore.EStructuralFeaturegetEditorFeature(org.eclipse.ui.IWorkbenchWindow window) org.eclipse.emf.ecore.EObjectgetEditorModel(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.voidpageActivated(org.eclipse.ui.IWorkbenchPage page) voidpageClosed(org.eclipse.ui.IWorkbenchPage page) voidpageOpened(org.eclipse.ui.IWorkbenchPage page) voidpartActivated(org.eclipse.ui.IWorkbenchPartReference partRef) voidpartBroughtToTop(org.eclipse.ui.IWorkbenchPartReference partRef) voidpartClosed(org.eclipse.ui.IWorkbenchPartReference partRef) voidpartDeactivated(org.eclipse.ui.IWorkbenchPartReference partRef) voidpartHidden(org.eclipse.ui.IWorkbenchPartReference partRef) voidpartInputChanged(org.eclipse.ui.IWorkbenchPartReference partRef) voidpartOpened(org.eclipse.ui.IWorkbenchPartReference partRef) voidpartVisible(org.eclipse.ui.IWorkbenchPartReference partRef) voidselectionChanged(org.eclipse.ui.IWorkbenchPart part, ISelection selection) voidstart()Participates thelinkingphase.
Adds listeners to the Workbench windows.voidstop()Participates thelinkingphase.
Removes listeners from the Workbench windows.voidwindowActivated(org.eclipse.ui.IWorkbenchWindow window) voidwindowClosed(org.eclipse.ui.IWorkbenchWindow window) voidwindowDeactivated(org.eclipse.ui.IWorkbenchWindow window) voidwindowOpened(org.eclipse.ui.IWorkbenchWindow window)
-
Constructor Details
-
DtSelectionService
public DtSelectionService()
-
-
Method Details
-
activate
public void activate()- Specified by:
activatein interfaceIManagedService
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceIManagedService
-
getEditorModel
public org.eclipse.emf.ecore.EObject getEditorModel(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
getEditorModelin interfaceIDtSelectionService- Parameters:
window- workbench window.- Returns:
- the active DT editor model for a given window if any,
nullotherwise.
-
getEditorFeature
public org.eclipse.emf.ecore.EStructuralFeature getEditorFeature(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
getEditorFeaturein interfaceIDtSelectionService- Parameters:
window- workbench window.- Returns:
- the active DT editor feature for a given window if any,
nullotherwise.
-
getEditorSelection
- Specified by:
getEditorSelectionin interfaceIDtSelectionService- Parameters:
window- workbench window.- Returns:
- the active DT editor selection for a given window if any,
nullotherwise.
-
getSelection
- Specified by:
getSelectionin interfaceIDtSelectionService- Parameters:
window- workbench window.- Returns:
- the active selection for a given window if any,
nullotherwise. This selection is provided by Eclipse selection service.
-
getSelectionForPropertyView
public ISelection getSelectionForPropertyView(org.eclipse.ui.IWorkbenchWindow window, ISelection selection) Description copied from interface:IDtSelectionServiceObtains a selection suitable for use by the Property View.- Specified by:
getSelectionForPropertyViewin 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:IDtSelectionServiceObtains a selection suitable for use by the New Wizard.- Specified by:
getSelectionForNewWizardin 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:
windowActivatedin interfaceorg.eclipse.ui.IWindowListener
-
windowDeactivated
public void windowDeactivated(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowDeactivatedin interfaceorg.eclipse.ui.IWindowListener
-
windowClosed
public void windowClosed(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowClosedin interfaceorg.eclipse.ui.IWindowListener
-
windowOpened
public void windowOpened(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowOpenedin interfaceorg.eclipse.ui.IWindowListener
-
selectionChanged
- Specified by:
selectionChangedin interfaceorg.eclipse.ui.ISelectionListener
-
pageActivated
public void pageActivated(org.eclipse.ui.IWorkbenchPage page) - Specified by:
pageActivatedin interfaceorg.eclipse.ui.IPageListener
-
pageClosed
public void pageClosed(org.eclipse.ui.IWorkbenchPage page) - Specified by:
pageClosedin interfaceorg.eclipse.ui.IPageListener
-
pageOpened
public void pageOpened(org.eclipse.ui.IWorkbenchPage page) - Specified by:
pageOpenedin interfaceorg.eclipse.ui.IPageListener
-
partActivated
public void partActivated(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partActivatedin interfaceorg.eclipse.ui.IPartListener2
-
partBroughtToTop
public void partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partBroughtToTopin interfaceorg.eclipse.ui.IPartListener2
-
partClosed
public void partClosed(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partClosedin interfaceorg.eclipse.ui.IPartListener2
-
partDeactivated
public void partDeactivated(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partDeactivatedin interfaceorg.eclipse.ui.IPartListener2
-
partOpened
public void partOpened(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partOpenedin interfaceorg.eclipse.ui.IPartListener2
-
partHidden
public void partHidden(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partHiddenin interfaceorg.eclipse.ui.IPartListener2
-
partVisible
public void partVisible(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partVisiblein interfaceorg.eclipse.ui.IPartListener2
-
partInputChanged
public void partInputChanged(org.eclipse.ui.IWorkbenchPartReference partRef) - Specified by:
partInputChangedin interfaceorg.eclipse.ui.IPartListener2
-
start
Participates thelinkingphase.
Adds listeners to the Workbench windows.For more information see
LifecyclePhase.LINKING- See Also:
-
stop
Participates thelinkingphase.
Removes listeners from the Workbench windows.For more information see
LifecyclePhase.LINKING- See Also:
-