Skip to content

Commit

Permalink
Updates for Pharo 12
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed May 7, 2024
1 parent 6f4d36a commit 5c626ad
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
10 changes: 5 additions & 5 deletions repository/OP-UML-Profiles/OPUMLProfile.extension.st
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Extension { #name : #OPUMLProfile }
Extension { #name : 'OPUMLProfile' }

{ #category : #'*OP-UML-Profiles' }
{ #category : '*OP-UML-Profiles' }
OPUMLProfile >> implementationPackage [
^ self tagAt: #implementationPackage ifAbsent: [ 'Unclassified' ]
]

{ #category : #'*OP-UML-Profiles' }
{ #category : '*OP-UML-Profiles' }
OPUMLProfile >> implementationPackage: aName [
self tagAt: #implementationPackage put: aName
]

{ #category : #'*OP-UML-Profiles' }
{ #category : '*OP-UML-Profiles' }
OPUMLProfile >> implementationPrefix [
^ self tagAt: #implementationPrefix ifAbsent: [ 'XYZ' ]
]

{ #category : #'*OP-UML-Profiles' }
{ #category : '*OP-UML-Profiles' }
OPUMLProfile >> implementationPrefix: aName [
^ self tagAt: #implementationPrefix put: aName
]
9 changes: 5 additions & 4 deletions repository/OP-UML-Profiles/OPUMLStereotype.extension.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Extension { #name : #OPUMLStereotype }
Extension { #name : 'OPUMLStereotype' }

{ #category : #'*OP-UML-Profiles' }
{ #category : '*OP-UML-Profiles' }
OPUMLStereotype >> implementationClass [
^ self implementationClassName asClass

^ Smalltalk at: self implementationClassName
]

{ #category : #'*OP-UML-Profiles' }
{ #category : '*OP-UML-Profiles' }
OPUMLStereotype >> implementationClassName [
^ self tags
at: #implementationClassName
Expand Down
23 changes: 12 additions & 11 deletions repository/OP-UML-Profiles/OPUmlCustomProfile.class.st
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
Class {
#name : #OPUmlCustomProfile,
#superclass : #Object,
#name : 'OPUmlCustomProfile',
#superclass : 'Object',
#instVars : [
'metaClasses'
],
#classInstVars : [
'profile',
'metaClassMap'
],
#category : 'OP-UML-Profiles'
#category : 'OP-UML-Profiles',
#package : 'OP-UML-Profiles'
}

{ #category : #accessing }
{ #category : 'accessing' }
OPUmlCustomProfile class >> metaClassFor: anElement [
"
metaClassMap := nil
Expand All @@ -23,41 +24,41 @@ OPUmlCustomProfile class >> metaClassFor: anElement [
^ metaClassMap at: anElement umlClassName
]

{ #category : #accessing }
{ #category : 'accessing' }
OPUmlCustomProfile class >> profile [
<script: 'self profile inspect'>
^ profile ifNil: [ profile := self new createProfile ]
]

{ #category : #accessing }
{ #category : 'accessing' }
OPUmlCustomProfile class >> reset [
<script>
profile := nil.
metaClassMap := nil
]

{ #category : #actions }
{ #category : 'actions' }
OPUmlCustomProfile >> createProfile [
^ self subclassResponsibility
]

{ #category : #actions }
{ #category : 'actions' }
OPUmlCustomProfile >> initialize [
super initialize.
metaClasses := Dictionary new
]

{ #category : #actions }
{ #category : 'actions' }
OPUmlCustomProfile >> metaClassNamed: aClassName [
^ OPUMLXMISpecsStorage metaClassNamed: aClassName
]

{ #category : #'instance creation' }
{ #category : 'instance creation' }
OPUmlCustomProfile >> newStereotype: aName to: aBaseClass [
^ self newStereotype: aName to: aBaseClass optional: true
]

{ #category : #'instance creation' }
{ #category : 'instance creation' }
OPUmlCustomProfile >> newStereotype: aName to: aBaseClass optional: isOptional [
| stereotype baseName extension baseProperty extensionProperty |
baseName := aBaseClass name.
Expand Down
2 changes: 1 addition & 1 deletion repository/OP-UML-Profiles/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'OP-UML-Profiles' }
Package { #name : 'OP-UML-Profiles' }

0 comments on commit 5c626ad

Please sign in to comment.