Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ Class {

{ #category : 'initialization' }
OPBCPetriNetController >> initializePalette: aPalette [

aPalette
newCreationTool: 'Place'
factory: [ OPPetriNetPlaceWithBooleanController new ]
icon: OPPetriNetsIcons current placeIcon;
factory: [ OPPetriNetPlaceWithBooleanController new ]
icon: OPPetriNetsIcons placeIcon;
newCreationTool: 'Transition'
factory: [ OPBCPetriNetTransitionController new ]
icon: OPPetriNetsIcons current transitionIcon;
factory: [ OPBCPetriNetTransitionController new ]
icon: OPPetriNetsIcons transitionIcon;
newSeparator;
newConnectionCreationTool: 'Arc'
factory: [ OPPetriNetArcWithExpressionController new ]
icon: OPPetriNetsIcons current arcIcon
factory: [ OPPetriNetArcWithExpressionController new ]
icon: OPPetriNetsIcons arcIcon
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ OPBCPetriNetsExamples class >> examplePetriNets [

{ #category : 'world menu' }
OPBCPetriNetsExamples class >> menuCommandOn: aBuilder [

<worldMenu>
(aBuilder item: #'BC Petri Nets')
icon: OPPetriNetsIcons current petriNetIcon;
icon: OPPetriNetsIcons petriNetIcon;
parent: #MostUsedTools;
action: [ self exampleEmpty ];
with: [ (aBuilder item: #'BC Petri Nets Example')
parent: #'BC Petri Nets';
label: 'BC Petri Nets example';
icon: OPPetriNetsIcons current petriNetIcon;
action: [ self examplePetriNets ] ]
with: [
(aBuilder item: #'BC Petri Nets Example')
parent: #'BC Petri Nets';
label: 'BC Petri Nets example';
icon: OPPetriNetsIcons petriNetIcon;
action: [ self examplePetriNets ] ]
]
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ OPBCPetriNetsNavigatorAdapter >> displayMapping [

{ #category : 'widget API' }
OPBCPetriNetsNavigatorAdapter >> iconMapping [
^ {(OPBCPetriNet -> OPPetriNetsIcons current petriNetIcon).
(OPPetriNetArcWithExpression -> OPPetriNetsIcons current arcIcon).
(OPPetriNetPlaceWithBooleanToken -> OPPetriNetsIcons current placeIcon).
(OPPetriNetTransition -> OPPetriNetsIcons current transitionIcon)}

^ {
(OPBCPetriNet -> OPPetriNetsIcons petriNetIcon).
(OPPetriNetArcWithExpression -> OPPetriNetsIcons arcIcon).
(OPPetriNetPlaceWithBooleanToken -> OPPetriNetsIcons placeIcon).
(OPPetriNetTransition -> OPPetriNetsIcons transitionIcon) }
]
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ OPPetriNetArcWithExpressionController >> buildEditorForm: aForm [
OPPetriNetArcWithExpressionController >> headShapeClass [
^ RTSimpleArrow
]

{ #category : 'accessing' }
OPPetriNetArcWithExpressionController >> modelClass [

^ OPPetriNetArcWithExpression
]
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ OPPetriNetPlaceWithBooleanController >> buildEditorForm: aForm [
existenceBox state: true ]
]

{ #category : 'accessing' }
OPPetriNetPlaceWithBooleanController >> modelClass [

^ OPPetriNetPlaceWithBooleanToken
]

{ #category : 'hooks' }
OPPetriNetPlaceWithBooleanController >> refreshFigure [
self tokenGroupFrom: self model token.
Expand Down
2 changes: 1 addition & 1 deletion repository/OpenPonk-PetriNets/OPPetriNetsExamples.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ OPPetriNetsExamples class >> menuCommandOn: aBuilder [
OPPetriNetsExamples class >> openExample: aModel [

| project |
project := OPProject named: 'FSM Example'.
project := OPProject named: 'Petri Net Example'.
project addModel: aModel.
^ (OPWorkbench openProject: project) showAllElementsInAllDiagrams
]
Expand Down