forked from pharo-project/pharo
/
ClyBrowseIcebergPackageCommand.class.st
55 lines (44 loc) · 1.47 KB
/
ClyBrowseIcebergPackageCommand.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Class {
#name : #ClyBrowseIcebergPackageCommand,
#superclass : #IceTipPackageCommand,
#category : #'Calypso-SystemPlugins-Monticello-Browser'
}
{ #category : #activation }
ClyBrowseIcebergPackageCommand class >> browserContextActivation [
<classAnnotation>
^ CmdContextMenuActivation byRootGroupItemOrder: 20 for: IceTipWorkingCopyContext
]
{ #category : #activation }
ClyBrowseIcebergPackageCommand class >> browserShortcutActivation [
<classAnnotation>
^CmdShortcutActivation by: $b meta for: IceTipWorkingCopyContext
]
{ #category : #activation }
ClyBrowseIcebergPackageCommand class >> browserStrongSelectionActivation [
<classAnnotation>
^ IceTipCommandStrongSelectionActivation for: IceTipWorkingCopyContext
]
{ #category : #accessing }
ClyBrowseIcebergPackageCommand class >> defaultHelp [
^ 'Browse the version in the repository'
]
{ #category : #accessing }
ClyBrowseIcebergPackageCommand class >> defaultMenuIconName [
^ #glamorousBrowse
]
{ #category : #accessing }
ClyBrowseIcebergPackageCommand class >> defaultMenuItemName [
^ 'Browse repository version'
]
{ #category : #execution }
ClyBrowseIcebergPackageCommand >> execute [
| env commit snapshot |
env := RGEnvironment new.
commit := repositoryModel commit.
#(1) do: [ :i |
snapshot := commit snapshotFor: (RPackage named: packageModel name).
snapshot importInto: env asPackageNamed: packageModel name]
displayingProgress: 'loading'.
env clean.
env browseAs: repositoryModel entity description
]