Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.databinding
Class WorkbenchObservables


java.lang.Object
  extended by 
org.eclipse.ui.databinding.WorkbenchObservables

public class WorkbenchObservables
extends Object

Factory methods for creating observables for Workbench objects

Since:
3.5

Constructor Summary
WorkbenchObservables ()
           
 
Method Summary
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.
static  IObservableValue observeDetailAdaptedValue ( IObservableValue master, Class adapter)
          Returns an observable with values of the given target type.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkbenchObservables

public WorkbenchObservables()
Method Detail

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

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire