Alexis Murail   
Internship Student (M.Sc.)
Modelling, Simulation and Design Lab
ENSTA Bretagne
Middelheimcampus
1, Middelheimlaan
e-mail:
www:
alexis.murail@ensta-bretagne.org
http://msdl.cs.mcgill.ca/people/murail
portrait     
   

I am a Second Year Military Student of ENSTA Bretagne specialized in Embedded systems.

This page is about my internship in the Department of Mathematics and Computer Science in the University of Antwerp under the supervision of Hans Vangheluwe and Simon Van Mierlo.



Internship Objectives

The objective of my internship is to build a modelling interface for the Statecharts + Class Diagramms (SCCD) formalism in the browser, implemented in Javascript/SVG. To start, I have an existing implementation in Python Tkinter whose behavior is explicitly modelled using SCCD. I have to port this behavior in javascript using an existing drawing tool: SVG-Edit.

I have to port step-by-step the code of SVG-Edit in SCCD and to modify it to make it specific for SCCD behavior.

Mouse behavior

First, I choose to focus on the mouse behavior of the platform. Then, I need to draw a diagram to target all differents states of the mouse. I decide to draw it using AToMPM a multi-paradigm tool developed for SCCD.

SCCD mouse model

After having made this diagram, I have to find in the svgedit masterfile all functions and callbacks related to the mouse behavior, such as mouseUp(), mouseDown(), or the callbacks of the mode's butons on the left of the interface.

mode
The files modified in the svgedit master files are:
  • ./editor/svg-editor.js
  • ./editor/svgcanvas.js
  • ./editor/svg-editor.html
And there is a list of all the different states and their current advancement:
  • select state, initial state default : default canvas mode, 6 sub-states, event:'select':
    • default, initial state select_default : default and initial state of the canvas, already done, events detected, event:'select'
    • resize, initial state resize_mouseDown: shape resizing mode, already done, working, event:'resize'
    • rotate, initial state rotate_moseDown : shape rotating mode, already done, working, event:'rotate'
    • textedit, initial state textedit_default: text zone editing mode, not done yet, events detected, event:'textedit'
    • pathedit, initial state pathedit_default: path shape editing mode, not done yet, events detected, event:'pathedit'
    • multiselect: multiselecting mode, not done yet, event detection issue, event:'multiselected' (currently deleted)
    • move, initial state move_MouseMove: shape moving mode, not done yet, event detection issue, event:'move' (not always detected)
    • all transitions done and available

  • rectangle state, initial state rect: rectangle drawing mode, 3 sub-states, event:'rect':
    • rect, initial state rect_default: basic rectangle drawing mode, already done, no rectangle drawn, event:'rect'
    • fhrect, initial state fhrect_default: free-handed rectangle drawing mode, not done yet, events detected, event:'fhrect'
    • square, initial state square_default: square drawing mode, in progress, little shape drawn but not resizeable, event:'square'
    • all transitions done and available

  • ellipse state, initial state fhellipse: ellipse drawing mode, 2 sub-states, event:'ellipse':
    • fhellipse, initial state fhellipse_default: basic ellipse drawing mode, not done yet, events detected, event:'ellipse'
    • circle, initial state circle_default : circle drawing mode, not done yet, events detected, event:'circle'
    • all transitions done and available

  • zoom state, initial state zoom_default: zooming mode, not done yet, events detected, event:'zoom'
    • all transitions done and available

  • text state, initial state text_default: text writting mode, not done yet, events detected, event:'text'
    • all transitions done and available

  • image state, initial state image_default: image mode, not done yet, events detected, event:'image'
    • all transitions done and available

  • path state, initial state path_default: shape drawing mode, not done yet, events detected, event:'path'
    • all transitions done and available

  • line state, initial state line_default: line drawing mode, not done yet, events detected, event:'line'
    • all transitions done and available

Each of the list important state has between 1 and 4 substates which dépends on the mouse behavior:

  • XXX_default
  • XXX_mouseDown event:'mouseDown'
  • XXX_mouseMove event:'mouseMove'
  • XXX_mouseUp event:'mouseUp'

The whole current work is available on the Git project page there

Maintained by Alexis Murail.