]*>([^<]*)");
}
@Override
public Pattern getIndexUrlRegex() {
return Pattern.compile("]*>");
}
@Override
public Pattern getApiTitleRegex() {
return Pattern.compile("([^<]*) ");
}
}
================================================
FILE: src/main/java/jetbrick/tools/chm/style/Javadoc8Style.java
================================================
/**
* javadoc.chm
* http://subchen.github.io/javadoc.chm/
*
* Copyright 2010-2014 Guoqiang Chen. All rights reserved.
* Email: subchen@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jetbrick.tools.chm.style;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
public class Javadoc8Style extends JavadocStyle {
@Override
public Pattern getAnchorNameRegex() {
return Pattern.compile("]*>");
}
@Override
public Pattern getIndexRegex() {
return Pattern.compile("(?:)?]*>(?:)?([^<]*)(?:)?");
}
@Override
public Pattern getJavaClassRegex() {
return Pattern.compile("]*>(?:)?([^<]*)(?:)?");
}
@Override
public Pattern getJavaFieldRegex() {
return Pattern.compile("]*>([^<]*)");
}
@Override
public Pattern getIndexUrlRegex() {
return Pattern.compile("]*>");
}
@Override
public Pattern getApiTitleRegex() {
return Pattern.compile("([^<]*) ");
}
@Override
public boolean isMethod(String url) {
return url.endsWith("-");
}
@Override
public String getMethodFullName(String url) {
String name = StringUtils.substringAfter(url, "#");
int count = StringUtils.countMatches(name, "-");
name = StringUtils.replaceOnce(name, "-", "(");
for (int i = 0; i < count - 2; i++) {
name = StringUtils.replaceOnce(name, "-", ", ");
}
name = StringUtils.replaceOnce(name, "-", ")");
name = StringUtils.replace(name, ":A", "[]");
return name;
}
}
================================================
FILE: src/main/java/jetbrick/tools/chm/style/JavadocStyle.java
================================================
/**
* javadoc.chm
* http://subchen.github.io/javadoc.chm/
*
* Copyright 2010-2014 Guoqiang Chen. All rights reserved.
* Email: subchen@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jetbrick.tools.chm.style;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
public class JavadocStyle {
public Pattern getAnchorNameRegex() {
return Pattern.compile("]*>");
}
public Pattern getIndexRegex() {
return Pattern.compile("]*>([^<]*)");
}
public Pattern getJavaClassRegex() {
return Pattern.compile("]*>(?:)?([^<]*)(?:)?");
}
public Pattern getJavaFieldRegex() {
return Pattern.compile("]*>([^<]*)");
}
public Pattern getIndexUrlRegex() {
return Pattern.compile("]*>");
}
public Pattern getApiTitleRegex() {
return Pattern.compile("([^<]*) ");
}
public boolean isMethod(String url) {
return url.endsWith("(");
}
public String getMethodFullName(String url) {
return StringUtils.substringAfter(url, "#");
}
}
================================================
FILE: src/main/resources/log4j.properties
================================================
log4j.logger.jetbrick=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=(%F:%L) - %m%n
================================================
FILE: src/main/resources/template/build.vm
================================================
start hhc htmlhelp.hhp
================================================
FILE: src/main/resources/template/hhc.vm
================================================
#foreach ($package in $packages)
-
#foreach ($c in $package.classes)
-
#if ($c.methods.size() > 0)
#foreach ($m in $c.methods)
-
#end
#end
#end
#end
================================================
FILE: src/main/resources/template/hhk.vm
================================================
#foreach ($index in $sortIndexes)
-
#end
================================================
FILE: src/main/resources/template/hhp.vm
================================================
[OPTIONS]
Compatibility=1.1 or later
Contents file=htmlhelp.hhc
Index file=htmlhelp.hhk
Title=${title} - by http://subchen.github.io/
Default topic=${indexUrl}
Compiled file=${title}.chm
Display compile progress=Yes
Binary Index=Yes
Full-text search=Yes
Language=0x804
Default Window=main
[WINDOWS]
main=,"htmlhelp.hhc","htmlhelp.hhk","${indexUrl}","${indexUrl}",,,,,0x23420,,0x187e,,0x118b0000,,,,,,0
[FILES]
#foreach ($f in $files)
$f
#end
================================================
FILE: src/main/resources/template/redir.vm
================================================
Occurences of ${keyManager.key}
- ${keyManager.key} occurences:
#foreach ($m in $keyManager.pairs)
- ${m}
#end
Copyright 2010-2014 Guoqiang Chen. All rights reserved.
http://subchen.github.io/ subchen@gmail.com