Added self doc to the wsf file system handler

Allow to hide the wsf file system handler from self documentation
Better description format handling for the self doc
This commit is contained in:
Jocelyn Fiat
2013-03-25 19:13:55 +01:00
parent da28baf872
commit 1ee6ffa725
3 changed files with 63 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ feature {NONE} -- Initialization
make (m: like mapping)
do
mapping := m
create {STRING_32} description.make_empty
create descriptions.make (0)
end
feature -- Status report
@@ -27,7 +27,7 @@ feature -- Status report
-- Is Current empty?
-- i.e: does not carry any information.
do
Result := description.is_empty
Result := descriptions.is_empty
end
feature -- Access
@@ -35,7 +35,18 @@ feature -- Access
mapping: WSF_ROUTER_MAPPING
-- Associated mapping
descriptions: ARRAYED_LIST [READABLE_STRING_GENERAL]
description: STRING_32
do
create Result.make_empty
across
descriptions as c
loop
Result.append_string_general (c.item)
Result.append ("%N")
end
end
feature -- Change
@@ -46,7 +57,17 @@ feature -- Change
add_description (d: READABLE_STRING_GENERAL)
do
description.append_string_general (d)
descriptions.force (d)
end
note
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -204,6 +204,7 @@ feature {WSF_RESPONSE} -- Output
l_url: detachable STRING_8
l_base_url: detachable READABLE_STRING_8
l_doc: detachable WSF_ROUTER_MAPPING_DOCUMENTATION
l_first: BOOLEAN
do
if attached {WSF_SELF_DOCUMENTED_ROUTER_MAPPING} m as l_doc_mapping then
l_doc := l_doc_mapping.documentation (meths)
@@ -256,7 +257,17 @@ feature {WSF_RESPONSE} -- Output
if l_doc /= Void and then not l_doc.is_empty then
s.append ("%N<ul class=%"handlerdoc%">")
s.append (html_encoder.encoded_string (l_doc.description))
l_first := True
across
l_doc.descriptions as c
loop
if not l_first then
s.append ("<br/>")
else
l_first := False
end
s.append (html_encoder.general_encoded_string (c.item))
end
s.append ("%N</ul>%N")
else
debug