2008-11-18 selected topics in software engineering - distributed software development
TRANSCRIPT
2008-11-18
Selected Topics in Software Engineering -
Distributed Software Development
22008-11-18
GUI for development of REMES models
REMES GUI group
Summary of contents
32008-11-18
• Short Introduction
• Requirements Definition– GUI– Project Management– Functionalities
• Design Description
Short Introduction
42008-11-18
• The task in our project is to develop an editor that allows people to make resource models. The editor is going to have a graphical user interface (GUI) that makes it easy to construct the models.
• REsource Model for Embedded Systems (REMES)• Resources (Memory, CPU, ports, bandwidth etc.)
• Graphical Modeling Language
• Behavior of a component is a mode (atomic or composite) Control points (entry points, exit points, init) Variables (boolean, natural, integer, array, clock) Constraints Conditional connectors Actions (discrete, delay/timed)
• Our customer has given us specific requirements that must be included in the final version.
Requirements
52008-11-18
• Editor– Editor window
• Modeling (modes, connectors etc.)
• Project explorer window• View for saved modes
– Palette• Containing modeling elements, for building models
(drag-&-drop)
Requirements
62008-11-18
• Project Management– Create new project– Open project– Add to existing project– Save project
Requirements
72008-11-18
• Functionalities– Define/modify element properties
• Name, numbers, values etc. – Add connections between modes– Add conditional connectors between modes– Change view
• Hide un-necessaryinformation of modes
C
main
submode1
Entry Port
Exit Port
submode2
submode3
Requirements
82008-11-18
• Other– All connections must satisfy REMES model– Open sub mode in new chart
• File Structure and Storing– Type Definition File (DTD)
• Describing structure of XML-files.
– eXtension Markup Language (XML)• XML-files for storing model info.
(connectors, values, resource, time etc.)
9
• First of all we have to create a new Project.We have to choose REMES project.
GUI Appearance
2008-11-18
10
GUI Appearance
2008-11-18
11
• The next step is introducing a name for our REMES project.
GUI Appearance
2008-11-18
12
Well, we have already created our REMES project. Now we can see how is this
GUI Appearance
2008-11-18
13
Better to break this down!
GUI Appearance
2008-11-18
14
First of all we can see the palette
Here are our tools to create modes in our project and other elements.
GUI Appearance
2008-11-18
15
But where must we drop the elements?
Here:
GUI Appearance
2008-11-18
16
Now it is empty because we have to design our models and connectors.
If we work with this we can get something like this.......
GUI Appearance
2008-11-18
17
.................
GUI Appearance
2008-11-18
18
GUI Appearance
2008-11-18
19
Wow, now the left bar has changed!
Why?
GUI Appearance
2008-11-18
20
Because there is where all the elements in our project is showed
GUI Appearance
2008-11-18
21
These are the main frames in our GUI, then each element has its own properties and they can be managed by clicking the right button.
GUI Appearance
2008-11-18
Achieving the goals
• EMF (Eclipse Modelling Framework)– Introduction
• Java framework• Code generation facility for building tools and
applications based on structured model• Rapidly turns models into efficient, correct and
easily customizable Java code• Low cost of entry
– EMF uses XMI (XML Metadata Interchange) as input
2008-11-18 22
Achieving the goals
• EMF (Eclipse Modelling Framework)– EMF generator creates
• ecore – core framework creates a set of java implementation classes
• emf.edit - extends core framework for building adapter classes that enable viewing and command based editing of a model, and even a basic working model editor
232008-11-18
242008-11-18
Achieving the goals
• GEF (Graphical Editing Framework)– Enables developers to easily create rich and
consistent graphical editors within Eclipse• Draw2D
– Painting and layout plug-in– Provides figures and layout managers which form
graphical layer of GEF application
• Zest– Visualization toolkit– Graph layout package to provide layout locations for a
set of entities and relationships
2008-11-18 25
Achieving the goals
• GMF (Graphical Modeling Toolkit)– Provides infrastructure for developing
graphical editors based on EMF and GEF– Produces graphical editing surface for any
domain model in EMF
26
Graphical Editor
Eclipse Platform
GMF Runtime
EMFGEF
2008-11-18
Achieving the goals
• Typical GMF workflow– Create domain model
• Defines non graphical information managed by the editor
– Create a diagram definition model• Defines graphical elements to be displayed in the
editor
– Create a diagram mapping model• Defines mapping between model elements and
graphical elements
272008-11-18
Achieving the goals
• Typical GMF workflow– Generate the graphical editor– Enhance generated editor by editing plug-in
code
28
DomainModel
DiagramMapping
Model
DiagramDefinition
Model
Create
Generate
Create
Create
BasicGraphicalModeling
Editor
Customize
CustomizedGraphicalModeling
Editor
2008-11-18
GEF Model View Controller Architecture
292008-11-18
30
Eclipse GMF extension point
2008-11-18
Package dsd.remes
312008-11-18
Package dsd.remes.providers
322008-11-18
Package dsd.remes.views.factories
332008-11-18
342008-11-18
Testing process
• UML 2.0 Testing profile (U2TP)
Design testcases
Prepare testdata
Run programwith test data
Compare resultsto test cases
Testcases
Testdata
Testresults
Testreports