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

moosetechnology / MooseIDE / 15922823259

27 Jun 2025 09:19AM UTC coverage: 66.79% (-0.2%) from 66.982%
15922823259

push

github

web-flow
Do not use fixed pharo versions

19810 of 29660 relevant lines covered (66.79%)

1.34 hits per line

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

96.51
/src/MooseIDE-QueriesBrowser/MiScopeQueryPresenter.class.st
1
"
2
A query configuration presenter for the `FQScopeQuery`
3
"
4
Class {
5
        #name : #MiScopeQueryPresenter,
6
        #superclass : #MiQueryConfiguratorPresenter,
7
        #instVars : [
8
                'scopesDropList',
9
                'directionsDropList',
10
                'recursiveCheckbox'
11
        ],
12
        #category : #'MooseIDE-QueriesBrowser-Configuration presenters'
13
}
14

15
{ #category : #specs }
16
MiScopeQueryPresenter class >> title [
×
17
        ^ 'Scope Query'
×
18
]
×
19

20
{ #category : #'api - actions' }
21
MiScopeQueryPresenter >> configureFor: aQuery [
2✔
22

2✔
23
        | queryScope |
2✔
24
        query := aQuery.
2✔
25
        queryScope := aQuery scope.
2✔
26
        directionsDropList selectItem: aQuery directionStrategy.
2✔
27
        scopesDropList := self scopesDropListForScopes: { queryScope }.
2✔
28
        scopesDropList selectItem: queryScope
2✔
29
]
2✔
30

31
{ #category : #actions }
32
MiScopeQueryPresenter >> configureQuery: scope [
2✔
33

2✔
34
        scope ifNil: [ ^ self ].
2✔
35
        self query scope: scope
2✔
36
]
2✔
37

38
{ #category : #initialization }
39
MiScopeQueryPresenter >> initializeDirectionsDropList [
2✔
40

2✔
41
        directionsDropList := self newDropList.
2✔
42
        directionsDropList
2✔
43
                startWithoutSelection;
2✔
44
                items: self query directionStrategies;
2✔
45
                display: [ :item | item label];
2✔
46
                whenSelectedItemChangedDo: [ :selectedDirection | 
2✔
47
                        self query resetAndChangeDirection: selectedDirection.
2✔
48
                        self updateAccordingToDirection.
2✔
49
                        self notifyQueryChanged ]
2✔
50
]
2✔
51

52
{ #category : #initialization }
53
MiScopeQueryPresenter >> initializePresenters [
2✔
54

2✔
55
        scopesDropList := self newDropList.
2✔
56
        self initializeRecursiveCheckbox.
2✔
57
        self initializeDirectionsDropList.
2✔
58
        self initializeLayout
2✔
59
]
2✔
60

61
{ #category : #initialization }
62
MiScopeQueryPresenter >> initializeRecursiveCheckbox [
2✔
63

2✔
64
        recursiveCheckbox := self newCheckBox
2✔
65
                                     label: 'Recursive';
2✔
66
                                     help:
2✔
67
                                             'Activate this to recursively look for result in hierarchy.';
2✔
68
                                     whenChangedDo: [ :state | 
2✔
69
                                             self query recursive: state.
2✔
70
                                             self query computeResult.
2✔
71
                                             self notifyQueryChanged ];
2✔
72
                                     yourself
2✔
73
]
2✔
74

75
{ #category : #layout }
76
MiScopeQueryPresenter >> newLayout [
2✔
77

2✔
78
        | padding |
2✔
79
        padding := 5.
2✔
80
        ^ SpBoxLayout newLeftToRight
2✔
81
                  add: directionsDropList
2✔
82
                  expand: false
2✔
83
                  fill: true
2✔
84
                  padding: padding;
2✔
85
                  add: scopesDropList
2✔
86
                  expand: false
2✔
87
                  fill: true
2✔
88
                  padding: padding;
2✔
89
                  add: recursiveCheckbox width: 30;
2✔
90
                  yourself
2✔
91
]
2✔
92

93
{ #category : #'widgets configuration' }
94
MiScopeQueryPresenter >> scopesDropListForScopes: scopes [
2✔
95

2✔
96
        ^ self newDropList
2✔
97
                  startWithoutSelection;
2✔
98
                  items: scopes;
2✔
99
                  display: [ :item | item mooseDescription name asEnglishPlural ];
2✔
100
                  selectItem: self query scope;
2✔
101
                  whenSelectedItemChangedDo: [ :scope | 
2✔
102
                          self computeQueryAction: scope ]
2✔
103
]
2✔
104

105
{ #category : #'widgets configuration' }
106
MiScopeQueryPresenter >> setScopesDropList [
2✔
107

2✔
108
        scopesDropList := self query availableScopes
2✔
109
                                  ifEmpty: [ self noParameterMessage: 'scope' ]
2✔
110
                                  ifNotEmpty: [ :scopes | 
2✔
111
                                  self scopesDropListForScopes: scopes ]
2✔
112
]
2✔
113

114
{ #category : #update }
115
MiScopeQueryPresenter >> updateAccordingToDirection [
2✔
116

2✔
117
        self setScopesDropList.
2✔
118
        self initializeLayout
2✔
119
]
2✔
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