Start proper javadoc.

This commit is contained in:
Michael Lipp 2023-06-05 10:50:00 +02:00
parent 62cdea852c
commit 2d73d3ff07
15 changed files with 1119 additions and 18 deletions

View file

@ -1,8 +1,21 @@
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath 'org.ajoberstar.grgit:grgit-gradle:4.1.0'
classpath 'org.ajoberstar:gradle-git-publish:3.0.0'
}
}
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.15.0' apply false
id 'org.jdrupes.vmoperator.java-doc-conventions'
id 'eclipse'
}
project.group = 'org.jdrupes.vmoperator'
eclipse {
project {
file {

View file

@ -8,6 +8,9 @@ plugins {
// Apply the java Plugin to add support for Java.
id 'java'
// Git based versioning
id 'pl.allegro.tech.build.axion-release'
// Apply eclipse plugin
id 'eclipse'
}
@ -52,6 +55,17 @@ java {
}
}
scmVersion {
versionIncrementer 'incrementMinor'
tag {
def shortened = project.name.startsWith(project.group + ".") ?
project.name.substring(project.group.length() + 1) : project.name
prefix = shortened.replace('.', '-') + "-"
}
}
version = scmVersion.version
ext.isSnapshot = version.endsWith('-SNAPSHOT')
eclipse {
project {

View file

@ -0,0 +1,124 @@
plugins {
// Apply the common convention plugin for shared build configuration between library and application projects.
id 'org.jdrupes.vmoperator.java-common-conventions'
id 'org.ajoberstar.git-publish'
}
var docDestinationDir = file("${rootProject.buildDir}/javadoc")
configurations {
javadocTaglets
}
configurations {
markdownDoclet
javadocTaglets
}
dependencies {
markdownDoclet "org.jdrupes.mdoclet:doclet:3.1.0"
javadocTaglets "org.jdrupes.taglets:plantuml-taglet:2.1.0"
}
task javadocResources(type: Copy) {
into file(docDestinationDir)
from ("${rootProject.rootDir}/misc") {
include '*.woff2'
}
}
task java11doc (type: JavaExec) {
// Does not work on JitPack, no /usr/bin/dot
enabled = JavaVersion.current() == JavaVersion.VERSION_17
dependsOn javadocResources
outputs.dir(docDestinationDir)
inputs.file rootProject.file('overview.md')
inputs.file "${rootProject.rootDir}/misc/stylesheet.css"
jvmArgs = ['--add-exports=jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED']
main = 'jdk.javadoc.internal.tool.Main'
gradle.projectsEvaluated {
// Make sure that other projects' compileClasspaths are resolved
rootProject.subprojects
.findAll({project -> project.name.startsWith("org.jdrupes")})
.each{project -> dependsOn project.tasks.getByName('assemble')}
classpath = files(rootProject.subprojects
.findAll({project -> project.name.startsWith("org.jdrupes")})
.collect {project -> project.sourceSets.main.compileClasspath})
var sourceDirs = rootProject.subprojects
.findAll({project -> project.name.startsWith("org.jdrupes")})
.collect{project -> project.sourceSets.main.allJava.getSrcDirs() }
.flatten().findAll(dir -> dir.exists())
sourceDirs.each { inputs.dir(it) }
args = ['-doctitle', """VM-Operator
(runner.qemu-${-> findProject(':org.jdrupes.vmoperator.runner.qemu').version},
manager-${-> findProject(':org.jdrupes.vmoperator.manager').version})""",
'-use',
'-linksource',
'-link', 'https://docs.oracle.com/en/java/javase/17/docs/api/',
'-link', 'https://mnlipp.github.io/jgrapes/latest-release/javadoc/',
'-link', 'https://freemarker.apache.org/docs/api/',
'--add-exports', 'jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED',
'--add-exports', 'jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'-doclet', 'org.jdrupes.mdoclet.MDoclet',
'-docletpath', configurations.markdownDoclet.files.asType(List).join(":"),
'--disable-auto-highlight',
'-tagletpath', configurations.javadocTaglets.files.asType(List).join(":"),
'-taglet', 'org.jdrupes.taglets.plantUml.PlantUml',
'-taglet', 'org.jdrupes.taglets.plantUml.StartUml',
'-taglet', 'org.jdrupes.taglets.plantUml.EndUml',
'-overview', "${rootProject.file('overview.md')}",
'-d', docDestinationDir,
'-sourcepath', sourceDirs.join(':'),
'-subpackages', 'org.jdrupes',
'-bottom', rootProject.file("misc/javadoc.bottom.txt").text,
'--allow-script-in-comments',
'-Xdoclint:-html',
'--main-stylesheet', "${rootProject.rootDir}/misc/stylesheet.css",
'--add-exports=jdk.javadoc/jdk.javadoc.internal.doclets.formats.html=ALL-UNNAMED',
'-quiet'
]
}
ignoreExitValue true
}
// Prepare github authentication for plugins
if (System.properties['org.ajoberstar.grgit.auth.username'] == null) {
System.setProperty('org.ajoberstar.grgit.auth.username',
project.rootProject.properties['repo.access.token'] ?: "nouser")
}
gitPublish {
repoUri = 'https://github.com/mnlipp/VM-Operator.git'
branch = 'gh-pages'
contents {
from("${rootProject.buildDir}/javadoc") {
into 'javadoc'
}
if ({ !findProject(':org.jdrupes.vmoperator.runner.qemu').isSnapshot
&& !findProject(':org.jdrupes.vmoperator.manager').isSnapshot }) {
from("${rootProject.buildDir}/javadoc") {
into 'latest-release/javadoc'
}
}
}
preserve { include '**/*' }
commitMessage = "Updated."
}
gradle.projectsEvaluated {
tasks.gitPublishReset.mustRunAfter subprojects.tasks
.collect { tc -> tc.findByName("build") }.flatten()
tasks.gitPublishReset.mustRunAfter subprojects.tasks
.collect { tc -> tc.findByName("test") }.flatten()
tasks.gitPublishCopy.dependsOn java11doc
}

BIN
misc/DejaVuSans-Bold.woff2 Normal file

Binary file not shown.

BIN
misc/DejaVuSans.woff2 Normal file

Binary file not shown.

Binary file not shown.

BIN
misc/DejaVuSansMono.woff2 Normal file

Binary file not shown.

BIN
misc/DejaVuSerif-Bold.woff2 Normal file

Binary file not shown.

BIN
misc/DejaVuSerif.woff2 Normal file

Binary file not shown.

View file

@ -0,0 +1,10 @@
<html lang="de">
<head>
<title>JGrapes documentation</title>
<meta http-equiv="refresh" content="0; url=http://mnlipp.github.io/jgrapes/" />
</head>
<body>
If you are not redirected automatically,
follow this <a href='http://mnlipp.github.io/jgrapes/'>link to the documentation.</a>.
</body>
</html>

14
misc/javadoc.bottom.txt Normal file
View file

@ -0,0 +1,14 @@
<div>
<!-- Optional footer data -->
<p id=githubfooter style="padding: 5px 6px; visibility: hidden">Hosted on GitHub Pages &mdash;
<a href="https://github.com/site/terms" target="_top">Terms</a>
&mdash; <a href="https://github.com/site/privacy" target="_top">Privacy</a></p>
<script type="text/javascript">
if (location.hostname.indexOf("github") !== -1) {
document.getElementById("githubfooter").style.visibility="visible";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser, terms and privacy links may not be shown correctly.</div>
</noscript>
</div>

912
misc/stylesheet.css Normal file
View file

@ -0,0 +1,912 @@
/*
* Javadoc style sheet
*/
@font-face {
font-family: 'DejaVu Serif';
src: local('DejaVu Serif'), url('DejaVuSerif.woff2');
}
@font-face {
font-family: 'DejaVu Serif';
font-weight: bold;
src: local('DejaVu Serif Bold'), url('DejaVuSerif-Bold.woff2');
}
@font-face {
font-family: 'DejaVu Sans';
src: local('DejaVu Sans'), url('DejaVuSans.woff2');
}
@font-face {
font-family: 'DejaVu Sans';
font-weight: bold;
src: local('DejaVu Sans Bold'), url('DejaVuSans-Bold.woff2');
}
@font-face {
font-family: 'DejaVu Sans Mono';
src: local('DejaVu Sans Mono'), url('DejaVuSansMono.woff2');
}
@font-face {
font-family: 'DejaVu Sans Mono';
font-weight: bold;
src: local('DejaVu Sans Mono Bold'), url('DejaVuSansMono-Bold.woff2');
}
/*
* Styles for individual HTML elements.
*
* These are styles that are specific to individual HTML elements. Changing them affects the style of a particular
* HTML element throughout the page.
*/
body {
background-color:#ffffff;
color:#353833;
font: normal 16px/1.5 "DejaVu Serif", serif;
margin:0;
padding:0;
height:100%;
width:100%;
}
iframe {
margin:0;
padding:0;
height:100%;
width:100%;
overflow-y:scroll;
border:none;
}
a:link, a:visited {
text-decoration:none;
color:#4A6782;
}
a[href]:hover, a[href]:focus {
text-decoration:none;
color:#bb7a2a;
}
a[name] {
color:#353833;
}
pre {
font-family: "DejaVu Sans Mono", monospace;
}
h1 {
font-family: "DejaVu Sans", sans;
font-size:20px;
}
h2 {
font-family: "DejaVu Sans", sans;
font-size:18px;
}
h3 {
font-family: "DejaVu Sans", sans;
font-size:16px;
}
h4 {
font-family: "DejaVu Sans", sans;
font-size:15px;
}
h5 {
font-family: "DejaVu Sans", sans;
font-size:14px;
}
h6 {
font-family: "DejaVu Sans", sans;
font-size:13px;
}
ul {
list-style-type:disc;
}
code, tt {
font-family: "DejaVu Sans Mono", monospace;
}
:not(h1, h2, h3, h4, h5, h6) > code,
:not(h1, h2, h3, h4, h5, h6) > tt {
/* font-size:14px; */
padding-top:4px;
margin-top:8px;
line-height:1.4em;
}
dt code {
font-family: "DejaVu Sans Mono", monospace;
font-size:14px;
padding-top:4px;
}
.summary-table dt code {
font-family: "DejaVu Sans Mono", monospace;
font-size:14px;
vertical-align:top;
padding-top:4px;
}
sup {
font-size:8px;
}
/*
* Styles for HTML generated by javadoc.
*
* These are style classes that are used by the standard doclet to generate HTML documentation.
*/
/*
* Styles for document title and copyright.
*/
.clear {
clear:both;
height:0;
overflow:hidden;
}
.about-language {
float:right;
padding:0 21px 8px 8px;
font-size:11px;
margin-top:-9px;
height:2.9em;
}
.legal-copy {
margin-left:.5em;
}
.tab {
background-color:#0066FF;
color:#ffffff;
padding:8px;
width:5em;
font-weight:bold;
}
/*
* Styles for navigation bar.
*/
@media screen {
.flex-box {
position:fixed;
display:flex;
flex-direction:column;
height: 100%;
width: 100%;
}
.flex-header {
flex: 0 0 auto;
}
.flex-content {
flex: 1 1 auto;
overflow-y: auto;
}
}
.top-nav {
background-color:#4D7A97;
color:#FFFFFF;
float:left;
padding:0;
width:100%;
clear:right;
min-height:2.8em;
padding-top:10px;
overflow:hidden;
font-family: "DejaVu Sans", sans;
font-size:80%;
}
.sub-nav {
background-color:#dee3e9;
float:left;
width:100%;
overflow:hidden;
font-family: "DejaVu Sans", sans;
font-size:80%;
}
.sub-nav div {
clear:left;
float:left;
padding:0 0 5px 6px;
text-transform:uppercase;
}
.sub-nav .nav-list {
padding-top:5px;
}
ul.nav-list {
display:block;
margin:0 25px 0 0;
padding:0;
}
ul.sub-nav-list {
float:left;
margin:0 25px 0 0;
padding:0;
}
ul.nav-list li {
list-style:none;
float:left;
padding: 5px 6px;
text-transform:uppercase;
}
.sub-nav .nav-list-search {
float:right;
margin:0 0 0 0;
padding:5px 6px;
clear:none;
}
.nav-list-search label {
position:relative;
right:-16px;
}
ul.sub-nav-list li {
list-style:none;
float:left;
padding-top:10px;
}
.top-nav a:link, .top-nav a:active, .top-nav a:visited {
color:#FFFFFF;
text-decoration:none;
text-transform:uppercase;
}
.top-nav a:hover {
text-decoration:none;
color:#bb7a2a;
text-transform:uppercase;
}
.nav-bar-cell1-rev {
background-color:#F8981D;
color:#253441;
margin: auto 5px;
}
.skip-nav {
position:absolute;
top:auto;
left:-9999px;
overflow:hidden;
}
/*
* Hide navigation links and search box in print layout
*/
@media print {
ul.nav-list, div.sub-nav {
display:none;
}
}
/*
* Styles for page header and footer.
*/
.title {
color:#2c4557;
margin:10px 0;
}
.sub-title {
margin:5px 0 0 0;
}
.header ul {
margin:0 0 15px 0;
padding:0;
}
.header ul li, .footer ul li {
list-style:none;
font-size:80%;
}
/*
* Styles for headings.
*/
body.class-declaration-page .summary h2,
body.class-declaration-page .details h2,
body.class-use-page h2,
body.module-declaration-page .block-list h2 {
font-style: italic;
padding:0;
margin:15px 0;
}
body.class-declaration-page .summary h3,
body.class-declaration-page .details h3,
body.class-declaration-page .summary .inherited-list h2 {
background-color:#dee3e9;
border:1px solid #d0d9e0;
margin:0 0 6px -8px;
padding:7px 5px;
}
/*
* Styles for page layout containers.
*/
main {
clear:both;
padding:10px 20px;
position:relative;
}
dl.notes > dt {
font-family: "DejaVu Sans", sans;
font-weight:bold;
margin:10px 0 0 0;
color:#4E4E4E;
}
dl.notes > dd {
margin:5px 10px 10px 0;
}
dl.name-value > dt {
margin-left:1px;
/* font-size:1.1em; */
display:inline;
font-weight:bold;
}
dl.name-value > dd {
margin:0 0 0 1px;
/* font-size:1.1em; */
display:inline;
}
/*
* Styles for lists.
*/
li.circle {
list-style:circle;
}
ul.horizontal li {
display:inline;
/* font-size:0.9em; */
}
div.inheritance {
margin:0;
padding:0;
}
div.inheritance div.inheritance {
margin-left:2em;
}
ul.block-list,
ul.details-list,
ul.member-list,
ul.summary-list {
margin:10px 0 10px 0;
padding:0;
}
ul.block-list > li,
ul.details-list > li,
ul.member-list > li,
ul.summary-list > li {
list-style:none;
margin-bottom:15px;
line-height:1.4;
}
.summary-table dl, .summary-table dl dt, .summary-table dl dd {
margin-top:0;
margin-bottom:1px;
}
ul.see-list, ul.see-list-long {
padding-left: 0;
list-style: none;
}
ul.see-list li {
display: inline;
}
ul.see-list li:not(:last-child):after,
ul.see-list-long li:not(:last-child):after {
content: ", ";
white-space: pre-wrap;
}
/*
* Styles for tables.
*/
.summary-table, .details-table {
width:100%;
border-spacing:0;
border-left:1px solid #EEE;
border-right:1px solid #EEE;
border-bottom:1px solid #EEE;
padding:0;
}
.caption {
position:relative;
text-align:left;
background-repeat:no-repeat;
color:#253441;
font-weight:bold;
clear:none;
overflow:hidden;
padding:0;
padding-top:10px;
padding-left:1px;
margin:0;
white-space:pre;
font-family: 'DejaVu Sans';
}
.caption a:link, .caption a:visited {
color:#1f389c;
}
.caption a:hover,
.caption a:active {
color:#FFFFFF;
}
.caption span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
padding-right:12px;
padding-bottom:7px;
display:inline-block;
float:left;
background-color:#F8981D;
border: none;
height:16px;
}
div.table-tabs {
padding:10px 0 0 1px;
margin:0;
}
div.table-tabs > button {
border: none;
cursor: pointer;
padding: 5px 12px 7px 12px;
font-weight: bold;
margin-right: 3px;
}
div.table-tabs > button.active-table-tab {
background: #F8981D;
color: #253441;
}
div.table-tabs > button.table-tab {
background: #4D7A97;
color: #FFFFFF;
}
.two-column-summary {
display: grid;
grid-template-columns: minmax(15%, max-content) minmax(15%, auto);
}
.three-column-summary {
display: grid;
grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto);
}
#method-summary-table .three-column-summary {
grid-template-columns: minmax(10%, 20%) minmax(15%, max-content) minmax(15%, auto);
}
.four-column-summary {
display: grid;
grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto);
}
@media screen and (max-width: 600px) {
.two-column-summary {
display: grid;
grid-template-columns: 1fr;
}
}
@media screen and (max-width: 800px) {
.three-column-summary {
display: grid;
grid-template-columns: minmax(10%, max-content) minmax(25%, auto);
}
.three-column-summary .col-last {
grid-column-end: span 2;
}
}
@media screen and (max-width: 1000px) {
.four-column-summary {
display: grid;
grid-template-columns: minmax(15%, max-content) minmax(15%, auto);
}
}
.summary-table > div, .details-table > div {
text-align:left;
padding: 8px 3px 3px 7px;
}
.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name {
vertical-align:top;
padding-right:0;
padding-top:8px;
padding-bottom:3px;
}
.table-header {
background:#dee3e9;
font-family: 'DejaVu Sans';
font-weight: bold;
}
/*
.col-first, .col-first {
font-size:13px;
}
.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last {
font-size:13px;
}
*/
.col-first, .col-second, .col-constructor-name {
vertical-align:top;
overflow: auto;
}
.col-last {
white-space:normal;
}
/*
.col-first a:link, .col-first a:visited,
.col-second a:link, .col-second a:visited,
.col-first a:link, .col-first a:visited,
.col-second a:link, .col-second a:visited,
.col-constructor-name a:link, .col-constructor-name a:visited,
.col-summary-item-name a:link, .col-summary-item-name a:visited,
.constant-values-container a:link, .constant-values-container a:visited,
.all-classes-container a:link, .all-classes-container a:visited,
.all-packages-container a:link, .all-packages-container a:visited {
font-weight:bold;
}
*/
.table-sub-heading-color {
background-color:#EEEEFF;
}
.even-row-color, .even-row-color .table-header {
background-color:#FFFFFF;
}
.odd-row-color, .odd-row-color .table-header {
background-color:#EEEEEF;
}
/*
* Styles for contents.
*/
.deprecated-content {
margin:0;
padding:10px 0;
}
/*
div.block {
font-size:14px;
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
}
*/
.col-last div {
padding-top:0;
}
.col-last a {
padding-bottom:3px;
}
.module-signature,
.package-signature,
.type-signature,
.member-signature {
font-family: "DejaVu Sans Mono", monospace;
/* font-size:14px; */
margin:14px 0;
white-space: pre-wrap;
}
.module-signature,
.package-signature,
.type-signature {
margin-top: 0;
}
.member-signature .type-parameters-long,
.member-signature .parameters,
.member-signature .exceptions {
display: inline-block;
vertical-align: top;
white-space: pre;
}
.member-signature .type-parameters {
white-space: normal;
}
/*
* Styles for formatting effect.
*/
.source-line-no {
color:green;
padding:0 30px 0 0;
}
h1.hidden {
visibility:hidden;
overflow:hidden;
/* font-size:10px; */
}
.block {
display:block;
margin:0 10px 5px 0;
color:#474747;
}
.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link,
.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type,
.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label {
font-family: "DejaVu Sans", sans;
font-weight:bold;
}
.sub-title, .inheritance, .all-packages-table-tab1.col-first,
.summary-table .col-first {
font-family: "DejaVu Sans", sans;
}
.deprecation-comment, .help-footnote, .preview-comment {
font-style:italic;
}
.deprecation-block {
/* font-size:14px; */
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
border-style:solid;
border-width:thin;
border-radius:10px;
padding:10px;
margin-bottom:10px;
margin-right:10px;
display:inline-block;
}
.preview-block {
/* font-size:14px; */
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
border-style:solid;
border-width:thin;
border-radius:10px;
padding:10px;
margin-bottom:10px;
margin-right:10px;
display:inline-block;
}
div.block div.deprecation-comment {
font-style:normal;
}
/*
* Styles specific to HTML5 elements.
*/
main, nav, header, footer, section {
display:block;
}
/*
* Styles for javadoc search.
*/
.ui-autocomplete-category {
font-weight:bold;
/* font-size:15px; */
padding:7px 0 7px 3px;
background-color:#4D7A97;
color:#FFFFFF;
}
.result-item {
/* font-size:13px; */
}
.ui-autocomplete {
max-height:85%;
max-width:65%;
overflow-y:scroll;
overflow-x:scroll;
white-space:nowrap;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
ul.ui-autocomplete {
position:fixed;
z-index:999999;
}
ul.ui-autocomplete li {
float:left;
clear:both;
width:100%;
}
.result-highlight {
font-weight:bold;
}
#search-input {
background-image:url('resources/glass.png');
background-size:13px;
background-repeat:no-repeat;
background-position:2px 3px;
padding-left:20px;
position:relative;
right:-18px;
width:400px;
}
#reset-button {
background-color: rgb(255,255,255);
background-image:url('resources/x.png');
background-position:center;
background-repeat:no-repeat;
background-size:12px;
border:0 none;
width:16px;
height:16px;
position:relative;
left:-4px;
top:-4px;
font-size:0px;
}
.watermark {
color:#545454;
}
.search-tag-desc-result {
font-style:italic;
/* font-size:11px; */
}
.search-tag-holder-result {
font-style:italic;
/* font-size:12px; */
}
.search-tag-result:target {
background-color:yellow;
}
.module-graph span {
display:none;
position:absolute;
}
.module-graph:hover span {
display:block;
margin: -100px 0 0 100px;
z-index: 1;
}
.inherited-list {
margin: 10px 0 10px 0;
}
section.class-description {
line-height: 1.4;
}
.summary section[class$="-summary"], .details section[class$="-details"],
.class-uses .detail, .serialized-class-details {
padding: 0px 20px 5px 10px;
border: 1px solid #ededed;
background-color: #f8f8f8;
}
.inherited-list, section[class$="-details"] .detail {
padding:0 0 5px 8px;
background-color:#ffffff;
border:none;
}
.vertical-separator {
padding: 0 5px;
}
ul.help-section-list {
margin: 0;
}
ul.help-subtoc > li {
display: inline-block;
padding-right: 5px;
/* font-size: smaller; */
}
ul.help-subtoc > li::before {
content: "\2022" ;
padding-right:2px;
}
span.help-note {
font-style: italic;
}
/*
* Indicator icon for external links.
*/
main a[href*="://"]::after {
content:"";
display:inline-block;
background-image:url('data:image/svg+xml; utf8, \
<svg xmlns="http://www.w3.org/2000/svg" width="768" height="768">\
<path d="M584 664H104V184h216V80H0v688h688V448H584zM384 0l132 \
132-240 240 120 120 240-240 132 132V0z" fill="%234a6782"/>\
</svg>');
background-size:100% 100%;
width:7px;
height:7px;
margin-left:2px;
margin-bottom:4px;
}
main a[href*="://"]:hover::after,
main a[href*="://"]:focus::after {
background-image:url('data:image/svg+xml; utf8, \
<svg xmlns="http://www.w3.org/2000/svg" width="768" height="768">\
<path d="M584 664H104V184h216V80H0v688h688V448H584zM384 0l132 \
132-240 240 120 120 240-240 132 132V0z" fill="%23bb7a2a"/>\
</svg>');
}
/*
* Styles for user-provided tables.
*
* borderless:
* No borders, vertical margins, styled caption.
* This style is provided for use with existing doc comments.
* In general, borderless tables should not be used for layout purposes.
*
* plain:
* Plain borders around table and cells, vertical margins, styled caption.
* Best for small tables or for complex tables for tables with cells that span
* rows and columns, when the "striped" style does not work well.
*
* striped:
* Borders around the table and vertical borders between cells, striped rows,
* vertical margins, styled caption.
* Best for tables that have a header row, and a body containing a series of simple rows.
*/
table.borderless,
table.plain,
table.striped {
margin-top: 10px;
margin-bottom: 10px;
}
table.borderless > caption,
table.plain > caption,
table.striped > caption {
font-weight: bold;
/* font-size: smaller; */
}
table.borderless th, table.borderless td,
table.plain th, table.plain td,
table.striped th, table.striped td {
padding: 2px 5px;
}
table.borderless,
table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th,
table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td {
border: none;
}
table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr {
background-color: transparent;
}
table.plain {
border-collapse: collapse;
border: 1px solid black;
}
table.plain > thead > tr, table.plain > tbody tr, table.plain > tr {
background-color: transparent;
}
table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th,
table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td {
border: 1px solid black;
}
table.striped {
border-collapse: collapse;
border: 1px solid black;
}
table.striped > thead {
background-color: #E3E3E3;
}
table.striped > thead > tr > th, table.striped > thead > tr > td {
border: 1px solid black;
}
table.striped > tbody > tr:nth-child(even) {
background-color: #EEE
}
table.striped > tbody > tr:nth-child(odd) {
background-color: #FFF
}
table.striped > tbody > tr > th, table.striped > tbody > tr > td {
border-left: 1px solid black;
border-right: 1px solid black;
}
table.striped > tbody > tr > th {
font-weight: normal;
}
/**
* Tweak font sizes and paddings for small screens.
*/
@media screen and (max-width: 1050px) {
#search-input {
width: 300px;
}
}
@media screen and (max-width: 800px) {
#search-input {
width: 200px;
}
.top-nav,
.bottom-nav {
font-size: 80%;
padding-top: 6px;
}
.sub-nav {
font-size: 80%;
}
.about-language {
padding-right: 16px;
}
ul.nav-list li,
.sub-nav .nav-list-search {
padding: 6px;
}
ul.sub-nav-list li {
padding-top: 5px;
}
main {
padding: 10px;
}
.summary section[class$="-summary"], .details section[class$="-details"],
.class-uses .detail, .serialized-class-details {
padding: 0 8px 5px 8px;
}
body {
-webkit-text-size-adjust: none;
}
}
@media screen and (max-width: 500px) {
#search-input {
width: 150px;
}
.top-nav,
.bottom-nav {
font-size: 80%;
}
.sub-nav {
font-size: 80%;
}
.about-language {
font-size: 80%;
padding-right: 12px;
}
}

