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 Platform
Release 3.5

org.eclipse.core.runtime.dynamichelpers
Interface IExtensionTracker

All Known Implementing Classes:
ExtensionTracker

public interface IExtensionTracker

An extension tracker keeps associations between extensions and their derived objects on an extension basis. All extensions being added in a tracker will automatically be removed when the extension is uninstalled from the registry. Users interested in extension removal can register a handler that will let them know when an object is being removed.

This interface can be used without OSGi running.

This interface is not intended to be implemented by clients.

Since:
3.1
Restriction:
This interface is not intended to be implemented by clients.

Field Summary
static int REF_SOFT
          Constant for soft reference holding.
static int REF_STRONG
          Constant for strong (normal) reference holding.
static int REF_WEAK
          Constant for weak reference holding.
 
Method Summary
 void close ()
          Close the tracker.
  Object[] getObjects ( IExtension extension)
          Return all the objects that have been associated with the given extension.
 void registerHandler ( IExtensionChangeHandler handler, IFilter filter)
          Register an extension change handler with this tracker using the given filter.
 void registerObject ( IExtension extension, Object object, int referenceType)
          Create an association between the given extension and the given object.
 void unregisterHandler ( IExtensionChangeHandler handler)
          Unregister the given extension change handler previously registered with this tracker.
  Object[] unregisterObject ( IExtension extension)
          Remove all the objects associated with the given extension.
 void unregisterObject ( IExtension extension, Object object)
          Remove an association between the given extension and the given object.
 

Field Detail

REF_STRONG

static final int REF_STRONG
Constant for strong (normal) reference holding. Value 1.

See Also:
Constant Field Values

REF_SOFT

static final int REF_SOFT
Constant for soft reference holding. Value 2.

See Also:
Constant Field Values

REF_WEAK

static final int REF_WEAK
Constant for weak reference holding. Value 3.

See Also:
Constant Field Values
Method Detail

registerHandler

void registerHandler(
IExtensionChangeHandler handler,
                     
IFilter filter)
Register an extension change handler with this tracker using the given filter.

Parameters:
handler - the handler to be registered
filter - the filter to use to choose interesting changes

unregisterHandler

void unregisterHandler(
IExtensionChangeHandler handler)
Unregister the given extension change handler previously registered with this tracker.

Parameters:
handler - the handler to be unregistered

registerObject

void registerObject(
IExtension extension,
                    
Object object,
                    int referenceType)
Create an association between the given extension and the given object. The referenceType indicates how strongly the object is being kept in memory. There is 3 possible values: REF_STRONG, REF_SOFT, REF_WEAK.

Parameters:
extension - the extension
object - the object to associate with the extension
referenceType - one of REF_STRONG, REF_SOFT, REF_WEAK
See Also:
REF_STRONG, REF_SOFT, REF_WEAK

unregisterObject

void unregisterObject(
IExtension extension,
                      
Object object)
Remove an association between the given extension and the given object.

Parameters:
extension - the extension under which the object has been registered
object - the object to unregister

unregisterObject


Object[] unregisterObject(
IExtension extension)
Remove all the objects associated with the given extension. Return the removed objects.

Parameters:
extension - the extension for which the objects are removed
Returns:
the objects that were associated with the extension

getObjects


Object[] getObjects(
IExtension extension)
Return all the objects that have been associated with the given extension. All objects registered strongly will be return unless they have been unregistered. The objects registered softly or weakly may not be returned if they have been garbage collected. Return an empty array if no associations exist.

Parameters:
extension - the extension for which the object must be returned
Returns:
the array of associated objects

close

void close()
Close the tracker. All registered objects are freed and all handlers are being automatically removed.


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