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

moosetechnology / MooseIDE / 26518204574

27 May 2026 02:39PM UTC coverage: 67.429% (+0.1%) from 67.308%
26518204574

Pull #1622

github

web-flow
Merge fdf7c7960 into f367f33f8
Pull Request #1622: Remove test accessors from ui code.

214 of 260 new or added lines in 20 files covered. (82.31%)

6 existing lines in 3 files now uncovered.

22681 of 33637 relevant lines covered (67.43%)

1.35 hits per line

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

0.0
/src/MooseIDE-QueriesBrowser/QueryCompilerPresenter.class.st
1
"
2
I am used in the manual query condigurator presenter. I have a code presenter in which you can enter some valid query code that I will compile an return the object
3
"
4
Class {
5
        #name : 'QueryCompilerPresenter',
6
        #superclass : 'MiPresenter',
7
        #instVars : [
8
                'submitButton',
9
                'codePresenter',
10
                'closeButton',
11
                'configurationPresenter'
12
        ],
13
        #category : 'MooseIDE-QueriesBrowser-Widgets',
14
        #package : 'MooseIDE-QueriesBrowser',
15
        #tag : 'Widgets'
16
}
17

18
{ #category : 'initialization' }
19
QueryCompilerPresenter >> initialExtent [
×
20

×
21
        ^ 350 @ 200
×
22
]
×
23

24
{ #category : 'initialization' }
25
QueryCompilerPresenter >> initializeButtons [
×
NEW
26

×
27
        submitButton := self newButton.
×
28
        submitButton
×
29
                label: 'Submit';
×
NEW
30
                icon: (self iconNamed: #smallDoIt);
×
NEW
31
                action: [ self owner dismiss ].
×
32
        closeButton := self newButton.
×
33
        closeButton
×
34
                label: 'Close';
×
35
                action: [ self owner dismiss ]
×
36
]
×
37

38
{ #category : 'initialization' }
39
QueryCompilerPresenter >> initializeCoder [
×
40

×
41
        codePresenter := self newCode.
×
42
        codePresenter
×
43
                withoutLineNumbers;
×
NEW
44
                beForScripting;
×
NEW
45
                text: '[ :mooseEntity | "Your code here" ]'
×
UNCOV
46
]
×
47

48
{ #category : 'initialization' }
49
QueryCompilerPresenter >> initializeLayout [
×
50

×
51
        | tempLayout |
×
52
        tempLayout := SpBoxLayout newTopToBottom
×
53
                add: (SpBoxLayout newLeftToRight
×
54
                        add: closeButton expand: false;
×
55
                        addLast: submitButton expand: false;
×
56
                        yourself)
×
57
                expand: false;
×
58
                add: codePresenter;
×
59
                yourself.
×
60

×
61
        self layout: (SpBoxLayout newTopToBottom
×
62
                add: tempLayout
×
63
                withConstraints: [ :constraints | 
×
64
                        constraints
×
65
                                height: self initialExtent y;
×
66
                                width: self initialExtent x ];
×
67
                yourself)
×
68
]
×
69

70
{ #category : 'initialization' }
71
QueryCompilerPresenter >> initializePresenters [
×
72

×
73
        self initializeButtons.
×
74
        self initializeCoder.
×
75
        self initializeLayout
×
76
]
×
77

78
{ #category : 'as yet unclassified' }
NEW
79
QueryCompilerPresenter >> selectBlockBehavior [
×
NEW
80
        "Select the comment so we can start coding immediately by replacing it with the expected behavior."
×
NEW
81

×
NEW
82
        codePresenter
×
NEW
83
                selectionInterval: (18 to: codePresenter text size - 2);
×
NEW
84
                takeKeyboardFocus
×
NEW
85
]
×
86

87
{ #category : 'accessing - model' }
88
QueryCompilerPresenter >> setModelBeforeInitialization: aModel [
×
89

×
NEW
90
        configurationPresenter := aModel
×
91
]
×
92

93
{ #category : 'compiling' }
NEW
94
QueryCompilerPresenter >> updateConfigurationPresenter: aConfigurationPresenter [
×
NEW
95

×
NEW
96
        | compiledBlock currentScript |
×
NEW
97
        currentScript := configurationPresenter query script.
×
NEW
98
        (currentScript isNotNil and: [
×
NEW
99
                         codePresenter text
×
NEW
100
                         = configurationPresenter query script sourceNode sourceCode ])
×
NEW
101
                ifTrue: [ ^ self ].
×
NEW
102

×
NEW
103
        compiledBlock := codePresenter
×
NEW
104
                                 evaluate: codePresenter text
×
NEW
105
                                 onCompileError: [ :e | ^ self ]
×
NEW
106
                                 onError: [ :e | ^ self ].
×
NEW
107
        configurationPresenter computeQueryAction: compiledBlock
×
UNCOV
108
]
×
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