Setup your editor

JetBrains IDEA and Lavoisier Editor Plugin (recommended)

  1. About
  2. How to install
  3. How to use
  4. How to uninstall

Other JetBrains editors : PhpStorm , WebStorm, PyCharm ...

  1. About
  2. How to install
  3. How to use

Other editors with support for XML Schema

  1. About
  2. How to install
  3. How to use

Other editors that don't support XML Schema

  1. About
  2. How to install
  3. How to use

JetBrains IDEA and Lavoisier Editor Plugin (recommended)

About
This option is by far the easiest and the most full-featured one:
  • Create skeletons for new Lavoisier Applications
  • Create skeletons for new Lavoisier Files
  • Auto-completion (for both XML and XPath, including the Lavoisier XPath functions)
  • Inline help
  • Automatically download and install Lavoisier
  • Automatically start Lavoisier service when testing rendering
  • Contextual Debugging (with both text windows and web browser)
  • ...and more to come in the future!

How to install
  • Download and install JetBrains IDEA.
  • Download Lavoisier Editor Plugin
  • Start JetBrains IDEA and install Lavoisier Editor Plugin: Configure | Plugins | Install plugin from disk... | Restart
  • Create a new Lavoisier Application: Create New Project | Lavoisier Application
  • For Windows users only: Delete file ~/<Your-JetBrains-Directory>/config/plugins/lavoisier-xpath.jar
  • Restart IDEA again: File | Invalidate Caches/Restart | Just Restart

How to use
  • Create a new Lavoisier Application: Create New Project | Lavoisier Application
  • Create a new Lavoisier File: Right-click on directory "etc/app/views/" | New | Lavoisier File
  • Use auto-completion (using [Ctrl + Space] and [Enter]) to enter the following text (do not copy-paste it!):
    <view name="hello">
        <argument name="name">World</argument>
        <connector type="StringConnector">
            <parameter name="content" eval="concat('Hello ',$name,'!')"/>
        </connector>
        <serializer type="EncapsulateSerializer"/>
    </view>
  • Entering [Ctrl + Q] when your cursor is on a plugin name will display a contextual help on this plugin.
  • Right click on element <view>, then click on...
    • Run this view
    • Browse this view with arguments | enter your name; | OK | Yes
  • Right click on element <connector>, then click on "Run up to this plugin"

How to uninstall
  • Uninstall Lavoisier Editor Plugin: Configure | Plugins | search for "LavoisierEditorPlugin" | uncheck it (or click on Uninstall)
  • For Windows users only: Delete file ~/<Your-JetBrains-Directory>/config/plugins/lavoisier-xpath.jar

Other JetBrains editors : PhpStorm , WebStorm, PyCharm ...

About
This option will not enable the following features:
  • Automatically download and install Lavoisier
  • Contextual Debugging (both in text console and in web browser)

How to install
Project Template
  • Download the project template for Lavoisier Applications
  • Copy it under the directory:
                                    ~/<Your-JetBrains-Directory>/config/projectTemplates/ (on Windows)
                                    ~/Library/Caches/<Your-JetBrains-Directory>/plugins-sandbox (on Mac OS X)
                               
Create a new Lavoisier Application
  • Create the skeleton of your application:
    • "Create New Project" (or menu File -> New -> Project)
    • "User-defined" -> "Lavoisier Application" -> "Next"
    • Enter the name of your application in field "Project name"
    • Click on button "Finish"
XML auto-completion

Associate the namespace of the configuration language to its XML schema.

Here is an easy way to do this:

  • open an XML file under directory etc/app/views/
  • click on the namespace http://software.in2p3.fr/lavoisier/application.xsd (which should be colored in red if the association has not been done yet).
  • Hit [Alt + Enter]
  • Click on option "Fetch external resource"

On JetBrains editors, doing this will also provide some inline contextual help, which can be invoked by hitting keys [Ctrl + Q].

XPath auto-completion
  • Set language injection by importing this file
  • Replace JetBrains plugin (Settings / Plugins / XPathView + XSLT Support / Install plugin from disk...) with our patched version

How to use
See Usage of Lavoisier Editor Plugin.

Other editors with support for XML Schema

About
This option will only enable auto-completion, and only for XML (not for XPath).
How to install
  • For Atom : xsd validation and auto-completion
  • For Sublime Text : xml validator plug-in
  • For other editors :
    • your may need to download manually the XML Schema of the Lavoisier language in order to import it into your editor.
    • Ensure that the namespace of the Lavoisier langage ( http://software.in2p3.fr/lavoisier/application.xsd) is associated to this XML Schema.

How to use
Use it the same way as with other languages.

Other editors that don't support XML Schema

About
You should seriously consider using another editor...
How to install
Click on "Uninstall"
How to use
Don't!