Skip to content

Commit

Permalink
Merge 9fd547e
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Nov 15, 2024
2 parents 1490067 + 9fd547e commit 1e721d8
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 60 deletions.
12 changes: 5 additions & 7 deletions .smalltalk.ston
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@ SmalltalkCISpec {
#platforms : [
#pharo
],
#baseline : 'PetriNets',
#baseline : 'OpenPonkPetriNets',
#directory : 'repository'
}
],
#preLoading : 'ci-scripts/.github/scripts/preLoad.st',
#postLoading : 'ci-scripts/.github/scripts/postLoad.st',
#testing : {
#packages : [
'OpenPonk*'
],
#coverage : {
#packages : [
'OpenPonk-PetriNets*'
]
},
#packages : [
'OpenPonk-PetriNets*',
'OP-*',
'OpenPonk*'
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
Class {
#name : 'BaselineOfPetriNets',
#superclass : 'BaselineOf',
#category : 'BaselineOfPetriNets',
#package : 'BaselineOfPetriNets'
}

{ #category : 'accessing' }
BaselineOfPetriNets >> baseline: spec [

<baseline>
spec for: #common do: [
spec
baseline: 'OpenPonk'
with: [ spec repository: 'github://openponk/openponk:v4.0.x' ].
spec baseline: 'OpenPonkSimulation' with: [
spec
repository: 'github://JanBliznicenko/openponk-simulation:v4.0.x';
loads: 'plugin' ].
spec
package: 'OpenPonk-PetriNets'
with: [ spec requires: #( 'OpenPonkSimulation' ) ].
spec
package: 'OpenPonk-BooleanColoredPetriNets'
with: [ spec requires: #( 'OpenPonk-PetriNets' ) ].
spec
group: 'plugin' with: #( 'OpenPonk-PetriNets' );
group: 'default' with: #( 'OpenPonk' 'plugin' );
group: 'bcpn' with: #( 'OpenPonk-BooleanColoredPetriNets' ) ]
]
Class {
#name : 'BaselineOfOpenPonkPetriNets',
#superclass : 'BaselineOf',
#category : 'BaselineOfOpenPonkPetriNets',
#package : 'BaselineOfOpenPonkPetriNets'
}

{ #category : 'accessing' }
BaselineOfOpenPonkPetriNets >> baseline: spec [

<baseline>
spec for: #common do: [
spec
baseline: 'OpenPonk'
with: [ spec repository: 'github://openponk/openponk' ].
spec baseline: 'OpenPonkSimulation' with: [
spec
repository: 'github://JanBliznicenko/openponk-simulation';
loads: 'plugin' ].
spec
package: 'OpenPonk-PetriNets'
with: [ spec requires: #( 'OpenPonkSimulation' ) ].
spec
package: 'OpenPonk-BooleanColoredPetriNets'
with: [ spec requires: #( 'OpenPonk-PetriNets' ) ].
spec
group: 'plugin' with: #( 'OpenPonk-PetriNets' );
group: 'default' with: #( 'OpenPonk' 'plugin' );
group: 'bcpn' with: #( 'OpenPonk-BooleanColoredPetriNets' ) ]
]
1 change: 1 addition & 0 deletions repository/BaselineOfOpenPonkPetriNets/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : 'BaselineOfOpenPonkPetriNets' }
1 change: 0 additions & 1 deletion repository/BaselineOfPetriNets/package.st

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ OPPetriNetArcController >> internalSubscribeTo: aModel [
aModel weakWhen: OPElementRemoved send: #removeControllerAndDiagramElement to: self
]

{ #category : 'testing' }
OPPetriNetArcController >> isHideable [
^ true
]

{ #category : 'destruction' }
OPPetriNetArcController >> removeModel [

Expand Down
3 changes: 2 additions & 1 deletion repository/OpenPonk-PetriNets/OPPetriNetController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ OPPetriNetController >> controllerFactory [

{ #category : 'accessing' }
OPPetriNetController >> elementsToShowInside [
^ model elements

^ self model elements
]

{ #category : 'initialization' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ OPPetriNetNodeController >> canBeTargetFor: aController [

{ #category : 'accessing' }
OPPetriNetNodeController >> dependentElements [
^ (model incoming , model outgoing) asSet

^ (self model incoming , self model outgoing) asSet
]

{ #category : 'rendering' }
Expand All @@ -58,11 +59,6 @@ OPPetriNetNodeController >> internalSubscribeTo: aModel [
aModel weakWhen: OPElementRemoved send: #removeControllerAndDiagramElement to: self
]

{ #category : 'testing' }
OPPetriNetNodeController >> isHideable [
^ true
]

{ #category : 'destruction' }
OPPetriNetNodeController >> removeModel [

Expand Down
21 changes: 14 additions & 7 deletions repository/OpenPonk-PetriNets/OPPetriNetPlaceShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ OPPetriNetPlaceShape >> addInteractions [
self addEventForwardingFrom: self tokenCircle to: self roassalShape
]

{ #category : 'accessing' }
OPPetriNetPlaceShape >> attachedShapes [

^ super attachedShapes , { tokenGroup }
]

{ #category : 'private' }
OPPetriNetPlaceShape >> createTokenGroup [

Expand All @@ -27,6 +33,13 @@ OPPetriNetPlaceShape >> createTokenGroup [
^ tokenGroup := RSGroup with: circle
]

{ #category : 'removing' }
OPPetriNetPlaceShape >> removeRender [

super removeRender.
tokenGroup := nil
]

{ #category : 'hooks' }
OPPetriNetPlaceShape >> renderBasicShape [

Expand All @@ -41,13 +54,7 @@ OPPetriNetPlaceShape >> renderShapeDetails [

super renderShapeDetails.
self canvas addAll: self createTokenGroup.
RSLocation new stick: self tokenCircle on: self roassalShape.
self roassalShape
when: RSShapeRemovedEvent
do: [
tokenGroup do: #remove.
tokenGroup := nil ]
for: self
RSLocation new stick: self tokenCircle on: self roassalShape
]

{ #category : 'private' }
Expand Down
23 changes: 20 additions & 3 deletions repository/OpenPonk-PetriNets/OPPetriNetTransitionShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ Class {
#name : 'OPPetriNetTransitionShape',
#superclass : 'OPPetriNetNodeShape',
#instVars : [
'announcer'
'announcer',
'transitionHelper',
'icon'
],
#category : 'OpenPonk-PetriNets-Shapes',
#package : 'OpenPonk-PetriNets',
Expand All @@ -15,12 +17,28 @@ OPPetriNetTransitionShape >> announcer [
^ announcer ifNil: [ announcer := Announcer new ]
]

{ #category : 'accessing' }
OPPetriNetTransitionShape >> attachedShapes [

^ super attachedShapes , {
icon.
transitionHelper }
]

{ #category : 'hooks' }
OPPetriNetTransitionShape >> playClicked [

self announcer announce: OPPetriNetPlayClicked
]

{ #category : 'removing' }
OPPetriNetTransitionShape >> removeRender [

super removeRender.
icon := nil.
transitionHelper := nil
]

{ #category : 'hooks' }
OPPetriNetTransitionShape >> renderBasicShape [

Expand All @@ -33,7 +51,7 @@ OPPetriNetTransitionShape >> renderBasicShape [
{ #category : 'hooks' }
OPPetriNetTransitionShape >> selectableInteraction [

| selectableInteraction icon transitionHelper removal |
| selectableInteraction removal |
selectableInteraction := super selectableInteraction.
transitionHelper := RSBox new
size: 18;
Expand Down Expand Up @@ -65,7 +83,6 @@ OPPetriNetTransitionShape >> selectableInteraction [
transitionHelper remove.
icon remove ].
selectableInteraction when: RSUnHighlightEvent do: removal for: self.
roassalShape when: RSShapeRemovedEvent do: removal for: self.
^ selectableInteraction
]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Class {
#name : 'OPPetrinets410oppProjectLoadTest',
#superclass : 'OPLegacyProjectLoadTest',
#category : 'OpenPonk-PetriNets-Tests',
#package : 'OpenPonk-PetriNets',
#tag : 'Tests'
}

{ #category : 'as yet unclassified' }
OPPetrinets410oppProjectLoadTest >> base64ProjectZip [

^'UEsDBBQAAAAIAHBXblkIJFS6OQAAAEMAAAAYAAAAcHJvamVjdC9leHBvcnQtaW5mby5qc29uq+biVErLL8pNLFFSsFJQSsksSk0uyS+qVNLh4lQqLk3KAnLBMgVF+WA2SLwstag4Mz8PJG7IVQsAUEsDBBQAAAAIAHBXblneen+sbwAAAIgAAAATAAAAcHJvamVjdC9tb2RlbHMuanNvbovm5eKs5uXi5FQqLc1MUVKwUlBKskgxszAwTtU1Tk011jVIMTDQtTQxSdVNTTQ2NEhLM0lKTk5W0gHrKcgpTc/MA+vyDwhILSnK9EstKQ6AiCIrCUstKs7Mh6g00ANC7dK87Lz88jwloKJaXq5YAFBLAwQUAAAACABwV25ZmbY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NGUtZWEzMTBmZjRiY2NjL21vZGVsL21vZGVsLnN0b25QSwUGAAAAAAgACAAbAwAA3AoAAAAA'
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Class {
#name : 'OPPetrinetsLegacyProjectLoadTestGenerator',
#superclass : 'OPLegacyProjectLoadTestGenerator',
#category : 'OpenPonk-PetriNets-Tests',
#package : 'OpenPonk-PetriNets',
#tag : 'Tests'
}

{ #category : 'hooks' }
OPPetrinetsLegacyProjectLoadTestGenerator >> model [

^ OPPetriNetsExamples examplePetriNet
]

0 comments on commit 1e721d8

Please sign in to comment.