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 Plug-in Developer Guide
Previous Page Home Next Page

Operational Topics

This section covers the operation of the CNF in detail.

Content Provider selection

Selecting the content provider is done by finding one or more NCEs associated with an object. The CNF is registered as a content provider a viewer and thus gets called at the content provider APIs in response to actions by the user on the viewer. In general, if the user is navigating by expanding in the viewer, the getElements() or getChildren() methods are called. However if the user has selected some object (like in an editor) and wishes to show it in the viewer, the getParent() method is used because the viewer needs to be able to figure out the part of the tree between the object and the content currently visible in the viewer.

When selecting an NCE in reaction to the getElements() or getChildren() call on the viewer, the triggerPoints (or enablement if specified) expression is evaluated against the object. The content provider associated with that NCE is invoked. If there are multiple content providers enabled by their triggerPoints (or enablement) expressions, they are all invoked in order according to priority and their results are concatenated.

When selecting an NCE in reaction to the getParent() call on the viewer, the possibleChildren (or enablement if specified) expression is evaluated against the object. The content provider associated with that NCE is invoked. If there are multiple content providers enabled by their possibleChildren (or enablement) expressions, the content providers are invoked in priority order. The first non-null parent returned by the content provider is used.

The overrides element allows an NCE to be overridden by another. In this case the content provider associated with the suppressed NCE will not be invoked to contribute.

During the initialization of the viewer, the it gets the initial input by invocation of the CommonNavigator.getInitialInput() . The default implementation of this method is to return the input of the current page. Thus, the initial input becomes the first object that is evaluated for the selection of NCEs.


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