Skip to content

Commit

Permalink
Merge pull request #156 from OpenSmock/Issue_0155
Browse files Browse the repository at this point in the history
  • Loading branch information
labordep authored Mar 8, 2024
2 parents 32450a3 + 483b67c commit acb1b2a
Show file tree
Hide file tree
Showing 49 changed files with 6,595 additions and 359 deletions.
123 changes: 101 additions & 22 deletions src/BaselineOfPyramid/BaselineOfPyramid.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,115 @@ Class {
BaselineOfPyramid >> baseline: spec [

<baseline>
spec for: #common do: [
spec postLoadDoIt: #postload:package:.
self dependencies: spec.
spec
package: #Pyramid;
package: #'Pyramid-IDE' with: [ spec requires: #( #Pyramid ) ];
package: #'Pyramid-Bloc'
with: [ spec requires: #( #Pyramid #Bloc #BlocSerialization ) ];
package: #'Pyramid-Tests'
with: [ spec requires: #( #Pyramid #'Pyramid-Bloc' ) ];
package: #'Pyramid-Examples'
with: [ spec requires: #( #Pyramid ) ];
package: #'Pyramid-IDE' with: [ spec requires: #( #Pyramid ) ] ]
"Common baseline for all Pharo versions"
spec for: #common do: [ self baselineForCommon: spec ]
]

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

spec
baseline: #Bloc
with: [
spec repository: 'github://pharo-graphics/Bloc:master/src' ].
spec
baseline: #BlocSerialization
with: [
spec repository: 'github://OpenSmock/Bloc-Serialization:main/src' ].
<baseline>
spec preLoadDoIt: #preload:package:.
spec postLoadDoIt: #postload:package:.

"Dependencies"
self blocDependencies: spec.
self toploDependencies: spec.

"Packages"
self pyramidPackages: spec.
self blocPackages: spec.
self toploPackages: spec.

"Groups"
spec group: 'default' with: #( 'BlocUI' 'ToploUI' ). "complete version"
spec group: 'BlocUI' with: self blocPackagesNames. "only Bloc"
spec group: 'ToploUI' with: self toploPackagesNames "only Bloc and Toplo"
]

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

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

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

spec
package: 'Pyramid-Bloc'
with: [ spec requires: #( 'Pyramid' 'Bloc' ) ].
spec
package: 'Pyramid-Tests'
with: [ spec requires: #( 'Pyramid-Bloc' ) ].
spec
package: 'Pyramid-Examples'
with: [ spec requires: #( 'Pyramid-Bloc' ) ]
]

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

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

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

PyramidPluginManager reset
]

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

]

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

spec package: 'Pyramid'.
spec
package: 'Pyramid-IDE'
with: [ spec requires: #( 'Pyramid' ) ].

]

{ #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' ]
]

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

spec
package: 'Pyramid-Toplo'
with: [ spec requires: #( 'Toplo' 'ToploSerialization') ].
spec
package: 'Pyramid-Toplo-Tests'
with: [ spec requires: #( 'Pyramid-Toplo' ) ].
spec
package: 'Pyramid-Toplo-Examples'
with: [ spec requires: #( 'Pyramid-Toplo' ) ]
]

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

| packages |
packages := self blocPackagesNames asOrderedCollection.
packages addAll: #( 'Pyramid-Toplo' 'Pyramid-Toplo-Tests' 'Pyramid-Toplo-Examples' ).
^ packages asArray
]
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlBackground.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlBackground }

{ #category : #'*Pyramid-Bloc' }
BlBackground >> = aBlBackground [

aBlBackground == self ifTrue: [ ^ true ].
^ aBlBackground class = self class
]

{ #category : #'*Pyramid-Bloc' }
BlBackground >> asForm [

Expand Down
8 changes: 0 additions & 8 deletions src/Pyramid-Bloc/BlEllipseGeometry.extension.st

This file was deleted.

11 changes: 0 additions & 11 deletions src/Pyramid-Bloc/BlFlowLayout.extension.st
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
Extension { #name : #BlFlowLayout }

{ #category : #'*Pyramid-Bloc' }
BlFlowLayout >> = anObject [

self == anObject ifTrue: [ ^ true ].
self class = anObject class ifFalse: [ ^ false ].
self orientation = anObject orientation ifFalse: [ ^ false ].
self horizontalAlignment = anObject horizontalAlignment ifFalse: [ ^ false ].
self verticalAlignment = anObject verticalAlignment ifFalse: [ ^ false ].
^ true
]

{ #category : #'*Pyramid-Bloc' }
BlFlowLayout >> asIcon [

Expand Down
8 changes: 0 additions & 8 deletions src/Pyramid-Bloc/BlGradientPaint.extension.st
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
Extension { #name : #BlGradientPaint }

{ #category : #'*Pyramid-Bloc' }
BlGradientPaint >> = aBlPaint [

self == aBlPaint ifTrue: [ ^ true ].
self class == aBlPaint class ifFalse: [ ^ false ].
^ self stops = aBlPaint stops
]

{ #category : #'*Pyramid-Bloc' }
BlGradientPaint >> asForm [

Expand Down
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlImageBackground.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlImageBackground }

{ #category : #'*Pyramid-Bloc' }
BlImageBackground >> = aBlBackground [

super = aBlBackground ifFalse: [ ^ false ].
^ self image = aBlBackground image
]

{ #category : #'*Pyramid-Bloc' }
BlImageBackground >> asForm [

Expand Down
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlLayout.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlLayout }

{ #category : #'*Pyramid-Bloc' }
BlLayout >> = anObject [

self == anObject ifTrue: [ ^ true ].
^ self class = anObject class
]

{ #category : #'*Pyramid-Bloc' }
BlLayout >> asIcon [

Expand Down
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlLinearGradientPaint.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlLinearGradientPaint }

{ #category : #'*Pyramid-Bloc' }
BlLinearGradientPaint >> = aBlPaint [

super = aBlPaint ifFalse: [ ^ false ].
^ self end = aBlPaint end and: [ self start = aBlPaint start ]
]

{ #category : #'*Pyramid-Bloc' }
BlLinearGradientPaint >> selectOnGradientPaintInput: aPyramidGradientPaintInputPresenter [

Expand Down
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlRadialGradientPaint.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlRadialGradientPaint }

{ #category : #'*Pyramid-Bloc' }
BlRadialGradientPaint >> = aBlPaint [

super = aBlPaint ifFalse: [ ^ false ].
^ self innerCenter = aBlPaint innerCenter and: [ self innerRadius = aBlPaint innerRadius and: [ self outerCenter = aBlPaint outerCenter and: [ self outerRadius = aBlPaint outerRadius ] ] ]
]

{ #category : #'*Pyramid-Bloc' }
BlRadialGradientPaint >> selectOnGradientPaintInput: aPyramidGradientPaintInputPresenter [

Expand Down
8 changes: 0 additions & 8 deletions src/Pyramid-Bloc/BlRectangleGeometry.extension.st

This file was deleted.

8 changes: 0 additions & 8 deletions src/Pyramid-Bloc/BlRoundedRectangleGeometry.extension.st

This file was deleted.

34 changes: 34 additions & 0 deletions src/Pyramid-Bloc/PyramidOpenFromSpacePlugin.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Class {
#name : #PyramidOpenFromSpacePlugin,
#superclass : #Object,
#traits : 'TPyramidPlugin',
#classTraits : 'TPyramidPlugin classTrait',
#instVars : [
'extensions'
],
#category : #'Pyramid-Bloc-plugin-edit-on-running'
}

{ #category : #adding }
PyramidOpenFromSpacePlugin >> addExtension: anExtension [

self extensions add: anExtension
]

{ #category : #accessing }
PyramidOpenFromSpacePlugin >> extensions [

^ extensions
]

{ #category : #accessing }
PyramidOpenFromSpacePlugin >> initialize [

extensions := OrderedCollection new.
]

{ #category : #adding }
PyramidOpenFromSpacePlugin >> removeExetension: anExtension [

self extensions remove: anExtension
]
48 changes: 14 additions & 34 deletions src/Pyramid-Bloc/PyramidPluginEditOnRunning.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,20 @@ PyramidPluginEditOnRunning class >> cleanUp: anObject [
PyramidPluginEditOnRunning class >> doShortcutAction: anEvent [

| space editor whenClosedDo |

self flag:'labordep: this is a temporary processing because this fork is due to a Bloc opened issue'.
(shortcutFork notNil and:[ shortcutFork isTerminated not ]) ifTrue:[ ^ self ].

shortcutFork := [

self editOnRunning ifTrue:[
space := anEvent source space.
(self canEditSpace: space) ifTrue:[
editor := space editWithPyramid.
whenClosedDo := editor window whenClosedDo.
editor window whenClosedDo: [ whenClosedDo value ].
].
].

] forkAt: Processor userBackgroundPriority named: 'Pyramid edit-on-running plugin shortcut'
self flag:
'labordep: this is a temporary processing because this fork is due to a Bloc opened issue'.
(shortcutFork notNil and: [ shortcutFork isTerminated not ]) ifTrue: [
^ self ].

shortcutFork := [
self editOnRunning ifTrue: [
space := anEvent source space.
(self canEditSpace: space) ifTrue: [
editor := space editWithPyramid.
whenClosedDo := editor window whenClosedDo.
editor window whenClosedDo: [ whenClosedDo value ] ] ] ]
forkAt: Processor userBackgroundPriority
named: 'Pyramid edit-on-running plugin shortcut'
]

{ #category : #accessing }
Expand Down Expand Up @@ -151,21 +149,3 @@ PyramidPluginEditOnRunning class >> uninstallBlUniverseListeners [

Beacon instance unsubscribe: self
]

{ #category : #adding }
PyramidPluginEditOnRunning >> addPanelsOn: aPyramidSimpleWindow [

"do nothing"
]

{ #category : #actions }
PyramidPluginEditOnRunning >> configureBuilder: aPyramidEditorBuilder [

"do nothing"
]

{ #category : #connecting }
PyramidPluginEditOnRunning >> connectOn: aPyramidEditor [

"do nothing"
]
8 changes: 4 additions & 4 deletions src/Pyramid-Bloc/PyramidSpaceBuilder.class.st
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Class {
#name : #PyramidSpaceBuilder,
#superclass : #Object,
#traits : 'TPyramidEditorTransformation',
#classTraits : 'TPyramidEditorTransformation classTrait',
#traits : 'TPyramidEditorTransformation + TPyramidEditorSpaceIsReady',
#classTraits : 'TPyramidEditorTransformation classTrait + TPyramidEditorSpaceIsReady classTrait',
#instVars : [
'topMostOverlay',
'overlays',
Expand Down Expand Up @@ -103,6 +103,7 @@ PyramidSpaceBuilder >> build [

self signalTransformationChanged.
self topMostOverlay buildOn: self space root.
self signalSpaceIsReady.
^ self space
]

Expand All @@ -111,8 +112,7 @@ PyramidSpaceBuilder >> editor: aPyramidEditor [

self extensions do: [ :each | each editor: aPyramidEditor ].
self extensions do: [ :each |
each projectModel: aPyramidEditor projectModel ].

each projectModel: aPyramidEditor projectModel ]
]

{ #category : #accessing }
Expand Down
3 changes: 2 additions & 1 deletion src/Pyramid-Bloc/PyramidSpacePlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ PyramidSpacePlugin >> makePresenterWithBlSpace: aBlSpace [
aBlSpace host: host.
aBlSpace addEventHandler: (BlEventHandler
on: BlSpaceDestroyedEvent
do: [ :evt | self updateMorphInCaseOfFaillure: morph ]).
do: [ :evt |
self updateMorphInCaseOfFaillure: morph ]).

self morphicPresenter morph: morph.
self morphicPresenter whenDisplayDo: [ aBlSpace show ]
Expand Down
Loading

0 comments on commit acb1b2a

Please sign in to comment.