Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Acceleo/Interpreter"

(Result)
Line 21: Line 21:
  
  
Each row of the tree can be displayed in a number of ways, depending on the object's type.
+
Each row of the tree can be displayed in a number of ways, depending on the object's type. The objects are usually displayed as they would in their own editors, but two types of generated objects are displayed in a special manner :
  
 
===String===
 
===String===

Revision as of 11:01, 23 September 2011

Since 3.2, Acceleo offers a full-featured live request interpreter. We will focus here on detailling all of this view's possibilities.

Breakdown

First things first, what are all of these menus and fields for?

Acceleo Interpreter Breakdown.png

Language selection

The title of the interpreter features a drop-down menu that allows the user to select the language of his expressions. By default, Acceleo provides the interpreter for himself, but any third-party plugin can come and add himself to that list. More on the extension in the Extensibility section.

Expression

The expression section allows users to enter and edit expressions for the selected language. It can be fully customized by language providers and can thus become as powerful as a full-fledged editor for that language. Completion proposals and syntax highlighting are available by default for the Acceleo interpreter.

Result

This section displays the result of evaluations in the form of a tree. There are multiple possibilities as to the result look-and-feel :

  • Collection result : each of the collection's values will be displayed as one row of the result tree.
Acceleo Interpreter Multiple result.png
  • Single object : if the result consists of a single, plain object, it will be displayed as the only row of the tree.
Acceleo Interpreter Single result.png


Each row of the tree can be displayed in a number of ways, depending on the object's type. The objects are usually displayed as they would in their own editors, but two types of generated objects are displayed in a special manner :

String

If the result is a string, its very first line will be displayed as the Tree's row.

Acceleo Interpreter Long result.png


If the string is longer than a single line, its full length can be seen in two ways :

  • Hover : Hovering the mouse over the row
Acceleo Interpreter Long result hover.png
  • Popup : Double-clicking the row
Acceleo Interpreter Long result popup.png

File

The interpreter allows you to generate "files". No file will actually be generated on disk; instead the interpreter will display them in their own special way, with the icon corresponding to their type (as known to Eclipse) and their content as a child row :

Acceleo Interpreter File result.png

A double-click on the "file" row will open a read-only editor for the file, along with all of the syntax highlighting this editor may have. (partial exemple of a "java" file opened through this action below)

Acceleo Interpreter File result readonly editor.png

Extensibility


Acceleo Portal
Project Project · Installation
Features Acceleo Features · Runtime · Acceleo editor · Views & Perspective · Interpreter · Maven
User documentation Getting Started · User Guide · Acceleo operations reference · OCL operations reference · Text Production Rules · Migration From Acceleo 2.x · Best Practices · Videos · FAQ
Developer documentation Source code · How to contribute · Compatibility · MOFM2T specification · OCL specification
Community Professional Support · Report a bug

Copyright © Eclipse Foundation, Inc. All Rights Reserved.