Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.ui.actions
Class ConvertingSelectionProvider


java.lang.Object
  extended by 
org.eclipse.jdt.ui.actions.ConvertingSelectionProvider
All Implemented Interfaces:
ISelectionProvider

public class ConvertingSelectionProvider
extends Object
implements ISelectionProvider

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.

Since:
3.2

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

ConvertingSelectionProvider

public ConvertingSelectionProvider(
ISelectionProvider provider)
Creates a ConvertingSelectionProvider to convert from a given selection provider using the default mechanism.

Parameters:
provider - the provider to covert from and to
Method Detail

convertFrom

public 
ISelection convertFrom(
ISelection viewerSelection)
Converts the given original viewer selection into a new selection. The default behavior adapts the elements in the selection first to IJavaElement then to IResource. Implementors want to override this method.

Parameters:
viewerSelection - the original viewer selection
Returns:
the new selection to be used

convertTo

public 
ISelection convertTo(
ISelection selection)
Converts a selection to a viewer selection. The default implementation does not convert the selection. Implementors want to override this behavior.

Parameters:
selection - the selection to convert
Returns:
a viewer selection

getSelection

public final 
ISelection getSelection()

Specified by:
getSelection in interface ISelectionProvider

setSelection

public final void setSelection(
ISelection selection)

Specified by:
setSelection in interface ISelectionProvider

addSelectionChangedListener

public void addSelectionChangedListener(
ISelectionChangedListener listener)

Specified by:
addSelectionChangedListener in interface ISelectionProvider

removeSelectionChangedListener

public void removeSelectionChangedListener(
ISelectionChangedListener listener)

Specified by:
removeSelectionChangedListener in interface ISelectionProvider

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire