Skip to content

Commit

Permalink
multiple multi-diagram project fixes, shapes naming unification
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Dec 4, 2024
1 parent 496ea4a commit 459cd61
Show file tree
Hide file tree
Showing 68 changed files with 326 additions and 274 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPAbstractUmlCompartmentableShapeTest',
#superclass : 'OPAbstractUmlShapeTest',
#category : 'OpenPonk-ClassEditor-Tests - Shapes',
#category : 'OpenPonk-ClassEditor-Tests - DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Tests - Shapes'
#tag : 'Tests - DiagramElements'
}

{ #category : 'hooks' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPAbstractUmlEdgeTest',
#superclass : 'OPAbstractEdgeTest',
#category : 'OpenPonk-ClassEditor-Tests - Shapes',
#category : 'OpenPonk-ClassEditor-Tests - DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Tests - Shapes'
#tag : 'Tests - DiagramElements'
}

{ #category : 'running' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPAbstractUmlShapeTest',
#superclass : 'OPAbstractNodeTest',
#category : 'OpenPonk-ClassEditor-Tests - Shapes',
#category : 'OpenPonk-ClassEditor-Tests - DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Tests - Shapes'
#tag : 'Tests - DiagramElements'
}

{ #category : 'tests' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OPDiagramElement >> showAssociationEndLabels [
^ self
stylePropertyNamed: self showAssociationEndLabelsKey
ifAbsent: [
OPUmlDiagramEndLabelsFigureCommand defaultResultingShowState ]
OPUmlEndLabelsRoassalShapeCommand defaultResultingShowState ]
]

{ #category : '*OpenPonk-ClassEditor' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPRSCairoMetricsProvider',
#superclass : 'RSCairoMetricsProvider',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'hooks' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Trait {
#name : 'OPTUmlAutoAccomodatingShape',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'rendering' }
Expand Down
7 changes: 5 additions & 2 deletions repository/OpenPonk-ClassEditor/OPTUmlBaseController.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ OPTUmlBaseController >> validationFailedPropertyWithoutOwner: aProperty [
s << 'Property "' << aProperty name asString << '" with type '
<< aProperty type asString << ' has no owner' ]).

"Attempt to create an ownership"
aProperty type ifNotNil: [ aProperty owningClass: aProperty type ]
"Attempt to create an ownership if possible"
aProperty type ifNil: [ ^ self ].
(self diagramController allModelElementsWithPossibleController includes: aProperty type)
ifFalse: [ ^ self ].
aProperty owningClass: aProperty type
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Trait {
#instVars : [
'hiddenPackages'
],
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ OPTUmlStereotypedElementController >> removeStereotypesIn: aModel [
whileTrue: [ aModel unapplyStereotype: aModel appliedStereotypes first ]
]

