agenttool (iii) dynamic mse presentation 2 binti sepaha

26
agentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Upload: sarah-lee

Post on 18-Jan-2018

217 views

Category:

Documents


0 download

DESCRIPTION

Graphical Editing Framework  Enables user to make rich graphical editors  Uses Draw2D to handle visual graphics  Based on MVC Approach

TRANSCRIPT

Page 1: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

agentTool (III) Dynamic

MSE Presentation 2Binti Sepaha

Page 2: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

OutlineGEF Overview Architecture DesignFormal SpecificationInspection ChecklistProject PlanTest PlanActivity Diagram Editor DemoQuestions/Comments

Page 3: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Graphical Editing Framework

Enables user to make rich graphical editors Uses Draw2D to handle visual graphics Based on MVC Approach

Page 4: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Graphical Editing Framework (contd.) Controller bridges the Model and the View Model and View have no knowledge of each

other Each model has an associated edit part i.e.

controller and a view

Page 5: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Functioning of Edit Part

Page 6: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Functioning of Edit Part (contd.) An edit part can play certain roles like Node

Role, Container Role, etc. Node Role – to connect to other nodes Container Role – to contain child objects Roles are delegated to Edit Policies which handle

Requests ContainerEditPolicy is installed for container role

which handles requests such as AddChild NodeEditPolicy is installed for node role and

handles requests such as target or source connect.

Page 7: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Functioning of Edit Part (contd.)

ContainerEditPolicy then creates a COMMAND called getCreateCommand which is executed and a new object is created and added to the Container

Similarly, NodeEditPolicy creates getConnectionCreateCommand and getConnectionCompleteCommand to start and end the connection

Another policy - XYLayout Policy is used by the container edit part to place children in XY Layout

The behavior of getCreateCommand is shown in a Sequence Diagram

Page 8: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Add an ElementUser CreateAction DiagramEditPart DiagramCreateCommandContainerEditPolicy

AddElement

Create Request

Get Create Command

Create Command

Create Command

Create Command

ExecuteCommand

Add Element

Command Executed

Action Complete

Page 9: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Move an Element

User EditPartMoveAction XYLayoutPolicy MoveCommand Model Element

MoveElement

ChangeConstraintRequest

Get Move Command

Move Command

MoveCommand

MoveCommand

Execute Command

ModifyBounds

Page 10: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Architecture Design

Package View

Controller

View Model

Editor

Page 11: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Editor Package

ActivityDiagramEditor – creates and loads the graphical editor and the palette

ActivityDiagramPlugin – enables the editor to be installed as a plugin in Eclipse Environment

PaletteViewerCreator – creates palette entries and associates models with each entry

PaletteFlyoutPreferences – sets the palette flyout preferences

GraphicalViewerCreator – this is the actual graphical editor i.e. the drawing pane

OverviewOutlinePage – this class gives the outline view of the diagram

Page 12: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Model Package

Page 13: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

EditPart Package

+activate()+deactivate()+createFigure()+createEditPolicies()+getFigure()

GEF EditPart

ActionStatePart

IncomingEventPart SwimLanePartOutgoingEventPart DecisionNodePart

FlowFinalNodePartFinalStatePartInitialStatePartActionFlowPart

SynchronizationPointPart

Page 14: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Command Package

+canExecute()+execute()+redo()+undo()

GEF Command

AddCommand DeleteCommand MoveResizeCommand ChnageNameCommand ActionFlowCreateCommand

ReconnectActionFlowStartCommand ReconnectActionFlowEndCommand

Page 15: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

View Package

+paintFigure()+getBounds()+setBounds()

-bounds

Draw2D Figure

-name

ActionStateFigure

-name

IncomingEventFigure SwimLaneFigure-name

OutgoingEventFigure

DecisionNodeFigure FlowFinalNodeFigureFinalStateFigureInitialStateFigure

SynchronizationPointFigure-name

LabelTagFigure

ActivityDiagramFigure

Page 16: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Formal Specificationsmodel agentTool---- CLASSES--class ActivityDiagramattributes name : Stringendclass IModelattributes name : String x : Integer y: Integer width: Integer height: Integerendclass ActionState < IModeloperations addActionState(ad : ActivityDiagram) : Set(ActionState) = ad.hasActionStates->union(Set{self}) deleteActionState(ad : ActivityDiagram) : Set(ActionState) = ad.hasActionStates - (Set{self}) end class InitialState < IModelendclass FinalState < IModelendclass FlowFinalNode < IModelEnd

