Implementation of a Graphical Modelica Editor with Preserved Source Code Formatting

Tobias Mattsson, Jon Sten, Tove Bergdahl, Jesper Mattsson, Johan Furunäs Åkesson · Linköping electronic conference proceedings · 2012

When an Integrated Development Environment (IDE) is developed, the support for multiple views of the same document is often essential.An example of this is Modelica models, where it should be possible to view and edit the same model in both its textual and graphical representation.One implementation of Modelica is the open source platform JModelica.org.It contains the Eclipse-based JModelica.orgIDE, providing a text editor for Modelica code based on the Eclipse platform.In this paper, we present an implementation of a graphical editor for the JModelica.orgIDE.Several challenges arising when implementing a graphical editor for Modelica models are discussed.Amongst others, the difficulties in rendering Modelica diagrams and how to interact with existing frameworks in Eclipse are covered.Also, a method for preserving the formatting of a modified source code file is presented, which is essential when the model is altered in the graphical editor.The presented implementation is compared to other open source software (OSS) implementations of Modelica editors.

Read the paper · More papers on PaperTik