87Knut.Hatlen@Sun.COM * CDDL HEADER START
87Knut.Hatlen@Sun.COM * The contents of this file are subject to the terms of the
87Knut.Hatlen@Sun.COM * Common Development and Distribution License (the "License").
87Knut.Hatlen@Sun.COM * You may not use this file except in compliance with the License.
87Knut.Hatlen@Sun.COM * See LICENSE.txt included in this distribution for the specific
87Knut.Hatlen@Sun.COM * language governing permissions and limitations under the License.
87Knut.Hatlen@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each
87Knut.Hatlen@Sun.COM * file and include the License file at LICENSE.txt.
87Knut.Hatlen@Sun.COM * If applicable, add the following below this CDDL HEADER, with the
87Knut.Hatlen@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying
87Knut.Hatlen@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner]
87Knut.Hatlen@Sun.COM * CDDL HEADER END
87Knut.Hatlen@Sun.COM * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
87Knut.Hatlen@Sun.COM * Use is subject to license terms.
87Knut.Hatlen@Sun.COM * Class representing file annotation, i.e., revision and author for the last
87Knut.Hatlen@Sun.COM * modification of each line in the file.
87Knut.Hatlen@Sun.COM * Gets the revision for the last change to the specified line.
87Knut.Hatlen@Sun.COM * @param line line number (counting from 1)
91Knut.Hatlen@Sun.COM * @return revision string, or an empty string if there is no information
91Knut.Hatlen@Sun.COM * about the specified line
91Knut.Hatlen@Sun.COM try {
91Knut.Hatlen@Sun.COM } catch (IndexOutOfBoundsException e) {
91Knut.Hatlen@Sun.COM return "";
878Lubos.Kosco@Sun.COM * Gets all revisions that are in use, first is the lowest one (sorted using natural order)
878Lubos.Kosco@Sun.COM * @return list of all revisions the file has
878Lubos.Kosco@Sun.COM return ret;
87Knut.Hatlen@Sun.COM * Gets the author who last modified the specified line.
87Knut.Hatlen@Sun.COM * @param line line number (counting from 1)
91Knut.Hatlen@Sun.COM * @return author, or an empty string if there is no information about the
91Knut.Hatlen@Sun.COM * specified line
91Knut.Hatlen@Sun.COM try {
91Knut.Hatlen@Sun.COM } catch (IndexOutOfBoundsException e) {
91Knut.Hatlen@Sun.COM return "";
168ldavis@fonix.com * Gets the enabled state for the last change to the specified line.
168ldavis@fonix.com * @param line line number (counting from 1)
168ldavis@fonix.com * @return true if the xref for this revision is enabled, false otherwise
168ldavis@fonix.com try {
168ldavis@fonix.com } catch (IndexOutOfBoundsException e) {
168ldavis@fonix.com return false;
87Knut.Hatlen@Sun.COM * Returns the size of the file (number of lines).
87Knut.Hatlen@Sun.COM * @return number of lines
87Knut.Hatlen@Sun.COM * Returns the widest revision string in the file (used for pretty
87Knut.Hatlen@Sun.COM * printing).
87Knut.Hatlen@Sun.COM * @return number of characters in the widest revision string
87Knut.Hatlen@Sun.COM return widestRevision;
87Knut.Hatlen@Sun.COM * Returns the widest author name in the file (used for pretty printing).
87Knut.Hatlen@Sun.COM * @return number of characters in the widest author string
87Knut.Hatlen@Sun.COM return widestAuthor;
87Knut.Hatlen@Sun.COM * Adds a line to the file.
87Knut.Hatlen@Sun.COM * @param revision revision number
87Knut.Hatlen@Sun.COM * @param author author name
87Knut.Hatlen@Sun.COM /** Class representing one line in the file. */
140trond.norbye@sun.com return filename;
878Lubos.Kosco@Sun.COM //TODO below might be useless, need to test with more SCMs and different commit messages
878Lubos.Kosco@Sun.COM // to see if it will not be usefull, if title attribute of <a> loses it's breath
1227trond.norbye@gmail.com out.append("<script type=\"text/javascript\">\nvar desc = new Object();\n");
972Knut.Hatlen@Sun.COM try {
972Knut.Hatlen@Sun.COM } catch (IOException e) {