From 566d264e0a678f426f31e72377f9b17a25695ba5 Mon Sep 17 00:00:00 2001 From: Jan Bliznicenko Date: Tue, 7 May 2024 18:22:34 +0200 Subject: [PATCH] Updates for Pharo 12 --- .../OpenPonk-BormModel/BormActivity.class.st | 38 +++++++------- .../BormActivityTest.class.st | 24 +++++---- .../BormCommunication.class.st | 50 ++++++++++--------- .../BormCommunicationTest.class.st | 22 ++++---- .../BormConstraint.class.st | 8 +-- .../OpenPonk-BormModel/BormDataFlow.class.st | 28 ++++++----- .../BormDataFlowTest.class.st | 14 +++--- .../OpenPonk-BormModel/BormElement.class.st | 16 +++--- .../OpenPonk-BormModel/BormEntity.class.st | 20 ++++---- .../BormExBooleanExpression.class.st | 8 +-- .../OpenPonk-BormModel/BormExClause.class.st | 8 +-- .../BormExOperator.class.st | 14 +++--- .../BormExVariable.class.st | 8 +-- .../OpenPonk-BormModel/BormFactory.class.st | 20 ++++---- .../OpenPonk-BormModel/BormORModel.class.st | 26 +++++----- .../BormORModelTest.class.st | 32 ++++++++---- .../BormParticipant.class.st | 40 ++++++++------- .../BormParticipantRole.class.st | 26 +++++----- .../BormParticipantTest.class.st | 28 ++++++----- .../BormParticipantType.class.st | 14 +++--- .../BormProcessNode.class.st | 44 ++++++++-------- .../BormProcessNodeTest.class.st | 28 ++++++----- .../OpenPonk-BormModel/BormState.class.st | 26 +++++----- .../OpenPonk-BormModel/BormStateTest.class.st | 16 +++--- .../OpenPonk-BormModel/BormTest.class.st | 34 +++++++------ .../BormTransition.class.st | 32 ++++++------ .../BormTransitionTest.class.st | 14 +++--- .../TBormRelationship.trait.st | 12 +++-- repository/OpenPonk-BormModel/package.st | 2 +- 29 files changed, 358 insertions(+), 294 deletions(-) diff --git a/repository/OpenPonk-BormModel/BormActivity.class.st b/repository/OpenPonk-BormModel/BormActivity.class.st index 25a4217..5b06235 100644 --- a/repository/OpenPonk-BormModel/BormActivity.class.st +++ b/repository/OpenPonk-BormModel/BormActivity.class.st @@ -4,20 +4,22 @@ Activity represents some behavior in the model being executed when traversing fr Activity can also communicate with activities in other participants using communications. " Class { - #name : #BormActivity, - #superclass : #BormProcessNode, + #name : 'BormActivity', + #superclass : 'BormProcessNode', #instVars : [ 'communications' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #associating } +{ #category : 'associating' } BormActivity >> ==> anActivity [ ^ BormFactory communicationFrom: self to: anActivity ] -{ #category : #accessing } +{ #category : 'accessing' } BormActivity >> allElements [ "should return all elements recursively (incl. sub-elements)" @@ -25,28 +27,28 @@ BormActivity >> allElements [ (Set with: each) , each allElements ]) ] -{ #category : #accessing } +{ #category : 'accessing' } BormActivity >> allEntities [ ^ super allEntities , (self sent flatCollect: #allEntities) ] -{ #category : #accessing } +{ #category : 'accessing' } BormActivity >> communications [ ^ communications copy ] -{ #category : #accessing } +{ #category : 'accessing' } BormActivity >> has: anElement [ ^ (super has: anElement) or: [ communications includes: anElement ] ] -{ #category : #initialization } +{ #category : 'initialization' } BormActivity >> initialize [ super initialize. communications := OrderedCollection new ] -{ #category : #inspection } +{ #category : 'inspection' } BormActivity >> inspectionCommunications [ @@ -73,12 +75,12 @@ BormActivity >> inspectionCommunications [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BormActivity >> isActivity [ ^ true ] -{ #category : #adding } +{ #category : 'adding' } BormActivity >> receive: aCommunication [ (communications includes: aCommunication) ifTrue: [ ^ self ]. @@ -87,12 +89,12 @@ BormActivity >> receive: aCommunication [ self changed ] -{ #category : #accessing } +{ #category : 'accessing' } BormActivity >> received [ ^ communications select: [ :each | each receiver = self ] ] -{ #category : #removing } +{ #category : 'removing' } BormActivity >> removeAllCommunications [ communications copy do: [ :each | @@ -100,7 +102,7 @@ BormActivity >> removeAllCommunications [ each receiver removeCommunication: each ] ] -{ #category : #adding } +{ #category : 'adding' } BormActivity >> removeCommunication: aCommunication [ communications remove: aCommunication. aCommunication sender = self @@ -109,7 +111,7 @@ BormActivity >> removeCommunication: aCommunication [ self announceRemoved: aCommunication ] ] -{ #category : #removing } +{ #category : 'removing' } BormActivity >> removedFrom: aParticipant [ super removedFrom: aParticipant @@ -118,7 +120,7 @@ BormActivity >> removedFrom: aParticipant [ self removeAllCommunications ] ] -{ #category : #adding } +{ #category : 'adding' } BormActivity >> send: aCommunication [ (communications includes: aCommunication) ifTrue: [ ^ self ]. @@ -128,7 +130,7 @@ BormActivity >> send: aCommunication [ self announceAdded: aCommunication ] -{ #category : #accessing } +{ #category : 'accessing' } BormActivity >> sent [ ^ communications select: [ :each | each sender = self ] ] diff --git a/repository/OpenPonk-BormModel/BormActivityTest.class.st b/repository/OpenPonk-BormModel/BormActivityTest.class.st index a409a33..b38651d 100644 --- a/repository/OpenPonk-BormModel/BormActivityTest.class.st +++ b/repository/OpenPonk-BormModel/BormActivityTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #BormActivityTest, - #superclass : #BormProcessNodeTest, + #name : 'BormActivityTest', + #superclass : 'BormProcessNodeTest', #instVars : [ 'sender', 'receiver', 'communication' ], - #category : #'OpenPonk-BormModel-Tests' + #category : 'OpenPonk-BormModel-Tests', + #package : 'OpenPonk-BormModel', + #tag : 'Tests' } -{ #category : #accessing } +{ #category : 'accessing' } BormActivityTest >> emptyNode [ ^ emptyActivity ] -{ #category : #running } +{ #category : 'running' } BormActivityTest >> setUp [ super setUp. sender := BormActivity new. @@ -24,12 +26,12 @@ BormActivityTest >> setUp [ receiver receive: communication ] -{ #category : #tests } +{ #category : 'tests' } BormActivityTest >> testAllEntities [ self assert: emptyActivity allEntities equals: (Set with: emptyActivity entity) ] -{ #category : #tests } +{ #category : 'tests' } BormActivityTest >> testCommunication [ self assert: communication sender equals: sender. self assert: communication receiver equals: receiver. @@ -40,27 +42,27 @@ BormActivityTest >> testCommunication [ self assert: receiver received anyOne equals: communication ] -{ #category : #tests } +{ #category : 'tests' } BormActivityTest >> testEmptyActivity [ self assert: emptyActivity sent isEmpty. self assert: emptyActivity received isEmpty ] -{ #category : #tests } +{ #category : 'tests' } BormActivityTest >> testRemoveAllCommunications [ sender removeAllCommunications. self assert: sender sent isEmpty. self assert: receiver received isEmpty ] -{ #category : #tests } +{ #category : 'tests' } BormActivityTest >> testRemoveAllCommunications2 [ receiver removeAllCommunications. self assert: sender sent isEmpty. self assert: receiver received isEmpty ] -{ #category : #tests } +{ #category : 'tests' } BormActivityTest >> testRemoveCommunication [ self assert: sender sent size equals: 1. self assert: receiver received size equals: 1. diff --git a/repository/OpenPonk-BormModel/BormCommunication.class.st b/repository/OpenPonk-BormModel/BormCommunication.class.st index b904376..4cd7434 100644 --- a/repository/OpenPonk-BormModel/BormCommunication.class.st +++ b/repository/OpenPonk-BormModel/BormCommunication.class.st @@ -2,8 +2,8 @@ Communication is a channel between two activities. Activites can send data flows in both directions through this channel " Class { - #name : #BormCommunication, - #superclass : #BormElement, + #name : 'BormCommunication', + #superclass : 'BormElement', #traits : 'TBormRelationship', #classTraits : 'TBormRelationship classTrait', #instVars : [ @@ -11,20 +11,22 @@ Class { 'sender', 'receiver' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #adding } +{ #category : 'adding' } BormCommunication >> addDataFlow: aDataFlow [ ^ self add: aDataFlow ] -{ #category : #adding } +{ #category : 'adding' } BormCommunication >> addDataFlowNamed: aString [ ^ self add: (BormDataFlow named: aString) ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> allEntities [ ^ (Set with: self entity) , (self dataFlows flatCollect: #allEntities) , @@ -33,12 +35,12 @@ BormCommunication >> allEntities [ ifFalse: [ {} ]) ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> constraint [ ^ constraint ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> constraint: aConstraint [ self hasConstraint ifTrue: [ ^ self ]. @@ -47,50 +49,50 @@ BormCommunication >> constraint: aConstraint [ self announceAdded: aConstraint ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> constraints [ ^ constraint ifNil: [ #() ] ifNotNil: [ ^ {constraint} ] ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> dataFlows [ ^ elements ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> elements [ self hasConstraint ifFalse: [ ^ super elements ]. ^ super elements , { self constraint } ] -{ #category : #testing } +{ #category : 'testing' } BormCommunication >> has: anEntity [ ^ (super has: anEntity) or: [ constraint = anEntity ] ] -{ #category : #testing } +{ #category : 'testing' } BormCommunication >> hasConstraint [ ^ constraint isNotNil ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> receiver [ ^ receiver ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> receiver: anActivity [ receiver := anActivity ] -{ #category : #removing } +{ #category : 'removing' } BormCommunication >> removeAllDataFlows [ ^ self removeAll ] -{ #category : #removing } +{ #category : 'removing' } BormCommunication >> removeConstraint [ self hasConstraint ifFalse: [ ^ self ]. @@ -99,37 +101,37 @@ BormCommunication >> removeConstraint [ constraint := nil ] -{ #category : #removing } +{ #category : 'removing' } BormCommunication >> removeDataFlow: aDataFlow [ ^ self remove: aDataFlow ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> sender [ ^ sender ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> sender: anActivity [ sender := anActivity ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> source [ ^ self sender ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> source: aSource [ self sender: aSource ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> target [ ^ self receiver ] -{ #category : #accessing } +{ #category : 'accessing' } BormCommunication >> target: aSource [ self receiver: aSource ] diff --git a/repository/OpenPonk-BormModel/BormCommunicationTest.class.st b/repository/OpenPonk-BormModel/BormCommunicationTest.class.st index f7b5bb2..fa6e7d3 100644 --- a/repository/OpenPonk-BormModel/BormCommunicationTest.class.st +++ b/repository/OpenPonk-BormModel/BormCommunicationTest.class.st @@ -1,21 +1,23 @@ Class { - #name : #BormCommunicationTest, - #superclass : #BormTest, - #category : #'OpenPonk-BormModel-Tests' + #name : 'BormCommunicationTest', + #superclass : 'BormTest', + #category : 'OpenPonk-BormModel-Tests', + #package : 'OpenPonk-BormModel', + #tag : 'Tests' } -{ #category : #tests } +{ #category : 'tests' } BormCommunicationTest >> testAddDataFlow [ emptyCommunication addDataFlow: emptyDataFlow. self assert: emptyCommunication dataFlows size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } BormCommunicationTest >> testAllEntities [ self assert: emptyCommunication allEntities equals: (Set with: emptyCommunication entity) ] -{ #category : #tests } +{ #category : 'tests' } BormCommunicationTest >> testAllEntities2 [ emptyCommunication addDataFlow: emptyDataFlow. self @@ -23,7 +25,7 @@ BormCommunicationTest >> testAllEntities2 [ equals: (Set with: emptyCommunication entity with: emptyDataFlow entity) ] -{ #category : #tests } +{ #category : 'tests' } BormCommunicationTest >> testAllEntities3 [ emptyCommunication constraint: emptyConstraint. self @@ -31,20 +33,20 @@ BormCommunicationTest >> testAllEntities3 [ equals: (Set with: emptyCommunication entity with: emptyConstraint entity) ] -{ #category : #tests } +{ #category : 'tests' } BormCommunicationTest >> testEmptyCommunication [ self assert: emptyCommunication dataFlows isEmpty. self assert: emptyCommunication constraint equals: nil ] -{ #category : #tests } +{ #category : 'tests' } BormCommunicationTest >> testRemoveAllDataFlows [ emptyCommunication addDataFlow: emptyDataFlow. emptyCommunication removeAllDataFlows. self assert: emptyCommunication dataFlows isEmpty ] -{ #category : #tests } +{ #category : 'tests' } BormCommunicationTest >> testRemoveDataFlow [ emptyCommunication addDataFlow: emptyDataFlow. emptyCommunication removeDataFlow: emptyDataFlow. diff --git a/repository/OpenPonk-BormModel/BormConstraint.class.st b/repository/OpenPonk-BormModel/BormConstraint.class.st index 7cdc077..d7144cc 100644 --- a/repository/OpenPonk-BormModel/BormConstraint.class.st +++ b/repository/OpenPonk-BormModel/BormConstraint.class.st @@ -2,7 +2,9 @@ I represent a constraint label of a transition or a communication. " Class { - #name : #BormConstraint, - #superclass : #BormElement, - #category : #'OpenPonk-BormModel-Models' + #name : 'BormConstraint', + #superclass : 'BormElement', + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } diff --git a/repository/OpenPonk-BormModel/BormDataFlow.class.st b/repository/OpenPonk-BormModel/BormDataFlow.class.st index ccf5f87..5a0581b 100644 --- a/repository/OpenPonk-BormModel/BormDataFlow.class.st +++ b/repository/OpenPonk-BormModel/BormDataFlow.class.st @@ -4,61 +4,63 @@ Data flow is an optional data package sent through communication channel from on The sender can send ""input"" (default) data flows (from the receivers perspective), while the receiver can answer with ""output"" data flows. " Class { - #name : #BormDataFlow, - #superclass : #BormElement, + #name : 'BormDataFlow', + #superclass : 'BormElement', #instVars : [ 'type' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #enumeration } +{ #category : 'enumeration' } BormDataFlow class >> inputType [ ^ #input ] -{ #category : #enumeration } +{ #category : 'enumeration' } BormDataFlow class >> outputType [ ^ #output ] -{ #category : #accessing } +{ #category : 'accessing' } BormDataFlow >> allEntities [ ^ Set with: self entity ] -{ #category : #accessing } +{ #category : 'accessing' } BormDataFlow >> beInput [ ^ type := self class inputType ] -{ #category : #accessing } +{ #category : 'accessing' } BormDataFlow >> beOutput [ type := self class outputType ] -{ #category : #initialization } +{ #category : 'initialization' } BormDataFlow >> initialize [ super initialize. self beInput ] -{ #category : #testing } +{ #category : 'testing' } BormDataFlow >> isInput [ ^ type = self class inputType ] -{ #category : #testing } +{ #category : 'testing' } BormDataFlow >> isOutput [ ^ type = self class outputType ] -{ #category : #accessing } +{ #category : 'accessing' } BormDataFlow >> type [ ^ type ] -{ #category : #accessing } +{ #category : 'accessing' } BormDataFlow >> type: aType [ type := aType. self changed diff --git a/repository/OpenPonk-BormModel/BormDataFlowTest.class.st b/repository/OpenPonk-BormModel/BormDataFlowTest.class.st index 251c414..90c3c80 100644 --- a/repository/OpenPonk-BormModel/BormDataFlowTest.class.st +++ b/repository/OpenPonk-BormModel/BormDataFlowTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #BormDataFlowTest, - #superclass : #BormTest, - #category : #'OpenPonk-BormModel-Tests' + #name : 'BormDataFlowTest', + #superclass : 'BormTest', + #category : 'OpenPonk-BormModel-Tests', + #package : 'OpenPonk-BormModel', + #tag : 'Tests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormDataFlowTest >> testAllEntities [ self assert: emptyDataFlow allEntities equals: (Set with: emptyDataFlow entity) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormDataFlowTest >> testChangeDataFlowType [ self assert: emptyDataFlow isInput. self deny: emptyDataFlow isOutput. @@ -21,7 +23,7 @@ BormDataFlowTest >> testChangeDataFlowType [ self deny: emptyDataFlow isOutput ] -{ #category : #tests } +{ #category : 'tests' } BormDataFlowTest >> testDefaultDataFlow [ self assert: emptyDataFlow isInput. self deny: emptyDataFlow isOutput diff --git a/repository/OpenPonk-BormModel/BormElement.class.st b/repository/OpenPonk-BormModel/BormElement.class.st index 8d299df..765c6cf 100644 --- a/repository/OpenPonk-BormModel/BormElement.class.st +++ b/repository/OpenPonk-BormModel/BormElement.class.st @@ -1,23 +1,25 @@ Class { - #name : #BormElement, - #superclass : #OPModelObject, + #name : 'BormElement', + #superclass : 'OPModelObject', #instVars : [ 'entity' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #accessing } +{ #category : 'accessing' } BormElement >> allEntities [ ^ Set with: self entity ] -{ #category : #accessing } +{ #category : 'accessing' } BormElement >> entity [ ^ entity ] -{ #category : #accessing } +{ #category : 'accessing' } BormElement >> entity: anEntity [ entity := SRToOneLink on: self @@ -27,7 +29,7 @@ BormElement >> entity: anEntity [ to: anEntity ] -{ #category : #initialization } +{ #category : 'initialization' } BormElement >> initialize [ super initialize. self entity: BormEntity new diff --git a/repository/OpenPonk-BormModel/BormEntity.class.st b/repository/OpenPonk-BormModel/BormEntity.class.st index 8814d55..e07238d 100644 --- a/repository/OpenPonk-BormModel/BormEntity.class.st +++ b/repository/OpenPonk-BormModel/BormEntity.class.st @@ -1,40 +1,42 @@ Class { - #name : #BormEntity, - #superclass : #OPModelObject, + #name : 'BormEntity', + #superclass : 'OPModelObject', #instVars : [ 'representations' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #accessing } +{ #category : 'accessing' } BormEntity >> addRepresentation: anElement [ self representations add: anElement ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormEntity >> initialize [ super initialize. representations := SRToManyLink on: self slot: #representations oppositeSlot: #entity ] -{ #category : #accessing } +{ #category : 'accessing' } BormEntity >> name [ super name ifNotEmpty: [ :n | ^ n ]. ^ self representations value ifEmpty: [ '' ] ifNotEmpty: [ :r | r first name ] ] -{ #category : #accessing } +{ #category : 'accessing' } BormEntity >> removeRepresentation: anElement [ self representations remove: anElement ] -{ #category : #accessing } +{ #category : 'accessing' } BormEntity >> representations [ ^ representations ] -{ #category : #accessing } +{ #category : 'accessing' } BormEntity >> representations: aCollection [ representations values: aCollection ] diff --git a/repository/OpenPonk-BormModel/BormExBooleanExpression.class.st b/repository/OpenPonk-BormModel/BormExBooleanExpression.class.st index 0a18312..36f2afc 100644 --- a/repository/OpenPonk-BormModel/BormExBooleanExpression.class.st +++ b/repository/OpenPonk-BormModel/BormExBooleanExpression.class.st @@ -2,7 +2,9 @@ BooleanExpression is an abstract class representing a tree expression. " Class { - #name : #BormExBooleanExpression, - #superclass : #Object, - #category : #'OpenPonk-BormModel-Conditions' + #name : 'BormExBooleanExpression', + #superclass : 'Object', + #category : 'OpenPonk-BormModel-Conditions', + #package : 'OpenPonk-BormModel', + #tag : 'Conditions' } diff --git a/repository/OpenPonk-BormModel/BormExClause.class.st b/repository/OpenPonk-BormModel/BormExClause.class.st index 094399c..b739634 100644 --- a/repository/OpenPonk-BormModel/BormExClause.class.st +++ b/repository/OpenPonk-BormModel/BormExClause.class.st @@ -2,10 +2,12 @@ Clause is an inner node of a boolean expression tree. It can have multiple children. " Class { - #name : #BormExClause, - #superclass : #BormExBooleanExpression, + #name : 'BormExClause', + #superclass : 'BormExBooleanExpression', #instVars : [ 'operator' ], - #category : #'OpenPonk-BormModel-Conditions' + #category : 'OpenPonk-BormModel-Conditions', + #package : 'OpenPonk-BormModel', + #tag : 'Conditions' } diff --git a/repository/OpenPonk-BormModel/BormExOperator.class.st b/repository/OpenPonk-BormModel/BormExOperator.class.st index f414ce7..572685f 100644 --- a/repository/OpenPonk-BormModel/BormExOperator.class.st +++ b/repository/OpenPonk-BormModel/BormExOperator.class.st @@ -2,22 +2,24 @@ Operator lists all possible types of a Clause. See class-side for listing. " Class { - #name : #BormExOperator, - #superclass : #Object, - #category : #'OpenPonk-BormModel-Conditions' + #name : 'BormExOperator', + #superclass : 'Object', + #category : 'OpenPonk-BormModel-Conditions', + #package : 'OpenPonk-BormModel', + #tag : 'Conditions' } -{ #category : #enumeration } +{ #category : 'enumeration' } BormExOperator class >> All [ ^ #All ] -{ #category : #enumeration } +{ #category : 'enumeration' } BormExOperator class >> Any [ ^ #Any ] -{ #category : #enumeration } +{ #category : 'enumeration' } BormExOperator class >> One [ ^ #One ] diff --git a/repository/OpenPonk-BormModel/BormExVariable.class.st b/repository/OpenPonk-BormModel/BormExVariable.class.st index 86cdfb2..e89819e 100644 --- a/repository/OpenPonk-BormModel/BormExVariable.class.st +++ b/repository/OpenPonk-BormModel/BormExVariable.class.st @@ -2,10 +2,12 @@ BormExVariable is a leaf of an expression tree, it represents a process node. " Class { - #name : #BormExVariable, - #superclass : #BormExBooleanExpression, + #name : 'BormExVariable', + #superclass : 'BormExBooleanExpression', #instVars : [ 'node' ], - #category : #'OpenPonk-BormModel-Conditions' + #category : 'OpenPonk-BormModel-Conditions', + #package : 'OpenPonk-BormModel', + #tag : 'Conditions' } diff --git a/repository/OpenPonk-BormModel/BormFactory.class.st b/repository/OpenPonk-BormModel/BormFactory.class.st index 14f8757..ebbd007 100644 --- a/repository/OpenPonk-BormModel/BormFactory.class.st +++ b/repository/OpenPonk-BormModel/BormFactory.class.st @@ -2,17 +2,19 @@ I provide some shortcuts for doing Borm-Model related operations like creation, moving, etc. " Class { - #name : #BormFactory, - #superclass : #Object, - #category : #'OpenPonk-BormModel-Factory' + #name : 'BormFactory', + #superclass : 'Object', + #category : 'OpenPonk-BormModel-Factory', + #package : 'OpenPonk-BormModel', + #tag : 'Factory' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } BormFactory class >> addFqnTransitions: aCollection in: aParticipant [ aCollection do: [ :pair | self fqnTransitionFrom: pair key to: pair value in: aParticipant ] ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BormFactory class >> communicationFrom: fromActivity to: toActivity [ | comm | comm := BormCommunication from: fromActivity to: toActivity. @@ -21,18 +23,18 @@ BormFactory class >> communicationFrom: fromActivity to: toActivity [ ^ comm ] -{ #category : #moving } +{ #category : 'moving' } BormFactory class >> detachParticipantsFrom: aDiagram [ aDiagram elements removeAll ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BormFactory class >> fqnTransitionFrom: fromName to: toName in: aParticipant [ ^ self transitionFrom: aParticipant @ fromName to: aParticipant @ toName ] -{ #category : #moving } +{ #category : 'moving' } BormFactory class >> moveParticipantsFrom: aSourceDiagram to: aTargetDiagram [ aTargetDiagram removeAll. "detach elements from old diagram without causing a cascade" @@ -41,7 +43,7 @@ BormFactory class >> moveParticipantsFrom: aSourceDiagram to: aTargetDiagram [ aSourceDiagram elements removeAll ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } BormFactory class >> transitionFrom: fromNode to: toNode [ | transition | transition := BormTransition from: fromNode to: toNode. diff --git a/repository/OpenPonk-BormModel/BormORModel.class.st b/repository/OpenPonk-BormModel/BormORModel.class.st index 729699d..642261e 100644 --- a/repository/OpenPonk-BormModel/BormORModel.class.st +++ b/repository/OpenPonk-BormModel/BormORModel.class.st @@ -2,32 +2,34 @@ Diagram represents the topmost component of BORM model. It contains participants. " Class { - #name : #BormORModel, - #superclass : #BormElement, + #name : 'BormORModel', + #superclass : 'BormElement', #instVars : [ 'project' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormORModel class >> stonAllInstVarNames [ ^ super stonAllInstVarNames copyWithout: #project ] -{ #category : #accessing } +{ #category : 'accessing' } BormORModel >> @ aFqn [ ^ (aFqn includesSubstring: '::') ifTrue: [ self nodeNamed: aFqn ] ifFalse: [ self participantNamed: aFqn ] ] -{ #category : #accessing } +{ #category : 'accessing' } BormORModel >> allEntities [ ^ super allEntities , (self participants flatCollect: #allEntities) ] -{ #category : #'gt-inspector' } +{ #category : 'gt-inspector' } BormORModel >> inspectionParticipants [ @@ -48,29 +50,29 @@ BormORModel >> inspectionParticipants [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BormORModel >> nodeNamed: aString [ | aName | aName := aString splitOn: '::'. ^ (self participantNamed: aName first) @ aName second ] -{ #category : #accessing } +{ #category : 'accessing' } BormORModel >> participantNamed: aString [ ^ self elementNamed: aString ] -{ #category : #accessing } +{ #category : 'accessing' } BormORModel >> participants [ ^ self elements ] -{ #category : #accessing } +{ #category : 'accessing' } BormORModel >> project [ ^ project ] -{ #category : #accessing } +{ #category : 'accessing' } BormORModel >> project: aProject [ project := aProject ] diff --git a/repository/OpenPonk-BormModel/BormORModelTest.class.st b/repository/OpenPonk-BormModel/BormORModelTest.class.st index 26fa849..6d177e3 100644 --- a/repository/OpenPonk-BormModel/BormORModelTest.class.st +++ b/repository/OpenPonk-BormModel/BormORModelTest.class.st @@ -1,24 +1,30 @@ Class { - #name : #BormORModelTest, - #superclass : #BormTest, - #category : #'OpenPonk-BormModel-Tests' + #name : 'BormORModelTest', + #superclass : 'BormTest', + #category : 'OpenPonk-BormModel-Tests', + #package : 'OpenPonk-BormModel', + #tag : 'Tests' } -{ #category : #tests } +{ #category : 'tests' } BormORModelTest >> testAddParticipant [ - emptyModel when: OPElementAdded do: [ :event | eventTriggered := true ]. + + emptyModel + when: OPElementAdded + do: [ :event | eventTriggered := true ] + for: self. emptyModel add: emptyParticipant. self assert: emptyModel participants size equals: 1. self assert: emptyParticipant owner equals: emptyModel. self assert: eventTriggered ] -{ #category : #tests } +{ #category : 'tests' } BormORModelTest >> testAllEntities [ self assert: emptyModel allEntities equals: (Set with: emptyModel entity) ] -{ #category : #tests } +{ #category : 'tests' } BormORModelTest >> testAllEntities2 [ emptyModel add: emptyParticipant. self @@ -26,21 +32,25 @@ BormORModelTest >> testAllEntities2 [ equals: (Set with: emptyModel entity with: emptyParticipant entity) ] -{ #category : #tests } +{ #category : 'tests' } BormORModelTest >> testEmpty [ self assert: emptyModel participants isEmpty ] -{ #category : #tests } +{ #category : 'tests' } BormORModelTest >> testRemoveAll [ emptyModel add: self fullParticipant. emptyModel removeAll. self assert: emptyModel participants size equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } BormORModelTest >> testRemoveParticipant [ - emptyModel when: OPElementRemoved do: [ :event | eventTriggered := true ]. + + emptyModel + when: OPElementRemoved + do: [ :event | eventTriggered := true ] + for: self. emptyModel add: emptyParticipant. emptyModel remove: emptyParticipant. self assert: emptyModel participants size equals: 0. diff --git a/repository/OpenPonk-BormModel/BormParticipant.class.st b/repository/OpenPonk-BormModel/BormParticipant.class.st index bc282c6..5ceba0c 100644 --- a/repository/OpenPonk-BormModel/BormParticipant.class.st +++ b/repository/OpenPonk-BormModel/BormParticipant.class.st @@ -4,49 +4,51 @@ Participant is statemachine-like diagram; it is composed of states and transitio The type of a participant can be specified with BormParticipantType and role with BormParticipantRole. " Class { - #name : #BormParticipant, - #superclass : #BormElement, + #name : 'BormParticipant', + #superclass : 'BormElement', #instVars : [ 'type', 'role' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #accessing } +{ #category : 'accessing' } BormParticipant >> @ aName [ ^ self nodeNamed: aName ] -{ #category : #accessing } +{ #category : 'accessing' } BormParticipant >> allEntities [ ^ (Set with: self entity) , (self nodes flatCollect: #allEntities) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipant >> changed [ super changed. owner changed ] -{ #category : #defaults } +{ #category : 'defaults' } BormParticipant >> defaultRole [ ^ BormParticipantRole Undefined ] -{ #category : #defaults } +{ #category : 'defaults' } BormParticipant >> defaultType [ ^ BormParticipantType Person ] -{ #category : #initialization } +{ #category : 'initialization' } BormParticipant >> initialize [ super initialize. type := self defaultType. role := self defaultRole ] -{ #category : #'gt-inspector' } +{ #category : 'gt-inspector' } BormParticipant >> inspectionNodes [ @@ -66,33 +68,33 @@ BormParticipant >> inspectionNodes [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BormParticipant >> nodeNamed: aName [ ^ self elementNamed: aName ] -{ #category : #accessing } +{ #category : 'accessing' } BormParticipant >> nodes [ ^ self elements ] -{ #category : #removing } +{ #category : 'removing' } BormParticipant >> removeAllNodes [ self removeAll ] -{ #category : #accessing } +{ #category : 'accessing' } BormParticipant >> role [ ^ role ] -{ #category : #accessing } +{ #category : 'accessing' } BormParticipant >> role: aParticipantRole [ role := aParticipantRole. self changed ] -{ #category : #'gt-spotter' } +{ #category : 'gt-spotter' } BormParticipant >> spotterForCommunicationFor: aStep [ ^ aStep listProcessor @@ -101,7 +103,7 @@ BormParticipant >> spotterForCommunicationFor: aStep [ ] ] -{ #category : #'gt-spotter' } +{ #category : 'gt-spotter' } BormParticipant >> spotterPreviewOn: aComposite [ @@ -117,12 +119,12 @@ BormParticipant >> spotterPreviewOn: aComposite [ entity: self ] -{ #category : #accessing } +{ #category : 'accessing' } BormParticipant >> type [ ^ type ] -{ #category : #accessing } +{ #category : 'accessing' } BormParticipant >> type: aParticipantType [ type := aParticipantType. self changed diff --git a/repository/OpenPonk-BormModel/BormParticipantRole.class.st b/repository/OpenPonk-BormModel/BormParticipantRole.class.st index 505792e..0c88834 100644 --- a/repository/OpenPonk-BormModel/BormParticipantRole.class.st +++ b/repository/OpenPonk-BormModel/BormParticipantRole.class.st @@ -4,52 +4,54 @@ I represent the possible roles for a participant. See the class side for the listing. " Class { - #name : #BormParticipantRole, - #superclass : #Object, - #category : #'OpenPonk-BormModel-Models' + #name : 'BormParticipantRole', + #superclass : 'Object', + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipantRole class >> Acquires [ ^ #Acquires ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipantRole class >> Approves [ ^ #Approves ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipantRole class >> Consults [ ^ #Consults ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipantRole class >> Cooperates [ ^ #Cooperates ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipantRole class >> Initiates [ ^ #Initiates ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipantRole class >> IsInformed [ ^ #IsInformed ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipantRole class >> IsResponsible [ ^ #IsResponsible ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipantRole class >> Performs [ ^ #Performs ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } BormParticipantRole class >> Undefined [ ^ #Undefined ] diff --git a/repository/OpenPonk-BormModel/BormParticipantTest.class.st b/repository/OpenPonk-BormModel/BormParticipantTest.class.st index 14f6635..90db0e4 100644 --- a/repository/OpenPonk-BormModel/BormParticipantTest.class.st +++ b/repository/OpenPonk-BormModel/BormParticipantTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #BormParticipantTest, - #superclass : #BormTest, - #category : #'OpenPonk-BormModel-Tests' + #name : 'BormParticipantTest', + #superclass : 'BormTest', + #category : 'OpenPonk-BormModel-Tests', + #package : 'OpenPonk-BormModel', + #tag : 'Tests' } -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testAddNodes [ self assert: emptyParticipant nodes size equals: 0. emptyParticipant add: emptyState. @@ -17,12 +19,12 @@ BormParticipantTest >> testAddNodes [ self assert: emptyActivity owner equals: emptyParticipant ] -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testAllEntities [ self assert: emptyParticipant allEntities equals: {emptyParticipant entity} asSet ] -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testAllEntities2 [ emptyParticipant add: emptyState. self @@ -30,20 +32,20 @@ BormParticipantTest >> testAllEntities2 [ equals: (Set with: emptyParticipant entity with: emptyState entity) ] -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testBigParticipant [ | person | person := self fullParticipant. self assert: person nodes size equals: 5 ] -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testChangeRole [ emptyParticipant role: BormParticipantRole Cooperates. self assert: emptyParticipant role equals: BormParticipantRole Cooperates ] -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testChangeType [ emptyParticipant type: BormParticipantType Organization. self assert: emptyParticipant type equals: BormParticipantType Organization. @@ -53,17 +55,17 @@ BormParticipantTest >> testChangeType [ self assert: emptyParticipant type equals: BormParticipantType Person ] -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testDefaultRole [ self assert: emptyParticipant role equals: BormParticipantRole Undefined ] -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testDefaultType [ self assert: emptyParticipant type equals: BormParticipantType Person ] -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testRemoveAllNodes [ | participant | participant := self fullParticipant. @@ -72,7 +74,7 @@ BormParticipantTest >> testRemoveAllNodes [ self assert: participant nodes isEmpty ] -{ #category : #tests } +{ #category : 'tests' } BormParticipantTest >> testRemoveNodes [ emptyParticipant add: emptyState. emptyParticipant add: emptyActivity. diff --git a/repository/OpenPonk-BormModel/BormParticipantType.class.st b/repository/OpenPonk-BormModel/BormParticipantType.class.st index 8b91f67..10218ba 100644 --- a/repository/OpenPonk-BormModel/BormParticipantType.class.st +++ b/repository/OpenPonk-BormModel/BormParticipantType.class.st @@ -4,22 +4,24 @@ I represent the possible types for a participant. See the class side for the listing. " Class { - #name : #BormParticipantType, - #superclass : #Object, - #category : #'OpenPonk-BormModel-Models' + #name : 'BormParticipantType', + #superclass : 'Object', + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #enumeration } +{ #category : 'enumeration' } BormParticipantType class >> Organization [ ^ #Organization ] -{ #category : #enumeration } +{ #category : 'enumeration' } BormParticipantType class >> Person [ ^ #Person ] -{ #category : #enumeration } +{ #category : 'enumeration' } BormParticipantType class >> System [ ^ #System ] diff --git a/repository/OpenPonk-BormModel/BormProcessNode.class.st b/repository/OpenPonk-BormModel/BormProcessNode.class.st index 3e6223a..d9397d7 100644 --- a/repository/OpenPonk-BormModel/BormProcessNode.class.st +++ b/repository/OpenPonk-BormModel/BormProcessNode.class.st @@ -2,21 +2,23 @@ Node is superclass of all nodes in a participant. They are connected with transitions. " Class { - #name : #BormProcessNode, - #superclass : #BormElement, + #name : 'BormProcessNode', + #superclass : 'BormElement', #instVars : [ 'transitions', 'submodel' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #associating } +{ #category : 'associating' } BormProcessNode >> -> aNode [ ^ BormFactory transitionFrom: self to: aNode ] -{ #category : #adding } +{ #category : 'adding' } BormProcessNode >> addTransition: aTransition [ (transitions includes: aTransition) ifTrue: [ ^ self ]. @@ -28,7 +30,7 @@ BormProcessNode >> addTransition: aTransition [ ifFalse: [ self changed ] ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> allElements [ "should return all elements recursively (incl. sub-elements)" @@ -36,28 +38,28 @@ BormProcessNode >> allElements [ (Set with: each) , each allElements ]) ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> allEntities [ ^ (Set with: self entity) , (self outgoing flatCollect: #allEntities) ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> has: anElement [ ^ transitions includes: anElement ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> incoming [ ^ transitions select: [ :each | each target = self ] ] -{ #category : #initialization } +{ #category : 'initialization' } BormProcessNode >> initialize [ super initialize. transitions := OrderedCollection new ] -{ #category : #inspection } +{ #category : 'inspection' } BormProcessNode >> inspectionTransitions [ @@ -84,27 +86,27 @@ BormProcessNode >> inspectionTransitions [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> isActivity [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> isState [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } BormProcessNode >> isSubmodelNode [ ^ submodel isNotNil ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> outgoing [ ^ transitions select: [ :each | each source = self ] ] -{ #category : #removing } +{ #category : 'removing' } BormProcessNode >> removeAllTransitions [ transitions copy do: [ :each | @@ -112,7 +114,7 @@ BormProcessNode >> removeAllTransitions [ each target removeTransition: each ] ] -{ #category : #removing } +{ #category : 'removing' } BormProcessNode >> removeTransition: aTransition [ transitions remove: aTransition. aTransition source = self @@ -121,23 +123,23 @@ BormProcessNode >> removeTransition: aTransition [ self announceRemoved: aTransition ] ] -{ #category : #removing } +{ #category : 'removing' } BormProcessNode >> removedFrom: aParticipant [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> submodel [ ^ submodel ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> submodel: aModel [ submodel := aModel. self changed ] -{ #category : #accessing } +{ #category : 'accessing' } BormProcessNode >> transitions [ ^ transitions ] diff --git a/repository/OpenPonk-BormModel/BormProcessNodeTest.class.st b/repository/OpenPonk-BormModel/BormProcessNodeTest.class.st index 576b95e..00efb28 100644 --- a/repository/OpenPonk-BormModel/BormProcessNodeTest.class.st +++ b/repository/OpenPonk-BormModel/BormProcessNodeTest.class.st @@ -1,29 +1,31 @@ Class { - #name : #BormProcessNodeTest, - #superclass : #BormTest, + #name : 'BormProcessNodeTest', + #superclass : 'BormTest', #instVars : [ 'emptyNode' ], - #category : #'OpenPonk-BormModel-Tests' + #category : 'OpenPonk-BormModel-Tests', + #package : 'OpenPonk-BormModel', + #tag : 'Tests' } -{ #category : #testing } +{ #category : 'testing' } BormProcessNodeTest class >> isAbstract [ ^ self = BormProcessNodeTest ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormProcessNodeTest >> emptyNode [ ^ self subclassResponsibility ] -{ #category : #running } +{ #category : 'running' } BormProcessNodeTest >> setUp [ super setUp. emptyNode := self emptyNode ] -{ #category : #tests } +{ #category : 'tests' } BormProcessNodeTest >> testAddTransition [ | source target transition | source := emptyState. @@ -38,7 +40,7 @@ BormProcessNodeTest >> testAddTransition [ self assert: transition target equals: target ] -{ #category : #tests } +{ #category : 'tests' } BormProcessNodeTest >> testAllEntitiesOutgoing [ | source target transition | source := emptyState. @@ -48,14 +50,14 @@ BormProcessNodeTest >> testAllEntitiesOutgoing [ self assert: target allEntities equals: (Set with: target entity) ] -{ #category : #tests } +{ #category : 'tests' } BormProcessNodeTest >> testEmptyProcessNode [ self assert: emptyNode incoming isEmpty. self assert: emptyNode outgoing isEmpty. self deny: emptyNode isSubmodelNode ] -{ #category : #tests } +{ #category : 'tests' } BormProcessNodeTest >> testRemoveAllTransitionsFromSource [ | source target transition | source := emptyState. @@ -66,7 +68,7 @@ BormProcessNodeTest >> testRemoveAllTransitionsFromSource [ self assert: target incoming size equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } BormProcessNodeTest >> testRemoveAllTransitionsFromTarget [ | source target transition | source := emptyState. @@ -77,7 +79,7 @@ BormProcessNodeTest >> testRemoveAllTransitionsFromTarget [ self assert: target incoming size equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } BormProcessNodeTest >> testRemoveTransition [ | source target transition | source := emptyState. @@ -89,7 +91,7 @@ BormProcessNodeTest >> testRemoveTransition [ self assert: target incoming size equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } BormProcessNodeTest >> testSubdiagram [ self deny: emptyNode isSubmodelNode. emptyNode submodel: emptyModel. diff --git a/repository/OpenPonk-BormModel/BormState.class.st b/repository/OpenPonk-BormModel/BormState.class.st index 6adf750..86fa973 100644 --- a/repository/OpenPonk-BormModel/BormState.class.st +++ b/repository/OpenPonk-BormModel/BormState.class.st @@ -4,60 +4,62 @@ State represents a state of execution in which the participant currently is. Also the state can be regular (default), initial, final, or both. " Class { - #name : #BormState, - #superclass : #BormProcessNode, + #name : 'BormState', + #superclass : 'BormProcessNode', #instVars : [ 'isInitial', 'isFinal' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #accessing } +{ #category : 'accessing' } BormState >> beFinal [ self isFinal: true ] -{ #category : #accessing } +{ #category : 'accessing' } BormState >> beInitial [ self isInitial: true ] -{ #category : #initialization } +{ #category : 'initialization' } BormState >> initialize [ super initialize. isInitial := false. isFinal := false ] -{ #category : #accessing } +{ #category : 'accessing' } BormState >> isFinal [ ^ isFinal ] -{ #category : #accessing } +{ #category : 'accessing' } BormState >> isFinal: aBoolean [ isFinal := aBoolean. self changed ] -{ #category : #accessing } +{ #category : 'accessing' } BormState >> isInitial [ ^ isInitial ] -{ #category : #accessing } +{ #category : 'accessing' } BormState >> isInitial: aBoolean [ isInitial := aBoolean. self changed ] -{ #category : #accessing } +{ #category : 'accessing' } BormState >> isState [ ^ true ] -{ #category : #removing } +{ #category : 'removing' } BormState >> removedFrom: aParticipant [ super removedFrom: aParticipant do: [ self removeAllTransitions ] ] diff --git a/repository/OpenPonk-BormModel/BormStateTest.class.st b/repository/OpenPonk-BormModel/BormStateTest.class.st index 6204b98..d36a4d0 100644 --- a/repository/OpenPonk-BormModel/BormStateTest.class.st +++ b/repository/OpenPonk-BormModel/BormStateTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #BormStateTest, - #superclass : #BormProcessNodeTest, - #category : #'OpenPonk-BormModel-Tests' + #name : 'BormStateTest', + #superclass : 'BormProcessNodeTest', + #category : 'OpenPonk-BormModel-Tests', + #package : 'OpenPonk-BormModel', + #tag : 'Tests' } -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormStateTest >> emptyNode [ ^ emptyState ] -{ #category : #tests } +{ #category : 'tests' } BormStateTest >> testAllEntities [ self assert: emptyState allEntities equals: (Set with: emptyState entity) ] -{ #category : #tests } +{ #category : 'tests' } BormStateTest >> testChangeState [ self deny: emptyState isInitial. self deny: emptyState isFinal. @@ -41,7 +43,7 @@ BormStateTest >> testChangeState [ self assert: emptyState isFinal ] -{ #category : #tests } +{ #category : 'tests' } BormStateTest >> testEmptyState [ self deny: emptyState isInitial. self deny: emptyState isFinal diff --git a/repository/OpenPonk-BormModel/BormTest.class.st b/repository/OpenPonk-BormModel/BormTest.class.st index d8630f5..a6f9029 100644 --- a/repository/OpenPonk-BormModel/BormTest.class.st +++ b/repository/OpenPonk-BormModel/BormTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #BormTest, - #superclass : #TestCase, + #name : 'BormTest', + #superclass : 'TestCase', #instVars : [ 'emptyParticipant', 'emptyState', @@ -12,55 +12,57 @@ Class { 'emptyConstraint', 'emptyModel' ], - #category : #'OpenPonk-BormModel-Tests' + #category : 'OpenPonk-BormModel-Tests', + #package : 'OpenPonk-BormModel', + #tag : 'Tests' } -{ #category : #testing } +{ #category : 'testing' } BormTest class >> isAbstract [ ^ self = BormTest ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> emptyActivity [ ^ BormActivity new ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> emptyCommunication [ ^ BormCommunication new ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> emptyConstraint [ ^ BormConstraint new ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> emptyDataFlow [ ^ BormDataFlow new ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> emptyModel [ ^ BormORModel new ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> emptyParticipant [ ^ BormParticipant new ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> emptyState [ ^ BormState new ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> emptyTransition [ ^ BormTransition new ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> fullParticipant [ | participant nodes | participant := self emptyParticipant. @@ -84,7 +86,7 @@ BormTest >> fullParticipant [ ^ participant ] -{ #category : #running } +{ #category : 'running' } BormTest >> setUp [ emptyModel := self emptyModel. emptyParticipant := self emptyParticipant. @@ -97,7 +99,7 @@ BormTest >> setUp [ eventTriggered := false ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> transitionFrom: aSourceNode to: aTargetNode [ | aTransition | (aTransition := self emptyTransition) from: aSourceNode to: aTargetNode. @@ -106,7 +108,7 @@ BormTest >> transitionFrom: aSourceNode to: aTargetNode [ ^ aTransition ] -{ #category : #'testing - instance creation' } +{ #category : 'testing - instance creation' } BormTest >> transitionsFrom: aSourceState to: aTargetState with: anActivity [ ^ Array with: (self transitionFrom: aSourceState to: anActivity) diff --git a/repository/OpenPonk-BormModel/BormTransition.class.st b/repository/OpenPonk-BormModel/BormTransition.class.st index 920d4aa..4ee3128 100644 --- a/repository/OpenPonk-BormModel/BormTransition.class.st +++ b/repository/OpenPonk-BormModel/BormTransition.class.st @@ -2,8 +2,8 @@ Transition is a link between process nodes. It can have associated constraint label. " Class { - #name : #BormTransition, - #superclass : #BormElement, + #name : 'BormTransition', + #superclass : 'BormElement', #traits : 'TBormRelationship', #classTraits : 'TBormRelationship classTrait', #instVars : [ @@ -11,10 +11,12 @@ Class { 'source', 'target' ], - #category : #'OpenPonk-BormModel-Models' + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> allEntities [ ^ (Set with: self entity) , @@ -23,12 +25,12 @@ BormTransition >> allEntities [ ifFalse: [ {} ]) ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> constraint [ ^ constraint ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> constraint: aConstraint [ self hasConstraint ifTrue: [ ^ self ]. @@ -37,29 +39,29 @@ BormTransition >> constraint: aConstraint [ self announceAdded: aConstraint ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> constraints [ ^ constraint ifNil: [ #() ] ifNotNil: [ ^ {constraint} ] ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> elements [ self hasConstraint ifFalse: [ ^ #( ) ]. ^ { self constraint } ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> has: anEntity [ ^ constraint = anEntity ] -{ #category : #testing } +{ #category : 'testing' } BormTransition >> hasConstraint [ ^ constraint isNotNil ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> removeConstraint [ self hasConstraint ifFalse: [ ^ self ]. @@ -68,22 +70,22 @@ BormTransition >> removeConstraint [ constraint := nil ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> source [ ^ source ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> source: aNode [ source := aNode ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> target [ ^ target ] -{ #category : #accessing } +{ #category : 'accessing' } BormTransition >> target: aNode [ target := aNode ] diff --git a/repository/OpenPonk-BormModel/BormTransitionTest.class.st b/repository/OpenPonk-BormModel/BormTransitionTest.class.st index bbd77b1..7fa433b 100644 --- a/repository/OpenPonk-BormModel/BormTransitionTest.class.st +++ b/repository/OpenPonk-BormModel/BormTransitionTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #BormTransitionTest, - #superclass : #BormTest, - #category : #'OpenPonk-BormModel-Tests' + #name : 'BormTransitionTest', + #superclass : 'BormTest', + #category : 'OpenPonk-BormModel-Tests', + #package : 'OpenPonk-BormModel', + #tag : 'Tests' } -{ #category : #tests } +{ #category : 'tests' } BormTransitionTest >> testAllEntities [ self assert: emptyTransition allEntities equals: (Set with: emptyTransition entity) ] -{ #category : #tests } +{ #category : 'tests' } BormTransitionTest >> testAllEntities2 [ emptyTransition constraint: emptyConstraint. self @@ -17,7 +19,7 @@ BormTransitionTest >> testAllEntities2 [ equals: (Set with: emptyTransition entity with: emptyConstraint entity) ] -{ #category : #tests } +{ #category : 'tests' } BormTransitionTest >> testEmptyConstraint [ self assert: emptyTransition constraint equals: nil ] diff --git a/repository/OpenPonk-BormModel/TBormRelationship.trait.st b/repository/OpenPonk-BormModel/TBormRelationship.trait.st index a84f22a..aa26800 100644 --- a/repository/OpenPonk-BormModel/TBormRelationship.trait.st +++ b/repository/OpenPonk-BormModel/TBormRelationship.trait.st @@ -1,16 +1,18 @@ Trait { - #name : #TBormRelationship, - #category : #'OpenPonk-BormModel-Models' + #name : 'TBormRelationship', + #category : 'OpenPonk-BormModel-Models', + #package : 'OpenPonk-BormModel', + #tag : 'Models' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } TBormRelationship classSide >> from: aSourceObject to: aTargetObject [ ^ self new from: aSourceObject to: aTargetObject; yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } TBormRelationship classSide >> from: aSourceObject to: aTargetObject named: aString [ ^ self new from: aSourceObject to: aTargetObject; @@ -18,7 +20,7 @@ TBormRelationship classSide >> from: aSourceObject to: aTargetObject named: aStr yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } TBormRelationship >> from: aSource to: aTarget [ self source: aSource. self target: aTarget diff --git a/repository/OpenPonk-BormModel/package.st b/repository/OpenPonk-BormModel/package.st index c633038..7f24da2 100644 --- a/repository/OpenPonk-BormModel/package.st +++ b/repository/OpenPonk-BormModel/package.st @@ -1 +1 @@ -Package { #name : #'OpenPonk-BormModel' } +Package { #name : 'OpenPonk-BormModel' }