Java Doc for INavigatorContentService.java in  » IDE-Eclipse » ui » org » eclipse » ui » navigator » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui » org.eclipse.ui.navigator 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.navigator.INavigatorContentService

All known Subclasses:   org.eclipse.ui.internal.navigator.NavigatorContentService,
INavigatorContentService
public interface INavigatorContentService (Code)
Manages content extensions for extensible viewers and provides reusable services for filters, sorting, the activation of content extensions, and DND. The service can locate the appropriate providers (for contents or labels) for an element and provide a ready-to-go ITreeContentProvider and ILabelProvider for viewers that wish to take advantage of the org.eclipse.ui.navigator.navigatorContent extensions defined for a particular viewerId.

Clients should create instances of the this class using the factory ( NavigatorContentServiceFactory ).

Clients may contribute logical extensions using org.eclipse.ui.navigator.navigatorContent. Each extension has three states which determine whether the extension is used by the content service:

A new instance of the content service should be created for each viewer. Clients should use INavigatorContentService.createCommonContentProvider() and INavigatorContentService.createCommonLabelProvider() for the viewer. Each content service tracks the viewer it is attached to. Clients may create the content service with a viewer using ( NavigatorContentServiceFactory.createContentService(String) ). Alternatively, when the content provider is created and set on a viewer, IContentProvider.inputChanged(org.eclipse.jface.viewers.ViewerObjectObject) will be called and the content provider will update the viewer used by its backing content service. Therefore, only each content service has exactly one content provider and one label provider.

Extensions may also coordinate their behavior through a IExtensionStateModel state model . The state model holds properties and supports property change listeners. Actions can toggle the setting of properties and the corresponding content/label providers will respond to property change event. Each navigatorContent extension has its own contained state model keyed off of the content extension id.

Clients may respond when content extensions are loaded by attaching a INavigatorContentServiceListener to the content service.

Some extensions may provide content or label providers which implement IMemento . Clients must call INavigatorContentService.restoreState(IMemento) and INavigatorContentService.saveState(IMemento) at the appropriate times for these extensions to prepare themselves with the memento.

This interface is not intended to be implemented by clients.


since:
   3.2




Method Summary
 voidaddListener(INavigatorContentServiceListener aListener)
     Add a listener to be notified whenever an extension is loaded.
 INavigatorContentDescriptor[]bindExtensions(String[] extensionIds, boolean isRoot)
     Bind the set of given extensions to this content service.
 ITreeContentProvidercreateCommonContentProvider()
     Create a Content Provider which will use an enhanced delegation model to locate extension content providers using this content service for each element in the tree.

The content provider returned will populate the root of the viewer in one of two ways.

In the first approach, the content provider will seek out content extensions which are bound using a viewerContentBinding.

 IDescriptionProvidercreateCommonDescriptionProvider()
    
 ILabelProvidercreateCommonLabelProvider()
     Create a Label Provider which will use an enhanced delegation model to locate extension label providers using this content service for each element in the tree.

The label of each element is determined by consulting the source of the element.

 voiddispose()
     Release any acquired resources and instantiated content extensions.
 SetfindContentExtensionsByTriggerPoint(Object anElement)
     Search for extensions that declare the given element in their triggerPoints expression.
 SetfindContentExtensionsWithPossibleChild(Object anElement)
     Search for extensions that declare the given element in their possibleChildren expression.
 SetfindRootContentExtensions(Object anElement)
     Search for extensions that declare the given element in their triggerPoints expression or that indicate they should be bound as a root extension.
 IExtensionStateModelfindStateModel(String anExtensionId)
     The state model stores properties associated with the extension.
 INavigatorActivationServicegetActivationService()
     The activation service is used to toggle whether certain extensions have the opportunity to contribute content and/or actions.
public  INavigatorContentDescriptorgetContentDescriptorById(String anExtensionId)
     Return the content extension for the given id.
public  INavigatorContentExtensiongetContentExtensionById(String anExtensionId)
     Return the content extension for the given id.
 INavigatorDnDServicegetDnDService()
     The DND Service provides instances of CommonDragAdapterAssistant and CommonDropAdapterAssistant for this content service.
 INavigatorFilterServicegetFilterService()
     The filter service can provide the available filters for the viewer, and manage which filters are active.
 INavigatorPipelineServicegetPipelineService()
     The pipeline service calculates the appropriate viewer modification or refresh that should be applied for viewers that wish to take advantage of the model pipelining that some extensions use to massage or reshape contents in the viewer.
 INavigatorSaveablesServicegetSaveablesService()
     The saveable service helps implementing ISaveablesSource .
 INavigatorSorterServicegetSorterService()
     The sorter service provides the appropriate sorter based on the current items being sorted.
 INavigatorViewerDescriptorgetViewerDescriptor()
     The viewer descriptor provides some basic information about the abstract viewer that uses this content service.
 StringgetViewerId()
     The viewer id is used to locate matching viewerContentBindings. In general, this would be the id of the view defined by a org.eclipse.ui.views extension.
 String[]getVisibleExtensionIds()
     Return the set of visible extension ids for this content service, which includes those that are bound through viewerContentBindings and those that are bound through INavigatorContentService.bindExtensions(String[],boolean) .
 INavigatorContentDescriptor[]getVisibleExtensions()
     Return the set of visible content descriptors for this content service, which includes those that are bound through viewerContentBindings and those that are bound through INavigatorContentService.bindExtensions(String[],boolean) .
 booleanisActive(String anExtensionId)
     See above for the definition of active.