{ #category : 'accessing' }
{ #category : 'forms' }
OPTUmlStereotypedElementController >> stereotypeMagritteDescription [
| descriptions |
descriptions := OPUmlStereotypeDescriptions new controller: self.
^ descriptions descriptions
]

{ #category : 'as yet unclassified' }
{ #category : 'enumerating' }
OPTUmlStereotypedElementController >> stereotypesIn: aProfile for: aModel [

^ (aProfile ownedStereotype reject: #isAbstract) select: [ :stereo |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPUmlAppliedStereotypesLabel',
#superclass : 'OPUmlStereotypesLabel',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Class {
#instVars : [
'atSource'
],
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'ston-core' }
Expand Down Expand Up @@ -42,11 +42,11 @@ OPUmlAssociationEndLabel >> defaultText [

| type typeName defaultText |
self showAssociationEndLabels
= OPUmlDiagramHideEndLabelsFigureCommand styleState ifTrue: [
= OPUmlHideEndLabelsRoassalShapeCommand styleState ifTrue: [
^ '' ].
defaultText := self modelElement notationStringAsRoleName.
self showAssociationEndLabels
= OPUmlDiagramShowEndLabelsFigureCommand styleState ifTrue: [
= OPUmlShowEndLabelsRoassalShapeCommand styleState ifTrue: [
^ defaultText ].
type := self modelElement type.
type ifNil: [ ^ defaultText ].
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPUmlAssociationLabel',
#superclass : 'OPUmlEdgeLabel',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'as yet unclassified' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPUmlAssociationPropertiesLabel',
#superclass : 'OPUmlEdgeLabel',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'as yet unclassified' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ I am a shape composition to accomodate for the most common UML Association shape
Class {
#name : 'OPUmlAssociationShape',
#superclass : 'OPUmlEdge',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'initialization' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Class {
'ownedComment',
'owningElement'
],
#category : 'OpenPonk-ClassEditor-Tests - Shapes',
#category : 'OpenPonk-ClassEditor-Tests - DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Tests - Shapes'
#tag : 'Tests - DiagramElements'
}

{ #category : 'instance creation' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPUmlAssociationStereotypesLabel',
#superclass : 'OPUmlEdgeLabel',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'as yet unclassified' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ OPUmlAttributeController >> registerModelInContainer: aClass [
aClass ownedAttributes add: self model
]

{ #category : 'removing' }
{ #category : 'destruction' }
OPUmlAttributeController >> removeDiagramElement [

self diagramElement ifNotExists: [ ^ self ].
self ownerDiagramElement ifExists: [ :owner |
self diagramElementOwnerWithPossibleController ifExists: [ :owner |
owner removeAttribute: self diagramElement ].
self diagramElement: nil
]
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-ClassEditor/OPUmlAttributeLabel.class.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : 'OPUmlAttributeLabel',
#superclass : 'OPUmlClassItemLabel',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}
4 changes: 2 additions & 2 deletions repository/OpenPonk-ClassEditor/OPUmlClassItemLabel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Class {
#superclass : 'OPUmlClassifierItemLabel',
#traits : 'OPTColoredAsFont',
#classTraits : 'OPTColoredAsFont classTrait',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPUmlClassItemListCompartment',
#superclass : 'OPUmlListCompartment',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'sorting' }
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-ClassEditor/OPUmlClassShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Class {
'attributes',
'operations'
],
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'ston-core' }
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-ClassEditor/OPUmlClassShapeTest.class.st
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPUmlClassShapeTest',
#superclass : 'OPAbstractUmlCompartmentableShapeTest',
#category : 'OpenPonk-ClassEditor-Tests - Shapes',
#category : 'OpenPonk-ClassEditor-Tests - DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Tests - Shapes'
#tag : 'Tests - DiagramElements'
}

{ #category : 'instance creation' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPUmlClassifierItemLabel',
#superclass : 'OPUmlNameLabel',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'as yet unclassified' }
Expand All @@ -14,6 +14,12 @@ OPUmlClassifierItemLabel >> addedByMouseClickTo: aPoint [

]

{ #category : 'accessing' }
OPUmlClassifierItemLabel >> canHaveController [

^ true
]

{ #category : 'as yet unclassified' }
OPUmlClassifierItemLabel >> isPositionableByUser [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Class {
#instVars : [
'labeled'
],
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'removing' }
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-ClassEditor/OPUmlClassifierShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Class {
'commentIcon',
'adornmentCreationBlock'
],
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'ston-core' }
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-ClassEditor/OPUmlCommentIcon.class.st
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPUmlCommentIcon',
#superclass : 'OPUmlCompartmentableContent',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'rendering' }
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-ClassEditor/OPUmlCompartment.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Class {
#superclass : 'OPUmlCompartmentableContent',
#traits : 'OPTUmlAutoAccomodatingShape',
#classTraits : 'OPTUmlAutoAccomodatingShape classTrait',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'rendering' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
Class {
#name : 'OPUmlCompartmentableContent',
#superclass : 'OPNode',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'accessing' }
OPUmlCompartmentableContent >> canHaveController [

^ false
]

{ #category : 'rendering' }
OPUmlCompartmentableContent >> layoutOwnedElements [

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'OPUmlCompartmentableLabel',
#superclass : 'OPUmlCompartmentableContent',
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Class {
#instVars : [
'separators'
],
#category : 'OpenPonk-ClassEditor-Shapes',
#category : 'OpenPonk-ClassEditor-DiagramElements',
#package : 'OpenPonk-ClassEditor',
#tag : 'Shapes'
#tag : 'DiagramElements'
}

{ #category : 'accessing' }
Expand Down
Loading

0 comments on commit 459cd61

Please sign in to comment.