diff --git a/repository/OP-ClockProfile/ClClock.class.st b/repository/OP-ClockProfile/ClClock.class.st index b2559cb..051ff50 100644 --- a/repository/OP-ClockProfile/ClClock.class.st +++ b/repository/OP-ClockProfile/ClClock.class.st @@ -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 +] diff --git a/repository/OP-ClockProfile/ClClockProfileFactory.class.st b/repository/OP-ClockProfile/ClClockProfileFactory.class.st index 8f8934d..f3e41c1 100644 --- a/repository/OP-ClockProfile/ClClockProfileFactory.class.st +++ b/repository/OP-ClockProfile/ClClockProfileFactory.class.st @@ -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 [ - - | 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 [ - - OPUmlProject openOnModel: self modelWithAppliedStereotype -] - -{ #category : #'instance creation' } -ClClockProfileFactory >> openProfile [ - - OPUmlProject openOnModel: self class profile -] - -{ #category : #'instance creation' } -ClClockProfileFactory >> 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 [ + + | 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 [ + + OPProject openOnModel: self modelWithAppliedStereotype +] + +{ #category : #'instance creation' } +ClClockProfileFactory >> openProfile [ + + OPProject openOnModel: self class profile +] + +{ #category : #'instance creation' } +ClClockProfileFactory >> reset [ + + self class reset +] diff --git a/repository/OP-ClockProfile/OPUMLClass.extension.st b/repository/OP-ClockProfile/OPUMLClass.extension.st index 64eb1f6..abe451a 100644 --- a/repository/OP-ClockProfile/OPUMLClass.extension.st +++ b/repository/OP-ClockProfile/OPUMLClass.extension.st @@ -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 +] diff --git a/repository/OP-ClockProfile/package.st b/repository/OP-ClockProfile/package.st index 4025883..8baa660 100644 --- a/repository/OP-ClockProfile/package.st +++ b/repository/OP-ClockProfile/package.st @@ -1 +1 @@ -Package { #name : #'OP-ClockProfile' } +Package { #name : #'OP-ClockProfile' } diff --git a/repository/OP-IssuesProfile/IPIssueTag.class.st b/repository/OP-IssuesProfile/IPIssueTag.class.st index 05975ca..0a2374c 100644 --- a/repository/OP-IssuesProfile/IPIssueTag.class.st +++ b/repository/OP-IssuesProfile/IPIssueTag.class.st @@ -1,47 +1,47 @@ -Class { - #name : #IPIssueTag, - #superclass : #OPUMLElement, - #instVars : [ - 'base_Element', - 'reviewed' - ], - #category : 'OP-IssuesProfile-Metamodel' -} - -{ #category : #accessing } -IPIssueTag >> base_Element [ - ^ base_Element -] - -{ #category : #accessing } -IPIssueTag >> base_Element: anElement [ - | oldElement | - oldElement := base_Element. - base_Element := anElement. - OPUMLToOneLink - on: self - thisSelector: #base_Element - otherSelector: #extension_IssueTag - updateFrom: oldElement - to: anElement -] - -{ #category : #accessing } -IPIssueTag >> reviewed [ - ^ reviewed ifNil: [ false ] -] - -{ #category : #accessing } -IPIssueTag >> reviewed: aBoolean [ - reviewed := aBoolean -] - -{ #category : #accessing } -IPIssueTag >> umlClassName [ - ^ 'IssueTag' -] - -{ #category : #accessing } -IPIssueTag >> umlMetaClass [ - ^ IPIssuesProfileFactory metaClassFor: self -] +Class { + #name : #IPIssueTag, + #superclass : #OPUMLElement, + #instVars : [ + 'base_Element', + 'reviewed' + ], + #category : 'OP-IssuesProfile-Metamodel' +} + +{ #category : #accessing } +IPIssueTag >> base_Element [ + ^ base_Element +] + +{ #category : #accessing } +IPIssueTag >> base_Element: anElement [ + | oldElement | + oldElement := base_Element. + base_Element := anElement. + OPUMLToOneLink + on: self + thisSelector: #base_Element + otherSelector: #extension_IssueTag + updateFrom: oldElement + to: anElement +] + +{ #category : #accessing } +IPIssueTag >> reviewed [ + ^ reviewed ifNil: [ false ] +] + +{ #category : #accessing } +IPIssueTag >> reviewed: aBoolean [ + reviewed := aBoolean +] + +{ #category : #accessing } +IPIssueTag >> umlClassName [ + ^ 'IssueTag' +] + +{ #category : #accessing } +IPIssueTag >> umlMetaClass [ + ^ IPIssuesProfileFactory metaClassFor: self +] diff --git a/repository/OP-IssuesProfile/IPIssuesProfileFactory.class.st b/repository/OP-IssuesProfile/IPIssuesProfileFactory.class.st index 1cd9cb2..e372a81 100644 --- a/repository/OP-IssuesProfile/IPIssuesProfileFactory.class.st +++ b/repository/OP-IssuesProfile/IPIssuesProfileFactory.class.st @@ -1,108 +1,108 @@ -Class { - #name : #IPIssuesProfileFactory, - #superclass : #OPUmlCustomProfile, - #category : 'OP-IssuesProfile-Model' -} - -{ #category : #actions } -IPIssuesProfileFactory >> classA [ - - | classA | - classA := OPUMLClass new - name: 'A'; - uuid: 'A'. - OPUMLProperty new - name: 'width'; - uuid: classA uuid , '-width'; - owningClass: classA. - OPUMLProperty new - name: 'length'; - uuid: classA uuid , '-reviewed'; - owningClass: classA. - ^ classA -] - -{ #category : #actions } -IPIssuesProfileFactory >> classB [ - - | classB | - classB := OPUMLClass new - name: 'B'; - uuid: 'B'. - OPUMLProperty new - name: 'x'; - uuid: classB uuid , '-x'; - type: (OPUMLPrimitiveType new name: 'String'); - owningClass: classB. - OPUMLProperty new - name: 'y'; - uuid: classB uuid , '-y'; - owningClass: classB. - ^ classB -] - -{ #category : #actions } -IPIssuesProfileFactory >> createProfile [ - | profile elementMetaclass associationMetaclass issueTag importedPackage packageImport | - profile := OPUMLProfile new - name: 'IssuesProfile'; - uuid: '_0'; - URI: 'http://www.example.com/IssuesProfile/0.0'; - implementationPackage: 'IssuesProfile'; - implementationPrefix: 'IP'. - importedPackage := OPUMLXMISpecsStorage umlMetamodel. - packageImport := OPUMLPackageImport new - uuid: '_packageImport.0'; - importedPackage: importedPackage. - profile packageImports add: packageImport. - profile metamodelReferences add: packageImport. - elementMetaclass := self metaClassNamed: 'Element'. - profile packagedElements addAll: (self newStereotype: #IssueTag to: elementMetaclass). - issueTag := profile packagedElements detect: [ :e | e name = #IssueTag ]. - issueTag profile: profile. - OPUMLProperty new - name: 'reviewed'; - uuid: issueTag uuid , '-reviewed'; - owningClass: issueTag; - type: (OPUMLPrimitiveType new name: 'Boolean'); - defaultValue: - (OPUMLLiteralBoolean new - value: false; - uuid: issueTag uuid , '-reviewed-_defaultValue'). - associationMetaclass := OPUMLClass new name: 'Association'. - ^ profile -] - -{ #category : #actions } -IPIssuesProfileFactory >> exampleModel [ - - | model classA classB issueTag profile | - model := OPUmlExamples new emptyModel. - profile := self class profile. - model profileApplications - add: - (OPUMLProfileApplication new - uuid: model uuid , '-_profileApplication.0'; - appliedProfile: profile). - issueTag := profile ownedStereotype detect: [ :each | each name = 'IssueTag' ]. - classA := self classA. - classA applyStereotype: issueTag implementationClass new. - classB := self classB. - classB applyStereotype: issueTag implementationClass new. - model packagedElements - add: classA; - add: classB. - ^ model -] - -{ #category : #actions } -IPIssuesProfileFactory >> openExample [ - - OPUmlProject openOnModel: self exampleModel -] - -{ #category : #actions } -IPIssuesProfileFactory >> openProfile [ - - OPUmlProject openOnModel: self class profile -] +Class { + #name : #IPIssuesProfileFactory, + #superclass : #OPUmlCustomProfile, + #category : #'OP-IssuesProfile-Model' +} + +{ #category : #actions } +IPIssuesProfileFactory >> classA [ + + | classA | + classA := OPUMLClass new + name: 'A'; + uuid: 'A'. + OPUMLProperty new + name: 'width'; + uuid: classA uuid , '-width'; + owningClass: classA. + OPUMLProperty new + name: 'length'; + uuid: classA uuid , '-reviewed'; + owningClass: classA. + ^ classA +] + +{ #category : #actions } +IPIssuesProfileFactory >> classB [ + + | classB | + classB := OPUMLClass new + name: 'B'; + uuid: 'B'. + OPUMLProperty new + name: 'x'; + uuid: classB uuid , '-x'; + type: (OPUMLPrimitiveType new name: 'String'); + owningClass: classB. + OPUMLProperty new + name: 'y'; + uuid: classB uuid , '-y'; + owningClass: classB. + ^ classB +] + +{ #category : #actions } +IPIssuesProfileFactory >> createProfile [ + | profile elementMetaclass associationMetaclass issueTag importedPackage packageImport | + profile := OPUMLProfile new + name: 'IssuesProfile'; + uuid: '_0'; + URI: 'http://www.example.com/IssuesProfile/0.0'; + implementationPackage: 'IssuesProfile'; + implementationPrefix: 'IP'. + importedPackage := OPUMLXMISpecsStorage umlMetamodel. + packageImport := OPUMLPackageImport new + uuid: '_packageImport.0'; + importedPackage: importedPackage. + profile packageImports add: packageImport. + profile metamodelReferences add: packageImport. + elementMetaclass := self metaClassNamed: 'Element'. + profile packagedElements addAll: (self newStereotype: #IssueTag to: elementMetaclass). + issueTag := profile packagedElements detect: [ :e | e name = #IssueTag ]. + issueTag profile: profile. + OPUMLProperty new + name: 'reviewed'; + uuid: issueTag uuid , '-reviewed'; + owningClass: issueTag; + type: (OPUMLPrimitiveType new name: 'Boolean'); + defaultValue: + (OPUMLLiteralBoolean new + value: false; + uuid: issueTag uuid , '-reviewed-_defaultValue'). + associationMetaclass := OPUMLClass new name: 'Association'. + ^ profile +] + +{ #category : #actions } +IPIssuesProfileFactory >> exampleModel [ + + | model classA classB issueTag profile | + model := OPUmlExamples new emptyModel. + profile := self class profile. + model profileApplications + add: + (OPUMLProfileApplication new + uuid: model uuid , '-_profileApplication.0'; + appliedProfile: profile). + issueTag := profile ownedStereotype detect: [ :each | each name = 'IssueTag' ]. + classA := self classA. + classA applyStereotype: issueTag implementationClass new. + classB := self classB. + classB applyStereotype: issueTag implementationClass new. + model packagedElements + add: classA; + add: classB. + ^ model +] + +{ #category : #actions } +IPIssuesProfileFactory >> openExample [ + + OPProject openOnModel: self exampleModel +] + +{ #category : #actions } +IPIssuesProfileFactory >> openProfile [ + + OPProject openOnModel: self class profile +] diff --git a/repository/OP-IssuesProfile/OPUMLElement.extension.st b/repository/OP-IssuesProfile/OPUMLElement.extension.st index 90cc0c5..93a8f2e 100644 --- a/repository/OP-IssuesProfile/OPUMLElement.extension.st +++ b/repository/OP-IssuesProfile/OPUMLElement.extension.st @@ -1,19 +1,19 @@ -Extension { #name : #OPUMLElement } - -{ #category : #'*OP-IssuesProfile' } -OPUMLElement >> extension_IssueTag [ - ^ self tagAt: #extension_IssueTag ifAbsent: [ nil ] -] - -{ #category : #'*OP-IssuesProfile' } -OPUMLElement >> extension_IssueTag: anIssueTag [ - | oldIssueTag | - oldIssueTag := self extension_IssueTag. - self tagAt: #extension_IssueTag put: anIssueTag. - OPUMLToOneLink - on: self - thisSelector: #extension_IssueTag - otherSelector: #base_Element - updateFrom: oldIssueTag - to: anIssueTag -] +Extension { #name : #OPUMLElement } + +{ #category : #'*OP-IssuesProfile' } +OPUMLElement >> extension_IssueTag [ + ^ self tagAt: #extension_IssueTag ifAbsent: [ nil ] +] + +{ #category : #'*OP-IssuesProfile' } +OPUMLElement >> extension_IssueTag: anIssueTag [ + | oldIssueTag | + oldIssueTag := self extension_IssueTag. + self tagAt: #extension_IssueTag put: anIssueTag. + OPUMLToOneLink + on: self + thisSelector: #extension_IssueTag + otherSelector: #base_Element + updateFrom: oldIssueTag + to: anIssueTag +] diff --git a/repository/OP-IssuesProfile/package.st b/repository/OP-IssuesProfile/package.st index e841140..1673a49 100644 --- a/repository/OP-IssuesProfile/package.st +++ b/repository/OP-IssuesProfile/package.st @@ -1 +1 @@ -Package { #name : #'OP-IssuesProfile' } +Package { #name : #'OP-IssuesProfile' }