/[eiffelstudio]/branches/eth/eve/Src/Eiffel/interface/graphical/tools/autodebug/data/es_adb_working_directory.e
ViewVC logotype

Contents of /branches/eth/eve/Src/Eiffel/interface/graphical/tools/autodebug/data/es_adb_working_directory.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 95332 - (show annotations)
Fri Jun 27 12:57:49 2014 UTC (5 years, 3 months ago) by maxpei
File size: 5432 byte(s)
Fixed a few bugs in AutoFix and AutoDebug.
1 note
2 description: "Summary description for {ES_ADB_WORKING_DIRECTORY}."
3 author: ""
4 date: "$Date$"
5 revision: "$Revision$"
6
7 class
8 ES_ADB_WORKING_DIRECTORY
9
10 inherit
11 ES_ADB_TOOL_HELPER
12
13 create
14 make
15
16 feature{NONE} -- Initialization
17
18 make (a_root_dir: PATH)
19 -- Initialization.
20 do
21 root_dir := a_root_dir.twin
22 end
23
24 feature -- Access
25
26 root_dir: PATH
27 -- Root of the working directory.
28
29 feature -- Query
30
31 testing_result_dir: PATH
32 -- Path to the directory for testing results.
33 do
34 if testing_result_dir_internal = Void then
35 initialize
36 end
37 Result := testing_result_dir_internal
38 end
39
40 testing_result_dir_for_fault (a_fault: ES_ADB_FAULT): PATH
41 -- Path to the directory for testing results related with `a_fault'.
42 require
43 a_fault /= VOid
44 do
45 Result := testing_result_dir.extended (a_fault.signature.class_under_test).extended (a_fault.signature.feature_under_test)
46 end
47
48 tested_class_timestamps_path: PATH
49 -- Path to the file of timestamps for the tested classes.
50 do
51 if tested_class_timestamps_path_internal = Void then
52 initialize
53 end
54 Result := tested_class_timestamps_path_internal
55 end
56
57 relaxed_testing_result_dir: PATH
58 -- Path to the directory of relaxed testing results.
59 do
60 if relaxed_testing_result_dir_internal = Void then
61 initialize
62 end
63 Result := relaxed_testing_result_dir_internal
64 end
65
66 fixing_result_dir: PATH
67 -- Path to the directory for fixing results.
68 do
69 if fixing_result_dir_internal = Void then
70 initialize
71 end
72 Result := fixing_result_dir_internal
73 end
74
75 fixing_result_file_path (a_fault: ES_ADB_FAULT): PATH
76 -- Path to the fixing result file for `a_fault'.
77 require
78 a_fault /= Void
79 do
80 Result := fixing_result_dir.extended (a_fault.signature.id + ".afx")
81 end
82
83 temp_dir: PATH
84 -- Path to the directory for temporary files.
85 do
86 if temp_dir_internal = Void then
87 initialize
88 end
89 Result := temp_dir_internal
90 end
91
92 original_file_path (a_copied_file_path: PATH): PATH
93 -- Path to the origian file, given the path to its copy in current.
94 require
95 a_copied_file_path /= Void
96 local
97 l_copied_path_str, l_original_path_str, l_root_path_str, l_project_path_str: STRING
98 do
99 l_copied_path_str := a_copied_file_path.out
100 l_root_path_str := temp_dir.out
101 l_original_path_str := l_copied_path_str.twin
102 if l_copied_path_str.starts_with (l_root_path_str) then
103 l_project_path_str := project_path.out
104 l_original_path_str.replace_substring_all (l_root_path_str, l_project_path_str)
105 end
106 create Result.make_from_string (l_original_path_str)
107 end
108
109 feature -- Operation
110
111 initialize
112 -- Initialize the structure of the directory.
113 local
114 l_dir: DIRECTORY
115 do
116 testing_result_dir_internal := root_dir.extended ("testing")
117 tested_class_timestamps_path_internal := testing_result_dir.extended ("timestamps.log")
118 relaxed_testing_result_dir_internal := root_dir.extended ("relaxed_testing")
119 fixing_result_dir_internal := root_dir.extended ("fixing")
120 temp_dir_internal := root_dir.extended ("temp")
121
122 create l_dir.make_with_path (testing_result_dir_internal)
123 if not l_dir.exists then
124 l_dir.recursive_create_dir
125 end
126
127 create l_dir.make_with_path (relaxed_testing_result_dir_internal)
128 if not l_dir.exists then
129 l_dir.recursive_create_dir
130 end
131
132 create l_dir.make_with_path (fixing_result_dir_internal)
133 if not l_dir.exists then
134 l_dir.recursive_create_dir
135 end
136
137 create l_dir.make_with_path (temp_dir_internal)
138 if l_dir.exists then
139 l_dir.recursive_create_dir
140 end
141 end
142
143 clear
144 -- Clear the content in Current.
145 local
146 l_dir: DIRECTORY
147 do
148 create l_dir.make_with_path (root_dir)
149 if not l_dir.exists then
150 l_dir.recursive_create_dir
151 end
152 l_dir.delete_content
153 end
154
155 feature{NONE} -- Cache
156
157 testing_result_dir_internal: like testing_result_dir
158 tested_class_timestamps_path_internal: like tested_class_timestamps_path
159 relaxed_testing_result_dir_internal: like relaxed_testing_result_dir
160 fixing_result_dir_internal: like fixing_result_dir
161 temp_dir_internal: like temp_dir
162
163 ;note
164 copyright: "Copyright (c) 1984-2014, Eiffel Software"
165 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
166 licensing_options: "http://www.eiffel.com/licensing"
167 copying: "[
168 This file is part of Eiffel Software's Eiffel Development Environment.
169
170 Eiffel Software's Eiffel Development Environment is free
171 software; you can redistribute it and/or modify it under
172 the terms of the GNU General Public License as published
173 by the Free Software Foundation, version 2 of the License
174 (available at the URL listed under "license" above).
175
176 Eiffel Software's Eiffel Development Environment is
177 distributed in the hope that it will be useful, but
178 WITHOUT ANY WARRANTY; without even the implied warranty
179 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
180 See the GNU General Public License for more details.
181
182 You should have received a copy of the GNU General Public
183 License along with Eiffel Software's Eiffel Development
184 Environment; if not, write to the Free Software Foundation,
185 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
186 ]"
187 source: "[
188 Eiffel Software
189 5949 Hollister Ave., Goleta, CA 93117 USA
190 Telephone 805-685-1006, Fax 805-685-6869
191 Website http://www.eiffel.com
192 Customer support http://support.eiffel.com
193 ]"
194 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23