diff --git a/jxr/src/main/org/apache/maven/jxr/CodeTransform.java b/jxr/src/main/org/apache/maven/jxr/CodeTransform.java index cd871993..1923d6c8 100644 --- a/jxr/src/main/org/apache/maven/jxr/CodeTransform.java +++ b/jxr/src/main/org/apache/maven/jxr/CodeTransform.java @@ -30,19 +30,25 @@ package org.apache.maven.jxr; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.PrintWriter; +import java.io.Serializable; import java.util.Hashtable; import java.util.Vector; import org.apache.commons.lang.StringUtils; - import org.apache.maven.jxr.pacman.ClassType; -import org.apache.maven.jxr.pacman.PackageManager; -import org.apache.maven.jxr.pacman.JavaFile; -import org.apache.maven.jxr.pacman.ImportType; import org.apache.maven.jxr.pacman.FileManager; +import org.apache.maven.jxr.pacman.ImportType; +import org.apache.maven.jxr.pacman.JavaFile; +import org.apache.maven.jxr.pacman.PackageManager; import org.apache.maven.jxr.pacman.PackageType; - import org.apache.maven.jxr.util.SimpleWordTokenizer; import org.apache.maven.jxr.util.StringEntry; @@ -59,84 +65,97 @@ import org.apache.maven.jxr.util.StringEntry; * |__ * multiLineCommentFilter -> uriFilter * |___ - * inlineCommentFilter - * |___ - * stringFilter - * |__ - * keywordFilter - * |__ - * uriFilter - * |__ - * jxrFilter - * |__ - * importFilter + * inlineCommentFilter + * |___ + * stringFilter + * |___ + * keywordFilter + * |___ + * uriFilter + * |___ + * jxrFilter + * |___ + * importFilter * */ public class CodeTransform implements Serializable { + /** - * Description of the Field + * show line numbers */ - public final static boolean LINE_NUMBERS = true; + public static final boolean LINE_NUMBERS = true; + + /** + * start comment delimeter + */ + public static final String COMMENT_START = ""; + + /** + * end comment delimeter + */ + public static final String COMMENT_END = ""; + + /** + * start javadoc comment delimeter + */ + public static final String JAVADOC_COMMENT_START = ""; + + /** + * end javadoc comment delimeter + */ + public static final String JAVADOC_COMMENT_END = ""; + + /** + * start String delimeter + */ + public static final String STRING_START = ""; + + /** + * end String delimeter + */ + public static final String STRING_END = ""; + + /** + * start reserved word delimeter + */ + public static final String RESERVED_WORD_START = ""; + + /** + * end reserved word delimeter + */ + public static final String RESERVED_WORD_END = ""; + + /** + * stylesheet file name + */ + public static final String STYLESHEET_FILENAME = "stylesheet.css"; /** * Description of the Field */ - public final static String BACKGROUND_COLOR = "#ffffff"; - - /** - * Description of the Field - */ - public final static String COMMENT_START = ""; - - /** - * Description of the Field - */ - public final static String COMMENT_END = ""; - - /** - * Description of the Field - */ - public final static String JAVADOC_COMMENT_START = ""; - - /** - * Description of the Field - */ - public final static String JAVADOC_COMMENT_END = ""; - - /** - * Description of the Field - */ - public final static String STRING_START = ""; - - /** - * Description of the Field - */ - public final static String STRING_END = ""; - - /** - * Description of the Field - */ - public final static String RESERVED_WORD_START = ""; - - /** - * Description of the Field - */ - public final static String RESERVED_WORD_END = ""; - - /** - * Description of the Field - */ - public final static String[] VALID_URI_SCHEMES = {"http://", "mailto:"}; + public static final String[] VALID_URI_SCHEMES = {"http://", "mailto:"}; /** * Specify the only characters that are allowed in a URI besides alpha and * numeric characters. Refer RFC2396 - http://www.ietf.org/rfc/rfc2396.txt */ - public final static char[] VALID_URI_CHARS = {'?', '+', '%', '&', ':', '/', '.', '@', '_', ';', '=', '$', ',', '-', '!', '~', '*', '\'', '(', ')'}; - + public static final char[] VALID_URI_CHARS = + { '?', '+', '%', '&', ':', '/', '.', '@', '_', ';', '=', '$', ',', '-', '!', '~', '*', '\'', '(', ')' }; + + /** + * HashTable containing java reserved words + */ private Hashtable reservedWords = new Hashtable(); + + /** + * flag set to true when a multi line comment is started + */ private boolean inMultiLineComment = false; + + /** + * flag set to true when a javadoc comment is started + */ private boolean inJavadocComment = false; /** @@ -168,16 +187,14 @@ public class CodeTransform implements Serializable * Relative path to javadocs, suitable for hyperlinking */ private String javadocLinkDir; - - /* + + /** * Package Manager for this project. */ private PackageManager packageManager; - /** * Constructor for the CodeTransform object - * * @param packageManager PackageManager for this project */ public CodeTransform(PackageManager packageManager) @@ -186,10 +203,11 @@ public class CodeTransform implements Serializable loadHash(); } - /** * Now different method of seeing if at end of input stream, closes inputs * stream at end. + * @param line String + * @return filtered line of code */ public final String syntaxHighlight(String line) { @@ -198,6 +216,8 @@ public class CodeTransform implements Serializable /** * Filter html tags into more benign text. + * @param line String + * @return html encoded line */ private final String htmlFilter(String line) { @@ -205,18 +225,18 @@ public class CodeTransform implements Serializable { return ""; } + line = replace(line, "&", "&"); line = replace(line, "<", "<"); - line = replace(line, ">", ">"); line = replace(line, "\\\\", "//"); line = replace(line, "\\\"", "\\""); line = replace(line, "'\"'", "'"'"); return multiLineCommentFilter(line); } - /** - * Filter out multiLine comments. State is kept with a private boolean - * variable. + * Filter out multiLine comments. State is kept with a private boolean variable. + * @param line String + * @return String */ private final String multiLineCommentFilter(String line) { @@ -228,8 +248,7 @@ public class CodeTransform implements Serializable int index; //First, check for the end of a java comment. - if (inJavadocComment && - (index = line.indexOf("*/")) > -1 && !isInsideString(line, index)) + if (inJavadocComment && (index = line.indexOf("*/")) > -1 && !isInsideString(line, index)) { inJavadocComment = false; buf.append(JAVADOC_COMMENT_START); @@ -323,6 +342,8 @@ public class CodeTransform implements Serializable * either ignore the problem, or implement a function called something like * isInsideString(line, index) where index points to some point in the line * that we need to check... started doing this function below. + * @param line String + * @return String */ private final String inlineCommentFilter(String line) { @@ -348,6 +369,8 @@ public class CodeTransform implements Serializable /** * Filters strings from a line of text and formats them properly. + * @param line String + * @return String */ private final String stringFilter(String line) { @@ -394,6 +417,8 @@ public class CodeTransform implements Serializable /** * Filters keywords from a line of text and formats them properly. + * @param line String + * @return String */ private final String keywordFilter(String line) { @@ -402,19 +427,15 @@ public class CodeTransform implements Serializable return ""; } StringBuffer buf = new StringBuffer(); - //HashMap usedReservedWords = new HashMap(); Hashtable usedReservedWords = new Hashtable(); int i = 0; - int startAt = 0; char ch; StringBuffer temp = new StringBuffer(); while (i < line.length()) { temp.setLength(0); ch = line.charAt(i); - startAt = i; - while (i < line.length() && ((ch >= 65 && ch <= 90) - || (ch >= 97 && ch <= 122))) + while (i < line.length() && ((ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122))) { temp.append(ch); i++; @@ -441,13 +462,22 @@ public class CodeTransform implements Serializable /** * Replace... I made it use a stringBuffer... hope it still works :) + * @param line String + * @param oldString String + * @param newString String + * @return String */ private final String replace(String line, String oldString, String newString) { int i = 0; while ((i = line.indexOf(oldString, i)) >= 0) { - line = (new StringBuffer().append(line.substring(0, i)).append(newString).append(line.substring(i + oldString.length()))).toString(); + line = + (new StringBuffer() + .append(line.substring(0, i)) + .append(newString) + .append(line.substring(i + oldString.length()))) + .toString(); i += newString.length(); } return line; @@ -456,6 +486,9 @@ public class CodeTransform implements Serializable /** * Checks to see if some position in a line is between String start and * ending characters. Not yet used in code or fully working :) + * @param line String + * @param position int + * @return boolean */ private final boolean isInsideString(String line, int position) { @@ -478,14 +511,7 @@ public class CodeTransform implements Serializable rightCount++; right = right.substring(index + 1); } - if (rightCount % 2 != 0 && leftCount % 2 != 0) - { - return true; - } - else - { - return false; - } + return (rightCount % 2 != 0 && leftCount % 2 != 0); } /** @@ -550,52 +576,89 @@ public class CodeTransform implements Serializable /** * Description of the Method + * @param oos ObjectOutputStream + * @throws IOException */ - final void writeObject(ObjectOutputStream oos) - throws IOException + final void writeObject(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); } /** * Description of the Method + * @param ois ObjectInputStream + * @throws ClassNotFoundException + * @throws IOException */ - final void readObject(ObjectInputStream ois) - throws ClassNotFoundException, IOException + final void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { ois.defaultReadObject(); } /** * Gets the header attribute of the CodeTransform object + * @todo make language and encoding headers customizable + * @return String */ public String getHeader() { - return "\n" + - "\n" + - "
\n" + this.getFileOverview();
+        StringBuffer buffer = new StringBuffer();
+
+        // header
+        buffer
+            .append("\n")
+            .append("\n")
+            .append("\n")
+            .append("");
+
+        // title ("classname xref")
+        try
+        {
+            buffer
+                .append("")
+                .append(FileManager.getInstance().getFile(this.getCurrentFilename()).getClassType().getName())
+                .append(" xref\n");
+
+        }
+        catch (IOException e)
+        {
+            buffer.append("xref\n");
+            e.printStackTrace();
+        }
+
+        // stylesheet link
+        buffer
+            .append("\n");
+
+        buffer.append("\n").append("\n").append(this.getFileOverview());
+
+        // start code section
+        buffer.append("
\n");
+
+        return buffer.toString();
     }
-        
+
     /**
      * Gets the footer attribute of the CodeTransform object
+     * @return String
      */
     public final String getFooter()
     {
-        return "
\n" + - "
" + - "
" + JXR.NOTICE + "
" + - "\n" + - "\n"; + return "
\n" + "
" + "
" + JXR.NOTICE + "
" + "\n" + "\n"; } - /** * This is the public method for doing all transforms of code. + * @param sourcefile String + * @param destfile String + * @param javadocLinkDir String + * @param revision String + * @throws IOException */ - public final void transform(String sourcefile, - String destfile, - String javadocLinkDir, - String revision) + public final void transform(String sourcefile, String destfile, String javadocLinkDir, String revision) throws IOException { @@ -611,103 +674,124 @@ public class CodeTransform implements Serializable FileReader fr = null; FileWriter fw = null; - try { - fr = new FileReader(sourcefile); - fw = new FileWriter(destfile); - BufferedReader in = new BufferedReader(fr); - - PrintWriter out = new PrintWriter(fw); + try + { + fr = new FileReader(sourcefile); + fw = new FileWriter(destfile); + BufferedReader in = new BufferedReader(fr); - String line = ""; + PrintWriter out = new PrintWriter(fw); - out.println(getHeader()); + String line = ""; - int linenumber = 1; - while ((line = in.readLine()) != null) - { - if (LINE_NUMBERS) + out.println(getHeader()); + + int linenumber = 1; + while ((line = in.readLine()) != null) { - out.print("" + - linenumber + - "" + getLineWidth(linenumber)); + if (LINE_NUMBERS) + { + out.print( + "" + + linenumber + + "" + + getLineWidth(linenumber)); + } + + out.println(this.syntaxHighlight(line)); + + ++linenumber; } - out.println(this.syntaxHighlight(line)); - - ++linenumber; - } - - out.println(getFooter()); - out.flush(); - } finally { - if (fr != null) { - try { - fr.close(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - if (fw != null) { - try { - fw.close(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } + out.println(getFooter()); + out.flush(); + } + finally + { + if (fr != null) + { + try + { + fr.close(); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + if (fw != null) + { + try + { + fw.close(); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } } } /** * Get an overview header for this file. + * @return String */ private final String getFileOverview() { StringBuffer overview = new StringBuffer(); - overview.append(""); + // only add the header if javadocs are present + if (javadocLinkDir != null) + { - if (javadocLinkDir != null) { - //get the URI to get Javadoc info. - StringBuffer javadocURI = new StringBuffer() - .append(getPackageRoot()) - .append(javadocLinkDir); + overview.append("
"); + //get the URI to get Javadoc info. + StringBuffer javadocURI = new StringBuffer().append(getPackageRoot()).append(javadocLinkDir); - try - { - JavaFile jf = FileManager.getInstance().getFile(this.getCurrentFilename()); + try + { + JavaFile jf = FileManager.getInstance().getFile(this.getCurrentFilename()); - javadocURI.append(StringUtils.replace(jf.getPackageType().getName(), ".", "/")); - javadocURI.append("/"); - if (jf.getClassType() != null) - { - javadocURI.append(jf.getClassType().getName()); - } - else - { - System.out.println(this.getCurrentFilename()); - } - javadocURI.append(".html"); + javadocURI.append(StringUtils.replace(jf.getPackageType().getName(), ".", "/")); + javadocURI.append("/"); + if (jf.getClassType() != null) + { + javadocURI.append(jf.getClassType().getName()); + } + else + { + System.out.println(this.getCurrentFilename()); + } + javadocURI.append(".html"); - } - catch (IOException e) - { - e.printStackTrace(); - } + } + catch (IOException e) + { + e.printStackTrace(); + } - String javadocHREF = "View Javadoc"; + String javadocHREF = "View Javadoc"; - //get the generation time... - overview.append(javadocHREF); + //get the generation time... + overview.append(javadocHREF); + + overview.append("
"); } - overview.append("
"); return overview.toString(); } /** * Handles line width which may need to change depending on which line * number you are on. + * @param linenumber int + * @return String */ private final String getLineWidth(int linenumber) { @@ -728,6 +812,8 @@ public class CodeTransform implements Serializable /** * Handles finding classes based on the current filename and then makes * HREFs for you to link to them with. + * @param line String + * @return String */ private final String jxrFilter(String line) { @@ -781,8 +867,7 @@ public class CodeTransform implements Serializable //get the package from teh PackageManager because this will hold //the version with the classes also. - PackageType currentImport = packageManager - .getPackageType(packages[j]); + PackageType currentImport = packageManager.getPackageType(packages[j]); //the package here might in fact be null because it wasn't parsed out //this might be something that is either not included or os part @@ -806,18 +891,12 @@ public class CodeTransform implements Serializable //if there is a "." in the string then we have to assume //it is a package. - //System.out.println( "FIX ME: Currently working in package mode" ); - - String fqpn_package = null; String fqpn_class = null; fqpn_package = wordName.substring(0, wordName.lastIndexOf(".")); fqpn_class = wordName.substring(wordName.lastIndexOf(".") + 1, wordName.length()); - //System.out.println( "fqpn_package -> " + fqpn_package ); - //System.out.println( "fqpn_class -> " + fqpn_class ); - //note. since this is a reference to a full package then //it doesn't have to be explicitly imported so this information //is useless. Instead just see if it was parsed out. @@ -835,21 +914,17 @@ public class CodeTransform implements Serializable //that is in the package manager so it is time to //link to it. - //System.out.println( "FIX ME: Found explicit class reference: " + wordName ); line = xrLine(line, pt.getName(), ct); } } - if (fqpn_package.equals(currentImport.getName()) && - currentImport.getClassType(fqpn_class) != null) + if (fqpn_package.equals(currentImport.getName()) && currentImport.getClassType(fqpn_class) != null) { //then the package we are currently in is the one specified in the string //and the import class is correct. - - //System.out.println( "FIX ME: found class: " + wordName ); line = xrLine(line, packages[j], currentImport.getClassType(fqpn_class)); } @@ -858,7 +933,6 @@ public class CodeTransform implements Serializable else if (currentImport.getClassType(wordName) != null) { - //System.out.println( "FIX ME: found imported class: "+ wordName ); line = xrLine(line, packages[j], currentImport.getClassType(wordName)); } @@ -872,6 +946,7 @@ public class CodeTransform implements Serializable /** * Get the current filename + * @return String */ public final String getCurrentFilename() { @@ -880,6 +955,7 @@ public class CodeTransform implements Serializable /** * Set the current filename + * @param filename String */ public final void setCurrentFilename(String filename) { @@ -888,15 +964,16 @@ public class CodeTransform implements Serializable /** * Given the current package, get an HREF to the package and class given + * @param dest String + * @param jc ClassType + * @return String */ - private final String getHREF(String dest, - ClassType jc) + private final String getHREF(String dest, ClassType jc) { StringBuffer href = new StringBuffer(); //find out how to go back to the root - href.append(this.getPackageRoot()); //now find out how to get to the dest package @@ -918,6 +995,8 @@ public class CodeTransform implements Serializable /** * Based on the destination package, get the HREF. + * @param dest String + * @return String */ private final String getHREF(String dest) { @@ -925,12 +1004,11 @@ public class CodeTransform implements Serializable } /** - *

- * - * Given the name of a package... get the number of - * subdirectories/subpackages there would be.

- * - * EX: org.apache.maven == 3

+ *

Given the name of a package... get the number of + * subdirectories/subpackages there would be.

+ *

EX: org.apache.maven == 3

+ * @param packageName String + * @return int */ private final int getPackageCount(String packageName) { @@ -966,6 +1044,8 @@ public class CodeTransform implements Serializable /** * Parse out the current link and look for package/import statements and * then create HREFs for them + * @param line String + * @return String */ private final String importFilter(String line) { @@ -981,9 +1061,7 @@ public class CodeTransform implements Serializable */ boolean isPackage = line.indexOf("package") != -1; - // - if (line.indexOf("import") != -1 || - isPackage) + if (line.indexOf("import") != -1 || isPackage) { start = line.trim().indexOf(" "); @@ -1005,13 +1083,13 @@ public class CodeTransform implements Serializable pkg = StringUtils.replace(pkg, ".*", ""); } - else if (isPackage == false) + else if (!isPackage) { //this is an explicit Class import String packageLine = pkg.toString(); - + // This catches a boundary problem where you have something like: // // Foo foo = FooMaster.getFooInstance(). @@ -1019,10 +1097,10 @@ public class CodeTransform implements Serializable // // This breaks Jxr and won't be a problem when we hook // in the real parser. - + int a = packageLine.lastIndexOf(".") + 1; int b = packageLine.length() - 1; - + if (a > b + 1) { classname = packageLine.substring(packageLine.lastIndexOf(".") + 1, packageLine.length() - 1); @@ -1043,33 +1121,27 @@ public class CodeTransform implements Serializable String pkgHREF = getHREF(pkg); //if this package is within the PackageManager then you can create an HREF for it. - if (packageManager.getPackageType(pkg) != null || - isPackage) + if (packageManager.getPackageType(pkg) != null || isPackage) { //Create an HREF for explicit classname imports if (classname != null) { - line = StringUtils.replace(line, classname, "" + - classname + - ""); + line = + StringUtils.replace( + line, + classname, + "" + classname + ""); } //now replace the given package with a href - line = StringUtils.replace(line, pkg, "" + - pkg + - ""); + line = + StringUtils.replace( + line, + pkg, + "" + pkg + ""); } } @@ -1077,10 +1149,10 @@ public class CodeTransform implements Serializable return line; } - /** * From the current file, determine the package root based on the current * path. + * @return String */ public final String getPackageRoot() { @@ -1113,6 +1185,8 @@ public class CodeTransform implements Serializable /** * Given a line of text, search for URIs and make href's out of them + * @param line String + * @return String */ public final String uriFilter(String line) { @@ -1136,8 +1210,7 @@ public class CodeTransform implements Serializable char current = line.charAt(j); - if (Character.isLetterOrDigit(current) == false && - isInvalidURICharacter(current)) + if (!Character.isLetterOrDigit(current) && isInvalidURICharacter(current)) { end = j; break; @@ -1155,21 +1228,17 @@ public class CodeTransform implements Serializable String uri = line.substring(start, end); - line = StringUtils.replace(line, uri, "" + - uri + - ""); - + line = + StringUtils.replace( + line, + uri, + "" + uri + ""); } - } - } //if we are in a multiline comment we should not call JXR here. - if (inMultiLineComment == false && - inJavadocComment == false) + if (!inMultiLineComment && !inJavadocComment) { return jxrFilter(line); } @@ -1180,22 +1249,21 @@ public class CodeTransform implements Serializable } - /** * if the given char is not one of the following in VALID_URI_CHARS then * return true + * @param c char to check against VALID_URI_CHARS list + * @return true if c is a valid URI char */ private final boolean isInvalidURICharacter(char c) { for (int i = 0; i < VALID_URI_CHARS.length; ++i) { - if (VALID_URI_CHARS[i] == c) { return false; } - } return true; @@ -1203,6 +1271,7 @@ public class CodeTransform implements Serializable /** * The current revision of the CVS module + * @return String */ public final String getRevision() { @@ -1211,6 +1280,7 @@ public class CodeTransform implements Serializable /** * The current source file being read + * @return source file name */ public final String getSourcefile() { @@ -1219,6 +1289,7 @@ public class CodeTransform implements Serializable /** * The current dest file being written + * @return destination file name */ public final String getDestfile() { @@ -1227,19 +1298,21 @@ public class CodeTransform implements Serializable /** * The current source directory being read from. + * @return source directory */ public final String getSourceDirectory() { return this.sourcedir; } - /** * Cross Reference the given line with JXR returning the new content. + * @param line String + * @param packageName String + * @param classType ClassType + * @return String */ - public final String xrLine(String line, - String packageName, - ClassType classType) + public final String xrLine(String line, String packageName, ClassType classType) { StringBuffer buff = new StringBuffer(line); @@ -1251,7 +1324,6 @@ public class CodeTransform implements Serializable if (classType != null) { href = this.getHREF(packageName, classType); - //find = packageName + "." + classType.getName(); find = classType.getName(); } else @@ -1259,19 +1331,16 @@ public class CodeTransform implements Serializable href = this.getHREF(packageName); find = packageName; } + //build out what the link would be. link = "" + find + ""; //use the SimpleWordTokenizer to find all entries //that match word. Then replace these with the link - //StringEntry se = SimpleWordTokenizer.tokenize( buff.toString(), - //now replace the word in the buffer with the link - String replace = link; - StringEntry[] tokens = SimpleWordTokenizer.tokenize(buff.toString(), find); for (int l = 0; l < tokens.length; ++l) @@ -1289,9 +1358,11 @@ public class CodeTransform implements Serializable /** * Highlight the package in this line. + * @param line input line + * @param packageName package name + * @return input line with linked package */ - public final String xrLine(String line, - String packageName) + public final String xrLine(String line, String packageName) { String href = this.getHREF(packageName); @@ -1301,10 +1372,7 @@ public class CodeTransform implements Serializable //build out what the link would be. String link = "" + find + ""; - //System.out.println( "find" ); - return StringUtils.replace(line, find, link); } } - diff --git a/jxr/src/plugin-resources/stylesheet.css b/jxr/src/plugin-resources/stylesheet.css index 44c5a087..d8945b24 100644 --- a/jxr/src/plugin-resources/stylesheet.css +++ b/jxr/src/plugin-resources/stylesheet.css @@ -1,45 +1,96 @@ /* Javadoc style sheet */ - /* Define colors, fonts and other style attributes here to override the defaults */ +body { + background-color: #fff; + font-family: Arial, Helvetica, sans-serif; +} -/* Page background color */ -body { background-color: #FFFFFF } +a:link { + color: #00f; +} +a:visited { + color: #00a; +} -a:link, a:visited { - color: blue; - } - -a:active, a:hover, #leftcol a:active, #leftcol a:hover { +a:active, a:hover { color: #f30 !important; - } +} -a:link.selfref, a:visited.selfref { - color: #555 !important; - } +ul, li { + list-style-type:none ; + margin:0; + padding:0; +} -.a td { - background: #ddd; - color: #000; - } +table td{ + padding: 3px; + border: 1px solid #000; +} +table{ + width:100%; + border: 1px solid #000; + border-collapse: collapse; +} -/* Table colors */ -.TableHeadingColor { background: #036; color:#FFFFFF } /* Dark blue */ -.TableSubHeadingColor { background: #bbb; color:#fff } /* Dark grey */ -.TableRowColor { background: #efefef } /* White */ +div.overview { + background-color:#ddd; + padding: 4px 4px 4px 0; +} +div.overview li, div.framenoframe li { + display: inline; +} +div.framenoframe { + text-align: center; + font-size: x-small; +} +div.framenoframe li { + margin: 0 3px 0 3px; +} +div.overview li { + margin:3px 3px 0 3px; + padding: 4px; +} +li.selected { + background-color:#888; + color: #fff; + font-weight: bold; +} -/* Font used in left-hand frame lists */ -.FrameTitleFont { font-size: normal; font-family: normal; color:#000000 } -.FrameHeadingFont { font-size: normal; font-family: normal; color:#000000 } -.FrameItemFont { font-size: normal; font-family: normal; color:#000000 } +table.summary { + margin-bottom: 20px; +} +table.summary td, table.summary th { + font-weight: bold; + text-align: left; + padding: 3px; +} +table.summary th{ + background-color:#036; + color: #fff; +} +table.summary td{ + background-color:#eee; + border: 1px solid black; +} -/* Example of smaller, sans-serif font in frames */ -/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ - -/* Navigation bar fonts and colors */ -.NavBarCell1 { background-color:#ddd;}/* Light mauve */ -.NavBarCell1Rev { background-color:#888;}/* Dark Blue */ -.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} -.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} - -.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} -.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} +em { + color: #A00; +} +em.comment { + color: #390; +} +.string { + color: #009; +} +div#footer { + text-align:center; +} +#overview { + padding:2px; +} + + +hr { + height: 1px; + color: #000; +} \ No newline at end of file diff --git a/jxr/src/plugin-resources/templates/allclasses-frame.jelly b/jxr/src/plugin-resources/templates/allclasses-frame.jelly index 55bc45e2..ef1c5e7c 100644 --- a/jxr/src/plugin-resources/templates/allclasses-frame.jelly +++ b/jxr/src/plugin-resources/templates/allclasses-frame.jelly @@ -1,33 +1,25 @@ - - + + - - All Classes - + + All Classes - - All Classes - - - - - - - - -
- - ${classInfo.name} -
-
-
+

All Classes

+ + +
- \ No newline at end of file diff --git a/jxr/src/plugin-resources/templates/index.jelly b/jxr/src/plugin-resources/templates/index.jelly index 2d0a4151..e56390e2 100644 --- a/jxr/src/plugin-resources/templates/index.jelly +++ b/jxr/src/plugin-resources/templates/index.jelly @@ -1,19 +1,24 @@ - - + + + + ${windowTitle} - - + + - + - <h2>Frame Alert</h2> - <p>You don't have frames. Go <a href="overview-summary.html">here</a></p> + <h1>Frame Alert</h1> + <p> + You don't have frames. Go + <a href="overview-summary.html">here</a> + </p> diff --git a/jxr/src/plugin-resources/templates/overview-frame.jelly b/jxr/src/plugin-resources/templates/overview-frame.jelly index 12e1eb0d..f7089f21 100644 --- a/jxr/src/plugin-resources/templates/overview-frame.jelly +++ b/jxr/src/plugin-resources/templates/overview-frame.jelly @@ -1,38 +1,29 @@ - - + + - - ${windowTitle} - + + ${windowTitle} - - - - -
- - All Classes - -

- Packages -
+

+ All Classes +

- - - ${pkgInfo.name} - -
-
+

Packages

-
+ -

diff --git a/jxr/src/plugin-resources/templates/overview-summary.jelly b/jxr/src/plugin-resources/templates/overview-summary.jelly index f683cc37..99279e74 100644 --- a/jxr/src/plugin-resources/templates/overview-summary.jelly +++ b/jxr/src/plugin-resources/templates/overview-summary.jelly @@ -3,102 +3,74 @@ - - - + + + - - + + - - ${windowTitle} - + + ${windowTitle} - - -
- + +
${bottom} -
- -
-
-

${docTitle}

-
- - - - +

${docTitle}

- - - +
- - Packages - -
- - ${pkgInfo.name} - -
+ + + - + + + + + + + +
Packages
+ ${pkgInfo.name} +
-

-


- - - - - - - - - - -
- - -
+
+
    +
  • Overview
  • +
  • Package
  • +
+
+
+ +
+
diff --git a/jxr/src/plugin-resources/templates/package-frame.jelly b/jxr/src/plugin-resources/templates/package-frame.jelly index ae87d6bb..a0da6a9a 100644 --- a/jxr/src/plugin-resources/templates/package-frame.jelly +++ b/jxr/src/plugin-resources/templates/package-frame.jelly @@ -1,36 +1,29 @@ - - + + - - ${windowTitle} Package ${pkgInfo.name} - + + ${windowTitle} Package ${pkgInfo.name} - +

${pkgInfo.name} - - - - - - -
- Classes -
+ - - - ${classInfo.name} - -
-
+

Classes

+ + -
diff --git a/jxr/src/plugin-resources/templates/package-summary.jelly b/jxr/src/plugin-resources/templates/package-summary.jelly index 9d707038..c1bc50df 100644 --- a/jxr/src/plugin-resources/templates/package-summary.jelly +++ b/jxr/src/plugin-resources/templates/package-summary.jelly @@ -3,96 +3,80 @@ - - - + + + - - + + - - ${windowTitle} Package ${name} - + + ${windowTitle} Package ${name} - - -
+ + +
${bottom} -

Package ${pkgInfo.name}

- - - - - - - - - + +
- Class Summary -
- ${classInfo.name} -
+ + + - + + + + + + + + +
Class Summary
+ ${classInfo.name} +
-

-


- - - - - - +
+ +
+
+ +
- - - -
- - -
+
- +
diff --git a/jxr/xdocs/changes.xml b/jxr/xdocs/changes.xml index 9c4b1194..89f5a904 100644 --- a/jxr/xdocs/changes.xml +++ b/jxr/xdocs/changes.xml @@ -10,6 +10,7 @@ MAVEN-822 + MAVEN-797