View file

@ -111,7 +111,6 @@ public class QemuMonitor extends Component {
* qemu process if it has been created.
*
* @param event the event
* @param context the context
*/
@Handler
public void onFileChanged(FileChanged event) {

View file

@ -72,9 +72,16 @@ import org.jgrapes.util.events.InitialConfiguration;
import org.jgrapes.util.events.WatchFile;
/**
* The Runner.
* The Runner is responsible for manageing the Qemu process and
* optionally a process that emulates a TPM (software TPM). It
* it's function is best described by a state diagram.
*
* @startuml
* ![Runner state diagram](RunnerStates.svg)
*
* If the log level for `org.jdrupes.vmoperator.runner.qemu.monitor`
* is set to fine, the messages exchanged on the monitor socket are logged.
*
* @startuml RunnerStates.svg
* [*] --> Initializing
* Initializing -> Initializing: InitialConfiguration/configure Runner
* Initializing -> Initializing: Start/start Runner
@ -92,27 +99,43 @@ import org.jgrapes.util.events.WatchFile;
* which --> qemu: [else]
*
* swtpm: entry/start swtpm
* swtpm --> error: StartProcessError/stop
* swtpm -> error: StartProcessError/stop
* swtpm -> qemu: FileChanged[swtpm socket created]
*
* qemu: entry/start qemu
* qemu --> error: StartProcessError/stop
* qemu -> error: StartProcessError/stop
* qemu --> monitor : FileChanged[monitor socket created]
*
* monitor: entry/fire OpenSocketConnection
* monitor --> success: ClientConnected[for monitor]
* monitor --> error: ConnectError[for monitor]
* monitor -> error: ConnectError[for monitor]
* }
*
* Initializing --> which: Started
*
* success --> Running
* error --> [*]
*
* state Terminating {
* state terminated <<exitPoint>>
* state which2 <<choice>>
*
* state "Powerdown qemu" as qemuPowerdown
* state "Await process termination" as terminateProcesses
* qemuPowerdown: entry/suspend Stop, send powerdown to qemu, start timer
*
* qemuPowerdown --> which2: Closed[for monitor]/resume Stop
* qemuPowerdown --> terminateProcesses: Timeout/resume Stop
* which2 --> terminateProcesses: [use swtmp]
* which2 --> terminated: [else]
* terminateProcesses --> terminated
* }
*
* Running --> qemuPowerdown: Stop
* terminated --> [*]
*
* @enduml
*
* If the log level for `org.jdrupes.vmoperator.runner.qemu.monitor`
* is set to fine, the messages exchanged on the monitor socket are logged.
*/
@SuppressWarnings("PMD.ExcessiveImports")
public class Runner extends Component {
@ -345,7 +368,6 @@ public class Runner extends Component {
* qemu process if it has been created.
*
* @param event the event
* @param context the context
*/
@Handler
public void onFileChanged(FileChanged event) {
@ -410,7 +432,6 @@ public class Runner extends Component {
* On qemu monitor started.
*
* @param event the event
* @param context the context
*/
@Handler
public void onQemuMonitorOpened(QemuMonitorOpened event) {
@ -433,15 +454,9 @@ public class Runner extends Component {
*
* @param event the event
*/
@Handler
@Handler(priority = 10_000)
public void onStop(Stop event) {
// Context context = (Context) channel();
// if (context.qemuChannel != null) {
// event.suspendHandling();
// context.suspendedStop = event;
// writeToMonitor(context,
// config.monitorMessages.get("powerdown").asText());
// }
state.set(State.TERMINATING);
}
/**

0
overview.md Normal file
View file