Package org.eclipse.ui.databinding

## Class WorkbenchObservables

- java.lang.Object
- - org.eclipse.ui.databinding.WorkbenchObservables

    @Deprecated
    public class WorkbenchObservables
    extends Object

Deprecated.
This class will be removed in a future release. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=546820 for more information. Use `WorkbenchProperties` instead.
Factory methods for creating observables for Workbench objects

Since:
  3.5
Restriction:

### Constructor Summary

Constructors
`WorkbenchObservables()` Deprecated.

### Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods
`static IObservableValue<IEditorReference>` `observeActiveEditor​(IPartService partService)` Deprecated. Returns an observable value that tracks the active editor for the given part service.
`static IObservableValue<IWorkbenchPartReference>` `observeActivePart​(IPartService partService)` Deprecated. Returns an observable value that tracks the active workbench part for the given part service.
`static IObservableValue<IWorkbenchPage>` `observeActiveWorkbenchPage​(IWorkbenchWindow window)` 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.

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

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

### Constructor Detail

#### WorkbenchObservables

    public WorkbenchObservables()

Deprecated.

### Method Detail

#### 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, otherwise `null`.

Parameters:
  `master` - the observable whose value should be adapted
  `adapter` - 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 available `ISelectionService`
  `targetType` - the target type
Returns:
  an observable value whose value type is the given target type

#### observeActiveWorkbenchWindow

    public static IObservableValue<IWorkbenchWindow> observeActiveWorkbenchWindow​(IWorkbench workbench)

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

    public static IObservableValue<IWorkbenchPage> observeActiveWorkbenchPage​(IWorkbenchWindow window)

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

    public static IObservableValue<IWorkbenchPartReference> observeActivePart​(IPartService partService)

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

    public static IObservableValue<IEditorReference> observeActiveEditor​(IPartService partService)

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

    public static IObservableValue<IEditorInput> observeEditorInput​(IEditorPart editor)

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