Parameters:
  anExtensionId - The unqiue identifier from a content extension.
 booleanisVisible(String anExtensionId)
     See above for the definition of visible.
Parameters:
  anExtensionId - The unqiue identifier from a content extension.
 voidremoveListener(INavigatorContentServiceListener aListener)
     Remove a listener (by identity) from the set of listeners.
 voidrestoreState(IMemento aMemento)
     Restore the state associated with the memento.
 voidsaveState(IMemento aMemento)
     Persist any session-to-session state with the memento.
 voidupdate()
     The root content providers are recalculated by this method.



Method Detail
addListener
void addListener(INavigatorContentServiceListener aListener)(Code)
Add a listener to be notified whenever an extension is loaded.
Parameters:
  aListener - A listener to be attached.



bindExtensions
INavigatorContentDescriptor[] bindExtensions(String[] extensionIds, boolean isRoot)(Code)
Bind the set of given extensions to this content service. Programmatic bindings allow clients to make extensions visible to an instance of the content service by appending to the bindings declared through org.eclipse.ui.navigator.viewer. Programmtic bindings are not persisted and are not remembered or propagated to other instances of the INavigatorContentService in the same session. Programmatic bindings cannot be undone for a given instance of the INavigatorContentService and do not override declarative bindings.

Once a content extension has been bound to the INavigatorContentService, clients may use INavigatorActivationService.activateExtensions(String[]boolean) or INavigatorActivationService.deactivateExtensions(String[]boolean) to control the activation state of the extension. See INavigatorContentService for more information on the difference between visible and active.


Parameters:
  extensionIds - The list of extensions to make visible.
Parameters:
  isRoot - whether the context provider shold be a root content provider A list of all INavigatorContentDescriptors that correspond to thegiven extensionIds.



createCommonContentProvider
ITreeContentProvider createCommonContentProvider()(Code)
Create a Content Provider which will use an enhanced delegation model to locate extension content providers using this content service for each element in the tree.

The content provider returned will populate the root of the viewer in one of two ways.

In the first approach, the content provider will seek out content extensions which are bound using a viewerContentBinding. If any of the found viewerContentBindings declare the isRoot attribute on as true, then that set of extensions will be consulted for the root elements of the tree. The input of the viewer will be supplied to each of their IStructuredContentProvider.getElements(Object) methods and aggregate the results for the root of the viewer.

In the second approach, if no viewerContentBindings declare isRoot as true, then all matching extensions are consulted based on their triggerPoints expression in the navigatorContent extension. Any matching extensions are then consulted via their IStructuredContentProvider.getElements(Object) methods and the results are aggregated into the root.

After the root is populated, the children of each root element are determined by consulting the source extension and all extension which describe the element in their triggerPoints expression.

If clients wish to use a viewer other than the CommonViewer, then they are responsible for creating the content provider, and setting it on their viewer.

An enhanced content provider that will use this content serviceto drive the viewer.



createCommonDescriptionProvider
IDescriptionProvider createCommonDescriptionProvider()(Code)
The description provider for this content service.



createCommonLabelProvider
ILabelProvider createCommonLabelProvider()(Code)
Create a Label Provider which will use an enhanced delegation model to locate extension label providers using this content service for each element in the tree.

The label of each element is determined by consulting the source of the element. If the source chooses to return null, then other extensions which declare the element in their triggerPoints extension are consulted. The first non-null value is used (including the empty label).

If clients wish to use a viewer other than the CommonViewer, then they are responsible for creating the label provider, and setting it on their viewer.

An enhanced label provider that will use this content service todrive labels in the viewer.



dispose
void dispose()(Code)
Release any acquired resources and instantiated content extensions.



findContentExtensionsByTriggerPoint
Set findContentExtensionsByTriggerPoint(Object anElement)(Code)
Search for extensions that declare the given element in their triggerPoints expression.
Parameters:
  anElement - The element to use in the query The set of INavigatorContentExtensions that arevisible and active for this content service andhave a triggerPoints expression that is enabledfor the given element.



findContentExtensionsWithPossibleChild
Set findContentExtensionsWithPossibleChild(Object anElement)(Code)
Search for extensions that declare the given element in their possibleChildren expression.
Parameters:
  anElement - The element to use in the query The set of INavigatorContentExtensions that arevisible and active for this content service andhave a possibleChildren expression that is enabledfor the given element.



findRootContentExtensions
Set findRootContentExtensions(Object anElement)(Code)
Search for extensions that declare the given element in their triggerPoints expression or that indicate they should be bound as a root extension.
Parameters:
  anElement - The element to use in the query The set of INavigatorContentExtensions that arevisible and active for this content service andeither declared through aorg.eclipse.ui.navigator.viewer/viewerContentBinding tobe a root element or have a triggerPoints expression thatis enabled for the given element.



