Skip to content

Commit

Permalink
Change worlds menu plugins + uninstall bugged theme plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyan11 committed May 1, 2024
1 parent 3e85c56 commit 34b8371
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 22 deletions.
67 changes: 45 additions & 22 deletions src/Pyramid-IDE/PyramidWorld.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,56 @@ PyramidWorld class >> cleanUp [

{ #category : #actions }
PyramidWorld class >> displayLoadedPlugins [
<script>

| presenter stream |
presenter := SpTextPresenter new.
<script>
| presenter stream displayBlock |
presenter := SpCodePresenter new
editable: false;
yourself.
stream := ReadWriteStream on: String new.


displayBlock := [ :printStream :collection |
(collection sorted: [ :a :b |
a className < b className ]) do: [ :plugin |
printStream
nextPutAll: plugin name;
nextPutAll: '.';
cr ] ].

"Create loaded plugin list"
PyramidPluginManager uniqueInstance ifNotNil:[ :e |

"Statistics"
stream
nextPutAll: (e pluginClasses size) asString;
nextPutAll: ' loaded / ';
nextPutAll: (PyramidPluginManager imagePluginClasses size) asString;
nextPutAll: ' available plugin(s)';
cr; cr.

"Details"
e pluginClasses do:[ :p |
stream nextPutAll: '-' ; nextPutAll: p name; cr.
].

] ifNil:[stream nextPutAll: 'No loaded plugins.'].

PyramidPluginManager uniqueInstance
ifNotNil: [ :e | "Statistics"
stream
nextPutAll: '"';
nextPutAll:
(e pluginClasses select: [ :p | p shouldInstall ]) size asString;
nextPutAll: ' installed / ';
nextPutAll: PyramidPluginManager imagePluginClasses size asString;
nextPutAll: ' available plugin(s)';
nextPutAll: '"';
cr;
cr.

"Details - not installed"
stream
nextPutAll: '"Not installed:"';
cr.
displayBlock
value: stream
value: (e pluginClasses reject: [ :p | p shouldInstall ]).
"Details - installed"
stream
cr;
nextPutAll: '"Installed:"';
cr.
displayBlock
value: stream
value: (e pluginClasses select: [ :p | p shouldInstall ]) ]
ifNil: [ stream nextPutAll: 'No loaded plugins.' ].

presenter text: stream contents.
presenter open.
presenter withWindowDo: [ :w | w title: 'Pyramid loaded plugins' ].
presenter withWindowDo: [ :w | w title: 'Pyramid loaded plugins' ]
]

{ #category : #'private - icons' }
Expand Down
6 changes: 6 additions & 0 deletions src/Pyramid-Toplo/PyramidThemeFromSpaceExtension.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Class {
#category : #'Pyramid-Toplo-plugin-theme-management'
}

{ #category : #asserting }
PyramidThemeFromSpaceExtension class >> shouldInstall [

^ false
]

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

Expand Down
6 changes: 6 additions & 0 deletions src/Pyramid-Toplo/PyramidToploThemePlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Class {
#category : #'Pyramid-Toplo-plugin-theme-management'
}

{ #category : #asserting }
PyramidToploThemePlugin class >> shouldInstall [

^ false
]

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

Expand Down

0 comments on commit 34b8371

Please sign in to comment.