public class ConvertingSelectionProvider
extends java.lang.Object
getSelection
and setSelection
. The default strategy
used to adapt the elements of the selection to IJavaScriptElement
or a IResource
,
but implementors can override this behavior.
Provisional API: This class/interface is part of an interim API that is still under development and expected to
change significantly before reaching stability. It is being made available at this early stage to solicit feedback
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
(repeatedly) as the API evolves.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)
IJavaScriptElement
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()
public final void setSelection(ISelection selection)
public void addSelectionChangedListener(ISelectionChangedListener listener)
public void removeSelectionChangedListener(ISelectionChangedListener listener)
Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.