• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / MooseIDE / 15211466287

23 May 2025 01:28PM UTC coverage: 66.929%. Remained the same
15211466287

push

github

web-flow
Merge pull request #1336 from tokyRT/557-ModelBrowser-export-default-filename

Fix: ModelBrowser export default filename 557

0 of 1 new or added line in 1 file covered. (0.0%)

19811 of 29600 relevant lines covered (66.93%)

1.34 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/MooseIDE-Core/MiModelExportCommand.class.st
1
Class {
2
        #name : #MiModelExportCommand,
3
        #superclass : #MiCommand,
4
        #category : #'MooseIDE-Core-Command'
5
}
6

7
{ #category : #converting }
8
MiModelExportCommand class >> asCommandGroupWith: aPresenter [
×
9

×
10
        | exportCommandGroup |
×
11
        exportCommandGroup := CmCommandGroup forSpec
×
12
                                      name: self defaultName;
×
13
                                      description: self defaultDescription;
×
14
                                      iconName: #smallExport.
×
15
        self allSubclassesDo: [ :cmd | 
×
16
                exportCommandGroup register: (cmd forSpecContext: aPresenter) ].
×
17
        ^ exportCommandGroup
×
18
]
×
19

20
{ #category : #default }
21
MiModelExportCommand class >> defaultDescription [
×
22
        ^ 'Export this model'
×
23
]
×
24

25
{ #category : #default }
26
MiModelExportCommand class >> defaultName [
×
27
        ^ 'Export'
×
28
]
×
29

30
{ #category : #executing }
31
MiModelExportCommand >> execute [
×
32
        self exportModel: self context miSelectedItem
×
33
]
×
34

35
{ #category : #executing }
36
MiModelExportCommand >> exportModel: aModel [
×
37
        | fileReference |
×
38
        fileReference := UITheme builder
×
39
                chooseForSaveFileReference: 'Choose location'
×
40
                extensions: self fileExtension
×
NEW
41
                path: aModel name.
×
42
        fileReference
×
43
                ifNotNil: [ fileReference
×
44
                                writeStreamDo: [ :stream | 
×
45
                                        self exportModel: aModel toStream: stream.
×
46
                                        Notification signal: 'Save successful!' ] ]
×
47
]
×
48

49
{ #category : #executing }
50
MiModelExportCommand >> exportModel: aModel toStream: stream [
51
        self subclassResponsibility
52
]
53

54
{ #category : #executing }
55
MiModelExportCommand >> fileExtension [
56
        ^ self subclassResponsibility
57
]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc