Jump to: navigation, search

Difference between revisions of "Emfatic"

(Screenshots)
(Where to download Emfatic from: pointed to repository)
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
__TOC__
 +
 
== Summary ==
 
== Summary ==
  
 
Emfatic is a text editor supporting navigation, editing, and conversion of Ecore models,
 
Emfatic is a text editor supporting navigation, editing, and conversion of Ecore models,
using a compact and human-readable syntax similar to Java. The EPLed Emfatic now hosted
+
using a compact and human-readable syntax similar to Java (see [http://www.eclipse.org/modeling/emft/emfatic/ Emfatic language reference]). The EPLed Emfatic now hosted
 
at [http://www.eclipse.org/modeling/emft/ EMFT] extends the Feb 2005 alphaworks release with support for EMF Generics, folding,
 
at [http://www.eclipse.org/modeling/emft/ EMFT] extends the Feb 2005 alphaworks release with support for EMF Generics, folding,
 
"red squigglies", an EMF Type Hierarchy, hyperlinks, AutoEdits, and the possibility to
 
"red squigglies", an EMF Type Hierarchy, hyperlinks, AutoEdits, and the possibility to
 
define templates to speed up document creation, among other usability features. The best
 
define templates to speed up document creation, among other usability features. The best
way to gain hands-on experience with Emfatic is to right-click on any .ecore file and
+
way to gain hands-on experience with Emfatic is to right-click on any <tt>.ecore</tt> file and
choose "Generate Emfatic source", a similar converter works in the opposite direction.
+
choose ''Generate Emfatic source'', a similar converter works in the opposite direction.
 
Online help is also available.
 
Online help is also available.
  
Emfatic itself builds upon Gymnast, a framework for jumpstarting text editors for custom Domain Specific Languages. Documentation on how to extend Emfatic, as well as on using Gymnast, can be found in this [http://www.sts.tu-harburg.de/%7Emi.garcia/SoC2007/draftreport.pdf technical report].
+
Emfatic itself builds upon [[Gymnast]], a framework for jumpstarting text editors for custom Domain Specific Languages. Documentation on how to extend Emfatic, as well as on using Gymnast, can be found in this [http://www.sts.tu-harburg.de/%7Emi.garcia/SoC2007/draftreport.pdf technical report].
  
 +
== Where to download Emfatic from ==
 +
Emfatic can be downloaded from the eclipse repository http://download.eclipse.org/emfatic/update
  
 
== Screenshots ==
 
== Screenshots ==
  
<table border="1">
+
 
  <tr>
+
=== Outline view ===  
    <td>The Outline view displays the same elements as the Sample Ecore Editor, toolbar actions are available for hiding/showing annotations, attributes, references, operations.
+
 
 +
The Outline view displays the same elements as the Sample Ecore Editor, toolbar actions are available for hiding/showing annotations, attributes, references, operations.
  
 
     [[Image:OutlineView.PNG]]
 
     [[Image:OutlineView.PNG]]
  </td>
+
 
  </tr>
+
=== Mark Occurrences ===
  <tr>
+
 
    <td>Mark occurrences highlights usages of the same EClassifier, range indication on the vertical bar spans the EClassifier  declaration.
+
Mark Occurrences highlights usages of the same EClassifier, range indication on the vertical bar spans the EClassifier  declaration.
  
 
     [[Image:EmfaticMarkOccurrences.PNG]]
 
     [[Image:EmfaticMarkOccurrences.PNG]]
</td>
 
  </tr>
 
  
 +
=== Folding ===
  
  <tr><td>Folding is supported, with an annotation hover for collapsed regions
+
Folding is supported, with an annotation hover for collapsed regions
 
     <table><tr>
 
     <table><tr>
 
     <td>[[Image:EmfaticFolding01.PNG]]</td> <td>[[Image:EmfaticFolding02.PNG]]</td>
 
     <td>[[Image:EmfaticFolding01.PNG]]</td> <td>[[Image:EmfaticFolding02.PNG]]</td>
 
     </tr></table>
 
     </tr></table>
</td>
 
  </tr>
 
  
<tr> <td> Problem and warning markers (with squigglies) are updated after each keystroke.
+
=== Problem and warning markers ===
 +
 
 +
Problem and warning markers (with squigglies) are updated after each keystroke.
 
[[Image:EmfaticProblemMarkers.PNG]]
 
[[Image:EmfaticProblemMarkers.PNG]]
</td> </tr>
 
  
<tr> <td>
+
 
 +
=== Validation on conversion attempt ===
 +
 
 
Attempting to generate an .emf for an .ecore triggers an EcoreValidation. Errors and warnings are shown in the Problems view, generation is still allowed if there are only warnings.
 
Attempting to generate an .emf for an .ecore triggers an EcoreValidation. Errors and warnings are shown in the Problems view, generation is still allowed if there are only warnings.
 
[[Image:EmfaticEcoreValidation.PNG]]
 
[[Image:EmfaticEcoreValidation.PNG]]
</td> </tr>
 
  
<tr> <td>
+
 
 +
=== Outline selection follows cursor ===
 +
 
 
The selected outline node follows the cursor position in the text.
 
The selected outline node follows the cursor position in the text.
  
 
[[Image:Emfatictext2outline.PNG]]
 
[[Image:Emfatictext2outline.PNG]]
</td> </tr>
 
  
 +
=== Hyperlinks ===
  
<tr> <td>
 
 
Navigable hyperlinks (from usages of classifiers and from type variables to their declarations).
 
Navigable hyperlinks (from usages of classifiers and from type variables to their declarations).
 
Hyperlinks are very handy for example to follow an eOpposite to its declaration
 
Hyperlinks are very handy for example to follow an eOpposite to its declaration
Line 62: Line 67:
  
 
[[Image:EmfaticHyperlinks.PNG]]
 
[[Image:EmfaticHyperlinks.PNG]]
</td> </tr>
 
  
 +
=== Wizard ===
  
 +
A File > New > Other … wizard is available, which initializes the just created .emf file to
 +
a syntactically correct state:
 +
<tt>
 +
<br/>@namespace(
 +
<br/> &nbsp; &nbsp;uri="http://a.b.c/x/y/Z",
 +
<br/> &nbsp; &nbsp;prefix="p")
 +
<br/>package top;
 +
</tt>
  
</table>
+
[[Image:EmfaticWizard.PNG]]
 +
 
 +
=== Hovers showing declaration for the element under the cursor ===
 +
 
 +
Hovers for usages of classifiers, type parameter variables, and eOpposite references: the
 +
definition is shown.
 +
 
 +
[[Image:EmfaticHover.PNG]]
 +
 
 +
 
 +
=== AutoEdits ===
 +
 
 +
SmartBrace: typing an opening brace automatically adds its
 +
closing brace and leaves the cursor indented on its own line
 +
(end result shown below). Besides that strategy the usual ones:
 +
<ul>
 +
<li>DefaultIndentLine</li>
 +
<li>Closing quote for opening quote</li>
 +
</ul>
 +
 
 +
[[Image:EmfaticAutoEdit.PNG]]
 +
 
 +
=== Preference pages ===
 +
 
 +
Preference pages, to control AutoEdits and templates (see example below).
 +
 
 +
[[Image:EmfaticPreferencePages.PNG]]
 +
 
 +
 
 +
=== Time-saving Templates ===
 +
 
 +
A template for each kind of annotation saves typing. In the example, the template
 +
definition for adding OCL invariants is shown (the error marker is transient, once the
 +
template is inserted it disappears).
 +
 
 +
[[Image:EmfaticTemplates.PNG]]
 +
 
 +
 
 +
=== Show in EMF Type Hierarchy ===
 +
 
 +
''Show in EMF Type Hierarchy'' can be activated from the editor and from the outline view.
 +
 
 +
[[Image:EmfaticTypeHierarchy.PNG]]
 +
 
 +
The supertype and subtype relationships can be followed, with a list of (inherited) class
 +
members displayed on the lower pane. Double-clicking on any of these elements
 +
navigates in the editor to its declaration.
 +
 
 +
[[Image:EmfaticTypeHierarchy02.PNG]]
  
 
== Organization ==
 
== Organization ==
Line 74: Line 135:
 
  <li>[http://www.sts.tu-harburg.de/%7Emi.garcia/ Miguel Garcia]</li>
 
  <li>[http://www.sts.tu-harburg.de/%7Emi.garcia/ Miguel Garcia]</li>
 
  <li>Chris Daly</li>
 
  <li>Chris Daly</li>
 +
</ul>
 +
'''Releng + Lead Interim Commiter'''
 +
<ul>
 +
<li>[http://my-naked-truth.blogspot.com Lucas Bigeardel]</li>
 
</ul>
 
</ul>

Latest revision as of 14:26, 28 September 2012

Summary

Emfatic is a text editor supporting navigation, editing, and conversion of Ecore models, using a compact and human-readable syntax similar to Java (see Emfatic language reference). The EPLed Emfatic now hosted at EMFT extends the Feb 2005 alphaworks release with support for EMF Generics, folding, "red squigglies", an EMF Type Hierarchy, hyperlinks, AutoEdits, and the possibility to define templates to speed up document creation, among other usability features. The best way to gain hands-on experience with Emfatic is to right-click on any .ecore file and choose Generate Emfatic source, a similar converter works in the opposite direction. Online help is also available.

Emfatic itself builds upon Gymnast, a framework for jumpstarting text editors for custom Domain Specific Languages. Documentation on how to extend Emfatic, as well as on using Gymnast, can be found in this technical report.

Where to download Emfatic from

Emfatic can be downloaded from the eclipse repository http://download.eclipse.org/emfatic/update

Screenshots

Outline view

The Outline view displays the same elements as the Sample Ecore Editor, toolbar actions are available for hiding/showing annotations, attributes, references, operations.

   OutlineView.PNG

Mark Occurrences

Mark Occurrences highlights usages of the same EClassifier, range indication on the vertical bar spans the EClassifier declaration.

   EmfaticMarkOccurrences.PNG

Folding

Folding is supported, with an annotation hover for collapsed regions

EmfaticFolding01.PNG EmfaticFolding02.PNG

Problem and warning markers

Problem and warning markers (with squigglies) are updated after each keystroke. EmfaticProblemMarkers.PNG


Validation on conversion attempt

Attempting to generate an .emf for an .ecore triggers an EcoreValidation. Errors and warnings are shown in the Problems view, generation is still allowed if there are only warnings. EmfaticEcoreValidation.PNG


Outline selection follows cursor

The selected outline node follows the cursor position in the text.

Emfatictext2outline.PNG

Hyperlinks

Navigable hyperlinks (from usages of classifiers and from type variables to their declarations). Hyperlinks are very handy for example to follow an eOpposite to its declaration (alternatively, letting the mouse cursor rest over an eOpposite displays its definition in a text hover, see below) Open declaration is also supported, i.e. pressing F3 (or whatever key binding is in effect for it) moves the cursor to the declaration.

EmfaticHyperlinks.PNG

Wizard

A File > New > Other … wizard is available, which initializes the just created .emf file to a syntactically correct state:
@namespace(
   uri="http://a.b.c/x/y/Z",
   prefix="p")
package top;

EmfaticWizard.PNG

Hovers showing declaration for the element under the cursor

Hovers for usages of classifiers, type parameter variables, and eOpposite references: the definition is shown.

EmfaticHover.PNG


AutoEdits

SmartBrace: typing an opening brace automatically adds its closing brace and leaves the cursor indented on its own line (end result shown below). Besides that strategy the usual ones:

  • DefaultIndentLine
  • Closing quote for opening quote

EmfaticAutoEdit.PNG

Preference pages

Preference pages, to control AutoEdits and templates (see example below).

EmfaticPreferencePages.PNG


Time-saving Templates

A template for each kind of annotation saves typing. In the example, the template definition for adding OCL invariants is shown (the error marker is transient, once the template is inserted it disappears).

EmfaticTemplates.PNG


Show in EMF Type Hierarchy

Show in EMF Type Hierarchy can be activated from the editor and from the outline view.

EmfaticTypeHierarchy.PNG

The supertype and subtype relationships can be followed, with a list of (inherited) class members displayed on the lower pane. Double-clicking on any of these elements navigates in the editor to its declaration.

EmfaticTypeHierarchy02.PNG

Organization

Initial committers

Releng + Lead Interim Commiter