Skip to content

Commit

Permalink
Initial commit of Ruediger Franke's version 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dietmarw committed Feb 17, 2010
0 parents commit 65e7e65
Show file tree
Hide file tree
Showing 5 changed files with 2,287 additions and 0 deletions.
49 changes: 49 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
04/25/01: Release of modelica-mode version 1.4.1

04/25/01: modelica-mode.el, br-mdc.el
- don't define read-only or intangible property for hidden annotations
- introduce constants mdc-class-keyword and mdc-class-modifier-keyword
formerly defined in br-mdc.el
- updates and fixes in mdc-indent-line, mdc-calculate-indent,
mdc-statement-start, mdc-short-class-definition, mdc-forward-begin
- add "." to word characters in mdc-mode-syntax-table
(useful for treating names and numbers as words,
as opposed to pure idents and integers)

Former history of modelica-mode.el:
04/24/01:
- update function mdc-forward-begin for Modelica 1.4
(used e.g. by mdc-forward-statement and mdc-show-annotation)
04/03/01: release of version 1.4.0 for Modelica 1.4
- hide/show of annotations
(initial effort made by Mike Tiller)
- bug fix in mdc-within-comment
- mdc-within-string exploits result of font-lock-mode
- extended font-lock support for Modelica 1.4
- new move commands
- bug fix in mdc-statement-start for first statement of block
12/03/97: release of version 1.06
- corrected mdc-indent-for-docstring
12/02/97: release of version 1.05
- initialize comment syntax as proposed by
David Kagedal <[email protected]>
- extended commands for writing comments and documentation strings
- commands for moving point according to syntax
- provide menu bar using easymenu
11/27/97: release of version 1.01
11/25/97:
- treatment of balanced expressions in mdc-statement-start
- make '_' belonging to syntax class word constituent
- new mdc-within-string
11/18/97: release of version 1.0 for Modelica 1.0
11/18/97:
- support for "if" in conditional equations
- add "initial", "terminal", "switch" to font-lock-function-name-face
10/30/97: first release of version 1.0b for Modelica 1.0

Former history of mdc-browse.el:
04/12/01: release of version 1.1
- synched up with OO-Browser 4.07 and Modelica 1.4 (partly)
12/04/97: release of version 1.01
- support for Action Key clicking on classes via mdc-to-definition
12/03/97: release of version 1.0
139 changes: 139 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
This directory contains extensions for Emacs supporting Modelica.
Modelica is a unified object-oriented language for physical systems modeling
(see http://www.Modelica.org).

Emacs lisp code
===============
modelica-mode.el -- major mode for editing Modelica files

mdc-browse.el -- Modelica extension for the OO-Browser
br-mdc.el (see http://sourceforge.net/projects/oo-browser)

Installation
============

See the files modelica-mode.el and mdc-browse.el for installation
instuctions.

At least put the files
modelica-mode.el
mdc-browse.el
br-mdc.el
to an Emacs lisp directory, e.g. ~/elisp

and add the following lines to your file ~/.emacs

;; Modelica mode
(setq load-path (cons "~/elisp" load-path))
(autoload 'modelica-mode "modelica-mode" "Modelica Editing Mode" t)
(setq auto-mode-alist (cons '("\.mo$" . modelica-mode) auto-mode-alist))

;; Enable Modelica browsing
(autoload 'mdc-browse "mdc-browse" "Modelica Class Browsing" t)
(autoload 'br-mdc "br-mdc" "Modelica Class Browsing" t)

(defvar br-env-lang-avector
'[
("C++/C" . "c++-")
("Eiffel" . "eif-")
("Info" . "info-")
("Java" . "java-")
("Lisp" . "clos-")
("Modelica" . "mdc-")
("Obj-C" . "objc-")
("Python" . "python-")
]
"Association vector of elements of OO-Browser languages.")

;; Autostart OO-Browser (the installation is assumed under ~/oo-browser)
(setq load-path (append
'("~/oo-browser/"
"~/oo-browser/hypb/")
load-path))
(load "br-start")
(global-set-key "\C-c\C-o" 'oo-browser)


Modelica mode for Emacs
=======================

The aim is to provide basic support as known from many programming
languages under Emacs. This includes proper indentation, automated
closing of code blocks, movement by statements and code blocks,
support for writing comments, and syntax highlighting.


Tutorial introduction into OO-Browser for Modelica
==================================================

The following steps should be helpful to start investigating
OO-Browser for Modelica without the need to read its documentation
before. Please follow the installation instructions given above first.

Source files to browse can be placed in multiple directories, which
are grouped into library directories (for stable code to be re-used)
and system directories (for code under development). For now we will
just work with one system directory. Copy Modelica code examples there.

Now start Emacs and open one of the files in your directory.

-> select the menu item <OO-Browser -> Create-or-Load-Env>

It is prompted for the environment name.
-> Choose a name, e.g. hello-world.

It is prompted for the file to store class information in.
-> confirm the default name OOBR

Now you must choose a language to work with.
-> select Modelica

Finally specify system and library directories
(specify the current directory "." as the only system directory)

Hit RET to specify the code directories for the Environment
-> Return

Top-level system-specific code dir #1 (RET to end):
-> . Return

Top-level system-specific code dir #2 (RET to end):
-> Return

Top-level reusable code library dir #1 (RET to end):
-> Return

Now OO-Browser is ready to scan your Modelica files

Build Environment 'hello-world now? (y or n)
-> y

Build Environment in the background? (y or n)
-> n

Now all Modelica code files in the specified directories are scanned.
Afterwards a list with all obtained classes appears. Some basic
operations are:

- show ancestors and descendants of a class,
e.g. click on a listed class name to show its definition,
hit the "a" key to show ancestors
(hit the "x" key to return to the list of all classes
if ancestors were found)
hit the "d" key to show descendants

- obtain information about classes
e.g. hit the "i" key to obtain the class location and documentation

- view and edit class implementations
e.g. hit the "v" key to view the implementation of a class
hit the "e" key to edit the implementation of a class

- view class definition by clicking the Action Key
(shift-left mouse button or shift-middle mouse button)
over a class name in any buffer showing a Modelica file


Have fun!

Ruediger Franke <[email protected]>
Loading

0 comments on commit 65e7e65

Please sign in to comment.