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

Reworking main UI #23

Merged
merged 18 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
20 changes: 19 additions & 1 deletion src/BaselineOfChest/BaselineOfChest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ BaselineOfChest >> baseline: spec [

<baseline>
spec for: #common do: [
spec postLoadDoIt: #postload:package:.

spec
package: 'Chest';
package: 'Chest-Tests';
Expand All @@ -17,5 +19,21 @@ BaselineOfChest >> baseline: spec [

spec
group: 'default'
with: #( 'Chest' 'Chest-Commands' 'Chest-Tests' 'Chest-Commands-Tests' )
with:
#( 'Chest' 'Chest-Commands' 'Chest-Tests' 'Chest-Commands-Tests' )
]

{ #category : #baselines }
BaselineOfChest >> createChestExamples [

Chest at: 'fortyTwo' put: 42.
(Chest newNamed: 'ExampleChest')
at: 'tata'
put: 'someExampleStringCalledTata'
]

{ #category : #baselines }
BaselineOfChest >> postload: loader package: packageSpec [

self createChestExamples
]
35 changes: 35 additions & 0 deletions src/Chest-Commands/ChestAddNewItemCommand.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Class {
#name : #ChestAddNewItemCommand,
#superclass : #ChestCommand,
#category : #'Chest-Commands'
}

{ #category : #default }
ChestAddNewItemCommand class >> defaultDescription [

^ 'Request an expression whose result will be stored inside the selected chest'
]

{ #category : #default }
ChestAddNewItemCommand class >> defaultIconName [

^ #add
]

{ #category : #default }
ChestAddNewItemCommand class >> defaultName [

^ 'Add item'
]

{ #category : #testing }
ChestAddNewItemCommand >> canBeExecuted [

^ context selectedChest isNotNil
]

{ #category : #executing }
ChestAddNewItemCommand >> execute [

^ context requestExpressionToStoreInChest
]
18 changes: 10 additions & 8 deletions src/Chest-Commands/ChestCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,39 @@ ChestCommand class >> chestLoadItemCommandClasses [
{ #category : #'accessing - commands classes' }
ChestCommand class >> chestTableContentMenuCommandClasses [

^ {
^ {
ChestRenameItemCommand.
ChestInspectItemCommand.
ChestAddNewItemCommand.
ChestRemoveItemCommand.
ChestRemoveAllItemsInChestCommand }
]

{ #category : #'accessing - commands classes' }
ChestCommand class >> chestTableContentToolbarCommandClasses [

^ {
ChestRemoveItemCommand.
ChestRemoveAllItemsInChestCommand }
^ {
ChestAddNewItemCommand.
ChestRemoveItemCommand }
]

{ #category : #'accessing - commands classes' }
ChestCommand class >> chestTableMenuCommandClasses [

^ {
^ {
ChestRenameChestCommand.
ChestInspectChestCommand.
ChestAddNewChestCommand.
ChestRemoveChestCommand.
ChestRemoveAllChestsCommand }
]

{ #category : #'accessing - commands classes' }
ChestCommand class >> chestTableToolbarCommandClasses [

^ {
^ {
ChestAddNewChestCommand.
ChestRemoveChestCommand.
ChestRemoveAllChestsCommand }
ChestRemoveChestCommand }
]

{ #category : #'accessing - commands classes' }
Expand Down
41 changes: 41 additions & 0 deletions src/Chest-Commands/ChestInspectChestCommand.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Class {
#name : #ChestInspectChestCommand,
#superclass : #ChestCommand,
#category : #'Chest-Commands'
}

{ #category : #default }
ChestInspectChestCommand class >> defaultDescription [

^ 'Inspect the chest'
]

{ #category : #default }
ChestInspectChestCommand class >> defaultIconName [

^ #glamorousInspect
]

{ #category : #default }
ChestInspectChestCommand class >> defaultName [

^ 'Inspect chest'
]

{ #category : #default }
ChestInspectChestCommand class >> defaultShortcutKey [

^ $i meta
]

{ #category : #testing }
ChestInspectChestCommand >> canBeExecuted [

^ context selectedChest isNotNil
]

{ #category : #executing }
ChestInspectChestCommand >> execute [

context selectedChest inspect
]
6 changes: 6 additions & 0 deletions src/Chest-Commands/ChestInspectItemCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ ChestInspectItemCommand class >> defaultDescription [
^ 'Inspect the object'
]

{ #category : #default }
ChestInspectItemCommand class >> defaultIconName [

^ #glamorousInspect
]

{ #category : #default }
ChestInspectItemCommand class >> defaultName [

Expand Down
Loading
Loading