Skip to content

Commit

Permalink
Moved to Tonel 3
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Jun 18, 2024
1 parent ce1bfd9 commit ca49045
Show file tree
Hide file tree
Showing 30 changed files with 285 additions and 243 deletions.
4 changes: 2 additions & 2 deletions repository/OP-XMI-GTExtensions/OPXMIElement.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #OPXMIElement }
Extension { #name : 'OPXMIElement' }

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIElement >> writeXMLOn: aWriter [
aWriter tag: self xmiName
]
8 changes: 4 additions & 4 deletions repository/OP-XMI-GTExtensions/OPXMIInfoItems.extension.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Extension { #name : #OPXMIInfoItems }
Extension { #name : 'OPXMIInfoItems' }

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIInfoItems >> treeViewLabelText [
^ self asHighlightedTextWrittenWith: [ :writer | self writeTreeViewLabelXMLOn: writer ]
]

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIInfoItems >> writeTreeViewLabelXMLOn: aWriter [
self writeXMLOn: aWriter
]

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIInfoItems >> writeXMLOn: aWriter [
]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #OPXMIObjectElement }
Extension { #name : 'OPXMIObjectElement' }

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIObjectElement >> inspectionProperties [

"<inspectorPresentationOrder: 5 title: 'Tree'>"
Expand All @@ -17,7 +17,7 @@ OPXMIObjectElement >> inspectionProperties [
yourself
]

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIObjectElement >> writeXMLOn: aWriter [
aWriter
tag: self xmiName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #OPXMIReferenceAttribute }
Extension { #name : 'OPXMIReferenceAttribute' }

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIReferenceAttribute >> writeXMLOn: aWriter [
aWriter
tag: self xmiName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #OPXMIReferenceElement }
Extension { #name : 'OPXMIReferenceElement' }

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIReferenceElement >> writeXMLOn: aWriter [
href
ifNil: [ aWriter tag: self xmiName ]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #OPXMIValueAttribute }
Extension { #name : 'OPXMIValueAttribute' }

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIValueAttribute >> writeXMLOn: aWriter [
aWriter tag: self xmiName with: self value
]
4 changes: 2 additions & 2 deletions repository/OP-XMI-GTExtensions/OPXMIValueElement.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #OPXMIValueElement }
Extension { #name : 'OPXMIValueElement' }

{ #category : #'*OP-XMI-GTExtensions' }
{ #category : '*OP-XMI-GTExtensions' }
OPXMIValueElement >> writeXMLOn: aWriter [
aWriter tag: self xmiName with: self value
]
2 changes: 1 addition & 1 deletion repository/OP-XMI-GTExtensions/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'OP-XMI-GTExtensions' }
Package { #name : 'OP-XMI-GTExtensions' }
16 changes: 9 additions & 7 deletions repository/OP-XMI/OPXMIAttribute.class.st
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
Class {
#name : #OPXMIAttribute,
#superclass : #OPXMIInfoItems,
#name : 'OPXMIAttribute',
#superclass : 'OPXMIInfoItems',
#instVars : [
'xmiName'
],
#category : 'OP-XMI-DOM'
#category : 'OP-XMI-DOM',
#package : 'OP-XMI',
#tag : 'DOM'
}

{ #category : #testing }
{ #category : 'testing' }
OPXMIAttribute class >> isAbstract [
^ self = OPXMIAttribute
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIAttribute >> isAttribute [
^ true
]

{ #category : #accessing }
{ #category : 'accessing' }
OPXMIAttribute >> xmiName [
^ xmiName
]

{ #category : #accessing }
{ #category : 'accessing' }
OPXMIAttribute >> xmiName: aString [
xmiName := aString
]
16 changes: 9 additions & 7 deletions repository/OP-XMI/OPXMIElement.class.st
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
Class {
#name : #OPXMIElement,
#superclass : #OPXMIInfoItems,
#name : 'OPXMIElement',
#superclass : 'OPXMIInfoItems',
#instVars : [
'xmiName'
],
#category : 'OP-XMI-DOM'
#category : 'OP-XMI-DOM',
#package : 'OP-XMI',
#tag : 'DOM'
}

{ #category : #testing }
{ #category : 'testing' }
OPXMIElement class >> isAbstract [
^ self = OPXMIElement
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIElement >> isElement [
^ true
]

{ #category : #accessing }
{ #category : 'accessing' }
OPXMIElement >> xmiName [
^ xmiName
]

{ #category : #accessing }
{ #category : 'accessing' }
OPXMIElement >> xmiName: aString [
xmiName := aString
]
28 changes: 15 additions & 13 deletions repository/OP-XMI/OPXMIInfoItems.class.st
Original file line number Diff line number Diff line change
@@ -1,55 +1,57 @@
Class {
#name : #OPXMIInfoItems,
#superclass : #Object,
#category : 'OP-XMI-DOM'
#name : 'OPXMIInfoItems',
#superclass : 'Object',
#category : 'OP-XMI-DOM',
#package : 'OP-XMI',
#tag : 'DOM'
}

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems class >> isAbstract [
^ self = OPXMIInfoItems
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems >> isAttribute [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems >> isElement [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems >> isObjectElement [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems >> isReferenceAttribute [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems >> isReferenceElement [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems >> isReferenceItem [
^ self isReferenceAttribute | self isReferenceElement
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems >> isValueAttribute [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems >> isValueElement [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIInfoItems >> isValueItem [
^ self isValueAttribute | self isValueElement
]
32 changes: 17 additions & 15 deletions repository/OP-XMI/OPXMIObjectElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,37 @@
XMIObjectElement is an XML element that can contain other information items (XML elements and attributes).
"
Class {
#name : #OPXMIObjectElement,
#superclass : #OPXMIElement,
#name : 'OPXMIObjectElement',
#superclass : 'OPXMIElement',
#instVars : [
'containedItems'
],
#category : 'OP-XMI-DOM'
#category : 'OP-XMI-DOM',
#package : 'OP-XMI',
#tag : 'DOM'
}

{ #category : #visiting }
{ #category : 'visiting' }
OPXMIObjectElement >> accept: aVisitor [
aVisitor visitObjectElement: self
]

{ #category : #accessing }
{ #category : 'accessing' }
OPXMIObjectElement >> containedItem [
^ containedItems ifEmpty: [ ^ nil ] ifNotEmpty: #first
]

{ #category : #accessing }
{ #category : 'accessing' }
OPXMIObjectElement >> containedItems [
^ containedItems
]

{ #category : #accessing }
{ #category : 'accessing' }
OPXMIObjectElement >> containedItems: aCollection [
containedItems := aCollection
]

{ #category : #accessing }
{ #category : 'accessing' }
OPXMIObjectElement >> elementNamed: aName [
"return the first element with the given name"

Expand All @@ -40,7 +42,7 @@ OPXMIObjectElement >> elementNamed: aName [
ifNone: [ nil ]
]

{ #category : #searching }
{ #category : 'searching' }
OPXMIObjectElement >> findElementWithXmiId: aXmiId [
self xmiId = aXmiId
ifTrue: [ ^ self ].
Expand All @@ -50,25 +52,25 @@ OPXMIObjectElement >> findElementWithXmiId: aXmiId [
^ nil
]

{ #category : #initialization }
{ #category : 'initialization' }
OPXMIObjectElement >> initialize [
super initialize.
containedItems := OrderedCollection new
]

{ #category : #testing }
{ #category : 'testing' }
OPXMIObjectElement >> isObjectElement [
^ true
]

{ #category : #'accessing - shortcuts' }
{ #category : 'accessing - shortcuts' }
OPXMIObjectElement >> nameValue [
"Retrieve the value of <name> child element. Throw up if none is present."

^ (self containedItems detect: [ :each | each xmiName = #name ]) value
]

{ #category : #printing }
{ #category : 'printing' }
OPXMIObjectElement >> printOn: aStream [
aStream
<< 'XMIObjectElement(';
Expand All @@ -88,15 +90,15 @@ OPXMIObjectElement >> printOn: aStream [
aStream << ')'
]

{ #category : #'accessing - shortcuts' }
{ #category : 'accessing - shortcuts' }
OPXMIObjectElement >> xmiId [
^ self containedItems
detect: [ :each | each xmiName = #xmi:id ]
ifFound: [ :each | each value ]
ifNone: [ nil ]
]

{ #category : #'accessing - shortcuts' }
{ #category : 'accessing - shortcuts' }
OPXMIObjectElement >> xmiType [
^ self containedItems
detect: [ :each | each xmiName = #xmi:type ]
Expand Down
Loading

0 comments on commit ca49045

Please sign in to comment.