Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.ui.util.selection.SelectionUtils Class Reference

List of all members.

Static Public Member Functions

static ISelectionService getSelectionService ()
static ISelection getSelection ()
static ISelection getSelection (final String partId)
static List< ISelection > getOverallSelections ()
static< T > List< T > getAdaptableObjects (ISelection selection, Class<?extends T > adapter)

Detailed Description

Utility class for a convenient work with the ISelectionService.

Author:
bkahlert

Member Function Documentation

static <T> List<T> de.fu_berlin.inf.dpp.ui.util.selection.SelectionUtils.getAdaptableObjects ( ISelection  selection,
Class<?extends T >  adapter 
) [static]

Tries to adapt each selection item to adapter and returns all adapted items.

Parameters:
selection
adapterto adapt each object to
Returns:
static List<ISelection> de.fu_berlin.inf.dpp.ui.util.selection.SelectionUtils.getOverallSelections ( ) [static]

Returns all selections made in the current perspective.

Returns:
static ISelection de.fu_berlin.inf.dpp.ui.util.selection.SelectionUtils.getSelection ( ) [static]

Returns the current selection. Will always return null if called from a non-UI thread.

Returns:
the current selection, or null if undefined
See also:
ISelectionService.getSelection()
static ISelection de.fu_berlin.inf.dpp.ui.util.selection.SelectionUtils.getSelection ( final String  partId) [static]

Returns the current selection in the given part. Will always return null if called from a non-UI thread.

Parameters:
partIdof the part
Returns:
the current selection, or null if undefined
See also:
ISelectionService.getSelection(String)
static ISelectionService de.fu_berlin.inf.dpp.ui.util.selection.SelectionUtils.getSelectionService ( ) [static]

Returns the selection service. Will always return null if called from a non-UI thread.

Returns:
the current selection service or null if it is not available
 All Classes Namespaces Files Functions Variables Enumerations