|
 |
|
|
org.eclipse.ui.databinding
Class WorkbenchObservables
java.lang.Object
org.eclipse.ui.databinding.WorkbenchObservables
-
public class WorkbenchObservables
- extends
Object
Factory methods for creating observables for Workbench objects
-
Since:
- 3.5
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
WorkbenchObservables
public WorkbenchObservables()
observeDetailAdaptedValue
public static
IObservableValue observeDetailAdaptedValue(
IObservableValue master,
Class adapter)
- 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
IObservableValue observeAdaptedSingleSelection(
IServiceLocator locator,
Class targetType)
- 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 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
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.
|
|
|