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

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

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui
Interface ISourceProvider

All Known Implementing Classes:
AbstractSourceProvider

public interface ISourceProvider

A provider of notifications for when a change has occurred to a particular type of source. These providers can be given to the appropriate service, and this service will then re-evaluate the appropriate pieces of its internal state in response to these changes.

It is recommended that clients subclass AbstractSourceProvider instead, as this provides some common support for listeners.

Since:
3.1
See Also:
IHandlerService, ISources

Method Summary
 void addSourceProviderListener ( ISourceProviderListener listener)
          Adds a listener to this source provider.
 void dispose ()
          Allows the source provider an opportunity to clean up resources (e.g., listeners) before being released.
  Map getCurrentState ()
          Returns the current state of the sources tracked by this provider.
  String[] getProvidedSourceNames ()
          Returns the names of those sources provided by this class.
 void removeSourceProviderListener ( ISourceProviderListener listener)
          Removes a listener from this source provider.
 

Method Detail

addSourceProviderListener

void addSourceProviderListener(
ISourceProviderListener listener)
Adds a listener to this source provider. This listener will be notified whenever the corresponding source changes.

Parameters:
listener - The listener to add; must not be null.

dispose

void dispose()
Allows the source provider an opportunity to clean up resources (e.g., listeners) before being released. This method should be called by the creator after the source provider has been removed from all the services with which it was registered.


getCurrentState

Map getCurrentState()
Returns the current state of the sources tracked by this provider. This is used to provide a view of the world if the event loop is busy and things are some state has already changed.

For use with core expressions, this map should contain IEvaluationContext#UNDEFINED_VARIABLE for properties which are only sometimes available.

Returns:
A map of variable names (String) to variable values (Object). This may be empty, and may be null.

getProvidedSourceNames

String[] getProvidedSourceNames()
Returns the names of those sources provided by this class. This is used by clients of source providers to determine which source providers they actually need.

Returns:
An array of source names. This value should never be null or empty.

removeSourceProviderListener

void removeSourceProviderListener(
ISourceProviderListener listener)
Removes a listener from this source provider. This listener will be notified whenever the corresponding source changes.

Parameters:
listener - The listener to remove; must not be null.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


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