Changes between Initial Version and Version 1 of Doc/SCDB/Eclipse


Ignore:
Timestamp:
Feb 28, 2007, 10:55:41 PM (19 years ago)
Author:
/C=FR/O=CNRS/OU=UMR8607/CN=Michel Jouvin/emailAddress=jouvin@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc/SCDB/Eclipse

    v1 v1  
     1= Using Eclipse with SCDB =
     2[[TracNav]]
     3
     4[[TOC(inline)]]
     5
     6Eclipse is an open source IDE (Integrated Development Environment), written in Java and thus available on all platforms, that provides a file browser, an editor, a SVN client, access to compilers and lot of other tools. It is neither part of SCDB, nor a requirement to use SCDB.
     7
     8With SCDB, it brings a graphical interface for administering SCDB and editing templates. With very few customization, Eclipse can be used both to edit templates, compile them and deploy them while taking advantage of all the advanced features you find in Eclipse like local history, file browsing and searching, ability to open a template directly at the line causing an error...
     9
     10Instructions in this page explain how to customize Eclipse for SCDB. This is not an introduction to Eclipse usage itself. Refer to online documentation in Eclipse. Configuration described here has already been tested on Linux, MacOS and Windows but should work on any other platforms as all components used are pure Java.
     11
     12
     13== Installation ==
     14
     15=== Installating Eclipse ===
     16
     17Eclipse can be downloaded from http://www.eclipse.org. Installing Eclipse mainly consists to unarchive the distribution. The archive format is dependant on the platform (zip, tar...).
     18
     19Before being able to run Eclipse, you need to install Java JRE on your machine. SCDB requires Java 1.5 or later. You need to check on Eclipse site minimum Java version required by Eclipse. As of Eclipse 3.2, it was lower than SCDB.
     20
     21If you have several Java JRE installed on your machine, run Eclipse, goto Preferences->Java (in  `Window` menu) and check the version used  by Eclipse matches both Eclipse and SCDB requirements.
     22
     23=== Installating Eclipse plugins ===
     24
     25For Eclipse to work with SCDB, some additional software, called plugins, needs to be installed. To do this, run Eclipse and use `Software Updates->Find and Install...` in `Help` menu. Then add a `new remote site` for each of the following plugins :
     26
     27 * Subclipse : used to interact with a SVN client. Download URL : http://subclipse.tigris.org/update.
     28 * JavaSVN (SVNKit) : pure Java SVN client, providing both Java classes and a set of command line utilities compatible with SVN line mode client (command `jsvn`). Download URL : http://tmate.org/svn/.
     29 * Sunshade : used for parsing PAN compiler output. Download URL : http://sunshade.sourceforge.net/update.
     30 * Colorer : used for syntax colouring in templates. Download URL : http://colorer.sf.net/eclipsecolorer/.
     31
     32After adding each site, select them and click on `Finish` button.
     33
     34== Configuration ==
     35
     36=== Colorer ===
     37
     38Colorer is used to do syntax colouring when editing PAN templates.
     39
     40Syntax colouring rules are defined in a file `pan.hrc` that can be downloaded from Quattor CVS (in elfms/Quattor/utils/eclipse). This file must be placed in
     41`/path/to/eclipse/plugins/net.sf.colorer_VERSION/colorer/hrc/auto`.
     42
     43Then an entry for these syntax colouring rules must be added to `/path/to/eclipse/plugins/net.sf.colorer_VERSION/colorer/catalog.xml`. This is done by editing this file and adding the following line to the hrc-sets:
     44<location link="hrc/auto/pan.hrc"/>
     45
     46Last, add an association between `.tpl` file extension and Colorer Editor. To do this, go to Window->Preferences->General->Editors->File Associations, add .tpl
     47and associate the Colorer Editor with it.
     48
     49For the new Colorer configuration to be taken into account, you need to restart Eclipse.
     50
     51=== Sunshade ===
     52
     53Sunshade is used to parse PAN compiler output. Regexps appropriate to PAN compiler output must be added, using Window->Preferences->Sunshade->Errorlink in Eclipse. The required regexps are :
     54{{{
     55\[pan-syntax\]\s*(.*\.tpl):(\d+):
     56\[pan-compile\]\s*(.*\.tpl):(\d+)
     57\[pan-syntax\].*[\s\(](.*\.tpl)
     58}}}
     59
     60
     61=== JavaSVN and certificates ===
     62
     63When using JavaSVN in combination with certificates, you must add the password in the ~/.subversion/servers file. Make sure that this file has correct access rights (as it contains cleartext password, it must have mode 400).
     64
     65A full example looks like :
     66
     67{{{
     68[groups]
     69somegroup = some.full.host, *.some.domain
     70[somegroup]
     71ssl-client-cert-file = /bla/bla/bla.p12
     72ssl-client-cert-password=hahahahaha
     73[global]
     74ssl-authority-files = /bla/bla/bla/ca_local.crt
     75}}}