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

Contexts

Identifier:
org.eclipse.help.contexts

Description:
For defining context-sensitive help for an individual plug-in.

Configuration Markup:

<!ELEMENT extension ( contexts | contextProvider)+>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT contexts EMPTY>

<!ATTLIST contexts

file   CDATA #REQUIRED

plugin CDATA #IMPLIED

>

a context-sensitive help contribution made by supplying an XML file


  • file - the name of the manifest file which contains the context-sensitive help documentation for this plug-in.

    Configuration Markup for what goes into the contexts manifest file:

        <!ELEMENT contexts (context)* ) >

        <!ELEMENT context (description?,topic*) >
        <!ATTLIST context
          id CDATA #REQUIRED
          title CDATA #IMPLIED >

        <!ELEMENT description (#PCDATA)>

        <!ELEMENT topic EMPTY >
        <!ATTLIST topic
          label CDATA #REQUIRED

          href CDATA #REQUIRED >

    The contexts manifest files provide all the information needed when context-sensitive help is requested by the user. The id is passed by the platform to the help system to identify the currently active context.The context definitions with matching IDs are then retrieved. If a title is defined it will be used when context help is displayed in the Help view, both as the title in the related topics section and also as the search term in the "More results" section. The IDs in the manifest file, must not contain the period character, since the IDs are uniquely identified by pluginID.contextID string when in memory. The IContext object is then created by help system that contains descriptions and topics from all context definitions for a given ID in a plug-in.  The description is to be displayed to the user, and related topics might be useful to the user for understanding the current context.  The related topic are html files packaged in doc.zip, together with topics that are part of on line help.

  • plugin - Plugin to which its context definitions are extended with extra information.

    If a plugin defines some context id's, one can extend the description or related links of a context by declaring another context with the same id.


<!ELEMENT contextProvider EMPTY>

<!ATTLIST contextProvider

class CDATA #REQUIRED

>

(since 3.3) a context-sensitive help contribution made by supplying a java class to generate the content at run-time


  • class - the implementation class for the context-sensitive help provider. This class must implement the org.eclipse.help.AbstractContextProvider interface.

Examples:
The following is an example of using the contexts extension point:
(in file plugin.xml)


   <extension point=
"org.eclipse.help.contexts"
> 
      <contexts file=
"xyzContexts.xml"
/> 
   </extension> 

(in file xyzContexts.xml)

    <contexts>
      <context  id="generalContextId">
        <description> This is a sample F1 help string.</description>
        <topic href="contexts/RelatedContext1.html"  label="Help Related Topic 1"/>
        <topic href="contexts/RelatedContext2.html"  label="Help Related Topic 2"/>
      </context>
    </contexts>
 

Externalizing Strings The Context XML files can be translated and the resulting copy (with translated descriptions labels) should be placed in nl/<language>/<country> or nl/<language> directory.  The <language> and <country> stand for two letter language and country codes as used in locale codes.  For example, Traditional Chinese translations should be placed in the nl/zh/TW directory.  The nl/<language>/<country> directory has a higher priority than nl/<language>.  Only if no file is found in the nl/<language>/<country>, the file residing in nl/<language> will be used.  The the root directory of a plugin will be searched last.

The related topics contained in doc.zip can be localized by creating a doc.zip file with translated version of documents, and placing doc.zip in
nl/<language>/<country> or nl/<language> directory. The help system will look for the files under this directories before defaulting to plugin directory.

Supplied Implementation:
The default implementation of the help system UI 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