note
description: "Summary description for {ECF_BUILDER_VISITOR}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
ECF_BUILDER_VISITOR
inherit
ECF_VISITOR
create
make
feature {NONE} -- Initialization
make (buf: like buffer)
do
buffer := buf
end
buffer: STRING
feature -- Visitor
process_ecf (v: ECF)
do
end
process_testing_ecf (v: TESTING_ECF)
do
process_application_ecf (v)
end
process_application_ecf (v: APPLICATION_ECF)
do
buffer.append_string ("%N")
buffer.append_string ("%N")
buffer.append_string ("%T%N")
buffer.append_string ("%T%T%N")
buffer.append_string ("%T%T%N")
buffer.append_string ("%T%T%T/.git$%N")
buffer.append_string ("%T%T%T/EIFGENs$%N")
buffer.append_string ("%T%T%T/.svn$%N")
buffer.append_string ("%T%T%N")
buffer.append_string ("%T%T%N")
if v.is_console_application then
check v.generating_type = {APPLICATION_ECF} end
buffer.append_string ("%T%T%N")
end
if attached v.executable_name as s then
check v.generating_type = {APPLICATION_ECF} end
buffer.append_string ("%T%T%N")
end
if attached v.concurrency as s then
buffer.append_string ("%T%T%N")
end
process_libraries_from (v)
process_clusters_from (v)
process_tests_clusters_from (v)
buffer.append_string ("%T%N")
buffer.append_string ("%N")
end
process_library_ecf (v: LIBRARY_ECF)
do
buffer.append_string ("%N")
buffer.append_string ("%N")
buffer.append_string ("%T%N")
buffer.append_string ("%T%T%N")
buffer.append_string ("%T%T%N")
buffer.append_string ("%T%T%T/.git$%N")
buffer.append_string ("%T%T%T/EIFGENs$%N")
buffer.append_string ("%T%T%T/.svn$%N")
buffer.append_string ("%T%T%N")
buffer.append_string ("%T%T%N")
process_libraries_from (v)
process_clusters_from (v)
process_tests_clusters_from (v)
buffer.append_string ("%T%N")
buffer.append_string ("%N")
end
feature {NONE} -- Implementation
process_libraries_from (v: ECF)
do
across
v.libraries as libs
loop
if attached library_info (libs.item) as lib_info then
if v.is_voidsafe then
buffer.append_string ("%T%T%N")
else
buffer.append_string ("%T%T%N")
end
end
end
end
process_clusters_from (v: ECF)
do
across
v.clusters as clu
loop
if attached clu.item as l_cluster then
if l_cluster.same_string (".") then
buffer.append_string ("%T%T%N")
else
buffer.append_string ("%T%T%N")
end
end
end
end
process_tests_clusters_from (v: ECF)
do
across
v.tests_clusters as clu
loop
if attached clu.item as l_cluster then
if l_cluster.same_string (".") then
buffer.append_string ("%T%T%N")
else
buffer.append_string ("%T%T%N")
end
end
end
end
library_info (s: STRING): detachable TUPLE [name: STRING; ecf_path: STRING]
local
lib: STRING
p: INTEGER
do
if s.has ('/') or s.has ('\') then
p := s.last_index_of ('/', s.count).max (s.last_index_of ('\', s.count))
if s.substring (s.count - 3, s.count).is_case_insensitive_equal (".ecf") then
Result := [s.substring (p + 1, s.count - 4).as_lower, s.substring (1, s.count - 4)]
else
Result := [s.substring (p + 1, s.count).as_lower, s]
end
else
lib := s.as_lower
Result := [lib, "$ISE_LIBRARY/library/" + s + "/" + s]
end
end
end