forked from dupriezt/Chest
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from adri09070/33-Chests-clipboard-has-a-buffe…
…r-of-one-which-is-not-enough implementing a clipboard chest with a maximum size
- Loading branch information
Showing
56 changed files
with
1,071 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,30 @@ | ||
Class { | ||
#name : #ChestCopyObjectCommand, | ||
#superclass : #SpCodeSelectionCommand, | ||
#category : #'Chest-Commands' | ||
#name : 'ChestCopyObjectCommand', | ||
#superclass : 'SpCodeSelectionCommand', | ||
#category : 'Chest-Commands', | ||
#package : 'Chest-Commands' | ||
} | ||
|
||
{ #category : #default } | ||
{ #category : 'default' } | ||
ChestCopyObjectCommand class >> defaultDescription [ | ||
|
||
^ 'Store the result of the selected expression in a clipboard chest to paste it later' | ||
] | ||
|
||
{ #category : #defaults } | ||
{ #category : 'defaults' } | ||
ChestCopyObjectCommand class >> defaultIconName [ | ||
|
||
^ #smallCopy | ||
] | ||
|
||
{ #category : #default } | ||
{ #category : 'default' } | ||
ChestCopyObjectCommand class >> defaultName [ | ||
|
||
^ 'Copy object in a clipboard chest' | ||
] | ||
|
||
{ #category : #executing } | ||
{ #category : 'executing' } | ||
ChestCopyObjectCommand >> execute [ | ||
|
||
self evaluateSelectionAndDo: [ :result | | ||
[ ClipboardChest at: ClipboardChest clipboardEntryName put: result ] | ||
on: ChestKeyAlreadyInUseError | ||
do: [ | ||
ClipboardChest removeObjectNamed: | ||
ClipboardChest clipboardEntryName. | ||
ClipboardChest at: ClipboardChest clipboardEntryName put: result ] ] | ||
self evaluateSelectionAndDo: [ :result | ClipboardChest add: result ] | ||
] |
Oops, something went wrong.