-
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.
- Loading branch information
anquetil
committed
Dec 19, 2024
1 parent
2c9de48
commit cd12ae4
Showing
5 changed files
with
130 additions
and
0 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,50 @@ | ||
" | ||
I am the superclass of Moose Import commands. | ||
Simple use: | ||
`MPImportSTCommand new execute`. | ||
Link to a context (for example a spec presenter): | ||
`(MPImportSTCommand forSpecContext: yourPresenter) execute`. | ||
You can also use class side method `#asCommandGroupForSpecContext:` to build a Spec command group with both MSE and St import commands. | ||
Your presenter should implement `#updateForNewModel:` to define behavior when a new model is installed successfully | ||
" | ||
Class { | ||
#name : #MiReportExportCommand, | ||
#superclass : #MiCommand, | ||
#category : #'MooseIDE-Core-Reporter' | ||
} | ||
|
||
{ #category : #testing } | ||
MiReportExportCommand class >> asCommandGroupWith: aPresenter [ | ||
|
||
| exportCommandGroup | | ||
exportCommandGroup := CmCommandGroup forSpec | ||
name: self defaultName; | ||
description: self defaultDescription; | ||
iconName: #smallExport. | ||
self allSubclassesDo: [ :cmd | | ||
exportCommandGroup register: (cmd forSpecContext: aPresenter) ]. | ||
^ exportCommandGroup | ||
] | ||
|
||
{ #category : #testing } | ||
MiReportExportCommand class >> defaultDescription [ | ||
^ 'Export this report' | ||
] | ||
|
||
{ #category : #testing } | ||
MiReportExportCommand class >> defaultName [ | ||
^ 'Export' | ||
] | ||
|
||
{ #category : #testing } | ||
MiReportExportCommand class >> isAbstract [ | ||
^ self = MiImportCommand | ||
] | ||
|
||
{ #category : #executing } | ||
MiReportExportCommand >> execute [ | ||
|
||
^self exportReport: self context | ||
] |
27 changes: 27 additions & 0 deletions
27
src/MooseIDE-Core-Reporter/MiReportHTMLExportCommand.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,27 @@ | ||
Class { | ||
#name : #MiReportHTMLExportCommand, | ||
#superclass : #MiReportExportCommand, | ||
#category : #'MooseIDE-Core-Reporter' | ||
} | ||
|
||
{ #category : #testing } | ||
MiReportHTMLExportCommand class >> defaultDescription [ | ||
^ 'Export this report to HTML' | ||
] | ||
|
||
{ #category : #testing } | ||
MiReportHTMLExportCommand class >> defaultIconName [ | ||
|
||
^ #mooseExportHTML | ||
] | ||
|
||
{ #category : #testing } | ||
MiReportHTMLExportCommand class >> defaultName [ | ||
^ 'Export to HTML' | ||
] | ||
|
||
{ #category : #export } | ||
MiReportHTMLExportCommand >> exportReport: reporterBrowserModel [ | ||
|
||
reporterBrowserModel exportReportToHTML | ||
] |
27 changes: 27 additions & 0 deletions
27
src/MooseIDE-Core-Reporter/MiReportPDFExportCommand.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,27 @@ | ||
Class { | ||
#name : #MiReportPDFExportCommand, | ||
#superclass : #MiReportExportCommand, | ||
#category : #'MooseIDE-Core-Reporter' | ||
} | ||
|
||
{ #category : #testing } | ||
MiReportPDFExportCommand class >> defaultDescription [ | ||
^ 'Export this report to PDF' | ||
] | ||
|
||
{ #category : #testing } | ||
MiReportPDFExportCommand class >> defaultIconName [ | ||
|
||
^ #mooseExportPDF | ||
] | ||
|
||
{ #category : #testing } | ||
MiReportPDFExportCommand class >> defaultName [ | ||
^ 'Export to PDF' | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
MiReportPDFExportCommand >> exportReport: reporterBrowserModel [ | ||
|
||
reporterBrowserModel exportReportToPDF | ||
] |