Skip to content

Commit 134f0e2

Browse files
committed
Fixed compilation for EiffelStudio 17.05
1 parent 25a1891 commit 134f0e2

File tree

6 files changed

+70
-34
lines changed

6 files changed

+70
-34
lines changed

CJ-client-safe.ecf

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</option>
1212
<setting name="concurrency" value="thread"/>
1313
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
14-
<library name="cj" location="lib\CJ\library\cj-safe.ecf"/>
14+
<library name="cj" location="lib\CJ\library\cj-safe.ecf" readonly="false"/>
1515
<library name="docking" location="$ISE_LIBRARY\library\docking\docking-safe.ecf"/>
1616
<library name="encoder" location="lib\EWF\library\text\encoder\encoder-safe.ecf"/>
1717
<library name="http" location="lib\EWF\library\network\protocol\http\http-safe.ecf" readonly="false"/>

lib/CJ/library/converter/cj_arrayed_list_json_converter.e

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ feature -- Conversion
4444
local
4545
failed: BOOLEAN
4646
do
47-
create Result.make_array
47+
create Result.make (o.count)
4848
across
4949
o as c
5050
loop

src/cj_client_application.e

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ feature {NONE} -- Initialization
3636

3737
feature {NONE} -- Implementation
3838

39-
main_window: detachable EV_WINDOW
39+
main_window: detachable CJ_CLIENT_WINDOW
4040

4141
end

src/cj_client_window.e

+58-26
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,65 @@ class
88
CJ_CLIENT_WINDOW
99

1010
inherit
11-
EV_TITLED_WINDOW
11+
ANY
1212
redefine
13-
initialize,
13+
default_create
14+
end
15+
16+
feature {NONE} -- Initialization
17+
18+
default_create
19+
do
1420
create_interface_objects
21+
initialize_tools (docking_manager)
22+
initialize
1523
end
1624

25+
feature -- Access
26+
27+
window: EV_TITLED_WINDOW
28+
29+
main_box: EV_VERTICAL_BOX
30+
31+
1732
feature {NONE} -- Initialization
1833

1934
create_interface_objects
35+
local
36+
win: EV_TITLED_WINDOW
37+
vb: EV_VERTICAL_BOX
38+
dm: SD_DOCKING_MANAGER
2039
do
21-
Precursor
2240
create field_url
2341

2442
create button_go.make_with_text ("Go")
2543
create button_settings.make_with_text ("...")
2644

2745
create cj_client_proxy.make (create {CJ_CLIENT}.make (""))
2846

29-
create information_tool.make (cj_client_proxy)
30-
create queries_tool.make (cj_client_proxy)
31-
queries_tool.on_query_actions.extend (agent explore_query)
32-
create template_tool.make (cj_client_proxy)
33-
create formatted_body_tool.make (cj_client_proxy)
34-
create http_response_tool.make (cj_client_proxy)
35-
create header_tool.make (cj_client_proxy)
47+
create win
48+
create vb
49+
win.extend (vb)
50+
window := win
51+
main_box := vb
52+
53+
create dm.make (vb, window)
54+
docking_manager := dm
3655

3756
cj_client_proxy.context_adaptation_agents.extend (agent updated_context)
3857
end
3958

