Skip to content

Commit

Permalink
Use random UUID for profile applications
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Jul 27, 2022
1 parent 9c606d7 commit b95f214
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
15 changes: 6 additions & 9 deletions repository/OP-ClockProfile/ClClockProfileFactory.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,17 @@ ClClockProfileFactory >> createProfile [

{ #category : #'instance creation' }
ClClockProfileFactory >> modelWithAppliedStereotype [

<gtExample>
| model class profile |
model := OPUmlExamples new emptyModel.
profile := self class profile.
model profileApplications
add:
(OPUMLProfileApplication new
uuid: model uuid , '-_profileApplication.0';
appliedProfile: profile).
model profileApplications add:
(OPUMLProfileApplication new appliedProfile: profile).
class := OPUMLClass new name: 'StopWatch'.
class
applyStereotype:
(profile packagedElements detect: [ :each | each name = 'Clock' ])
implementationClass new.
class applyStereotype:
(profile packagedElements detect: [ :each | each name = 'Clock' ])
implementationClass new.
model packagedElements add: class.
^ model
]
Expand Down
11 changes: 5 additions & 6 deletions repository/OP-IssuesProfile/IPIssuesProfileFactory.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,15 @@ IPIssuesProfileFactory >> createProfile [

{ #category : #actions }
IPIssuesProfileFactory >> exampleModel [

<gtExample>
| model classA classB issueTag profile |
model := OPUmlExamples new emptyModel.
profile := self class profile.
model profileApplications
add:
(OPUMLProfileApplication new
uuid: model uuid;
appliedProfile: profile).
issueTag := profile ownedStereotype detect: [ :each | each name = 'IssueTag' ].
model profileApplications add:
(OPUMLProfileApplication new appliedProfile: profile).
issueTag := profile ownedStereotype detect: [ :each |
each name = 'IssueTag' ].
classA := self classA.
classA applyStereotype: issueTag implementationClass new.
classB := self classB.
Expand Down

0 comments on commit b95f214

Please sign in to comment.