Commit 17fa4836 authored by Dennis Hendriks's avatar Dennis Hendriks
Browse files

Merge branch '73-splits-escet-end-user-and-developer-documentation' into 'develop'

#73 Split ESCET end-user and developer documentation into two separate documentation sets.

Closes #73

See merge request !162
parents e2c6bfbd 6ebc2dea
Pipeline #947 passed with stage
in 0 seconds
......@@ -27,7 +27,7 @@ For more information regarding source code management, builds, setting up a
developer environment, coding standards, how to contribute, and more, see
the Eclipse ESCET development documentation at:
* https://eclipse.org/escet/escet/developer
* https://eclipse.org/escet/development
The project maintains the following source code repositories:
......@@ -47,7 +47,7 @@ that contributions are always welcome!
To contribute source code (e.g. patches) via GitLab, see:
* https://eclipse.org/escet/escet/developer/contributing.html
* https://eclipse.org/escet/development/development/contributing.html
To create issues, reply to issues, contribute patches and merge requests, etc,
you need an Eclipse Foundation account. It can easily be created at
......
......@@ -153,7 +153,8 @@ pipeline {
cp releng/website/*.html deploy/www/${RELEASE_VERSION}
cp releng/website/*.png deploy/www/${RELEASE_VERSION}
sed -i -e "s/@VERSION@/${RELEASE_VERSION}/g" deploy/www/${RELEASE_VERSION}/index.html
unzip -q products/org.eclipse.escet.documentation/target/*-website-*.zip -d deploy/www/${RELEASE_VERSION}/escet/
unzip -q releng/org.eclipse.escet.releng.project.documentation/target/*-website-*.zip -d deploy/www/${RELEASE_VERSION}/escet/
unzip -q releng/org.eclipse.escet.releng.dev.documentation/target/*-website-*.zip -d deploy/www/${RELEASE_VERSION}/development/
unzip -q chi/org.eclipse.escet.chi.documentation/target/*-website-*.zip -d deploy/www/${RELEASE_VERSION}/chi/
unzip -q cif/org.eclipse.escet.cif.documentation/target/*-website-*.zip -d deploy/www/${RELEASE_VERSION}/cif/
unzip -q tooldef/org.eclipse.escet.tooldef.documentation/target/*-website-*.zip -d deploy/www/${RELEASE_VERSION}/tooldef/
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
<stringAttribute key="M2_GOALS" value="clean package --projects releng/org.eclipse.escet.target,chi/org.eclipse.escet.chi.documentation,cif/org.eclipse.escet.cif.documentation,products/org.eclipse.escet.documentation,tooldef/org.eclipse.escet.tooldef.documentation --also-make"/>
<stringAttribute key="M2_GOALS" value="clean package --projects releng/org.eclipse.escet.target,chi/org.eclipse.escet.chi.documentation,cif/org.eclipse.escet.cif.documentation,releng/org.eclipse.escet.releng.dev.documentation,releng/org.eclipse.escet.releng.project.documentation,tooldef/org.eclipse.escet.tooldef.documentation --also-make"/>
<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
<booleanAttribute key="M2_OFFLINE" value="false"/>
<stringAttribute key="M2_PROFILES" value=""/>
......
......@@ -789,7 +789,7 @@ public abstract class Application<T extends IOutputComponent> {
public String getCrashReportIssueReportingInstructions() {
return "Issues can be reported using the Eclipse ESCET issue tracker, at "
+ "https://gitlab.eclipse.org/eclipse/escet/escet/-/issues. For more information, see "
+ "https://eclipse.org/escet/escet/developer/issue-tracking.html. This crash report "
+ "https://eclipse.org/escet/escet/issue-reporting.html. This crash report "
+ "contains valuable information that you can include in your bug report, to make it easier for the "
+ "bug to be fixed. We appreciate you taking the effort to report issues to us!";
}
......
......@@ -53,6 +53,9 @@ import com.google.common.collect.Multimaps;
/** AsciiDoc-generated single-page HTML modifier. */
class AsciiDocHtmlModifier {
/** Whether to print debug output. */
private static final boolean DEBUG = false;
/** Constructor for the {@link AsciiDocHtmlModifier} class. */
private AsciiDocHtmlModifier() {
// Static class.
......@@ -78,6 +81,11 @@ class AsciiDocHtmlModifier {
// Modify the pages, per page.
for (AsciiDocHtmlPage page: htmlPages.pages) {
try {
// Debug output.
if (DEBUG) {
System.out.println("Modifying page: " + page.sourceFile.relPath);
}
// Clone the original single-page HTML file for this page.
page.doc = singlePageDoc.clone();
......@@ -397,37 +405,55 @@ class AsciiDocHtmlModifier {
* @param doc The HTML document to modify in-place.
*/
private static void removeEmptyParagraphsAndSections(Document doc) {
// Remove empty paragraphs.
for (Element pElem: doc.select("p")) {
if (pElem.attributes().size() == 0 && haveNoContent(pElem.childNodes())) {
pElem.remove();
boolean modified;
do {
// Initialization.
modified = false;
// Remove empty paragraphs.
for (Element pElem: doc.select("p")) {
if (pElem.attributes().size() == 0 && haveNoContent(pElem.childNodes())) {
pElem.remove();
modified = true;
}
}
}
for (Element paragraphDivElem: doc.select("div.paragraph")) {
if (haveNoContent(paragraphDivElem.childNodes())) {
paragraphDivElem.remove();
for (Element paragraphDivElem: doc.select("div.paragraph")) {
if (haveNoContent(paragraphDivElem.childNodes())) {
paragraphDivElem.remove();
modified = true;
}
}
}
// Remove empty sections.
Element elemContent = single(doc.select("#content"));
for (int i = 99; i >= 0; i--) { // Start with most deeply nested sections first.
for (Element sectElem: elemContent.select("div.sect" + Integer.toString(i))) {
if (haveNoContent(sectElem.childNodes())) {
// Completely empty section.
sectElem.remove();
} else if (sectElem.children().size() == 1) {
Element sectChildElem = sectElem.child(0);
List<Node> sectChildNodes = copy(sectElem.childNodes());
sectChildNodes.remove(sectChildElem);
if (sectChildElem.tagName().matches("h\\d+") && haveNoContent(sectChildNodes)) {
// Section with only a wrapper header name (all actual content is on other pages).
// Remove empty section bodies.
for (Element sectionBodyDivElem: doc.select("div.sectionbody")) {
if (haveNoContent(sectionBodyDivElem.childNodes())) {
sectionBodyDivElem.remove();
modified = true;
}
}
// Remove empty sections.
Element elemContent = single(doc.select("#content"));
for (int i = 99; i >= 0; i--) { // Start with most deeply nested sections first.
for (Element sectElem: elemContent.select("div.sect" + Integer.toString(i))) {
if (haveNoContent(sectElem.childNodes())) {
// Completely empty section.
sectElem.remove();
modified = true;
} else if (sectElem.children().size() == 1) {
Element sectChildElem = sectElem.child(0);
List<Node> sectChildNodes = copy(sectElem.childNodes());
sectChildNodes.remove(sectChildElem);
if (sectChildElem.tagName().matches("h\\d+") && haveNoContent(sectChildNodes)) {
// Section with only a wrapper header name (all actual content is on other pages).
sectElem.remove();
modified = true;
}
}
}
}
}
} while (modified);
}
/**
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.escet.common.asciidoc/src/org/eclipse/escet/common/asciidoc/html/multipage/AsciiDocMultiPageHtmlSplitter.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.escet.common.asciidoc.html.multipage.AsciiDocMultiPageHtmlSplitter"/>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="org.eclipse.escet.common.asciidoc"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="../../releng/org.eclipse.escet.releng.dev.documentation/asciidoc ../../releng/org.eclipse.escet.releng.dev.documentation/target/eclipse-help-intermediate/index.html test/output-eclipse-help-escet-dev --eclipse-help"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.escet.common.asciidoc"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.escet.common.asciidoc/src/org/eclipse/escet/common/asciidoc/html/multipage/AsciiDocMultiPageHtmlSplitter.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.escet.common.asciidoc.html.multipage.AsciiDocMultiPageHtmlSplitter"/>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="org.eclipse.escet.common.asciidoc"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="../../releng/org.eclipse.escet.releng.project.documentation/asciidoc ../../releng/org.eclipse.escet.releng.project.documentation/target/eclipse-help-intermediate/index.html test/output-eclipse-help-escet-project --eclipse-help"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.escet.common.asciidoc"/>
</launchConfiguration>
......@@ -11,6 +11,6 @@
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.escet.common.asciidoc.html.multipage.AsciiDocMultiPageHtmlSplitter"/>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="org.eclipse.escet.common.asciidoc"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="../../products/org.eclipse.escet.documentation/asciidoc ../../products/org.eclipse.escet.documentation/target/eclipse-help-intermediate/index.html test/output-eclipse-help-escet --eclipse-help"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="../../releng/org.eclipse.escet.releng.dev.documentation/asciidoc ../../releng/org.eclipse.escet.releng.dev.documentation/target/website-intermediate/index.html test/output-website-escet-dev --website"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.escet.common.asciidoc"/>
</launchConfiguration>
......@@ -11,6 +11,6 @@
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.escet.common.asciidoc.html.multipage.AsciiDocMultiPageHtmlSplitter"/>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="org.eclipse.escet.common.asciidoc"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="../../products/org.eclipse.escet.documentation/asciidoc ../../products/org.eclipse.escet.documentation/target/website-intermediate/index.html test/output-website-escet --website"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="../../releng/org.eclipse.escet.releng.project.documentation/asciidoc ../../releng/org.eclipse.escet.releng.project.documentation/target/website-intermediate/index.html test/output-website-escet-project --website"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.escet.common.asciidoc"/>
</launchConfiguration>
......@@ -155,10 +155,12 @@ POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./common/org.eclipse.escet.common.e
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./common/org.eclipse.escet.common.position.metamodel/docs/position_ecore_doc.tex:3$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./common/org.eclipse.escet.common.position.metamodel/model/autofix.py:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./misc/license-header/license-header-check.bash:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/asciidoc/index.asciidoc:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/asciidoc/legal.asciidoc:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.product.branding/about.properties:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.product.branding/plugin.properties:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/asciidoc/index.asciidoc:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/asciidoc/legal.asciidoc:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.project.documentation/asciidoc/index.asciidoc:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.project.documentation/asciidoc/legal.asciidoc:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./tooldef/org.eclipse.escet.tooldef.documentation/asciidoc/index.asciidoc:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./tooldef/org.eclipse.escet.tooldef.documentation/asciidoc/legal.asciidoc:2$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./tooldef/org.eclipse.escet.tooldef.metamodel/model/autofix.py:2$"
......@@ -206,18 +208,18 @@ POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./cif/org.eclipse.escet.cif.documen
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./cif/org.eclipse.escet.cif.documentation/images/tools/mergecif/merge_timed.cif:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./cif/org.eclipse.escet.cif.documentation/images/tools/mergecif/merged.cif:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./common/org.eclipse.escet.common.raildiagrams/src/org/eclipse/escet/common/raildiagrams/config/default.properties:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/abcd.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/abcdefgh.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/alternating.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/choice.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/choice2.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/emptyalternating.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/optional.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/refpath.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/sequence.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/sequence_loops.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/terminals.props:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./products/org.eclipse.escet.documentation/images/rail/terminals.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/abcd.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/abcdefgh.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/alternating.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/choice.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/choice2.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/emptyalternating.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/optional.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/refpath.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/sequence.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/sequence_loops.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/terminals.props:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./releng/org.eclipse.escet.releng.dev.documentation/images/rail/terminals.rr:0$"
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./tooldef/org.eclipse.escet.tooldef.documentation/images/language-reference/syntax/tooldef.bnf:0$"
# Exclude third party dependencies.
POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./thirdparty/.*\.properties:0$"
......
......@@ -72,7 +72,13 @@
unpack="false"/>
<plugin
id="org.eclipse.escet.documentation"
id="org.eclipse.escet.releng.dev.documentation"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.eclipse.escet.releng.project.documentation"
download-size="0"
install-size="0"
version="0.0.0"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.escet.documentation</name>
<name>org.eclipse.escet.releng.dev.documentation</name>
<comment></comment>
<projects>
</projects>
......
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ESCET Documentation (Incubation)
Bundle-SymbolicName: org.eclipse.escet.documentation;singleton:=true
Bundle-Name: ESCET Development Documentation (Incubation)
Bundle-SymbolicName: org.eclipse.escet.releng.dev.documentation;singleton:=true
Bundle-Version: 0.4.0.qualifier
Bundle-Vendor: Eclipse ESCET
Require-Bundle: org.eclipse.help,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment