agenttool (iii) dynamic mse presentation 2 binti sepaha

Post on 18-Jan-2018

217 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

TRANSCRIPT

agentTool (III) Dynamic

MSE Presentation 2Binti Sepaha

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

Graphical Editing Framework

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

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

Functioning of Edit Part

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.

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

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

Move an Element

User EditPartMoveAction XYLayoutPolicy MoveCommand Model Element

MoveElement

ChangeConstraintRequest

Get Move Command

Move Command

MoveCommand

MoveCommand

Execute Command

ModifyBounds

Architecture Design

Package View

Controller

View Model

Editor

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

Model Package

EditPart Package

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

GEF EditPart

ActionStatePart

IncomingEventPart SwimLanePartOutgoingEventPart DecisionNodePart

FlowFinalNodePartFinalStatePartInitialStatePartActionFlowPart

SynchronizationPointPart

Command Package

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

GEF Command

AddCommand DeleteCommand MoveResizeCommand ChnageNameCommand ActionFlowCreateCommand

ReconnectActionFlowStartCommand ReconnectActionFlowEndCommand

View Package

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

-bounds

Draw2D Figure

-name

ActionStateFigure

-name

IncomingEventFigure SwimLaneFigure-name

OutgoingEventFigure

DecisionNodeFigure FlowFinalNodeFigureFinalStateFigureInitialStateFigure

SynchronizationPointFigure-name

LabelTagFigure

ActivityDiagramFigure

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

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

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

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

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)

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

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

Phase III Deliverables

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

Activity Diagram Editor Demo

Sample XML Model

Questions/Comments

top related