-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
One command to select a tag, one to tag entities
- Loading branch information
1 parent
01969a1
commit 80fa6d1
Showing
5 changed files
with
122 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Class { | ||
#name : #MiSelectTagCommand, | ||
#superclass : #MiCommand, | ||
#category : #'MooseIDE-Core-Command' | ||
} | ||
|
||
{ #category : #default } | ||
MiSelectTagCommand class >> defaultDescription [ | ||
|
||
^ 'Select the tag that will be used to tag the current entities in this browser' | ||
] | ||
|
||
{ #category : #default } | ||
MiSelectTagCommand class >> defaultName [ | ||
|
||
^ 'Select Tag' | ||
] | ||
|
||
{ #category : #testing } | ||
MiSelectTagCommand >> canBeExecuted [ | ||
|
||
^ self context canTagEntities | ||
] | ||
|
||
{ #category : #executing } | ||
MiSelectTagCommand >> execute [ | ||
|
||
self newMenu openWithSpecAtPointer | ||
] | ||
|
||
{ #category : #'instance creation' } | ||
MiSelectTagCommand >> newMenu [ | ||
|
||
^ SpMenuPresenter new | ||
addGroup: [ :group | | ||
self tagsList do: [ :tag | | ||
group addItem: [ :item | | ||
item | ||
name: tag name; | ||
icon: (self application iconForTag: tag); | ||
action: [ self selectedTag: tag ]; | ||
yourself ] ] ]; | ||
yourself | ||
] | ||
|
||
{ #category : #accessing } | ||
MiSelectTagCommand >> selectedTag: aTag [ | ||
|
||
context selectedTag: aTag | ||
] | ||
|
||
{ #category : #accessing } | ||
MiSelectTagCommand >> tagsList [ | ||
|
||
^ self context tagList | ||
] |
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