Skip to content

Commit

Permalink
Merge 8fd6ef2
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Oct 3, 2024
2 parents c46c880 + 8fd6ef2 commit f038e9f
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 56 deletions.
6 changes: 3 additions & 3 deletions repository/OpenPonk-BPMN/OPBPMNActivityController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Class {
#tag : 'Controllers'
}

{ #category : 'connecting' }
{ #category : 'forms' }
OPBPMNActivityController >> buildEditorForm: aForm [

super buildEditorForm: aForm.
Expand Down Expand Up @@ -61,7 +61,7 @@ OPBPMNActivityController >> canBeTargetFor: aController [
]
]

{ #category : 'connecting' }
{ #category : 'construction' }
OPBPMNActivityController >> diagramElementClass [

^ OPBPMNActivityShape
Expand All @@ -72,7 +72,7 @@ OPBPMNActivityController >> modelClass [
^ OPBPMNActivityModel
]

{ #category : 'hooks' }
{ #category : 'connecting' }
OPBPMNActivityController >> typeIconForModel [
^ self model typeIconFor: self model type
]
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ OPBPMNBoundaryEventController >> buildEditorForm: aForm [
self diagramElement modelChanged ].
]

{ #category : 'forms' }
{ #category : 'connecting' }
OPBPMNBoundaryEventController >> canBeSourceFor: aController [
^ (aController isKindOf: OPBPMNMessageFlowController)
| (aController isKindOf: OPBPMNFlowController)
]

{ #category : 'forms' }
{ #category : 'connecting' }
OPBPMNBoundaryEventController >> canBeTargetFor: aController [
^ (aController isKindOf: OPBPMNMessageFlowController)
]

{ #category : 'forms' }
{ #category : 'construction' }
OPBPMNBoundaryEventController >> diagramElementClass [

^ OPBPMNBoundaryEventShape
Expand All @@ -54,7 +54,7 @@ OPBPMNBoundaryEventController >> modelClass [
^ OPBPMNBoundaryEventModel
]

{ #category : 'forms' }
{ #category : 'accessing' }
OPBPMNBoundaryEventController >> subscribeDiagram: aDiagram [

self model subscribeDiagram: aDiagram
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Class {
#tag : 'Controllers'
}

{ #category : 'testing' }
{ #category : 'forms' }
OPBPMNCollapsedSubProcessController >> buildEditorForm: aForm [

| anEvent |
Expand Down Expand Up @@ -52,12 +52,12 @@ OPBPMNCollapsedSubProcessController >> buildEditorForm: aForm [
self diagramElement modelChanged
]

{ #category : 'testing' }
{ #category : 'connecting' }
OPBPMNCollapsedSubProcessController >> canBeSourceFor: aController [
^ aController isKindOf: OPBPMNEdgeController
]

{ #category : 'testing' }
{ #category : 'connecting' }
OPBPMNCollapsedSubProcessController >> canBeTargetFor: aController [

^ (aController isKindOf: OPBPMNMessageFlowController)
Expand All @@ -69,18 +69,18 @@ OPBPMNCollapsedSubProcessController >> canBeTargetFor: aController [
]
]

{ #category : 'testing' }
{ #category : 'construction' }
OPBPMNCollapsedSubProcessController >> diagramElementClass [

^ OPBPMNCollapsedSubProcessShape
]

{ #category : 'testing' }
{ #category : 'construction' }
OPBPMNCollapsedSubProcessController >> modelClass [
^ OPBPMNCollapsedSubProcessModel
]

{ #category : 'testing' }
{ #category : 'connecting' }
OPBPMNCollapsedSubProcessController >> renderDiagramElement [

super renderDiagramElement.
Expand All @@ -90,7 +90,7 @@ OPBPMNCollapsedSubProcessController >> renderDiagramElement [
for: self
]

{ #category : 'testing' }
{ #category : 'connecting' }
OPBPMNCollapsedSubProcessController >> typeIconForModel [
^ self typeIconFor: self model type
^ self model typeIconFor: self model type
]
17 changes: 9 additions & 8 deletions repository/OpenPonk-BPMN/OPBPMNEndEventController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,31 @@ Class {
#tag : 'Controllers'
}

{ #category : 'connecting' }
{ #category : 'forms' }
OPBPMNEndEventController >> buildEditorForm: aForm [

super buildEditorForm: aForm.
(aForm addDroplist: 'Type')
items: #( #Send #EscalationThrow #Error #Cancel #CompensationThrow #SignalThrow #MultipleThrow #Terminate #None );
items: #( #Send #EscalationThrow #Error #Cancel #CompensationThrow
#SignalThrow #MultipleThrow #Terminate #None );
displayIcon: [ :type | self model typeIconFor: type ];
display: [ :type | type asString ];
selectItem: self model type;
whenSelectedItemChangedDo: [ :newValue |
whenSelectedItemChangedDo: [ :newValue |
self model type: newValue.
self diagramElement modelChanged ].
self model type = OPBPMNNodeType Send
ifTrue: [
ifTrue: [
(aForm addText: 'Executable attribute')
text: self model executableAttribute;
whenTextChangedDo: [ :newValue |
whenTextChangedDo: [ :newValue |
self model executableAttribute: newValue asString.
self refreshFigure ].
self diagramElement modelChanged ].
(aForm addText: 'Executable attribute value')
text: self model executableAttributeValue;
whenTextChangedDo: [ :newValue |
whenTextChangedDo: [ :newValue |
self model executableAttributeValue: newValue asString.
self refreshFigure ] ]
self diagramElement modelChanged ] ]
ifFalse: [ self model executableAttribute: nil ]
]

Expand Down
9 changes: 4 additions & 5 deletions repository/OpenPonk-BPMN/OPBPMNEventModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@ Class {

{ #category : 'printing' }
OPBPMNEventModel >> timerType [
^ timerType

^ timerType ifNil: [ #none ]
]

{ #category : 'printing' }
OPBPMNEventModel >> timerType: aType [
(aType = 'none')
ifTrue: [ timerType := nil ]
ifFalse: [ timerType := aType ]

timerType := aType
]

{ #category : 'printing' }
OPBPMNEventModel >> timerValue [
^ timerValue

^ timerValue ifNil: [ '' ]
]

{ #category : 'printing' }
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-BPMN/OPBPMNGatewayController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Class {
#tag : 'Controllers'
}

{ #category : 'connecting' }
{ #category : 'forms' }
OPBPMNGatewayController >> buildEditorForm: aForm [

super buildEditorForm: aForm.
Expand All @@ -35,7 +35,7 @@ OPBPMNGatewayController >> canBeTargetFor: aController [

]

{ #category : 'connecting' }
{ #category : 'construction' }
OPBPMNGatewayController >> diagramElementClass [

^ OPBPMNGatewayShape
Expand Down
26 changes: 13 additions & 13 deletions repository/OpenPonk-BPMN/OPBPMNIntermediateEventController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Class {
#tag : 'Controllers'
}

{ #category : 'hooks' }
{ #category : 'forms' }
OPBPMNIntermediateEventController >> buildEditorForm: aForm [

super buildEditorForm: aForm.
Expand All @@ -26,34 +26,34 @@ OPBPMNIntermediateEventController >> buildEditorForm: aForm [
displayIcon: [ :type | self model typeIconFor: type ];
display: [ :type | type asString ];
selectItem: self model type;
whenSelectedItemChangedDo: [ :newValue |
whenSelectedItemChangedDo: [ :newValue |
self model type: newValue.
self diagramElement modelChanged ].
self model type = OPBPMNNodeType Timer ifTrue: [
self model type = OPBPMNNodeType Timer ifTrue: [
(aForm addDroplist: 'Timer type')
items: #( #none #timeDate #timeDuration #timeCycle );
display: [ :type | type asString ];
selectItem: self model timerType;
whenSelectedItemChangedDo: [ :newValue |
whenSelectedItemChangedDo: [ :newValue |
self model timerType: newValue.
self refreshFigure ].
self diagramElement modelChanged ].
(aForm addText: 'Timer value')
text: self model timerValue;
whenTextChangedDo: [ :newValue |
whenTextChangedDo: [ :newValue |
self model timerValue: newValue asString.
self refreshFigure ] ].
self diagramElement modelChanged ] ].
self model type = OPBPMNNodeType Send
ifTrue: [
ifTrue: [
(aForm addText: 'Executable attribute')
text: self model executableAttribute;
whenTextChangedDo: [ :newValue |
whenTextChangedDo: [ :newValue |
self model executableAttribute: newValue asString.
self refreshFigure ].
self diagramElement modelChanged ].
(aForm addText: 'Executable attribute value')
text: self model executableAttributeValue;
whenTextChangedDo: [ :newValue |
whenTextChangedDo: [ :newValue |
self model executableAttributeValue: newValue asString.
self refreshFigure ] ]
self diagramElement modelChanged ] ]
ifFalse: [ self model executableAttribute: nil ]
]

Expand All @@ -74,7 +74,7 @@ OPBPMNIntermediateEventController >> canBeTargetFor: aController [
]
]

{ #category : 'connecting' }
{ #category : 'construction' }
OPBPMNIntermediateEventController >> diagramElementClass [

^ OPBPMNIntermediateEventShape
Expand Down
6 changes: 4 additions & 2 deletions repository/OpenPonk-BPMN/OPBPMNNodeModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ OPBPMNNodeModel >> defaultType [

{ #category : 'printing' }
OPBPMNNodeModel >> executableAttribute [
^ executableAttribute

^ executableAttribute ifNil: [ '' ]
]

{ #category : 'printing' }
Expand All @@ -58,7 +59,8 @@ OPBPMNNodeModel >> executableAttribute: anAttribute [

{ #category : 'printing' }
OPBPMNNodeModel >> executableAttributeValue [
^ executableAttributeValue

^ executableAttributeValue ifNil: [ '' ]
]

{ #category : 'printing' }
Expand Down
2 changes: 1 addition & 1 deletion repository/OpenPonk-BPMN/OPBPMNPlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Class {
{ #category : 'toolbar' }
OPBPMNPlugin class >> exportPackage: aPackage [

StFBSaveFileDialog new
StSaveFilePresenter new
title: 'Choose a BPMN file to export to';
okAction: [ :file |
file
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-BPMN/OPBPMNPoolController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OPBPMNPoolController >> boxHeight [
^ 300
]

{ #category : 'connecting' }
{ #category : 'forms' }
OPBPMNPoolController >> buildEditorForm: aForm [

super buildEditorForm: aForm.
Expand Down Expand Up @@ -52,7 +52,7 @@ OPBPMNPoolController >> canBeTargetFor: aController [
| (aController isKindOf: OPBPMNDataObjectController)]
]

{ #category : 'connecting' }
{ #category : 'construction' }
OPBPMNPoolController >> diagramElementClass [

^ OPBPMNPoolShape
Expand Down
8 changes: 4 additions & 4 deletions repository/OpenPonk-BPMN/OPBPMNStartEventController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Class {
#tag : 'Controllers'
}

{ #category : 'connecting' }
{ #category : 'forms' }
OPBPMNStartEventController >> buildEditorForm: aForm [

super buildEditorForm: aForm.
Expand Down Expand Up @@ -38,7 +38,7 @@ OPBPMNStartEventController >> buildEditorForm: aForm [
text: self model timerValue;
whenTextChangedDo: [ :newValue |
self model timerValue: newValue asString.
self refreshFigure ] ]
self diagramElement modelChanged ] ]
]

{ #category : 'connecting' }
Expand All @@ -58,13 +58,13 @@ OPBPMNStartEventController >> canBeTargetFor: aController [
]
]

{ #category : 'hooks' }
{ #category : 'construction' }
OPBPMNStartEventController >> diagramElementClass [

^ OPBPMNStartEventShape
]

{ #category : 'connecting' }
{ #category : 'accessing' }
OPBPMNStartEventController >> modelClass [
^ OPBPMNStartEventModel
]
5 changes: 3 additions & 2 deletions repository/OpenPonk-BPMN/OPBPMNSubProcessController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OPBPMNSubProcessController >> buildEditorForm: aForm [

| anEvent |
super buildEditorForm: aForm.
(aForm addButton: 'Add Boundary Event') action: [
(aForm addButton: 'Add Boundary Event') action: [
anEvent := OPBPMNBoundaryEventController new
createModelIn: self model;
showInDiagram: self diagramController;
Expand All @@ -29,7 +29,8 @@ OPBPMNSubProcessController >> buildEditorForm: aForm [
offset: -5 @ 20.
self diagramElement roassalShape
when: RSShapeRemovedEvent
do: [ anEvent diagramElement roassalShape remove ] ].
do: [ anEvent diagramElement roassalShape remove ]
for: self ].
self diagramElement modelChanged
]

Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-BPMN/OPBPMNXMLWriterVisitorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OPBPMNXMLWriterVisitorTest >> testVisitElement [
assert: writerVisitor writer asString
equals: '<?xml version="1.0" encoding="UTF-8"?>
<bpmn:exclusiveGateway name="Test name" id="_6-' , model uuid asString
, '"/>'
, '" =""/>'
]

{ #category : 'tests' }
Expand Down Expand Up @@ -49,7 +49,7 @@ writerVisitor := OPBPMNXMLWriterVisitor new.
writerVisitor visitElementEvent: model.
self assert: writerVisitor writer asString equals:
'<?xml version="1.0" encoding="UTF-8"?>
<bpmn:startEvent name="Test name" id="_6-', model uuid asString,'">
<bpmn:startEvent name="Test name" id="_6-', model uuid asString,'" ="">
<bpmn:timerEventDefinition id="timerEventDefinition_', model uuid asString,'">
<bpmn:timeDuration xsi:type="semantic:tFormalExpression">PT5M</bpmn:timeDuration>
</bpmn:timerEventDefinition>
Expand Down

0 comments on commit f038e9f

Please sign in to comment.