blob: 22c582105f3fd09ed66156b5a70588ba6f26e82f [file] [log] [blame]
<%--
Copyright (c) 2020 Eclipse contributors and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
--%>
<%@jet
package="org.eclipse.justj.codegen.templates.description"
class="Describer"
imports="java.util.List org.eclipse.justj.codegen.model.util.Generator.Description.Descriptor"
builder="StringBuilder builder = new StringBuilder()"
minimize="true"%>
<%Descriptor descriptor = (Descriptor)argument;
String link = descriptor.getLink();%>
<span class="jre-gen-description"><code><%if (link != null) {%><a href="<%=link%>"><%}%><%=descriptor.getName()%><%if (link != null) {%></a><%}%></code> - <%=descriptor.getDescription()%></span>
<%List<Descriptor> children = descriptor.getChildren();
if (!children.isEmpty()) {%>
<ul class="jre-gen-group">
<%for (Descriptor child : children) {
String childContent = generate(child);
String[] lines = childContent.split("\r?\n");%>
<li class="jre-gen-item">
<%for (String line : lines) {%>
<%=line%>
<%}%>
</li>
<%}%>
</ul>
<%}%>