Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update .smalltalk.ston #182

Merged
merged 28 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1d4492c
Add announcer + fix some tests
Nyan11 Jun 16, 2024
b19e281
Update the event system for project model
Nyan11 Jun 16, 2024
f7b9b9e
fix bug
Nyan11 Jun 16, 2024
d48cc5c
Clean up bug on Playground
Nyan11 Jun 18, 2024
1947f73
TU for new announcer
Nyan11 Jun 18, 2024
5034972
fix baseline
Nyan11 Jun 18, 2024
0edc0b6
Fix the elevation bug
Nyan11 Jun 18, 2024
4e6ac0f
Change allElement method to Bloc package
Nyan11 Jun 18, 2024
8b4e29d
editWithPyramid in the correct package
Nyan11 Jun 18, 2024
acce307
Remove traits that is not needed
Nyan11 Jun 18, 2024
01c6949
missing test object
Nyan11 Jun 18, 2024
faf64c2
Update .smalltalk.ston
Nyan11 Jun 18, 2024
2251a88
Small fixes
Nyan11 Jun 18, 2024
288786c
Merge 01c6949bd1c58ed931f9410d937027681d27c481
Nyan11 Jun 18, 2024
f2882e0
fix broken tests
Nyan11 Jun 18, 2024
4d731be
Delete src/Pyramid/AnObsoletePyramidSpCodeObjectInteractionModel.clas…
Nyan11 Jun 18, 2024
d8e7b2b
Delete src/Pyramid/AnObsoletePyramidProjectModelObserverForTest.class.st
Nyan11 Jun 18, 2024
1311690
fix tags for Obsolete Class in Pharo 11
Nyan11 Jun 18, 2024
7d5c577
fix not passing tests
Nyan11 Jun 18, 2024
6c353d0
try a UUID for teststing
Nyan11 Jun 18, 2024
f85cbaa
change in the package verifier
Nyan11 Jun 18, 2024
1e15fa1
modify the test method to not test the obsolete classes
Nyan11 Jun 18, 2024
e830d99
o secour
Nyan11 Jun 18, 2024
c501961
skip it
Nyan11 Jun 18, 2024
744448d
initialize the plugins before testing them
Nyan11 Jun 18, 2024
c8c3bbe
fix another test where we need to reset the plugin before
Nyan11 Jun 18, 2024
8a60e00
Another test where we need to update the plugin for the CI
Nyan11 Jun 18, 2024
c29f428
update #when:send:to: with #when:do:for:
Nyan11 Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .smalltalk.ston
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nyan11 is there a file format change? Does it works on Pharo 11?

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SmalltalkCISpec {
}
],
#testing : {
#packages : [ 'Pyramid.*' ],
#categories : [ 'Pyramid*' ],
#packages : [ 'Bloc-Serialization.*' ]
}
}
32 changes: 17 additions & 15 deletions src/BaselineOfPyramid/BaselineOfPyramid.class.st
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
Class {
#name : #BaselineOfPyramid,
#superclass : #BaselineOf,
#category : #BaselineOfPyramid
#name : 'BaselineOfPyramid',
#superclass : 'BaselineOf',
#category : 'BaselineOfPyramid',
#package : 'BaselineOfPyramid'
}

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfPyramid >> baseline: spec [

<baseline>
"Common baseline for all Pharo versions"
spec for: #common do: [ self baselineForCommon: spec ]
]

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfPyramid >> baselineForCommon: spec [

<baseline>
Expand All @@ -34,7 +35,7 @@ BaselineOfPyramid >> baselineForCommon: spec [
spec group: 'ToploUI' with: self toploPackagesNames "only Bloc and Toplo"
]

{ #category : #dependencies }
{ #category : 'dependencies' }
BaselineOfPyramid >> blocDependencies: spec [

spec
Expand All @@ -46,7 +47,7 @@ BaselineOfPyramid >> blocDependencies: spec [
spec repository: 'github://OpenSmock/Bloc-Serialization:main/src' ]
]

{ #category : #packages }
{ #category : 'packages' }
BaselineOfPyramid >> blocPackages: spec [

spec
Expand All @@ -60,24 +61,24 @@ BaselineOfPyramid >> blocPackages: spec [
with: [ spec requires: #( 'Pyramid-Bloc' ) ]
]

{ #category : #packages }
{ #category : 'packages' }
BaselineOfPyramid >> blocPackagesNames [

^ #( 'Pyramid' 'Pyramid-Bloc' 'Pyramid-Tests' 'Pyramid-IDE' 'Pyramid-Examples' )
]

{ #category : #actions }
{ #category : 'actions' }
BaselineOfPyramid >> postload: loader package: packageSpec [

PyramidPluginManager reset
]

{ #category : #actions }
{ #category : 'actions' }
BaselineOfPyramid >> preload: loader package: packageSpec [

]

{ #category : #packages }
{ #category : 'packages' }
BaselineOfPyramid >> pyramidPackages: spec [

spec package: 'Pyramid'.
Expand All @@ -87,18 +88,19 @@ BaselineOfPyramid >> pyramidPackages: spec [

]

{ #category : #dependencies }
{ #category : 'dependencies' }
BaselineOfPyramid >> toploDependencies: spec [

spec
baseline: 'Toplo'
with: [ spec repository: 'github://pharo-graphics/Toplo:master/src' ].
spec
baseline: 'ToploSerialization'
with: [ spec repository: 'github://OpenSmock/Toplo-Serialization:main/src' ]
with: [
spec repository: 'github://OpenSmock/Toplo-Serialization:main/src' ]
]

{ #category : #packages }
{ #category : 'packages' }
BaselineOfPyramid >> toploPackages: spec [

spec
Expand All @@ -112,7 +114,7 @@ BaselineOfPyramid >> toploPackages: spec [
with: [ spec requires: #( 'Pyramid-Toplo' ) ]
]

{ #category : #packages }
{ #category : 'packages' }
BaselineOfPyramid >> toploPackagesNames [

| packages |
Expand Down
2 changes: 1 addition & 1 deletion src/BaselineOfPyramid/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfPyramid }
Package { #name : 'BaselineOfPyramid' }
19 changes: 19 additions & 0 deletions src/Pyramid-Bloc/BlElement.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,22 @@ BlElement >> asIcon [

^ self layout asIcon
]

{ #category : '*Pyramid-Bloc' }
BlElement >> editWithPyramid [

| editor oldParent |
editor := PyramidEditor buildEditor.

self flag:
labordep marked this conversation as resolved.
Show resolved Hide resolved
'labordep: the code below is too complicated, we need to have a more simple API to edit a BlElement, for example editElement:'.
oldParent := self parent.
self hasParent ifTrue: [ oldParent removeChild: self ].

editor projectModel firstLevelElements add: self.
editor window whenClosedDo: [
oldParent ifNotNil: [ oldParent addChild: self ] ].

editor window open.
^ editor
]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : 'BlSpace' }

{ #category : '*Pyramid' }
{ #category : '*Pyramid-Bloc' }
BlSpace >> editWithPyramid [

| editor elements spacePlaceholder openFromSpacePlugin |
Expand Down
6 changes: 4 additions & 2 deletions src/Pyramid-Bloc/PyramidBackgroundOpacityCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ PyramidBackgroundOpacityCommand >> getValueFor: aBlElement [
{ #category : 'as yet unclassified' }
PyramidBackgroundOpacityCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background: aBlElement background paint asBlBackground.
aBlElement background opacity: anArgument
| background |
background := aBlElement background paint asBlBackground.
background opacity: anArgument.
aBlElement background: background
]
5 changes: 4 additions & 1 deletion src/Pyramid-Bloc/PyramidBlocPlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,16 @@ PyramidBlocPlugin >> addPanelsOn: aPyramidSimpleWindow [
{ #category : 'connecting' }
PyramidBlocPlugin >> connectOn: aPyramidEditor [

"Configure the sort function."
aPyramidEditor projectModel firstLevelElements sortFunction: PyramidElevationSortFunction new.

self editor: aPyramidEditor.
aPyramidEditor propertiesManager addProperty: self class elementId.
aPyramidEditor propertiesManager addProperty: self class visibility.
aPyramidEditor propertiesManager addProperty: self class zIndex.
aPyramidEditor propertiesManager addProperty: self class clipChildren.
aPyramidEditor propertiesManager addProperty: self class geometry.
aPyramidEditor propertiesManager addProperty: self class cornerRadii.
aPyramidEditor propertiesManager addProperty: self class cornerRadii
]

{ #category : 'accessing' }
Expand Down
21 changes: 8 additions & 13 deletions src/Pyramid-Bloc/PyramidMainExtension.class.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'PyramidMainExtension',
#superclass : 'Object',
#traits : 'TPyramidSpaceExtension + TPyramidEditorExtension + TPyramidProjectModelObserver + TPyramidEditorTransformationObserver',
#classTraits : 'TPyramidSpaceExtension classTrait + TPyramidEditorExtension classTrait + TPyramidProjectModelObserver classTrait + TPyramidEditorTransformationObserver classTrait',
#traits : 'TPyramidSpaceExtension + TPyramidEditorExtension + TPyramidEditorTransformationObserver',
#classTraits : 'TPyramidSpaceExtension classTrait + TPyramidEditorExtension classTrait + TPyramidEditorTransformationObserver classTrait',
#instVars : [
'containerElement',
'projectModel',
'borderElement',
'sizeElement',
'extentButton',
Expand Down Expand Up @@ -143,24 +142,20 @@ PyramidMainExtension >> offsetTranslation [
^ 50 @ 50
]

{ #category : 'accessing' }
PyramidMainExtension >> projectModel [

^ projectModel
]

{ #category : 'accessing' }
PyramidMainExtension >> projectModel: aProjectModel [

projectModel:= aProjectModel.
aProjectModel addObserver: self.
aProjectModel announcer
when: PyramidFirstLevelElementsChangedEvent
send: #pyramidFirstLevelElementsChanged:
labordep marked this conversation as resolved.
Show resolved Hide resolved
to: self
]

{ #category : 'as yet unclassified' }
PyramidMainExtension >> pyramidFirstLevelElementsChanged [
PyramidMainExtension >> pyramidFirstLevelElementsChanged: anEvent [

self containerElement removeChildren.
(self projectModel firstLevelElements asArray sorted:
(anEvent firstLevelElements asArray sorted:
PyramidElevationSortFunction new) do: [ :each |
each parent ifNotNil: [ :p | p removeChild: each ].
self containerElement addChild: each ]
Expand Down
8 changes: 8 additions & 0 deletions src/Pyramid-Bloc/PyramidProjectModel.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : 'PyramidProjectModel' }

{ #category : '*Pyramid-Bloc' }
PyramidProjectModel >> allElements [

^ PyramidElementsManipulationHelper flattenChildrenOfCollection:
self firstLevelElements
]
13 changes: 6 additions & 7 deletions src/Pyramid-Bloc/PyramidSaveModelVerifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PyramidSaveModelVerifier class >> classPackageIsEqual [

^ self new
verifyBlock: [ :model |
self class environment
Smalltalk globals
at: model savingClassName asSymbol
ifPresent: [ :class | "
Model = class package >> OK
Expand All @@ -35,12 +35,11 @@ PyramidSaveModelVerifier class >> classPackageIsEqual [
class package name = model savingPackageName
ifTrue: [ true ]
ifFalse: [
class package tags
detect: [ :tag | tag includesClass: class ]
ifFound: [ :tag |
class package name , '-' , tag name
= model savingPackageName ]
ifNone: [ false ] ] ]
(model savingPackageName endsWith: class packageTag name)
ifFalse: [ false ]
ifTrue: [
model savingPackageName = (class package name , '-'
, class packageTag name) ] ] ]
ifAbsent: [ true ] ];
showBlock: [ :view | view showClassPackageIsNotEqualError ];
yourself
Expand Down
3 changes: 2 additions & 1 deletion src/Pyramid-Bloc/PyramidSavePlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ PyramidSavePlugin >> connectOn: aPyramidEditor [

self projectModel: aPyramidEditor projectModel.
self saveModel projectModel: aPyramidEditor projectModel.
aPyramidEditor projectModel addObserver: self inputsController
self inputsController projectModel: aPyramidEditor projectModel.

]

{ #category : 'initialization' }
Expand Down
28 changes: 16 additions & 12 deletions src/Pyramid-Bloc/PyramidSaveProjectConfigurationController.class.st
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Class {
#name : 'PyramidSaveProjectConfigurationController',
#superclass : 'Object',
#traits : 'TPyramidProjectModelObserver',
#classTraits : 'TPyramidProjectModelObserver classTrait',
#instVars : [
'view',
'saveModel',
Expand Down Expand Up @@ -55,17 +53,16 @@ PyramidSaveProjectConfigurationController >> isSaved [
]

{ #category : 'as yet unclassified' }
PyramidSaveProjectConfigurationController >> pyramidElementsChanged [
PyramidSaveProjectConfigurationController >> projectModel: aProjectModel [

self saveModel isSaved: false.
self updateWindowTitle
]

{ #category : 'as yet unclassified' }
PyramidSaveProjectConfigurationController >> pyramidFirstLevelElementsChanged [

self saveModel isSaved: false.
self updateWindowTitle
aProjectModel announcer
when: PyramidElementsChangedEvent
send: #updateSaveState:
to: self.
aProjectModel announcer
when: PyramidFirstLevelElementsChangedEvent
send: #updateSaveState:
to: self
]

{ #category : 'as yet unclassified' }
Expand Down Expand Up @@ -116,6 +113,13 @@ PyramidSaveProjectConfigurationController >> textUpdatedFromPackage: aString [
self updateView
]

{ #category : 'as yet unclassified' }
PyramidSaveProjectConfigurationController >> updateSaveState: anEvent [

self saveModel isSaved: false.
self updateWindowTitle
]

{ #category : 'as yet unclassified' }
PyramidSaveProjectConfigurationController >> updateView [

Expand Down
20 changes: 7 additions & 13 deletions src/Pyramid-Bloc/PyramidSelectionWidgetExtension.class.st
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Class {
#name : 'PyramidSelectionWidgetExtension',
#superclass : 'Object',
#traits : 'TPyramidSpaceExtension + TPyramidEditorExtension + TPyramidProjectModelObserver + TPyramidEditorTransformationObserver',
#classTraits : 'TPyramidSpaceExtension classTrait + TPyramidEditorExtension classTrait + TPyramidProjectModelObserver classTrait + TPyramidEditorTransformationObserver classTrait',
#traits : 'TPyramidSpaceExtension + TPyramidEditorExtension + TPyramidEditorTransformationObserver',
#classTraits : 'TPyramidSpaceExtension classTrait + TPyramidEditorExtension classTrait + TPyramidEditorTransformationObserver classTrait',
#instVars : [
'projectModel',
'widgetElement',
Expand Down Expand Up @@ -193,14 +193,15 @@ PyramidSelectionWidgetExtension >> projectModel [
PyramidSelectionWidgetExtension >> projectModel: aProjectModel [

projectModel := aProjectModel.
projectModel addObserver: self.
self makeNewSelection.
projectModel announcer when: PyramidSelectionChangedEvent send: #pyramidSelectionChanged: to: self.
self makeNewSelection
]

{ #category : 'events' }
PyramidSelectionWidgetExtension >> pyramidSelectionChanged [
PyramidSelectionWidgetExtension >> pyramidSelectionChanged: anEvent [

self updateSelection
self removeSelection.
self makeNewSelection
]

{ #category : 'selection element' }
Expand All @@ -225,13 +226,6 @@ PyramidSelectionWidgetExtension >> removeSelection [
self widgetElement removeChildren.
]

{ #category : 'selection' }
PyramidSelectionWidgetExtension >> updateSelection [

self removeSelection.
self makeNewSelection
]

{ #category : 'as yet unclassified' }
PyramidSelectionWidgetExtension >> usePositionOffsetCommand: aPosition [

Expand Down
Loading
Loading