public class ConvertingSelectionProvider extends Object implements ISelectionProvider
getSelection and setSelection. The default strategy
used to adapt the elements of the selection to IJavaElement or a IResource,
but implementors can override this behavior.| Constructor and Description |
|---|
ConvertingSelectionProvider(ISelectionProvider provider)
Creates a
ConvertingSelectionProvider to convert from a given selection provider
using the default mechanism. |
| Modifier and Type | Method and Description |
|---|---|
void |
addSelectionChangedListener(ISelectionChangedListener listener) |
ISelection |
convertFrom(ISelection viewerSelection)
Converts the given original viewer selection into a new
selection.
|
ISelection |
convertTo(ISelection selection)
Converts a selection to a viewer selection.
|
ISelection |
getSelection() |
void |
removeSelectionChangedListener(ISelectionChangedListener listener) |
void |
setSelection(ISelection selection) |
public ConvertingSelectionProvider(ISelectionProvider provider)
ConvertingSelectionProvider to convert from a given selection provider
using the default mechanism.provider - the provider to covert from and topublic ISelection convertFrom(ISelection viewerSelection)
IJavaElement then to IResource.
Implementors want to override this method.viewerSelection - the original viewer selectionpublic ISelection convertTo(ISelection selection)
selection - the selection to convertpublic final ISelection getSelection()
getSelection in interface ISelectionProviderpublic final void setSelection(ISelection selection)
setSelection in interface ISelectionProviderpublic void addSelectionChangedListener(ISelectionChangedListener listener)
addSelectionChangedListener in interface ISelectionProviderpublic void removeSelectionChangedListener(ISelectionChangedListener listener)
removeSelectionChangedListener in interface ISelectionProviderCopyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.