Page 17: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

class IncomingEvent < IModelendclass OutgoingEvent < IModelendclass SynchronizationPoint < IModelendclass DecisionNode < IModelendclass SwimLane < IModelend----ASSOCIATIONS--association ActionStateBelongsTo between ActionState[*] role hasActionStates ActivityDiagram[*] role belongsToendassociation FinalStateBelongsTo between FinalState[0..1] role hasFinalStates ActivityDiagram[*] role belongsToendassociation InitialStateBelongsTo between InitialState[0..1] role hasInitialStates ActivityDiagram[*] role belongsToendassociation FlowFinalNodeBelongsTo between FlowFinalNode[*] role hasFlowFinalNodes ActivityDiagram[*] role belongsToendassociation IncomingEventBelongsTo between IncomingEvent[*] role hasIncomingEvents ActivityDiagram[*] role belongsToEndassociation OutgoingEventBelongsTo between OutgoingEvent[*] role hasOutgoingEvents ActivityDiagram[*] role belongsToend

Page 18: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

association SynchronizationPointBelongsTo between SynchronizationPoint[*] role hasSynchronizationPoints ActivityDiagram[*] role belongsToendassociation DecisionNodeBelongsTo between DecisionNode[*] role hasDecisionNodes ActivityDiagram[*] role belongsToendassociation SwimLaneBelongsTo between SwimLane[*] role hasSwimLanes ActivityDiagram[*] role belongsToend----This assocaition shows that there is an action flow between 2 elements--association ActionFlow between IModel[*] role startsFrom IModel[*] role endsAtend----CONSTRAINTS--constraintscontext ad:ActivityDiagram inv UniqueActionStates: ad.hasActionStates->forAll(a1, a2 | a1 <> a2 implies a1.name <> a2.name) context ActionState::addActionState(ad : ActivityDiagram): Set(ActionState) pre cond1 : ad.hasActionStates->excludes(self) post cond2 : ad.hasActionStates = ad.hasActionStates@pre->union(Set{self}) post cond3 : result = ad.hasActionStates post cond4 : (ad.hasActionStates - ad.hasActionStates@pre)->size() = 1context ActionState::deleteActionState(ad : ActivityDiagram): Set(ActionState) pre cond1 : ad.hasActionStates->includes(self) post cond2 : ad.hasActionStates = ad.hasActionStates@pre->excluding(self) post cond3 : result = ad.hasActionStates post cond4 : (ad.hasActionStates@pre - ad.hasActionStates)->size() = 1

Page 19: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Inspection Checklist The symbols used in the class diagrams conform to UML standards The classes in the class diagrams have a corresponding description

provided in the Architecture Design document The description of the classes in the Architecture Design document are

clear and adequate The symbols used in the sequence diagrams conform to UML

standards The sequence diagrams are clear and understandable The attributes in the USE model are compatible with the attributes of

the corresponding class diagrams The multiplicities in the USE model are reflected in the Class diagram Classes in the Architecture Design (Activity Diagram) correspond to

classes in the USE model All model elements and relationships as outlined in the Vision

Document (Section 3.1.1.2) are present in the Architecture Design document as classes

Page 20: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Project Plan

Already developed – 5.5 KSLOC which is 50% of the entire project

5500 SLOC / 150 hours = 36.67 SLOC/hour (productivity)

5500 SLOC / .50 = 11000 SLOC (total SLOC)

Remaining SLOC = 5500 (5500 SLOC)/ 36.67 SLOC/hour = 150 hours

(Remaining Time)

Page 21: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Project Plan (contd.) 150 hrs/6 hrs per day = 25 days

Approximately 25 days for coding, testing, etc.

And 10 days documentation which includes component design, user manual, etc.

Total of 35 days

Approximate Completion Date – April 20th 2005

Page 22: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Test Plan Features to be tested – all features from Vision Document Version 1.0

Drawing Sequence Diagrams

Drawing Activity Diagrams

Importing Models

Exporting Models

Printing Diagrams

JUnit Plugin for Eclipse will be used for Unit testing

Only functional testing will be performed

All Test Results will be documented

Page 23: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Phase III Deliverables

· Component Design· Source Code + JavaDocs· Assessment Evaluation· User Manual· Formal Technical Inspection Letters· References· Project Evaluation

Page 24: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Activity Diagram Editor Demo

Page 25: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Sample XML Model

Page 26: AgentTool (III) Dynamic MSE Presentation 2 Binti Sepaha

Questions/Comments