/** * Returns an observable list that tracks the current selection of the given * viewer. Assumes that the viewer provides selections of type * {@link IStructuredSelection}. Note that the observable list will not * honor the full contract of <code>java.util.List</code> in that it may * delete or reorder elements based on what the viewer returns from * {@link ISelectionProvider#getSelection()} after having called * {@link ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)} * based on the requested change to the observable list. The affected * methods are <code>add</code>, <code>addAll</code>, and <code>set</code>. * * @param viewer * @return the observable value tracking the (multi) selection of the given * selection provider * * @since 1.2 */ public static IViewerObservableList observeMultiSelection(Viewer viewer) { checkNull(viewer); return ViewerProperties.multipleSelection().observe(viewer); }
/** * Returns an observable list that tracks the current <i>post</i> selection * of the given structured viewer. Assumes that the viewer provides * selections of type {@link IStructuredSelection}. Note that the observable * list will not honor the full contract of <code>java.util.List</code> in * that it may delete or reorder elements based on what the viewer returns * from {@link ISelectionProvider#getSelection()} after having called * {@link ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)} * based on the requested change to the observable list. The affected * methods are <code>add</code>, <code>addAll</code>, and <code>set</code>. * * @param viewer * The viewer on which to track the <i>post</i> selection. * @return the observable value tracking the (multi) <i>post</i> selection * of the given structured viewer * * @since 1.4 */ public static IViewerObservableList observeMultiPostSelection( StructuredViewer viewer) { checkNull(viewer); return ViewerProperties.multiplePostSelection().observe(viewer); }
/** * Returns an observable list that tracks the current selection of the given * selection provider. Assumes that the selection provider provides * selections of type {@link IStructuredSelection}. Note that the observable * list will not honor the full contract of <code>java.util.List</code> in * that it may delete or reorder elements based on what the selection * provider returns from {@link ISelectionProvider#getSelection()} after * having called * {@link ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)} * based on the requested change to the observable list. The affected * methods are <code>add</code>, <code>addAll</code>, and <code>set</code>. * * @param selectionProvider * @return the observable value tracking the (multi) selection of the given * selection provider * * @since 1.2 */ public static IObservableList observeMultiSelection( ISelectionProvider selectionProvider) { checkNull(selectionProvider); return ViewerProperties.multipleSelection().observe(selectionProvider); }
/** * Returns an observable list that tracks the current <i>post</i> selection * of the given post selection provider. Assumes that the selection provider * provides selections of type {@link IStructuredSelection}. Note that the * observable list will not honor the full contract of * <code>java.util.List</code> in that it may delete or reorder elements * based on what the selection provider returns from * {@link ISelectionProvider#getSelection()} after having called * {@link ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)} * based on the requested change to the observable list. The affected * methods are <code>add</code>, <code>addAll</code>, and <code>set</code>. * * @param selectionProvider * The selection provider on which to track the <i>post</i> * selection. * @return the observable value tracking the (multi) <i>post</i> selection * of the given post selection provider * * @since 1.4 */ public static IObservableList observeMultiPostSelection( IPostSelectionProvider selectionProvider) { checkNull(selectionProvider); return ViewerProperties.multiplePostSelection().observe( selectionProvider); }