findStateModel
IExtensionStateModel findStateModel(String anExtensionId)(Code)
The state model stores properties associated with the extension. Each content extension has its own contained state model. Components of the extension (content provider, label provider, action providers, etc) may attach themselves as listeners to the model ( IExtensionStateModel.addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) ) and respond to changes to the values of the properties.
Parameters:
  anExtensionId - The extension id defined by a navigatorContentextension. The state model for the given extension id.



getActivationService
INavigatorActivationService getActivationService()(Code)
The activation service is used to toggle whether certain extensions have the opportunity to contribute content and/or actions. The INavigatorActivationService for this content service.



getContentDescriptorById
public INavigatorContentDescriptor getContentDescriptorById(String anExtensionId)(Code)
Return the content extension for the given id.
Parameters:
  anExtensionId - The id used to define the org.eclipse.ui.navigator.navigatorContent/navigatorContent extension. An instance of the content extension for the given extension id. May return null if the id is invalid.
since:
   3.3



getContentExtensionById
public INavigatorContentExtension getContentExtensionById(String anExtensionId)(Code)
Return the content extension for the given id.
Parameters:
  anExtensionId - The id used to define the org.eclipse.ui.navigator.navigatorContent/navigatorContent extension. An instance of the content extension for the given extension id. May return null if the id is invalid.



getDnDService
INavigatorDnDService getDnDService()(Code)
The DND Service provides instances of CommonDragAdapterAssistant and CommonDropAdapterAssistant for this content service. The INavigatorDnDService which can add additionalTransferTypes for the DragAdapter and setup the data correctlyfor those extended Transfer Types.



getFilterService
INavigatorFilterService getFilterService()(Code)
The filter service can provide the available filters for the viewer, and manage which filters are active. An INavigatorFilterService that can provide informationto a viewer about what filters are visible and active.



getPipelineService
INavigatorPipelineService getPipelineService()(Code)
The pipeline service calculates the appropriate viewer modification or refresh that should be applied for viewers that wish to take advantage of the model pipelining that some extensions use to massage or reshape contents in the viewer. Clients that use the CommonViewer do not need to be concerned with this service as the refreshes are automatically computed using this service. The INavigatorPipelineService which can determine thecorrect updates to apply to a viewer.



getSaveablesService
INavigatorSaveablesService getSaveablesService()(Code)
The saveable service helps implementing ISaveablesSource . the INavigatorSaveablesService for this content service.



getSorterService
INavigatorSorterService getSorterService()(Code)
The sorter service provides the appropriate sorter based on the current items being sorted. By default, the CommonViewer uses CommonViewerSorter which delegates to this service. Clients do not need to provide their own ViewerSorter unless they wish to override this functionality. An INavigatorSorterService that can provideViewerSorter based on the context of the parent.



getViewerDescriptor
INavigatorViewerDescriptor getViewerDescriptor()(Code)
The viewer descriptor provides some basic information about the abstract viewer that uses this content service. The viewer descriptor for this content service.
See Also:   INavigatorViewerDescriptor



getViewerId
String getViewerId()(Code)
The viewer id is used to locate matching viewerContentBindings. In general, this would be the id of the view defined by a org.eclipse.ui.views extension. However, there is no formal requirement that this is the case. The viewerId used to create this content service.



getVisibleExtensionIds
String[] getVisibleExtensionIds()(Code)
Return the set of visible extension ids for this content service, which includes those that are bound through viewerContentBindings and those that are bound through INavigatorContentService.bindExtensions(String[],boolean) . The set of visible extension ids for this content service



getVisibleExtensions
INavigatorContentDescriptor[] getVisibleExtensions()(Code)
Return the set of visible content descriptors for this content service, which includes those that are bound through viewerContentBindings and those that are bound through INavigatorContentService.bindExtensions(String[],boolean) . The set of visible content descriptors for this contentservice



isActive
boolean isActive(String anExtensionId)(Code)
See above for the definition of active.
Parameters:
  anExtensionId - The unqiue identifier from a content extension. True if and only if the given extension id is active forthis content service.
See Also:   INavigatorContentService
See Also:    For more information on what active
See Also:   means.



isVisible
boolean isVisible(String anExtensionId)(Code)
See above for the definition of visible.
Parameters:
  anExtensionId - The unqiue identifier from a content extension. True if and only if the given extension id is visible tothis content service.
See Also:   INavigatorContentService
See Also:    For more information on what visible
See Also:   means.



removeListener
void removeListener(INavigatorContentServiceListener aListener)(Code)
Remove a listener (by identity) from the set of listeners.
Parameters:
  aListener - A listener to be detached.



restoreState
void restoreState(IMemento aMemento)(Code)
Restore the state associated with the memento.
Parameters:
  aMemento - The memento for extensions to use when restoring previoussettings.



saveState
void saveState(IMemento aMemento)(Code)
Persist any session-to-session state with the memento.
Parameters:
  aMemento - The memento for extensions to use when persisting previoussettings.



update
void update()(Code)
The root content providers are recalculated by this method. The attached viewer is also refreshed as a result of this method.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.