59+
initialize_tools (dm: SD_DOCKING_MANAGER)
60+
do
61+
create information_tool.make (cj_client_proxy, dm)
62+
create queries_tool.make (cj_client_proxy, dm)
63+
create template_tool.make (cj_client_proxy, dm)
64+
create formatted_body_tool.make (cj_client_proxy, dm)
65+
create http_response_tool.make (cj_client_proxy, dm)
66+
create header_tool.make (cj_client_proxy, dm)
67+
queries_tool.on_query_actions.extend (agent explore_query)
68+
end
69+
4070
initialize
4171
-- Initialize `Current'.
4272
local
@@ -47,10 +77,7 @@ feature {NONE} -- Initialization
4777
dm: like docking_manager
4878
f: RAW_FILE
4979
do
50-
Precursor
51-
create vb
52-
extend (vb)
53-
80+
vb := main_box
5481
vb.set_border_width (3)
5582

5683
create hb
@@ -69,11 +96,10 @@ feature {NONE} -- Initialization
6996
vb.extend (hb)
7097
vb.disable_item_expand (hb)
7198

72-
73-
create dm.make (vb, Current)
74-
docking_manager := dm
99+
dm := docking_manager
75100
create f.make ("layout.db")
76101
dm.close_editor_place_holder
102+
initialize_tools (dm)
77103
dm.contents.extend (information_tool.sd_content)
78104
dm.contents.extend (queries_tool.sd_content)
79105
dm.contents.extend (template_tool.sd_content)
@@ -97,8 +123,8 @@ feature {NONE} -- Initialization
97123
information_tool.set_focus
98124
end
99125

100-
set_title ("Collection-JSON explorer")
101-
set_size (800, 600)
126+
window.set_title ("Collection-JSON explorer")
127+
window.set_size (800, 600)
102128

103129
initialize_actions
104130

@@ -113,11 +139,16 @@ feature {NONE} -- Initialization
113139
button_go.select_actions.extend (agent on_go)
114140
button_settings.select_actions.extend (agent on_settings)
115141

116-
close_request_actions.extend (agent on_quit)
142+
window.close_request_actions.extend (agent on_quit)
117143
end
118144

119145
feature -- Action
120146

147+
show
148+
do
149+
window.show
150+
end
151+
121152
on_quit
122153
do
123154
if attached docking_manager as dm then
@@ -126,7 +157,7 @@ feature -- Action
126157
-- .. too bad
127158
end
128159
end
129-
destroy_and_exit_if_last
160+
window.destroy_and_exit_if_last
130161
end
131162

132163
on_go
@@ -185,14 +216,14 @@ feature -- Explore
185216
last_collection := Void
186217
if not retried then
187218
set_field_url_from_location (q.href)
188-
set_pointer_style (stock_pixmaps.Busy_cursor)
219+
window.set_pointer_style (stock_pixmaps.Busy_cursor)
189220
if
190221
attached cj_client_proxy.query (q, Void) as resp
191222
then
192223
set_response (resp)
193224
end
194225
end
195-
set_pointer_style (stock_pixmaps.Standard_cursor)
226+
window.set_pointer_style (stock_pixmaps.Standard_cursor)
196227
rescue
197228
retried := True
198229
retry
@@ -225,7 +256,7 @@ feature -- Explore
225256
last_collection := Void
226257
if not retried then
227258
set_field_url_from_location (a_url)
228-
set_pointer_style (stock_pixmaps.Busy_cursor)
259+
window.set_pointer_style (stock_pixmaps.Busy_cursor)
229260

230261
if
231262
attached cj_client_proxy.get (a_url, Void) as resp
@@ -234,7 +265,7 @@ feature -- Explore
234265
end
235266
end
236267

237-
set_pointer_style (stock_pixmaps.Standard_cursor)
268+
window.set_pointer_style (stock_pixmaps.Standard_cursor)
238269
rescue
239270
retried := True
240271
retry
@@ -613,6 +644,7 @@ feature -- Tools
613644
formatted_body_tool: CJ_FORMATTED_BODY_TOOL
614645

615646
http_response_tool: CJ_HTTP_RESPONSE_TOOL
647+
616648
header_tool: CJ_HEADER_TOOL
617649

618650
feature -- Widget
@@ -641,7 +673,7 @@ feature -- Widget
641673

642674
feature -- UI widgets
643675

644-
docking_manager: detachable SD_DOCKING_MANAGER
676+
docking_manager: SD_DOCKING_MANAGER
645677

646678
set_template_tab_displayed (b: BOOLEAN)
647679
do

src/gui/cj_tool.e

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ deferred class
99

1010
feature {NONE} -- Initialization
1111

12-
make (cl: like cj_client)
12+
make (cl: like cj_client; dm: like docking_manager)
1313
do
14+
docking_manager := dm
1415
cj_client := cl
1516
create_interface_objects
1617
initialize
@@ -22,12 +23,14 @@ feature {NONE} -- Initialization
2223

2324
initialize
2425
do
25-
create sd_content.make_with_widget (widget, title)
26+
create sd_content.make_with_widget (widget, title, docking_manager)
2627
sd_content.set_short_title (title)
2728
sd_content.set_long_title (title)
2829
sd_content.close_request_actions.extend (agent hide)
2930
end
3031

32+
docking_manager: SD_DOCKING_MANAGER
33+
3134
feature -- Access
3235

3336
cj_client: CJ_CLIENT_PROXY

src/kernel/cj_client.e

+4-3
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ feature -- Access
115115
end
116116
l_ctx.add_header ("Content-Type", "application/vnd.collection+json")
117117
l_ctx.add_header ("Accept", "application/vnd.collection+json")
118-
118+
119119

120120
if attached cj_template_to_json (tpl) as j then
121121
d := "{ %"template%": " + j.representation + " }"
@@ -266,9 +266,10 @@ feature -- Access
266266
local
267267
p: JSON_PARSER
268268
do
269-
create p.make_parser (s)
269+
create p.make_with_string (s)
270+
p.parse_content
270271
if
271-
attached p.parse as v and then
272+
attached p.parsed_json_value as v and then
272273
p.is_parsed
273274
then
274275
Result := v

0 commit comments

Comments
 (0)