INF2120 Tools at your fingertips Version 070124 23-Jan-07 INF2120 Prosjekt i modellering 1
Eclipse og RSM en god IDE? med foiler også av Andreas Limyr og Gøran K. Olsen før begge Ifi, nå begge Sintef 23-Jan-07 INF2120 Prosjekt i modellering 2
Eclipse plattformen Eclipse is a kind of universal tool platform - an open extensible IDE* for anything and nothing in particular. www.eclipse.org *Integrated Development Environment 23-Jan-07 INF2120 Prosjekt i modellering 3
Eclipse plattformen En åpen plattform Open Source prosjekt som støttes av store aktører (bl.a. IBM, Oracle, Intel, HP og Ericsson) Plattformuavhengig og kan lastes ned til Linux, Windows, Mac ++ Skrevet i Java Gir mulighet til rask utvikling av plattformuavhengige verktøy Godt egnet til Java-programmering 23-Jan-07 INF2120 Prosjekt i modellering 4
Bruk av Eclipse For å starte Eclipse på ifi brukes kommandoen eclipse Ved oppstart blir du bedt om å velge en workspace. Dette blir området for de filene du kommer til å jobbe med når du bruker Eclipse Du møter så en velkomstsside der man kan lære litt mer om Eclipse. Bruk gjerne litt tid på å kikke på det. For å komme i gang trykker du på Workbench 23-Jan-07 INF2120 Prosjekt i modellering 5
Eclipse Workbench 23-Jan-07 INF2120 Prosjekt i modellering 6
Bruk av Eclipse Det finnes mange begreper i Eclipse; de viktigste er: View En måte å fremstille informasjon eller ressurser på Editor Et området for å manipulere data (f. eks en tekst editor) Perspective En sammensetning av view og editor (f. eks Java perspective) Har også betydning for hvilke knapper som er tilgjengelig på toolbars 23-Jan-07 INF2120 Prosjekt i modellering 7
Installere plug-in Det er to hovedmåter å installere plug-ins på: Bruke den innebygde installeringen i Eclipse Eclipse har en innebygd hjelper til nedlasting og installering av plug-ins Laste ned plug-in manuelt Man laster ned en plug-in fra et sted og pakker den ut i plugins mappen til Eclipse Etter å ha installert en plug-in må man alltid restarte Eclipse før den registrerer installasjonen 23-Jan-07 INF2120 Prosjekt i modellering 8
IBM Rational Modeler / Architect 23-Jan-07 INF2120 Prosjekt i modellering 9
RSM at Ifi 2007 (Versjon 6.0.1.1) Linux rsm& hvis ikke dette virker, gi beskjed hvilken maskin dere er på Windows XP installér fra CD dette blir en image fortsett installasjonen derifra Utfør software update!! dette tar tid! Gjør det over natta! Husk å sette opp extension location der man kan legge plugins og features Slik kan man installere ekstrafunksjonalitet uten å være administrator! 23-Jan-07 INF2120 Prosjekt i modellering 10
Extension Location Creating an extension location works under both the 3.0.x and 3.1.x releases of eclipse, under both linux and windows (and I assume all others). The steps to accomplish this under linux are as follows: As root, I install eclipse to /opt/eclipse As myuser, I create the directories ~/eclipse-config ~/eclipse-config/eclipse ~/eclipse-config/eclipse/features ~/eclipse-config/eclipse/plugins ~/eclipse-config/workspace I edit ~/eclipse-config/eclipse/.eclipseextension to contain: name=my Eclipse Configuration id=my.eclipse.configuration version=1.0.0 As myuser I install plugins/feature to ~/eclipse-config/eclipse (manually or through eclipse update mechanism after step 6 completed) As myuser, I start eclipse like "/opt/eclipse/eclipse -data /home/conway/eclipse-config/workspace -vmargs -Xmx512M" In Help->Software Updates->Manage Configuration... I "Add an Extension Location" to ~/eclipse-config/eclipse. The setting for this ends up being stored in ~/.eclipse 23-Jan-07 INF2120 Prosjekt i modellering 11
The extension site administrative files extension site binary files source files workspace 23-Jan-07 INF2120 Prosjekt i modellering 12
Important distinctions of a UML model Diagram Model Diagram element Model element details 23-Jan-07 INF2120 Prosjekt i modellering 13
Update Site This will appear Register a new site Site URL for IFI UML Total continue here 23-Jan-07 INF2120 Prosjekt i modellering 14
IBM Rational Software Modeler Provides a flexible development environment for creating and editing UML models. You can use the Model Explorer view to edit the source code and model structure of the semantic model. You can use the diagram editor to edit the visualized model. When you edit models, you should understand the differences between model elements and diagram elements. For example, when you right-click an element in the diagram editor, there are two delete options. If you click Delete from Diagram, the element is deleted from the diagram only, because the diagram element is only a visualization of a model element. Conversely, if you click Delete from Model, the element is deleted from both the model and the diagram. 23-Jan-07 INF2120 Prosjekt i modellering 15
Create a new project From File menu choose : 1. New 2. Project 3. Modeling 4. UML Project 23-Jan-07 INF2120 Prosjekt i modellering 16
Creating a new class diagram 1. Right-click your model 2. Add Diagram 3. Class Diagram 23-Jan-07 INF2120 Prosjekt i modellering 17
Adding a class to your model (1) Classes can be added from the Model explorer field: 1. Right click your new class model 2. Add UML 3. Class 23-Jan-07 INF2120 Prosjekt i modellering 18
Adding a class to your model (2) From the Palette on the right side of your screen: 1. Left-click the class icon 2. Left-click or click and drag in the editor 3. Enter the name of the class 23-Jan-07 INF2120 Prosjekt i modellering 19
Adding a class to your model (3) Or simply hold the mouse still in the editor: 1. A menu will appear 2. Choose what element you want to create 3. Enter element name 23-Jan-07 INF2120 Prosjekt i modellering 20
ICU0 your very first I see you system surveillence at your fingertips, first we only observe yourself 23-Jan-07 INF2120 Prosjekt i modellering 21
UML Use Cases very very simple subject : our system note: an informal text use case: a service actor: the outsiders 23-Jan-07 INF2120 Prosjekt i modellering 22
Use cases in a separate package 23-Jan-07 INF2120 Prosjekt i modellering 23
UML Sequence Diagrams: a more precise way Lifeline Message Interaction State inv. Sequence diagram Signature 23-Jan-07 INF2120 Prosjekt i modellering 24
SeDi the IFI UML Total Sequence Diagram edit 23-Jan-07 INF2120 Prosjekt i modellering 25
Packages, Collaboration, Composite Structure Package Composite structure Collaboration Part Port 23-Jan-07 INF2120 Prosjekt i modellering 26
Model-time Consistency! Run validation! 23-Jan-07 INF2120 Prosjekt i modellering 27
Structure hierarchy Part type Part type 23-Jan-07 INF2120 Prosjekt i modellering 28
A State Machine defining the whole system local variables State machine Initial Decision State Trigger Guard Transition Effect 23-Jan-07 INF2120 Prosjekt i modellering 29
Runtime Consistency! 23-Jan-07 INF2120 Prosjekt i modellering 30
Transition Effect Activity Diagram Initial Action where the name is java code Final Control flow 23-Jan-07 INF2120 Prosjekt i modellering 31
UML compilation and execution Make target java project Set up java libraries Make transformation config. Make run configuration Apply transformation config by rightclicking on desired package (not the whole model) Apply run configuration Enjoy the running system 23-Jan-07 INF2120 Prosjekt i modellering 32