Package org.eclipse.ui.databinding
Class WorkbenchObservables
java.lang.Object
org.eclipse.ui.databinding.WorkbenchObservables
Deprecated.
Factory methods for creating observables for Workbench objects
- Since:
- 3.5
- Restriction:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IObservableValue<IEditorReference>
observeActiveEditor
(IPartService partService) Deprecated.Returns an observable value that tracks the active editor for the given part service.observeActivePart
(IPartService partService) Deprecated.Returns an observable value that tracks the active workbench part for the given part service.static IObservableValue<IWorkbenchPage>
Deprecated.Returns an observable value that tracks the active workbench page for the given workbench window.static IObservableValue<IWorkbenchWindow>
observeActiveWorkbenchWindow
(IWorkbench workbench) Deprecated.Returns an observable value that tracks the active workbench window for the given workbench.static <T> IObservableValue<T>
observeAdaptedSingleSelection
(IServiceLocator locator, Class<T> targetType) Deprecated.Returns an observable value that tracks the post selection of a selection service obtained through the given service locator, and adapts the first element of that selection to the given target type.static <T> IObservableValue<T>
observeDetailAdaptedValue
(IObservableValue<?> master, Class<T> adapter) Deprecated.Returns an observable with values of the given target type.static IObservableValue<IEditorInput>
observeEditorInput
(IEditorPart editor) Deprecated.Returns an observable value that tracks the editor input for the given editor.
-
Constructor Details
-
WorkbenchObservables
public WorkbenchObservables()Deprecated.
-
-
Method Details
-
observeDetailAdaptedValue
public static <T> IObservableValue<T> observeDetailAdaptedValue(IObservableValue<?> master, Class<T> adapter) Deprecated.Returns an observable with values of the given target type. If the wrapped observable's value is of the target type, or can be adapted to the target type, this is taken as the value of the returned observable, otherwisenull
.- Parameters:
master
- the observable whose value should be adaptedadapter
- the target type- Returns:
- an observable with values of the given type, or
null
if the current value of the given observable does not adapt to the target type
-
observeAdaptedSingleSelection
public static <T> IObservableValue<T> observeAdaptedSingleSelection(IServiceLocator locator, Class<T> targetType) Deprecated.Returns an observable value that tracks the post selection of a selection service obtained through the given service locator, and adapts the first element of that selection to the given target type.This method can be used by view or editor implementers to tie into the selection service, for example as follows:
IObservableValue<IResource> selection = WorkbenchObservables.observeAdaptedSingleSelection(getSite(), IResource.class);
- Parameters:
locator
- a service locator with an availableISelectionService
targetType
- the target type- Returns:
- an observable value whose value type is the given target type
-
observeActiveWorkbenchWindow
Deprecated.Returns an observable value that tracks the active workbench window for the given workbench.- Parameters:
workbench
- the workbench to get the observable for- Returns:
- an observable value that tracks the active workbench window
- Since:
- 3.110
-
observeActiveWorkbenchPage
Deprecated.Returns an observable value that tracks the active workbench page for the given workbench window.- Parameters:
window
- the workbench window to get the observable for- Returns:
- an observable value that tracks the active workbench page
- Since:
- 3.110
-
observeActivePart
Deprecated.Returns an observable value that tracks the active workbench part for the given part service.- Parameters:
partService
- the part service to get the observable for, e.g. a workbench page- Returns:
- an observable value that tracks the active workbench part
- Since:
- 3.110
-
observeActiveEditor
Deprecated.Returns an observable value that tracks the active editor for the given part service.- Parameters:
partService
- the part service to get the observable for, e.g. a workbench page- Returns:
- an observable value that tracks the active editor
- Since:
- 3.110
-
observeEditorInput
Deprecated.Returns an observable value that tracks the editor input for the given editor.- Parameters:
editor
- the editor to get the observable for- Returns:
- an observable value that tracks the editor input
- Since:
- 3.110
-
WorkbenchProperties
instead.