Skip to content

Commit

Permalink
editWithPyramid in the correct package
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyan11 committed Jun 18, 2024
1 parent 4e6ac0f commit 8b4e29d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
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: 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
20 changes: 0 additions & 20 deletions src/Pyramid/BlElement.extension.st

This file was deleted.

0 comments on commit 8b4e29d

Please sign in to comment.