Skip to content

Commit

Permalink
replaced OPUmlProject by OPProject
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Jan 24, 2020
1 parent 999c0d1 commit 5effc00
Show file tree
Hide file tree
Showing 8 changed files with 328 additions and 328 deletions.
116 changes: 58 additions & 58 deletions repository/OP-ClockProfile/ClClock.class.st
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
Class {
#name : #ClClock,
#superclass : #Object,
#instVars : [
'osVersion',
'posixCompliant',
'base_Class'
],
#category : 'OP-ClockProfile-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 : 'OP-ClockProfile-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
]
150 changes: 75 additions & 75 deletions repository/OP-ClockProfile/ClClockProfileFactory.class.st
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
Class {
#name : #ClClockProfileFactory,
#superclass : #OPUmlCustomProfile,
#category : 'OP-ClockProfile-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 new emptyModel.
profile := self class profile.
model profileApplications
add:
(OPUMLProfileApplication new
uuid: model uuid , '-_profileApplication.0';
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'>
OPUmlProject openOnModel: self modelWithAppliedStereotype
]

{ #category : #'instance creation' }
ClClockProfileFactory >> openProfile [
<script: 'self new openProfile'>
OPUmlProject openOnModel: self class profile
]

{ #category : #'instance creation' }
ClClockProfileFactory >> reset [
<script: 'self reset'>
self class reset
]
Class {
#name : #ClClockProfileFactory,
#superclass : #OPUmlCustomProfile,
#category : #'OP-ClockProfile-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 new emptyModel.
profile := self class profile.
model profileApplications
add:
(OPUMLProfileApplication new
uuid: model uuid , '-_profileApplication.0';
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
]

{ #category : #'instance creation' }
ClClockProfileFactory >> openProfile [
<script: 'self new openProfile'>
OPProject openOnModel: self class profile
]

{ #category : #'instance creation' }
ClClockProfileFactory >> reset [
<script: 'self reset'>
self class reset
]
38 changes: 19 additions & 19 deletions repository/OP-ClockProfile/OPUMLClass.extension.st
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 : #'*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
]
2 changes: 1 addition & 1 deletion repository/OP-ClockProfile/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'OP-ClockProfile' }
Package { #name : #'OP-ClockProfile' }
Loading

0 comments on commit 5effc00

Please sign in to comment.