NX01: Closed x4o-maisdoc module by moving theme to META-INF
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 57s
|
|
@ -31,7 +31,7 @@
|
||||||
/// @version ©Δ∞ 仙上主天
|
/// @version ©Δ∞ 仙上主天
|
||||||
open module ᣕᕁᐤᣳ.ᕽᙾᐤ.ᒄᣗᑊᘁᓫᣗ {
|
open module ᣕᕁᐤᣳ.ᕽᙾᐤ.ᒄᣗᑊᘁᓫᣗ {
|
||||||
// TODO: remove open after qa module, as all test resources only work if open...
|
// TODO: remove open after qa module, as all test resources only work if open...
|
||||||
// thus local tests that remain, can only use inline xml if module is not open...
|
// thus local tests that remain, can only use inline xml if module is not open in test or move to META-INF...
|
||||||
|
|
||||||
// TODO: move qa tests own project as we get duplicate resouces from "ONE" module filtered to last one which breaks testing
|
// TODO: move qa tests own project as we get duplicate resouces from "ONE" module filtered to last one which breaks testing
|
||||||
|
|
||||||
|
|
@ -42,7 +42,7 @@ open module ᣕᕁᐤᣳ.ᕽᙾᐤ.ᒄᣗᑊᘁᓫᣗ {
|
||||||
|
|
||||||
// TEMP for tests only, until split to nx01-x4o-driver-qa module
|
// TEMP for tests only, until split to nx01-x4o-driver-qa module
|
||||||
requires java.desktop;
|
requires java.desktop;
|
||||||
// M2E is correct for now allowing two module-info per project, missing;
|
// M2E is correct for not allowing two module-info per project, missing;
|
||||||
//test-requires java.desktop;
|
//test-requires java.desktop;
|
||||||
//test-requires transitive org.junit.jupiter.engine;
|
//test-requires transitive org.junit.jupiter.engine;
|
||||||
//test-requires transitive org.junit.jupiter.api;
|
//test-requires transitive org.junit.jupiter.api;
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,7 @@
|
||||||
///
|
///
|
||||||
/// @author للَّٰهِilLצسُو
|
/// @author للَّٰهِilLצسُو
|
||||||
/// @version ©Δ∞ 仙上主天
|
/// @version ©Δ∞ 仙上主天
|
||||||
open module ᣕᕁᐤᣳ.ᕽᙾᐤ.ᔿᣔᑊᔆᒄᐤᒼ {
|
module ᣕᕁᐤᣳ.ᕽᙾᐤ.ᔿᣔᑊᔆᒄᐤᒼ {
|
||||||
//note: open for classloader resources(js/css) loading from this module
|
|
||||||
|
|
||||||
requires transitive ᣕᕁᐤᣳ.ᕽᙾᐤ.ᔆᣔᕽᕀᕀᕀ;
|
requires transitive ᣕᕁᐤᣳ.ᕽᙾᐤ.ᔆᣔᕽᕀᕀᕀ;
|
||||||
requires transitive java.logging;
|
requires transitive java.logging;
|
||||||
|
|
|
||||||
|
|
@ -566,7 +566,7 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
|
||||||
|
|
||||||
private void writeStyleSheet() throws IOException {
|
private void writeStyleSheet() throws IOException {
|
||||||
try {
|
try {
|
||||||
copyResourceToFile("org/x4o/maisdoc/theme/base/api-theme.js", basePath, "resources", "api-theme.js");
|
copyResourceToFile("META-INF/maisdoc/theme/base/api-theme.js", basePath, "resources", "api-theme.js");
|
||||||
|
|
||||||
if (doc.getMetaStyleSheet() != null) {
|
if (doc.getMetaStyleSheet() != null) {
|
||||||
copyStreamToFile(new FileInputStream(doc.getMetaStyleSheet()), basePath, "resources", "stylesheet.css");
|
copyStreamToFile(new FileInputStream(doc.getMetaStyleSheet()), basePath, "resources", "stylesheet.css");
|
||||||
|
|
@ -574,25 +574,25 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
|
||||||
}
|
}
|
||||||
String thema = doc.getMetaStyleSheetThema();
|
String thema = doc.getMetaStyleSheetThema();
|
||||||
List<String> cssResources = new ArrayList<String>(10);
|
List<String> cssResources = new ArrayList<String>(10);
|
||||||
cssResources.add("org/x4o/maisdoc/theme/base/api-theme.css");
|
cssResources.add("META-INF/maisdoc/theme/base/api-theme.css");
|
||||||
cssResources.add("org/x4o/maisdoc/theme/base/api-html.css");
|
cssResources.add("META-INF/maisdoc/theme/base/api-html.css");
|
||||||
cssResources.add("org/x4o/maisdoc/theme/base/api-layout.css");
|
cssResources.add("META-INF/maisdoc/theme/base/api-layout.css");
|
||||||
cssResources.add("org/x4o/maisdoc/theme/base/api-inset.css");
|
cssResources.add("META-INF/maisdoc/theme/base/api-inset.css");
|
||||||
cssResources.add("org/x4o/maisdoc/theme/base/api-font.css");
|
cssResources.add("META-INF/maisdoc/theme/base/api-font.css");
|
||||||
cssResources.add("org/x4o/maisdoc/theme/base/api-color.css");
|
cssResources.add("META-INF/maisdoc/theme/base/api-color.css");
|
||||||
|
|
||||||
if ("jdk6".equals(thema)) {
|
if ("jdk6".equals(thema)) {
|
||||||
cssResources.add("org/x4o/maisdoc/theme/jdk6/stylesheet.css");
|
cssResources.add("META-INF/maisdoc/theme/jdk6/stylesheet.css");
|
||||||
writeStyleSheetResources(cssResources);
|
writeStyleSheetResources(cssResources);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ("jdk7".equals(thema)) {
|
if ("jdk7".equals(thema)) {
|
||||||
cssResources.add("org/x4o/maisdoc/theme/jdk7/stylesheet.css");
|
cssResources.add("META-INF/maisdoc/theme/jdk7/stylesheet.css");
|
||||||
writeStyleSheetResources(cssResources);
|
writeStyleSheetResources(cssResources);
|
||||||
copyResourceToFile("org/x4o/maisdoc/theme/jdk7/background.png", basePath, "resources", "background.png");
|
copyResourceToFile("META-INF/maisdoc/theme/jdk7/background.png", basePath, "resources", "background.png");
|
||||||
copyResourceToFile("org/x4o/maisdoc/theme/jdk7/tab.png", basePath, "resources", "tab.png");
|
copyResourceToFile("META-INF/maisdoc/theme/jdk7/tab.png", basePath, "resources", "tab.png");
|
||||||
copyResourceToFile("org/x4o/maisdoc/theme/jdk7/titlebar_end.png", basePath, "resources", "titlebar_end.png");
|
copyResourceToFile("META-INF/maisdoc/theme/jdk7/titlebar_end.png", basePath, "resources", "titlebar_end.png");
|
||||||
copyResourceToFile("org/x4o/maisdoc/theme/jdk7/titlebar.png", basePath, "resources", "titlebar.png");
|
copyResourceToFile("META-INF/maisdoc/theme/jdk7/titlebar.png", basePath, "resources", "titlebar.png");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
|
|
@ -812,8 +812,8 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
|
||||||
writer.printTagStart(Tag.div, MaisDocContentCss.indexContainer);
|
writer.printTagStart(Tag.div, MaisDocContentCss.indexContainer);
|
||||||
writer.printTagStart(Tag.ul);
|
writer.printTagStart(Tag.ul);
|
||||||
|
|
||||||
boolean printParent = new Boolean(true).equals(doc.getFrameNavPrintParent());
|
boolean printParent = Boolean.TRUE.equals(doc.getFrameNavPrintParent());
|
||||||
boolean printParentParent = new Boolean(true).equals(doc.getFrameNavPrintParentParent());
|
boolean printParentParent = Boolean.TRUE.equals(doc.getFrameNavPrintParentParent());
|
||||||
|
|
||||||
for (MaisDocNode node : nodes) {
|
for (MaisDocNode node : nodes) {
|
||||||
List<String> nodePath = new ArrayList<String>(10);
|
List<String> nodePath = new ArrayList<String>(10);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ package org.x4o.maisdoc.model;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
@ -150,13 +151,11 @@ public class MaisDoc {
|
||||||
setNodeData(new MaisDocNodeData());
|
setNodeData(new MaisDocNodeData());
|
||||||
try {
|
try {
|
||||||
for (Class<?> annoClass : getAnnotatedClasses()) {
|
for (Class<?> annoClass : getAnnotatedClasses()) {
|
||||||
Object bean = annoClass.newInstance();
|
Object bean = annoClass.getConstructor().newInstance();
|
||||||
MaisDocNodeWriterBean.addAnnotatedNodeContentWriters(this, bean);
|
MaisDocNodeWriterBean.addAnnotatedNodeContentWriters(this, bean);
|
||||||
MaisDocNodeDataConfiguratorBean.addAnnotatedNodeDataConfigurators(this, bean);
|
MaisDocNodeDataConfiguratorBean.addAnnotatedNodeDataConfigurators(this, bean);
|
||||||
}
|
}
|
||||||
} catch (InstantiationException e) {
|
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException e) {
|
||||||
throw new IllegalArgumentException(e);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
throw new IllegalArgumentException(e);
|
throw new IllegalArgumentException(e);
|
||||||
}
|
}
|
||||||
for (MaisDocConcept concept : getConcepts()) {
|
for (MaisDocConcept concept : getConcepts()) {
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
|
@ -124,11 +127,18 @@ public class MaisDocRemoteClass {
|
||||||
packageList.clear();
|
packageList.clear();
|
||||||
String baseUrl = getDocUrlClean();
|
String baseUrl = getDocUrlClean();
|
||||||
baseUrl += REMOTE_FILE;
|
baseUrl += REMOTE_FILE;
|
||||||
URL url = new URL(baseUrl);
|
URL url;
|
||||||
|
try {
|
||||||
|
url = new URI(baseUrl).toURL();
|
||||||
|
} catch (MalformedURLException | URISyntaxException e) {
|
||||||
|
throw new IOException(e);
|
||||||
|
}
|
||||||
URLConnection conn = url.openConnection();
|
URLConnection conn = url.openConnection();
|
||||||
conn.setConnectTimeout(2000);
|
conn.setConnectTimeout(2000);
|
||||||
conn.setReadTimeout(2000);
|
conn.setReadTimeout(2000);
|
||||||
parseRemoteFile(conn.getInputStream(), conn.getContentEncoding());
|
try (InputStream in = conn.getInputStream()) {
|
||||||
|
parseRemoteFile(in, conn.getContentEncoding());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -143,16 +153,12 @@ public class MaisDocRemoteClass {
|
||||||
enc = "UTF-8";
|
enc = "UTF-8";
|
||||||
}
|
}
|
||||||
BufferedReader br = new BufferedReader(new InputStreamReader(in, Charset.forName(enc)));
|
BufferedReader br = new BufferedReader(new InputStreamReader(in, Charset.forName(enc)));
|
||||||
try {
|
|
||||||
String line = null;
|
String line = null;
|
||||||
while ((line = br.readLine()) != null) {
|
while ((line = br.readLine()) != null) {
|
||||||
String lineClean = line.trim();
|
String lineClean = line.trim();
|
||||||
packageList.add(lineClean);
|
packageList.add(lineClean);
|
||||||
logger.finer("Adding remote package: '" + lineClean + "'");
|
logger.finer("Adding remote package: '" + lineClean + "'");
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
br.close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |