Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-help-dev] Allow environment variables in hrefs in toc files

Mary,

Currently Eclipse requires all documentation being contributed by plug-ins,
with the exception that it also supports file: protocol.  To solve your
issue, a simple solution, that would work in Eclipse 2.1 is to have your
documentation installed outside of Eclipse installation tree, but still
being packaged as plug-ins.  If this is the case, you can then use Eclipse
links mechanism to configure your outside plug-ins as an extension to
Eclipse.  I like this solution because it is generic, not specific to help,
and is implemented in Eclipse 2.1.

Your problem is not an isolated, one.  There exist request to have help
server dynamically generated files (bug 9409), or for the TOCs to be
changed at run-time.  I think your case is a subset of these requests and a
solution that we decide to implement, should address most of them rather
than be many special cases for each specific need.  One solution that comes
to mind is to take advantage of URL handlers in Eclipse.  Any plug-in can
contribute a URL handler to Eclipse.  If help code is changed to obtain
document contents using these URLs, then TOC can define topics with
attribute href="myurl://$AMZI_DIR/docs/pro/pug_overview.htm#Debugger" or
href="myurl:/pro/pug_overview.htm#Debugger", and obtaining the contests
would be delegated to the URL handler.  URL handler contributors could than
code to obtain documents from whatever location, use whatever convention
for variables in the path, or generate documents on the fly.

2.1 code is pretty much frozen, but do not be discouraged.  Please continue
the discussion, open features for the missing functionality, so we can
decide on what goes into help 2.2.

Konrad Kolosowski
Eclipse Help System



                                                                                                                                              
                      Mary Kroening                                                                                                           
                      <mary@xxxxxxxx>                 To:       platform-help-dev@xxxxxxxxxxx                                                 
                      Sent by:                        cc:                                                                                     
                      platform-help-dev-admin@        Subject:  [platform-help-dev] Allow environment variables in hrefs in toc files         
                      eclipse.org                                                                                                             
                                                                                                                                              
                                                                                                                                              
                      03/16/2003 09:15 AM                                                                                                     
                      Please respond to                                                                                                       
                      platform-help-dev                                                                                                       
                                                                                                                                              
                                                                                                                                              



Hi,

I would like to make and submit my first contribution to the Eclipse
project to allow the use of environment variables in toc.xml files, e.g.

<topic label="Debugger" href="
file://$AMZI_DIR/docs/pro/pug_overview.htm#Debugger" />

We need this change because our docs are installed separately from the
plug-in and their location is findable by the environment variable AMZI_DIR
(in this example).

I have 3 questions.

1) I believe the best place for this change is in normalizeHref in
HrefUtils.java. Is that correct?
2) What format is best for the environment variable? Some choices seem to
be:
     $ENV_VAR or other special characters
     env://ENV_VAR/doc...
     ENV_VAR and always check file:// style href's to see if the first
segment of the path is an
     environment variable
3) There must be a lib/so in Eclipse that can provide the value of an
environment variable. Would you know where that is?

Thanks much,
Mary Kroening




----------------------------------------------------
  Amzi! inc.
    5861 Greentree Road
    Lebanon, OH 45036 U.S.A.
  web      http://www.amzi.com
  tel      +1 513 425 8050
  e-mail   info@xxxxxxxx
  fax      +1 513 425 8025
----------------------------------------------------








Back to the top