|
Eclipse JDT Release 3.7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.ui.actions.ConvertingSelectionProvider
public class ConvertingSelectionProvider
A converting selection provider is a special selection provider which converts
a selection before notifying any listeners. Additional it converts the selection
on 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 Summary | |
---|---|
ConvertingSelectionProvider(ISelectionProvider provider)
Creates a ConvertingSelectionProvider to convert from a given selection provider
using the default mechanism. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConvertingSelectionProvider(ISelectionProvider provider)
ConvertingSelectionProvider
to convert from a given selection provider
using the default mechanism.
provider
- the provider to covert from and toMethod Detail |
---|
public ISelection convertFrom(ISelection viewerSelection)
IJavaElement
then to IResource
.
Implementors want to override this method.
viewerSelection
- the original viewer selection
public ISelection convertTo(ISelection selection)
selection
- the selection to convert
public final ISelection getSelection()
getSelection
in interface ISelectionProvider
public final void setSelection(ISelection selection)
setSelection
in interface ISelectionProvider
public void addSelectionChangedListener(ISelectionChangedListener listener)
addSelectionChangedListener
in interface ISelectionProvider
public void removeSelectionChangedListener(ISelectionChangedListener listener)
removeSelectionChangedListener
in interface ISelectionProvider
|
Eclipse JDT Release 3.7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved.