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

Content Extension

Identifier:
org.eclipse.help.contentExtension

Description:

This extension point is for supporting dynamic and reusable content in user assistance documents. It allows for contributing content into an existing document. A document can declare that it can accept content contributions by explicitly specifying these contribution points using an anchor element. An element in a document with a unique id attribute specified can be replaced.

Content extensions are applicable to the following types of documents:

  • Help XHTML topics
  • Help table of contents
  • Help keyword index
  • Help context-sensitive help
  • Cheat sheets (both simple and composite)

Welcome content is extended using the org.eclipse.ui.intro.configExtension extension point.

Configuration Markup:

<!ELEMENT extension ( contentExtension | contentExtensionProvider)+>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT contentExtension EMPTY>

<!ATTLIST contentExtension

file CDATA #REQUIRED

>

Defines content extension to one or more user assistance documents. The location of the content extension file is specified by the file attribute.


  • file - a plugin-relative path to the location of an extension content file. An extension content file is an XML file that specifies the location of content contributions and the target document where they should be merged into. A content extension is either a contribution of content at a known anchor, or the replacement of an element in an existing document. The content file is parsed at run time by the platform and each content extension is loaded and inserted into the target location specified by the anchor.

    This content file should have the a syntax like the following:

    
    <contentExtension>
       <contribution
             content=
    "bundleRelativePath/content.xhml"
     
             path=
    "pluginId/path/file.xml#elementId"
    />
       <replacement
             content=
    "bundleRelativePath/content.xhml"
     
             path=
    "pluginId/path/file.xml#elementId"
    />
    </contentExtension>
    
    

    contribution is the element used to insert content at the target anchor location. replacement is the markup used to replace the content of the target element by the specified content. In other words, content can be contributed that either adds to the target location or replaces the content of the target location.


<!ELEMENT contentExtensionProvider EMPTY>

<!ATTLIST contentExtensionProvider

class CDATA #REQUIRED

>

(since 3.3) Allows java code to be plugged-in so that extensions can be generated at run-time. This is an alternative to the XML file, has the same capabilities, but doesn't require you to provide static XML.


  • class - the implementation class for the content extension provider. This class must implement the org.eclipse.help.AbstractContentExtensionProvider interface and must have a no-arg constructor.

Examples:

The following is an example of using the contentExtension extension point.

In file plugin.xml:


   <extension point=
"org.eclipse.help.contentExtension"
> 
      <contentExtension file=
"contentExtensionFile.xml"
/>
   </extension>

In file contentExtensionFile.xml:


   <contentExtension>
      <contribution
            content=
"xhtml/topicA.xhtml"

            path=
"/org.xxx.yyy.somePluginId/xhtml/someHelpPage.xhtml#topicAnchor"
/>
   </contentExtension>

The above contribution inserts the content of the XHTML file, topicA.xhtml, into the target Help system page specified by the path attribute. In this case, the content extension will be inserted in the location of an anchor called topicAnchor in page someHelpPage.xhtml in plugin org.xxx.yyy.somePluginId.

Supplied Implementation:
The default implementation of the base help system supplied with the Eclipse platform fully supports this extension point.


Copyright (c) 2000, 2006 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v10.html


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