forked from pharo-project/pharo
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a22a97c
commit de2ce39
Showing
1 changed file
with
94 additions
and
0 deletions.
There are no files selected for viewing
94 changes: 94 additions & 0 deletions
94
src/Calypso-SystemTools-QueryBrowser/ClyShowTraitUsersCommand.class.st
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,94 @@ | ||
Class { | ||
#name : #ClyShowTraitUsersCommand, | ||
#superclass : #SycClassCommand, | ||
#instVars : [ | ||
'browser' | ||
], | ||
#category : #'Calypso-SystemTools-QueryBrowser-Commands-Queries' | ||
} | ||
|
||
{ #category : #'instance creation' } | ||
ClyShowTraitUsersCommand class >> forClasses: classes by: aBrowser [ | ||
^(self for: classes) | ||
browser: aBrowser | ||
] | ||
|
||
{ #category : #activation } | ||
ClyShowTraitUsersCommand class >> fullBrowserMenuActivation [ | ||
<classAnnotation> | ||
|
||
^CmdContextMenuActivation byItemOf: ClyQueryMenuGroup for: ClyFullBrowserClassContext | ||
] | ||
|
||
{ #category : #activation } | ||
ClyShowTraitUsersCommand class >> fullBrowserShortcutActivation [ | ||
<classAnnotation> | ||
|
||
^CmdShortcutActivation by: $n meta for: ClyFullBrowserClassContext | ||
] | ||
|
||
{ #category : #activation } | ||
ClyShowTraitUsersCommand class >> fullBrowserToolbarActivation [ | ||
<classAnnotation> | ||
|
||
^ClyToolbarActivation byItemOf: ClyButtonToolbarGroup for: ClyFullBrowserClassContext | ||
] | ||
|
||
{ #category : #activation } | ||
ClyShowTraitUsersCommand class >> queryBrowserMenuActivation [ | ||
<classAnnotation> | ||
|
||
^CmdContextMenuActivation byItemOf: ClyQueryMenuGroup for: ClyQueryBrowserContext | ||
] | ||
|
||
{ #category : #activation } | ||
ClyShowTraitUsersCommand class >> queryBrowserShortcutActivation [ | ||
<classAnnotation> | ||
|
||
^CmdShortcutActivation by: $c meta, $n meta for: ClyQueryBrowserContext | ||
] | ||
|
||
{ #category : #activation } | ||
ClyShowTraitUsersCommand class >> queryBrowserToolbarActivation [ | ||
<classAnnotation> | ||
|
||
^ClyToolbarActivation byItemOf: ClyButtonToolbarGroup for: ClyQueryBrowserContext | ||
] | ||
|
||
{ #category : #activation } | ||
ClyShowTraitUsersCommand class >> sourceCodeMenuActivation [ | ||
<classAnnotation> | ||
|
||
^SycSourceCodeMenuActivation byItemOf: ClyQueryMenuGroup for: ClySourceCodeContext | ||
] | ||
|
||
{ #category : #accessing } | ||
ClyShowTraitUsersCommand >> browser [ | ||
|
||
^ browser | ||
] | ||
|
||
{ #category : #accessing } | ||
ClyShowTraitUsersCommand >> browser: anObject [ | ||
|
||
browser := anObject | ||
] | ||
|
||
{ #category : #accessing } | ||
ClyShowTraitUsersCommand >> defaultMenuItemName [ | ||
^'Show trait users' | ||
] | ||
|
||
{ #category : #execution } | ||
ClyShowTraitUsersCommand >> execute [ | ||
|
||
browser spawnQueryBrowserOn: | ||
(ClyClassReferencesQuery ofAny: classes result: classes first traitUsers) | ||
] | ||
|
||
{ #category : #execution } | ||
ClyShowTraitUsersCommand >> prepareFullExecutionInContext: aToolContext [ | ||
super prepareFullExecutionInContext: aToolContext. | ||
|
||
browser := aToolContext browser | ||
] |