Skip to content

Commit

Permalink
Baseline and package renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Nov 10, 2024
1 parent 6233ef7 commit 9501d1f
Show file tree
Hide file tree
Showing 19 changed files with 373 additions and 373 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"
Baseline for https://github.com/OpenPonk/uml-profiles
"
Class {
#name : 'BaselineOfOpenPonkUMLProfiles',
#superclass : 'BaselineOf',
#category : 'BaselineOfOpenPonkUMLProfiles',
#package : 'BaselineOfOpenPonkUMLProfiles'
}

{ #category : 'baselines' }
BaselineOfOpenPonkUMLProfiles >> baseline: spec [
<baseline>
spec
for: #common
do: [ spec
baseline: 'OpenPonkUMLMetamodel'
with: [ spec repository: 'github://openponk/uml-metamodel' ].
spec package: 'OpenPonk-UML-Profiles' with: [ spec requires: #('UMLMetamodel') ].
spec package: 'OpenPonk-ClockProfile' with: [ spec requires: #('OP-UML-Profiles') ].
spec package: 'OpenPonk-IssuesProfile' with: [ spec requires: #('OP-UML-Profiles') ].
spec group: 'default' with: #('OpenPonk-UML-Profiles' 'OpenPonk-ClockProfile' 'OpenPonk-IssuesProfile') ]
]
1 change: 1 addition & 0 deletions repository/BaselineOfOpenPonkUMLProfiles/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : 'BaselineOfOpenPonkUMLProfiles' }
23 changes: 0 additions & 23 deletions repository/BaselineOfUMLProfiles/BaselineOfUMLProfiles.class.st

This file was deleted.

1 change: 0 additions & 1 deletion repository/BaselineOfUMLProfiles/package.st

This file was deleted.

1 change: 0 additions & 1 deletion repository/OP-ClockProfile/package.st

This file was deleted.

1 change: 0 additions & 1 deletion repository/OP-IssuesProfile/package.st

This file was deleted.

1 change: 0 additions & 1 deletion repository/OP-UML-Profiles/package.st

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
Class {
#name : 'ClClock',
#superclass : 'Object',
#instVars : [
'osVersion',
'posixCompliant',
'base_Class'
],
#category : 'OP-ClockProfile-Metamodel',
#package : 'OP-ClockProfile',
#tag : 'Metamodel'
}

{ #category : 'accessing' }
ClClock >> base_Class [
^ base_Class
]

{ #category : 'accessing' }
ClClock >> base_Class: aClass [
| oldClass |
oldClass := base_Class.
base_Class := aClass.
OPUMLToOneLink
on: self
thisSelector: #base_Class
otherSelector: #extension_Clock
updateFrom: oldClass
to: aClass
]

{ #category : 'accessing' }
ClClock >> osVersion [
^ osVersion
]

{ #category : 'accessing' }
ClClock >> osVersion: aString [
osVersion := aString
]

{ #category : 'accessing' }
ClClock >> posixCompliant [
^ posixCompliant ifNil: [ false ]
]

{ #category : 'accessing' }
ClClock >> posixCompliant: aBoolean [
posixCompliant := aBoolean
]

{ #category : 'accessing' }
ClClock >> umlClassName [
^ 'Clock'
]

{ #category : 'accessing' }
ClClock >> umlMetaClass [
^ ClClockProfileFactory metaClassFor: self
]
Class {
#name : 'ClClock',
#superclass : 'Object',
#instVars : [
'osVersion',
'posixCompliant',
'base_Class'
],
#category : 'OpenPonk-ClockProfile-Metamodel',
#package : 'OpenPonk-ClockProfile',
#tag : 'Metamodel'
}

{ #category : 'accessing' }
ClClock >> base_Class [
^ base_Class
]

{ #category : 'accessing' }
ClClock >> base_Class: aClass [
| oldClass |
oldClass := base_Class.
base_Class := aClass.
OPUMLToOneLink
on: self
thisSelector: #base_Class
otherSelector: #extension_Clock
updateFrom: oldClass
to: aClass
]

{ #category : 'accessing' }
ClClock >> osVersion [
^ osVersion
]

{ #category : 'accessing' }
ClClock >> osVersion: aString [
osVersion := aString
]

{ #category : 'accessing' }
ClClock >> posixCompliant [
^ posixCompliant ifNil: [ false ]
]

{ #category : 'accessing' }
ClClock >> posixCompliant: aBoolean [
posixCompliant := aBoolean
]

{ #category : 'accessing' }
ClClock >> umlClassName [
^ 'Clock'
]

{ #category : 'accessing' }
ClClock >> umlMetaClass [
^ ClClockProfileFactory metaClassFor: self
]
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
Class {
#name : 'ClClockProfileFactory',
#superclass : 'OPUmlCustomProfile',
#category : 'OP-ClockProfile-Model',
#package : 'OP-ClockProfile',
#tag : 'Model'
}

{ #category : 'instance creation' }
ClClockProfileFactory >> createProfile [
| profile classMetaclass clock clockPair |
profile := OPUMLProfile new
name: 'Clock';
uuid: '_0';
URI: 'http://www.example.com/Clock/0.1';
implementationPackage: 'ClockProfile';
implementationPrefix: 'Cl'.
classMetaclass := self metaClassNamed: 'Class'.
clockPair := self newStereotype: 'Clock' to: classMetaclass.
profile packagedElements addAll: clockPair.
clock := clockPair first.
OPUMLProperty new
name: 'osVersion';
uuid: clock uuid , '-osVersion';
owningClass: clock;
type: (OPUMLPrimitiveType new name: 'String').
"OPUMLProperty new
name: 'startOperation';
uuid: clock uuid , '-startOperation';
owningClass: clock;
type: (OPUMLClass new name: 'Operation')."
OPUMLProperty new
name: 'posixCompliant';
uuid: clock uuid , '-posixCompliant';
owningClass: clock;
type: (OPUMLPrimitiveType new name: 'Boolean').
profile ownedStereotype do: [ :each | each profile: profile ].
^ profile
]

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

<gtExample>
| model class profile |
model := OPUmlExamples emptyModel.
profile := self class profile.
model profileApplications add:
(OPUMLProfileApplication new appliedProfile: profile).
class := OPUMLClass new name: 'StopWatch'.
class applyStereotype:
(profile packagedElements detect: [ :each | each name = 'Clock' ])
implementationClass new.
model packagedElements add: class.
^ model
]

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

<script: 'self new openExample'>
(OPProject openOnModel: self modelWithAppliedStereotype)
showAllElementsInAllDiagrams
]

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

<script: 'self new openProfile'>
(OPProject openOnModel: self class profile)
showAllElementsInAllDiagrams
]

{ #category : 'instance creation' }
ClClockProfileFactory >> reset [
<script: 'self reset'>
self class reset
]
Class {
#name : 'ClClockProfileFactory',
#superclass : 'OPUmlCustomProfile',
#category : 'OpenPonk-ClockProfile-Model',
#package : 'OpenPonk-ClockProfile',
#tag : 'Model'
}

{ #category : 'instance creation' }
ClClockProfileFactory >> createProfile [
| profile classMetaclass clock clockPair |
profile := OPUMLProfile new
name: 'Clock';
uuid: '_0';
URI: 'http://www.example.com/Clock/0.1';
implementationPackage: 'ClockProfile';
implementationPrefix: 'Cl'.
classMetaclass := self metaClassNamed: 'Class'.
clockPair := self newStereotype: 'Clock' to: classMetaclass.
profile packagedElements addAll: clockPair.
clock := clockPair first.
OPUMLProperty new
name: 'osVersion';
uuid: clock uuid , '-osVersion';
owningClass: clock;
type: (OPUMLPrimitiveType new name: 'String').
"OPUMLProperty new
name: 'startOperation';
uuid: clock uuid , '-startOperation';
owningClass: clock;
type: (OPUMLClass new name: 'Operation')."
OPUMLProperty new
name: 'posixCompliant';
uuid: clock uuid , '-posixCompliant';
owningClass: clock;
type: (OPUMLPrimitiveType new name: 'Boolean').
profile ownedStereotype do: [ :each | each profile: profile ].
^ profile
]

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

<gtExample>
| model class profile |
model := OPUmlExamples emptyModel.
profile := self class profile.
model profileApplications add:
(OPUMLProfileApplication new appliedProfile: profile).
class := OPUMLClass new name: 'StopWatch'.
class applyStereotype:
(profile packagedElements detect: [ :each | each name = 'Clock' ])
implementationClass new.
model packagedElements add: class.
^ model
]

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

<script: 'self new openExample'>
(OPProject openOnModel: self modelWithAppliedStereotype)
showAllElementsInAllDiagrams
]

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

<script: 'self new openProfile'>
(OPProject openOnModel: self class profile)
showAllElementsInAllDiagrams
]

{ #category : 'instance creation' }
ClClockProfileFactory >> reset [
<script: 'self reset'>
self class reset
]
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Extension { #name : 'OPUMLClass' }

{ #category : '*OP-ClockProfile-Metamodel' }
OPUMLClass >> extension_Clock [
^ self tagAt: #extension_Clock ifAbsent: [ nil ]
]

{ #category : '*OP-ClockProfile-Metamodel' }
OPUMLClass >> extension_Clock: aClock [
| oldClock |
oldClock := self extension_Clock.
self tagAt: #extension_Clock put: aClock.
OPUMLToOneLink
on: self
thisSelector: #extension_Clock
otherSelector: #base_Class
updateFrom: oldClock
to: aClock
]
Extension { #name : 'OPUMLClass' }

{ #category : '*OpenPonk-ClockProfile-Metamodel' }
OPUMLClass >> extension_Clock [
^ self tagAt: #extension_Clock ifAbsent: [ nil ]
]

{ #category : '*OpenPonk-ClockProfile-Metamodel' }
OPUMLClass >> extension_Clock: aClock [
| oldClock |
oldClock := self extension_Clock.
self tagAt: #extension_Clock put: aClock.
OPUMLToOneLink
on: self
thisSelector: #extension_Clock
otherSelector: #base_Class
updateFrom: oldClock
to: aClock
]
1 change: 1 addition & 0 deletions repository/OpenPonk-ClockProfile/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : 'OpenPonk-ClockProfile' }
Loading

0 comments on commit 9501d1f

Please sign in to comment.