-
-Avoid single letter indexes with just one entry on a new line
-
-If a return type has a [] in it, browser may break the line before the []
-Maybe the table should be name and a row under it for the description , to stop cramped names and descriptions?
-
-Add note that links in docdiffs may not necessarily work, since some of them
-are written expecting to be in documents in the Java API tree.
-
-Add a "having problems?" page?
-
-MISCELLANEOUS
-=============
diff --git a/thirdparty/jdiff/v-custom/doc/dev_notes.txt b/thirdparty/jdiff/v-custom/doc/dev_notes.txt
deleted file mode 100644
index 67659fccbb..0000000000
--- a/thirdparty/jdiff/v-custom/doc/dev_notes.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Handy commands for SourceForge:
-
-export CVS_RSH=ssh
-cvs -z3 -d:ext:mdoar@javadiff.cvs.sourceforge.net:/cvsroot/javadiff co -P jdiff
-
-ssh -l mdoar javadiff.sourceforge.net
-scp jdkchanges.zip mdoar@javadiff.sourceforge.net:/home/groups/j/ja/javadiff/htdocs/
-scp jdkchanges.zip mdoar@jdiff.sourceforge.net:/home/groups/j/jd/jdiff/htdocs/
-
-scp index.html mdoar@javadiff.sourceforge.net:/home/users/m/md/mdoar/jdiff/htdocs
-
-crontab when logged in as mdoar in /home/users/m/md/mdoar:
-0 1 * * * /home/users/m/md/mdoar/nightly.sh > /dev/null
-
-/home/users/m/md/mdoar/nightly.sh contains:
-cd tarballs
-cvs -Q -d:pserver:anonymous@cvs1:/cvsroot/javadiff export -Dtomorrow jdiff
-if [ -d jdiff ]
-then
-echo "Tarball created on: " > jdiff/CREATED_ON
-echo `date` >> jdiff/CREATED_ON
-tar czf /home/groups/j/ja/javadiff/htdocs/jdiff/jdiff_latest.tar.gz jdiff
-rm -rf jdiff
-fi
-
-These are the CVS repository backups, only changed when something has changed:
-http://cvs.sourceforge.net/cvstarballs/javadiff-cvsroot.tar.bz2
-
-ftp upload.sourceforge.net
-anonymous
-cd incoming
-put jdiff-1.1.0.zip
-put jdiff-1.1.0-src.zip
-
-cvs tag JDIFF_1_1_0 .
-Creating a src package:
-
-mv jdiff jdiff-1.1.0-src
-find jdiff-1.1.0-src | zip source -@
-mv source.zip jdiff-1.1.0-src.zip
-
-(Probably neater to do it in Ant and exclude CVS directories)
diff --git a/thirdparty/jdiff/v-custom/doc/index.html b/thirdparty/jdiff/v-custom/doc/index.html
deleted file mode 100644
index fc377298d2..0000000000
--- a/thirdparty/jdiff/v-custom/doc/index.html
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
-
-
-
-JDiff - An HTML Report of API Differences
-
-
-
-
-
-JDiff - An HTML Report of API Differences
-
-
-
-JDiff is a Javadoc doclet which generates an
-HTML report of all the packages, classes, constructors, methods, and
-fields which have been removed, added or changed in any way, including
-their documentation, when two APIs are compared. This is very useful
-for describing exactly what has changed between two releases of a
-product. Only the API (Application Programming Interface) of each
-version is compared. It does not compare what the source code does
-when executed.
-
-
-
-It's great for reporting what has changed between two releases of your
-product!
-You can download the latest
- version from here, with a module name of jdiff
.
-There is also an article originally published Java Developers Journal.
-
-
-
-
-
-Note: to eliminate the annoying register.com
banner,
-after you choose a report from below, simply click on "No
-Frames" or "Frames".
-
-
-
-
-
-
-Sample Output
-
-
-
-
-
-
-
-Copyright © 2001-2010 Matthew B. Doar
JDiff is licensed under the LGPL.
-
-
-
-
-
diff --git a/thirdparty/jdiff/v-custom/doc/jdiff.html b/thirdparty/jdiff/v-custom/doc/jdiff.html
deleted file mode 100644
index 5c46f967b9..0000000000
--- a/thirdparty/jdiff/v-custom/doc/jdiff.html
+++ /dev/null
@@ -1,1032 +0,0 @@
-
-
-
-
-JDiff User Documentation
-
-
-
-
-
- |
-  |
-
-
-
-
-
-JDiff User Documentation
-
-
-
-JDiff is a Javadoc doclet which generates an
-HTML report of all the packages, classes, constructors, methods, and
-fields which have been removed, added or changed in any way, including
-their documentation, when two APIs are compared. This is very useful
-for describing exactly what has changed between two releases of a
-product. Only the API (Application Programming Interface) of each
-version is compared. It does not compare what the source code does
-when executed.
-
-
-
-CONTENTS
-
-
-
-
-OVERVIEW
-
-
-The basic sequence of operations is to run JDiff on one set of source
-files to create an XML file which represents the API for that version
-of a product. Then JDiff is run again on another set of source files
-to create an XML file which represents the API for the next version of
-a product. Finally, JDiff compares the two APIs as represented in the
-XML files and generates an HTML report which describes the differences
-between the two APIs, together with comments describing the reasons
-for the differences. This whole process can be executed as separate
-Javadoc steps (either from Ant or the command line) or by simply using
-the Ant JDiff task provided.
-
-
-
-The results are written into a file called changes.html
,
-with more files in a subdirectory called changes
. These
-files can contain links to existing Javadoc documentation. A CSS
-stylesheet is also generated in the file
-stylesheet-jdiff.css
, and this uses a background image in
-background.gif
. These are the only files which usually
-need to be shipped with a product to include a report of what has
-changed since the previous release. If the -stats
-option was used, then the file black.gif
should also be
-shipped.
-
-
-
-There is a working example of how to use JDiff in the examples
-directory of the source distribution.
-
-
-
-
-
-INSTALLATION
-
-
-Unpack the jdiff-1.1.1.zip file. This will produce a directory named
-"jdiff-1.1.1" containing all that is necessary to use JDiff to produce
-your own reports. See the file "example.xml" in that directory for an
-example of how to use the Ant JDiff task. The file "jdiff.html"
-contains more information about using JDiff.
-
-
-
-If you are using the complete source distribution, then you should be
-able to simply type "ant" at the top-level to produce a working
-example report.
-
-
-
-The Ant JDiff task needs Ant 1.6.1 to work correctly. Using Ant
-1.5 will produce the error:
-
-Error: two projects are needed, one <old> and one <new>
-
-
-
-
-No Windows registry entries are changed by JDiff. To remove JDiff,
-simply delete the directory where it is was unpacked.
-
-
-
-
-SYNOPSIS
-
-
-The Ant JDiff task has the following parameters:
-
-
-
-
-
- Attribute |
- Description |
- Required |
-
-
-
- destdir |
- The location where the JDiff report will be generated. Defaults to a directory "jdiff_report" in the directory from where Ant was executed. |
- No |
-
-
-
- stats |
- Generate an HTML page of statistical information about the
- differences between the two APIs. Defaults to "off". |
- No |
-
-
-
- docchanges |
- Enables comparison of Javadoc documentation. Defaults to "off". |
- No |
-
-
-
- verbose |
- Increase the logging vebosity of the task. Defaults to "off". |
- No |
-
-
-
-
-
-Parameters specified as nested elements
-
-
-
-The old
and new
elements are used to describe the projects to be compared.
-
-
-
-
-
- Attribute |
- Description |
- Required |
-
-
-
- name |
- The name of the project, e.g. "My Project Version 1". The name, with spaces replaced by underscores, is used as the name of the XML file in destdir ,
-which is generated by JDiff to represent the structure of the source files of this project. |
- Yes |
-
-
-
- javadoc |
- The location of a Javadoc report for this project. If this attribute is not used, then a Javadoc report for the project will be generated in a subdirectory named name in destdir . |
- No |
-
-
-
-
-
-
-Note: the old
and new
elements only have DirSet
nested elements, not FileSet
ones.
-
-
-
-The complete list parameters that can be passed to the JDiff doclet,
-either through the Ant Javadoc task or directly at the command line,
-is as follows:
-
-
-
-javadoc -doclet jdiff.JDiff -docletpath jdiff.jar
- [-apiname <API name>]
- [-apidir <optional directory where the API XML file is to be placed>]
- [-oldapi <name of old API>]
- [-oldapidir <optional directory where the old API XML file is located>]
- [-newapi <name of new API>]
- [-newapidir <optional directory where the new API XML file is located>]
- [-sourcepath <source path>]
- [-javadocnew <javadoc files location for the new API>]
- [-javadocold <javadoc files location for the old API>]
- [-baseURI <base>]
- [-excludeclass <exclusion level>]
- [-excludemember <exclusion level>]
- [-nosuggest <suggestion level>]
- [-firstsentence]
- [-docchanges]
- [-checkcomments]
- [-packagesonly]
- [-showallchanges]
- [-retainnonprinting]
- [-excludetag <exclude tag>]
- [-stats]
- [-windowtitle <text>]
- [-doctitle <HTML text>]
- [-version]
- [-help]
-
-
-
-NOTE: Either -apiname
, or both -oldapi
and
--newapi
must be used. All other arguments are optional.
-
-
-
-The -d directory
argument works just as with Javadoc, redirecting
-the HTML output to the given directory.
-
-
-The arguments for the JDiff doclet are:
-
- -
-
-apiname
<API name>
- -
- Define the name which will be associated
- with the specified API. If the name which is given here has space
- characters, they will be
- replaced by underscore characters. This name with no spaces is used as the name of the XML
- file. It is also written into the XML file as an attribute of the top
- element.
- E.g. "SuperProduct 1.0" generates an XML file named
- "SuperProduct_1.0.xml".
- The XML file is always generated in the current directory, unless
- overridden by the
-apidir
argument.
-
-
- -
-
-oldapi
<name of old API>
- -
- The name of the old or previous version of an
- API or product, e.g. "SuperProduct 1.0", which is to be one of the
- APIs compared.
- This name is the name which was given to
-apiname
when
- the XML file was generated.
-
-
- -
-
-newapi
<name of old API>
- -
- The name of the new or later version of an
- API or product, e.g. "SuperProduct 2.0", which is to be one of the
- APIs compared.
- This name is the name which was given to
-apiname
when
- the XML file was generated.
-
-
- -
-
-apidir
<API directory>
- -
- Defines the directory where the API XML file is to be placed. Used in
- conjunction with the
-apiname
argument.
-
-
- -
-
-oldapidir
<old API directory>
- -
- Defines the directory where the XML file for the old API is located.
- Used in conjunction with the
-oldapi
argument. Default is the current
- directory.
-
-
- -
-
-newapidir
<new API directory>
- -
- Defines the directory where the XML file for the new API is located.
- Used in conjunction with the
-newapi
argument. Default is the current
- directory.
-
-
- -
-
-sourcepath
<source path>
- -
- Define the path to the set of Java source
- files (the API)
- to be scanned, e.g.
examples/SuperProduct1.0
. The
- slashes in this argument should match the local architecture.
-
-
- -
-
-javadocnew
<javadoc files location for the new API>
- -
- The location of existing Javadoc files
- for the new API, e.g. "http://java.sun.com/j2se/1.5.0/docs/api/" for the
- public documentation for J2SE1.5.0. The default value is "../", which implies
- that the documentation directory generated by Javadoc is at the same level as
- the "changes.html" file generated by JDiff. Slashes are always
- forward in the argument, since this is an HTML link. The argument
- should also always end in a forward slash. If a relative value is
- given, it should be relative to files in the "changes" directory
- generated by JDiff.
-
-
- -
-
-javadocold
<javadoc files location for the old API>
- - The location of existing
- Javadoc files for the old API, e.g. "http://java.sun.com/j2se/1.5.0/docs/API/"
- for the public documentation for J2SE1.5.0. The default value is null, which
- results in no links to Javadoc-generated documentation for the previous
- release. Slashes are always forward in the argument, since this is an HTML
- link. The argument should also always end in a forward slash. If a relative
- value is given, it should be relative to files in the "changes" directory
- generated by JDiff.
-
-
- -
-
-
-baseURI
<base>
- -
- Use \"base\" as the base location of the various DTDs used by
- JDiff. For example,
-baseURI "file:///C:/jdiff/lib"
would cause
- the XML parser to use the copies which are shipped in the
- lib
directory, if JDiff is installed in
- C:\jdiff
. Note that there are three forward slashes
- after "file:".
-
-
- -
-
-excludeclass
<exclusion level>
- -
- This can be set to "public",
- "protected", "package", or "private". If it is set to "protected", only
- classes which are public or protected will be shown. If it is set to
- "public", then only public classes are shown. The default is
- "protected". If this is changed, the Javadoc
-private
- argument must also be passed to Javadoc.
-
-
- -
-
-excludemember
<exclusion level>
- -
- This can be set to "public",
- "protected", "package", or "private". If it is set to "protected", only
- members (constructors, methods and fields) which are public or protected will be shown. If it is set to
- "public", then only public members are shown. The default is
- "protected".
- If this is changed, the Javadoc
-private
- argument must also be passed to Javadoc.
-
-
- -
-
-firstsentence
- -
- This argument causes JDiff to save only the first sentence of each
- Javadoc comment as part of
- the API. This is only necessary when the XML file representing the
- API is being generated. See
-docchanges
for how to
- note documentation changes as differences.
-
-
- -
-
-docchanges
- -
- This argument enables comparison of Javadoc documentation.
- By default, changes in the saved Javadoc documentation
- are not noted as changes (or as removals and related
- additions). See
-firstsentence
option for how to compare just
- the first sentence in Javadoc documentation.
-
-
- -
-
-nosuggest
<suggestion level>
- -
- This can be set to "all", "remove", "add",
- or "change". The effect of setting this to "all" is to stop comments
- for any changes at all being suggested. Any comments which are to
- appear in the report must then be written by the user (see below).
- If it is set to "change", then
- comments will not be suggested for changes, but will be suggested for
- removals and additions. The default is that comments are suggested for
- all possible places.
-
-
- -
-
-checkcomments
- -
- If this argument is used, JDiff
- will warn the user when the report is generated if there are comments
- which do not end in a period, question mark or exclamation mark.
-
-
- -
-
-packagesonly
- -
- If this argument is used, JDiff
- will not scan classes specified on the command line. This should
- only need to be used with the "jdiffjar" script, when
- comparing Jar files.
- If this options is not used when comparing Jar files, duplicate
- classes with no packages ("anonymous" classes) may be
- wrongly reported by JDiff.
-
-
- -
-
-showallchanges
- -
- If this argument is used, JDiff will show changes in
- native and synchronized modifiers. See here for why these are not shown by default.
-
-
- -
-
-retainnonprinting
- -
- Retain non-printable characters
- in comments. By default, JDiff removes non-printable characters
- from comments which it uses.
- This should only really be necessary if the first line of a
- comment has used explicit Unicode character escape sequences which
- cannot be printed, or more importantly for JDiff, read in from XML.
- If this option is used, JDiff may fail to read in an XML
- file, and exit with an error message about "an invalid XML character (Unicode:
- 0x....)" on a certain line in the file. Turning off this option does
- make creating large XML files a little faster.
-
-
- -
-
-excludetag <exclude tag>
- -
- The argument passed in with this causes
- JDiff to ignore program elements (packages, classes, constructors,
- methods, fields) which contain the given exclude tag in their comment blocks,
- e.g. " @exclude", " @docset Internal". The extra space in front of "@" is
- to stop Javadoc from expanding the name into a file containing commands on
- the compile line. White space is trimmed off before the string is used.
-
- Another solution to passing "@" as part of an argument is to pass @foo,
- and then create a file named
foo
, containing
- -excludetag @exclude
.
-
-
-
- -
-
-stats
- -
- Generate an HTML page of statistical information about the
- differences between the two APIs.
-
-
- -
-
-windowtitle <text>
- -
- Specify the title used in the browser window for the report.
- By default, this is
- "API Differences Between <name of old API> and
- <name of new API>".
-
-
- -
-
-doctitle <HTML text>
- -
- Specify the title used on the first page of the report.
- By default, this is
- "API Differences Between <name of old API> and
- <name of new API>".
-
-
- -
-
-version
- -
- Display the version of JDiff.
-
-
- -
-
-help
- -
- Display the usage summary for JDiff.
-
-
-
-
-
-OUTPUT
-
-
-
-- Interfaces appear in italics, just as in Javadoc documentation.
-- When a package or class appears in bold, it has been added in
-the new version or API.
-- When a package or class appears
struck through, it has been removed in
-the new version or API.
-- When a constructor is added, two entries are added to the "All
-Differences" index: one for the addition of a new constructor, and
-one for the change of the class. The constructor entry has
-"constructor" after it.
-- There are some complex changes which can occur between versions, for example, when two or more methods with the same name change simultaneously, or when a method or field is moved into or from a superclass.
-In these cases, the change will be seen as a removal and an addition, rather than as a change. Unexpected removals or additions are often part of one of these type of changes.
-- With large packages, it is often necessary to change the memory parameters for
-Javadoc, e.g. pass in
-J-Xmx128m
to Javadoc.
-- The
api.xsd
template describes the format of the XML
-for the APIs, and the comments.xsd
template describes the format
-of the XML for the comments. The API template is independent of any
-related work at Sun, but the intention is to adopt whatever becomes
-the de facto standard in the future, whilst retaining backward
-compatibility. To enable validation, set the boolean validateXML
in
-the file XMLToAPI.java
and recompile.
-- Comments in the comments XML file do get reordered during
-regeneration. This is harmless.
-
-
-
-
-
-ADDING COMMENTS TO A REPORT
-
-
-Comments can be added to a report by using a text editor to add text
-to the "user_comments_X_to_Y.xml" file, where "X" and "Y" are the
-names of the two APIs being compared. This file is automatically regenerated
-each time the report is generated.
-If the -d directory
argument is used, the user comments XML
-file also appears, and is expected, in the named directory.
-
-Comments which become unused are
-moved to the end of the file and placed inside XML comments.
-
-
- The text which is added can be HTML text if necessary, but if the
- HTML is incorrect, JDiff may fail to read the comments file and exit. Note that
- the required HTML is in fact XHTML. Since this HTML is stored in an XML document, single tags without their closing ("slash") element are not permitted.
- For example, most browsers permit HTML which looks like "<p>Here is some
- text.", with no closing tag. XML requires that either a closing tag exists ("</p>"),
- or that the single tag is closed, e.g. "<p/>Here is some text.".
-HTML p, br and hr tags can be single, due to common usage.
-
-
-
-To write comments for a particular removal, addition or change in the
-JDiff-generated report, edit the comments XML file. Your changes will
-be automatically incorporated into a new version of this file when the
-report is next generated. Search the file for the identifier for the
-particular removal, addition or change, using the package name, class
-name and member name to find the identifier. Alternatively, look at
-the HTML source of a report and note the identifier (an HTML named anchor)
-near the intended place for the comment.
-
-
-
-Adding links to comments can be accomplished in two ways: with the {@link} Javadoc tag, or by using HTML links directly.
-
-
-
--
-To link to a class, use the package and class name, e.g. {@link
-packagename.classname}.
-
-
--
-To link to a specific method in a class' HTML page, use the package,
-class name, a pound sign, and then the method and parameters, or ()
-e.g. {@link packagename.classname#methodname(params)}.
-
-
--
-To link to a specific constructor in a class' HTML page, use the package,
-class name, a pound sign, and then the classname and parameters, or ()
-e.g. {@link packagename.classname#classname(params)}.
-
-
--
-To link to a specific field in a class' HTML page, use the package,
-class name, a pound sign, and then the name of the field
-e.g. {@link packagename.classname#fieldname}.
-
-
-
-
-Alternatively, you can use an explicit HTML
-<a> element. e.g.
-<a href="packagename.classname.html#methodname">link text<a>.
-The specific HTML named anchor can be found by looking at the HTML
-source of a report.
-
-
-
-Sometimes you may want to have the same comment text appear in
-multiple places in the report. You can do this by having multiple
-<identifier> elements in a single <comment> element. This
-grouping does not persist after the comments file is regenerated.
-
-
-
-The first sentence from a comment in the source code for an element is
-available in the comments XML file by using the @first tag. This tag
-will be replaced (once) in the comments in the report by the first
-sentence from the appropriate Javadoc comment.
-
-
-
-
-TROUBLESHOOTING
-
-
-
- PROBLEM |
- POSSIBLE SOLUTION |
-
-
-
- Error: two projects are needed, one
-<old> and one <new> |
- The Ant JDiff task needs Ant 1.6.1 to work correctly |
-
-
-
- You are not connected to the Internet, or are behind a firewall |
- See the documentation for how to use
- the -baseURI
- optionThis only applies to generating JDiff output,
- not to viewing it. |
-
-
-
- No changes are seen in the report. |
- By default, Javadoc and JDiff only show public
- and protected classes and members. |
-
-
-
- No changes seen for package and private classes. |
- Enable both the correct Javadoc visibility level
- (-public, -protected, -package, -private) and the correct JDiff
- visibility level (-excludeclass, -excludemember). |
-
-
-
- No comments were inserted for packages. |
- You need to use the -sourcepath argument to
- locate the source code files, so that
- JDiff can deduce where the package.html file with
- comments about the package may be. If no package.html
- file exists or can be found, then no comments can be suggested
- for packages. Of course, comments can still be
- added by hand. |
-
-
-
- JDiff takes a long time to load XML, or throws
- java.net.NoRouteToHostException: Operation timed out . |
- The validation portion of loading the XML file
- currently requires the ability to make an HTTP connection. Check
- your network and try again, or see the -baseURI
- option and the next suggestion. |
-
-
-
- From behind a firewall,
-
- JDiff fails to load one of the required XML DTD files. |
- Use the following settings to tell the Java2 VM
- that you are behind a firewall:
- java -DproxySet=true -DproxyHost=PROXYSERVER -DproxyPort=PORT
- where PROXYSERVER is the hostname or IP address of
- your proxy server, and PORT is the port number of the
- proxy server.
- The other alternative is to use the local copies of the required
- files by using the option -baseURI when generating the API XML
- files. For example, -baseURI "file:///C:/jdiff/lib" would cause
- the XML parser to use the copies which are shipped in the
- lib directory, if JDiff is installed in
- C:\jdiff . Note that there are three forward slashes
- after "file:".
- The -baseURI approach has the advantage that it
- requires no connectivity to the Internet to be able to run JDiff.
- |
-
-
-
- JDiff fails to handle assert in J2SE1.4 |
- Be sure to use the -source 1.4 argument to
- Javadoc to handle assertions present in J2SE1.4 source code.
- |
-
-
-
- Using an XML parser other than Xerces |
- Set the org.xml.sax.driver system property to
- the name of the XML parser class which you wish to use. Setting a system
- property is usually done by passing -Dname=value to the JVM.
- To cause Javadoc to pass an argument to the underlying JVM, use
- -J-Dname=value . To pass an argument to Javadoc from within
- an ANT Javadoc task, use the additionalparam attribute, e.g.
- additionalparam="-J-Dorg.xml.sax.driver=com.example.my.driver"
- |
-
-
-
- Comparing Jar files results in duplicate class
- changes being reported. |
- Be sure to use the -packagesonly
- option when using Jar files as the input to JDiff. You should not
- need to use -packagesonly otherwise.
- |
-
-
-
- Documentation difference page becomes all changes
- part way through. |
- This problem can occur if incorrect HTML is
- written in the new documentation. JDiff shows this HTML on the
- documentation difference page, and can cause entries later on in
- the page to be displayed incorrectly.
-
- One solution is to edit the documentation difference page by
- hand, but the better solution is to fix the offending HTML in the
- new source code.
- |
-
-
-
- The background color of my HTML report is not correct. |
- Check that the file background.gif from the lib is in the same directory as the changes.html file.
- |
-
-
-
- The names of exceptions are too long in the HTML report. |
- To use short names for exceptions, set the
- showExceptionTypes boolean to false in
- XMLToAPI.java file and recompile.
- |
-
-
-
-
-
-
-
-ERRORS AND WARNING MESSAGES
-
-
-The warnings and error messages which can be generated by JDiff are as
-follows:
-
-
-
-
-
- ERROR MESSAGE |
- POSSIBLE CAUSE |
-
-
- Error: unknown element type. |
- The XML file contains an element tag which the
- current version of JDiff cannot recognize. This may occur if an
- older version of JDiff is used with XML files generated by a newer
- version. |
-
-
- Error: IO Error while attempting to create X. |
- Java was unable to open a file for writing. May
- occur if the user does not have write permission for the current
- directory. |
-
-
- Error: no identifier found in the comments XML file. |
- The XML file for the comments for the report must
- contain an identifier to indicate which report of differing APIs
- these comments are written for. |
-
-
- Error: unknown program element type. |
- Internal JDiff error. |
-
-
- Error: could not create the subdirectory X. |
- Java was unable to create a directory. May
- occur if the user does not have write or execute permission for the current
- directory. |
-
-
- Error: file X does not exist for the [old|new] API. |
- The XML files corresponding to the names given to
- -oldapi and -newapi are not in the
- current directory. This may be because the XML files have not yet been
- generated, or were generated elsewhere.
- It can also occur if the
- XML file was generated with one API identifier, and is now being
- read in with another identifier. Either use the same identifier,
- or change the <api> name element value in the XML file to the new
- API identifier. |
-
-
- Error: no API identifier found in the XML file X. |
- The given XML file does not have an identifier in
- it, probably due to manual modification. |
-
-
- Error: no packages found in the APIs. |
- JDiff was unable to find any packages in the
- arguments given to Javadoc. |
-
-
-
-
-
-
-
- WARNING MESSAGE |
- POSSIBLE CAUSE |
-
-
- Warning: illegal string found in text. Ignoring the comment. |
- The suggested comments from Javadoc are stored in
- XML files in a CDATA element, which permits every string except . |
-
-
- Warning: no difference between the APIs. |
- There was no difference between the APIs. You are
- probably comparing two identical XML files. |
-
-
- Warning: no classes found in the package X. |
- A package without classes was encountered. |
-
-
- Warning: change from deprecated to undeprecated for class X. |
- A class changed from being deprecated to being
- undeprecated in the next release. This is usually either poor
- software design or a misplaced @deprecated Javadoc tag. |
-
-
- Warning: change from deprecated to undeprecated
- for a constructor in class X. |
- A constructor changed from being deprecated to being
- undeprecated in the next release. This is usually either poor
- software design or a misplaced @deprecated Javadoc tag. |
-
-
- Warning: change from deprecated to undeprecated for method X. |
- A method changed from being deprecated to being
- undeprecated in the next release. This is usually either poor
- software design or a misplaced @deprecated Javadoc tag. |
-
-
- Warning: text of comment does not end in a period. |
- Generated when the -checkcomments is
- used. The suggested comment does not end in a period, question mark or exclamation mark. |
-
-
- Warning: N identical ids in the existing comments file. Using the first instance. |
- The comments file contains comment for multiple
- places in the report, but N of the identifiers for the comment
- are non-unique. |
-
-
- Warning: incorrectly formatted @link in text. |
- JDiff was unable to parse the @link in the
- suggested comment. |
-
-
- Warning: comment com.acme.sp is no longer used. |
- The comment in the comments file intended for the
- given element is no longer needed, since the element is no longer
- part of the changes between the APIs. The comment will be moved to
- the end of the comments file and preserved, but not used. |
-
-
- Warning: API identifier in the comments XML file differs from the name of the file. |
- The comments file keeps track of which APIs it is
- to be used for, and has detected a mismatch with the names of the
- current APIs. |
-
-
- Warning: multiple @deprecated tags found in comments for X. Using the first one only. |
- A comment with more than one @deprecated tag was
- encountered in the source code. This is considered poor Javadoc style. |
-
-
- Warning: @ tag seen in comment. |
- An @ tag other than @link has somehow made its
- way into a suggested comment. This should not occur, but can be
- remedied by editing the comments file to use a different comment. |
-
-
- Warning: duplicate class : X found. Using the first instance only. |
- Multiple instances of the same fully qualified
- class name were found in the API XML file. Most likely caused by
- manual modification of the file after it was generated. |
-
-
- Warning: missing @since tag |
- A class, constructor, method or field was added
- in the later API but no @since tag was found in the Javadoc
- comment. This information is logged into a file
- missingSinces.txt in the same directory as
- changes.html . This file is informational only. The
- boolean to control this behaviour is in the source file
- HTMLIndexes.java .
- |
-
-
- Warning: API identifier in the XML file X differs from the name of the file Y. |
- The name given to -apiname when the XML file
- is generated is embedded in the XML file as a top-level attribute. This
- warning suggests that the XML file has been modified by hand, but that
- report generation should proceed using the new API identifier. |
-
-
-
-
-
-
-DIFFERENCE STATISTICS
-
-During the generation of a report, JDiff also reports a percentage
-difference between the two APIs being compared, e.g. "Approximately
-10% difference between the APIs". This statistic is calculated in the
-following way:
-
-
-Percentage change = 100 * (added + removed + 2*changed)
- -----------------------------------
- sum of public elements in BOTH APIs
-
-
-So if there are 15 packages in the old API, and 2 of these are removed,
-and 17 packages in the new API, 1 of which is newly added, and only 3
-of which have changed, then the simple percentage difference would be:
-
-
-100 * (1 + 2 + 2*3)/ (15 + 17) = 28%
-
-
-A change of 100% means that there are no packages in common between
-the two APIs. A change of 0% indicates that nothing changed between
-the two APIs. This formula is applied recursively in JDiff for classes
-and their members. That is, the value for the number of packages
-changed is not an integer, but instead is the value obtained by
-applying the same formula to the all the classes in the changed
-packages, and then to all the members of the changed classes.
- This results in a lower, but more accurate, percentage difference.
-The percentage difference value does not appear anywhere in the HTML
-report files generated by JDiff.
-The test suite for JDiff v1.0 had a difference value of approximately 63%.
-A real-world value is the value for the differences between J2SE1.2 and
-J2SE1.3, which is approximately 8%.
-
-
-
-
-LIMITATIONS
-
-
-- While Java is highly backward compatible, so that, for example,
- the XML for a
-J2SE1.2 application can be generated using JDiff with J2SE1.3, there
-are a few cases where classes will appear in the XML of the API which are
-not present in the source code. These classes appear to be inserted by
-
javac
or javadoc
. An example of this is the class
-java.awt.Robot
, which is inserted into the XML for
-J2SE1.2 if javadoc
in J2SE1.3 is used, but not does not appear in
- the XML if javadoc
in J2SE1.2 is used.
-To avoid these (rare) cases, it is recommended that you use the same version
-of the J2SE that the application was written for.
-- JDiff does not tell you how two Javadoc web pages differ in layout, though
-it can tell you how the content has changed.
-Nor does it
-compare what the methods in an API do; if JDiff could tell you what had changed about the way two
-versions of an API execute, the Halting
-Problem would be solved, and our lives would be very different.
-- On a P3 450MHz machine, to scan all of the J2SE
Java
-and javax
packages and generate XML takes about 2 minutes
-per version. To generate a report from the XML files takes about 30s
-
-
-
-
-
-FURTHER READING
-
-
-
-
-
-
-
-
-This software comes with absolutely NO WARRANTY. See the LGPL in the file LICENSE.txt for
-details.
-
-
-
-
-Copyright © 2001-2007 Matthew B. Doar
-
-
-
-
-
diff --git a/thirdparty/jdiff/v-custom/doc/stylesheet.css b/thirdparty/jdiff/v-custom/doc/stylesheet.css
deleted file mode 100644
index 3c5564cd0b..0000000000
--- a/thirdparty/jdiff/v-custom/doc/stylesheet.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Page background color */
-body { font-family: arial; }
diff --git a/thirdparty/jdiff/v-custom/index.xhtml b/thirdparty/jdiff/v-custom/index.xhtml
deleted file mode 100644
index 57b5ef9dff..0000000000
--- a/thirdparty/jdiff/v-custom/index.xhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- Example page
-
-
- Moved to example.org
- or example.com.
-
-
\ No newline at end of file
diff --git a/thirdparty/jdiff/v-custom/jdiff.jar b/thirdparty/jdiff/v-custom/jdiff.jar
deleted file mode 100755
index b3e20b6c74..0000000000
Binary files a/thirdparty/jdiff/v-custom/jdiff.jar and /dev/null differ
diff --git a/thirdparty/jdiff/v-custom/lib/2000/10/XMLSchema b/thirdparty/jdiff/v-custom/lib/2000/10/XMLSchema
deleted file mode 100644
index 767b952af6..0000000000
--- a/thirdparty/jdiff/v-custom/lib/2000/10/XMLSchema
+++ /dev/null
@@ -1,2201 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ]>
-
-
-
- Part 1 version: $Id: XMLSchema,v 1.1 2001/11/16 06:19:40 mdoar Exp $
- Part 2 version: $Id: XMLSchema,v 1.1 2001/11/16 06:19:40 mdoar Exp $
-
-
-
-
-
-
- The schema corresponding to this document is normative,
- with respect to the syntactic constraints it expresses in the
- XML Schema language. The documentation (within <documentation> elements)
- below, is not normative, but rather highlights important aspects of
- the W3C Recommendation of which this is a part
-
-
-
-
- The simpleType element and all of its members are defined
- towards the end of this schema document
-
-
-
-
-
- Get access to the xml: attribute groups for xml:lang
- as declared on 'documentation' below
-
-
-
-
-
-
-
- This type is extended by almost all schema types
- to allow attributes from other namespaces to be
- added to user schemas.
-
-
-
-
-
-
-
-
-
-
-
-
- This type is extended by all types which allow annotation
- other than <schema> itself
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This abstract element defines an substitution group over the
- elements which occur freely at the top level of schemas. These are:
- simpleType, complexType, element, attribute, attributeGroup, group, notation
- All of their types are based on the "annotated" type by extension.
-
-
-
-
-
-
- This abstract element defines a substitution group for the
- elements which can self-redefine (see <redefine> below).
-
-
-
-
-
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- for maxOccurs
-
-
-
-
-
-
-
-
-
-
-
- for all particles
-
-
-
-
-
-
- for element, group and attributeGroup,
- which both define and reference
-
-
-
-
-
-
-
- 'complexType' uses this
-
-
-
-
-
-
-
-
-
-
-
- 'topLevelGroup' uses this
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This branch is short for
- <complexContent>
- <restriction base="anyType">
- ...
- </restriction>
- </complexContent>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Will be restricted to required or forbidden
-
-
-
-
-
- Not allowed if simpleContent child is chosen.
- May be overriden by setting on complexContent child.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Overrides any setting on complexType parent.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- No typeDefParticle group reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
- #all or (possibly empty) subset of {substitution, extension,
- restriction}
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #all or (possibly empty) subset of {extension, restriction}
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The element element can be used either
- at the toplevel to define an element-type binding globally,
- or within a content model to either reference a globally-defined
- element or type or declare an element-type binding locally.
- The ref form is not allowed at the top level.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- group type for explicit groups, named top-level groups and
- group references
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- group type for the three kinds of group
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Only elements allowed inside
-
-
-
-
-
-
-
-
- restricted max/min
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- simple type for the value of the 'namespace' attr of
- 'any' and 'anyAttribute'
-
-
-
- Value is
- ##any - - any non-conflicting WFXML/attribute at all
-
- ##other - - any non-conflicting WFXML/attribute from
- namespace other than targetNS
-
- ##local - - any unqualified non-conflicting WFXML/attribute
-
- one or - - any non-conflicting WFXML/attribute from
- more URI the listed namespaces
- references
- (space separated)
-
- ##targetNamespace or ##local may appear in the above list, to
- refer to the targetNamespace of the enclosing
- schema or an absent targetNamespace respectively
-
-
-
-
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- An XPath expression
-
- A utility type, not for public use
-
-
-
-
-
- A VERY permissive definition, probably not even right
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A public identifier, per ISO 8879
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- notations for use within XML Schema schemas
-
-
-
-
-
-
-
-
- Not the real urType, but as close an approximation as we can
- get in the XML representation
-
-
-
-
-
-
-
-
-
- First the builtin primitive datatypes. These definitions are for
- information only, the real builtin definitions are magic. Note in
- particular that there is no type named 'anySimpleType'. The
- primitives should really be derived from no type at all, and
- anySimpleType should be derived as a union of all the primitives.
-
-
-
- For each built-in datatype in this schema (both primitive and
- derived) can be uniquely addressed via a URI constructed
- as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is an XPointer that identifies
- the name of the datatype, as an ID
-
- For example, to address the date datatype, the URI is:
-
- http://www.w3.org/2000/10/XMLSchema#xpointer(id("date"))
-
- Additionally, each facet definition element can be uniquely
- addressed via a URI constructed as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is an XPointer that identifies
- the name of the facet, as an ID
-
- For example, to address the period facet, the URI is:
-
- http://www.w3.org/2000/10/XMLSchema#xpointer(id("period"))
-
- Additionally, each facet usage in a built-in datatype definition
- can be uniquely addressed via a URI constructed as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is an XPointer that identifies
- the name of the datatype, followed by a period (".")
- followed by the name of the facet, as an ID
-
- For example, to address the usage of the period facet in
- the definition of date, the URI is:
-
- http://www.w3.org/2000/10/XMLSchema#xpointer(id("date.period"))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Now the derived primitive types
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pattern matches production 33 from the XML spec
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pattern matches production 7 from the XML spec
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pattern matches production 5 from the XML spec
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pattern matches production 4 from the Namespaces in XML spec
-
-
-
-
-
-
-
-
-
-
- NOTATION cannot be used directly in a schema; rather a type
- must be derived from it by specifying at least one enumeration
- facet whose value is the name of a NOTATION declared in the
- schema.
-
-
- the value/lexical spaces of NOTATION are not the full
- value/lexical spaces of NOTATION even though there are
- no additional constraining facets. The true value/lexical
- spaces are limited to the set of names of NOTATIONs declared
- in the schema.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Can be restricted to required or forbidden
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Required at the top level
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Forbidden when nested
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- base attribute and simpleType child are mutually
- exclusive, but one or other is required
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- itemType attribute and simpleType child are mutually
- exclusive, but one or other is required
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- memberTypes attribute must be non-empty or there must be
- at least one simpleType child
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- each (8-bit) byte is encoded as a sequence
- of 2 hexidecimal digits
-
-
-
-
-
-
- value is encoded in Base64 as defined
- in the MIME RFC
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/thirdparty/jdiff/v-custom/lib/2000/10/XMLSchema-instance b/thirdparty/jdiff/v-custom/lib/2000/10/XMLSchema-instance
deleted file mode 100644
index 8722ede668..0000000000
--- a/thirdparty/jdiff/v-custom/lib/2000/10/XMLSchema-instance
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-]>
-
-
-
- XML Schema instance namespace
- See The XML Schema draft recommendation for an introduction
-
-
-
- Henry S. Thompson
- $Date: 2001/11/16 06:19:40 $
- $Id: XMLSchema-instance,v 1.1 2001/11/16 06:19:40 mdoar Exp $
-
-
-
-
- No definitions are provided here, as
- this schema is never used as such
-
-
-
-
-
-
-
diff --git a/thirdparty/jdiff/v-custom/lib/2001/XMLSchema b/thirdparty/jdiff/v-custom/lib/2001/XMLSchema
deleted file mode 100644
index 02881b3e99..0000000000
--- a/thirdparty/jdiff/v-custom/lib/2001/XMLSchema
+++ /dev/null
@@ -1,2441 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ]>
-
-
-
- Part 1 version: Id: XMLSchema.xsd,v 1.49 2001/10/25 10:25:41 ht Exp
- Part 2 version: Id: datatypes.xsd,v 1.53 2001/10/25 10:26:05 ht Exp
-
-
-
-
-
-
- The schema corresponding to this document is normative,
- with respect to the syntactic constraints it expresses in the
- XML Schema language. The documentation (within <documentation> elements)
- below, is not normative, but rather highlights important aspects of
- the W3C Recommendation of which this is a part
-
-
-
-
- The simpleType element and all of its members are defined
- towards the end of this schema document
-
-
-
-
-
- Get access to the xml: attribute groups for xml:lang
- as declared on 'schema' and 'documentation' below
-
-
-
-
-
-
-
- This type is extended by almost all schema types
- to allow attributes from other namespaces to be
- added to user schemas.
-
-
-
-
-
-
-
-
-
-
-
-
- This type is extended by all types which allow annotation
- other than <schema> itself
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This group is for the
- elements which occur freely at the top level of schemas.
- All of their types are based on the "annotated" type by extension.
-
-
-
-
-
-
-
-
-
-
-
-
- This group is for the
- elements which can self-redefine (see <redefine> below).
-
-
-
-
-
-
-
-
-
-
-
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
- A utility type, not for public use
-
- #all or (possibly empty) subset of {extension, restriction}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- for maxOccurs
-
-
-
-
-
-
-
-
-
-
-
- for all particles
-
-
-
-
-
-
- for element, group and attributeGroup,
- which both define and reference
-
-
-
-
-
-
-
- 'complexType' uses this
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This branch is short for
- <complexContent>
- <restriction base="xs:anyType">
- ...
- </restriction>
- </complexContent>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Will be restricted to required or forbidden
-
-
-
-
-
- Not allowed if simpleContent child is chosen.
- May be overriden by setting on complexContent child.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Overrides any setting on complexType parent.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- No typeDefParticle group reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A utility type, not for public use
-
- #all or (possibly empty) subset of {substitution, extension,
- restriction}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The element element can be used either
- at the top level to define an element-type binding globally,
- or within a content model to either reference a globally-defined
- element or type or declare an element-type binding locally.
- The ref form is not allowed at the top level.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- group type for explicit groups, named top-level groups and
- group references
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- group type for the three kinds of group
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- restricted max/min
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Only elements allowed inside
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- simple type for the value of the 'namespace' attr of
- 'any' and 'anyAttribute'
-
-
-
- Value is
- ##any - - any non-conflicting WFXML/attribute at all
-
- ##other - - any non-conflicting WFXML/attribute from
- namespace other than targetNS
-
- ##local - - any unqualified non-conflicting WFXML/attribute
-
- one or - - any non-conflicting WFXML/attribute from
- more URI the listed namespaces
- references
- (space separated)
-
- ##targetNamespace or ##local may appear in the above list, to
- refer to the targetNamespace of the enclosing
- schema or an absent targetNamespace respectively
-
-
-
-
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A subset of XPath expressions for use
-in selectors
- A utility type, not for public
-use
-
-
-
- The following pattern is intended to allow XPath
- expressions per the following EBNF:
- Selector ::= Path ( '|' Path )*
- Path ::= ('.//')? Step ( '/' Step )*
- Step ::= '.' | NameTest
- NameTest ::= QName | '*' | NCName ':' '*'
- child:: is also allowed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A subset of XPath expressions for use
-in fields
- A utility type, not for public
-use
-
-
-
- The following pattern is intended to allow XPath
- expressions per the same EBNF as for selector,
- with the following change:
- Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The three kinds of identity constraints, all with
- type of or derived from 'keybase'.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A utility type, not for public use
-
- A public identifier, per ISO 8879
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- notations for use within XML Schema schemas
-
-
-
-
-
-
-
-
- Not the real urType, but as close an approximation as we can
- get in the XML representation
-
-
-
-
-
-
-
-
-
- First the built-in primitive datatypes. These definitions are for
- information only, the real built-in definitions are magic. Note in
- particular that there is no type named 'anySimpleType'. The
- primitives should really be derived from no type at all, and
- anySimpleType should be derived as a union of all the primitives.
-
-
-
- For each built-in datatype in this schema (both primitive and
- derived) can be uniquely addressed via a URI constructed
- as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is the name of the datatype
-
- For example, to address the int datatype, the URI is:
-
- http://www.w3.org/2001/XMLSchema#int
-
- Additionally, each facet definition element can be uniquely
- addressed via a URI constructed as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is the name of the facet
-
- For example, to address the maxInclusive facet, the URI is:
-
- http://www.w3.org/2001/XMLSchema#maxInclusive
-
- Additionally, each facet usage in a built-in datatype definition
- can be uniquely addressed via a URI constructed as follows:
- 1) the base URI is the URI of the XML Schema namespace
- 2) the fragment identifier is the name of the datatype, followed
- by a period (".") followed by the name of the facet
-
- For example, to address the usage of the maxInclusive facet in
- the definition of int, the URI is:
-
- http://www.w3.org/2001/XMLSchema#int.maxInclusive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NOTATION cannot be used directly in a schema; rather a type
- must be derived from it by specifying at least one enumeration
- facet whose value is the name of a NOTATION declared in the
- schema.
-
-
-
-
-
-
-
-
-
- Now the derived primitive types
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pattern specifies the content of section 2.12 of XML 1.0e2
- and RFC 1766
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pattern matches production 7 from the XML spec
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pattern matches production 5 from the XML spec
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pattern matches production 4 from the Namespaces in XML spec
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #all or (possibly empty) subset of {restriction, union, list}
-
-
- A utility type, not for public use
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Can be restricted to required or forbidden
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Required at the top level
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Forbidden when nested
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- We should use a substitution group for facets, but
- that's ruled out because it would allow users to
- add their own, which we're not ready for yet.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- base attribute and simpleType child are mutually
- exclusive, but one or other is required
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- itemType attribute and simpleType child are mutually
- exclusive, but one or other is required
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- memberTypes attribute must be non-empty or there must be
- at least one simpleType child
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/thirdparty/jdiff/v-custom/lib/2001/XMLSchema-instance b/thirdparty/jdiff/v-custom/lib/2001/XMLSchema-instance
deleted file mode 100644
index 48b2d9d948..0000000000
--- a/thirdparty/jdiff/v-custom/lib/2001/XMLSchema-instance
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-]>
-
-
-
- XML Schema instance namespace
- See the XML Schema
- Recommendation for an introduction
-
-
-
- $Date: 2002/01/09 20:32:53 $
- $Id: XMLSchema-instance,v 1.1 2002/01/09 20:32:53 mdoar Exp $
-
-
-
- This schema should never be used as such:
- the XML
- Schema Recommendation forbids the declaration of
- attributes in this namespace
-
-
-
-
-
-
-
-
diff --git a/thirdparty/jdiff/v-custom/lib/Null.java b/thirdparty/jdiff/v-custom/lib/Null.java
deleted file mode 100644
index 019b71895d..0000000000
--- a/thirdparty/jdiff/v-custom/lib/Null.java
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * This class is used only as a "null" argument for Javadoc when comparing
- * two API files. Javadoc has to have a package, .java or .class file as an
- * argument, even though JDiff doesn't use it.
- */
-public class Null {
- public Null() {
- }
-}
diff --git a/thirdparty/jdiff/v-custom/lib/background.gif b/thirdparty/jdiff/v-custom/lib/background.gif
deleted file mode 100644
index e6d2dda389..0000000000
Binary files a/thirdparty/jdiff/v-custom/lib/background.gif and /dev/null differ
diff --git a/thirdparty/jdiff/v-custom/lib/black.gif b/thirdparty/jdiff/v-custom/lib/black.gif
deleted file mode 100644
index 185d95b110..0000000000
Binary files a/thirdparty/jdiff/v-custom/lib/black.gif and /dev/null differ
diff --git a/thirdparty/jdiff/v-custom/lib/classdoc.jar b/thirdparty/jdiff/v-custom/lib/classdoc.jar
deleted file mode 100755
index 725416399f..0000000000
Binary files a/thirdparty/jdiff/v-custom/lib/classdoc.jar and /dev/null differ
diff --git a/thirdparty/jdiff/v-custom/lib/jdiff_logo.gif b/thirdparty/jdiff/v-custom/lib/jdiff_logo.gif
deleted file mode 100644
index d098485d3a..0000000000
Binary files a/thirdparty/jdiff/v-custom/lib/jdiff_logo.gif and /dev/null differ
diff --git a/thirdparty/jdiff/v-custom/lib/new.gif b/thirdparty/jdiff/v-custom/lib/new.gif
deleted file mode 100644
index c0ef7a4744..0000000000
Binary files a/thirdparty/jdiff/v-custom/lib/new.gif and /dev/null differ
diff --git a/thirdparty/jdiff/v-custom/lib/xerces.jar b/thirdparty/jdiff/v-custom/lib/xerces.jar
deleted file mode 100755
index e75d486c8d..0000000000
Binary files a/thirdparty/jdiff/v-custom/lib/xerces.jar and /dev/null differ
diff --git a/thirdparty/jdiff/v-custom/src/api.xsd b/thirdparty/jdiff/v-custom/src/api.xsd
deleted file mode 100644
index bb2368fc8c..0000000000
--- a/thirdparty/jdiff/v-custom/src/api.xsd
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
- Schema for JDiff API representation.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/thirdparty/jdiff/v-custom/src/comments.xsd b/thirdparty/jdiff/v-custom/src/comments.xsd
deleted file mode 100644
index cfee740843..0000000000
--- a/thirdparty/jdiff/v-custom/src/comments.xsd
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
- Schema for JDiff comments.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/.cvsignore b/thirdparty/jdiff/v-custom/src/jdiff/.cvsignore
deleted file mode 100644
index 6b468b62a9..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.class
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/API.java b/thirdparty/jdiff/v-custom/src/jdiff/API.java
deleted file mode 100644
index 2e8f117f4d..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/API.java
+++ /dev/null
@@ -1,429 +0,0 @@
-package jdiff;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * The internal representation of an API.
- *
- * RootDoc could have been used for representing this, but
- * you cannot serialize a RootDoc object - see
- * http://developer.java.sun.com/developer/bugParade/bugs/4125581.html
- * You might be able use Javadoc.Main() to create another RootDoc, but the
- * methods are package private. You can run javadoc in J2SE1.4, see:
- * http://java.sun.com/j2se/1.4/docs/tooldocs/javadoc/standard-doclet.html#runningprogrammatically
- * but you still can't get the RootDoc object.
- *
- * The advantage of writing out an XML representation of each API is that
- * later runs of JDiff don't have to have Javadoc scan all the files again,
- * a possibly lengthy process. XML also permits other source code in
- * languages other than Java to be scanned to produce XML, and then versions
- * of JDiff can be used to create documents describing the difference in those
- * APIs.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-public class API {
-
- /**
- * The list of all the top-level packages.
- * Each package contains classes, each class contains members, and so on.
- */
- public List packages_; // PackageAPI[]
-
- /**
- * The list of all the classes.
- * This is used to generate the methods and fields which are inherited,
- * rather than storing them in the XML file.
- */
- public Hashtable classes_;
-
- /**
- * The String which identifies this API, e.g. "SuperProduct 1.3".
- */
- public String name_ = null;
-
- /** The current package being added to during parsing. */
- public PackageAPI currPkg_ = null;
- /** The current class being added to during parsing. */
- public ClassAPI currClass_ = null;
- /** The current constructor being added to during parsing. */
- public ConstructorAPI currCtor_ = null;
- /** The current method being added to during parsing. */
- public MethodAPI currMethod_ = null;
- /** The current field being added to during parsing. */
- public FieldAPI currField_ = null;
-
- /** Default constructor. */
- public API() {
- packages_ = new ArrayList(); //PackageAPI[]
- classes_ = new Hashtable(); //ClassAPI
- }
-
-//
-// Methods to display the contents of an API object.
-//
-
- /** Amount by which to increment each indentation. */
- public static final int indentInc = 2;
-
- /** Display the contents of the API object. */
- public void dump() {
- int indent = 0;
- Iterator iter = packages_.iterator();
- while (iter.hasNext()) {
- dumpPackage((PackageAPI)(iter.next()), indent);
- }
- }
-
- /**
- * Display the contents of a PackageAPI object.
- *
- * @param pkg The given PackageAPI object.
- * @param indent The number of spaces to indent the output.
- */
- public void dumpPackage(PackageAPI pkg, int indent) {
- for (int i = 0; i < indent; i++) System.out.print(" ");
- System.out.println("Package Name: " + pkg.name_);
- Iterator iter = pkg.classes_.iterator();
- while (iter.hasNext()) {
- dumpClass((ClassAPI)(iter.next()), indent + indentInc);
- }
- // Display documentation
- if (pkg.doc_ != null) {
- System.out.print("Package doc block:");
- System.out.println("\"" + pkg.doc_ + "\"");
- }
- }
-
- /**
- * Display the contents of a ClassAPI object.
- *
- * @param c The given ClassAPI object.
- * @param indent The number of spaces to indent the output.
- */
- public static void dumpClass(ClassAPI c, int indent) {
- for (int i = 0; i < indent; i++) System.out.print(" ");
- if (c.isInterface_)
- System.out.println("Interface name: " + c.name_);
- else
- System.out.println("Class Name: " + c.name_);
- if (c.extends_ != null) {
- for (int i = 0; i < indent; i++) System.out.print(" ");
- System.out.println("Extends: " + c.extends_);
- }
- if (c.implements_.size() != 0) {
- for (int i = 0; i < indent; i++) System.out.print(" ");
- System.out.println("Implements: ");
- Iterator iter = c.implements_.iterator();
- while (iter.hasNext()) {
- String interfaceImpl = (String)(iter.next());
- for (int i = 0; i < indent + 2; i++) System.out.print(" ");
- System.out.println(" " + interfaceImpl);
- }
- }
- // Dump modifiers specific to a class
- if (c.isAbstract_)
- System.out.print("abstract ");
- // Dump modifiers common to all
- dumpModifiers(c.modifiers_, indent);
- // Dump ctors
- Iterator iter = c.ctors_.iterator();
- while (iter.hasNext()) {
- dumpCtor((ConstructorAPI)(iter.next()), indent + indentInc);
- }
- // Dump methods
- iter = c.methods_.iterator();
- while (iter.hasNext()) {
- dumpMethod((MethodAPI)(iter.next()), indent + indentInc);
- }
- // Dump fields
- iter = c.fields_.iterator();
- while (iter.hasNext()) {
- dumpField((FieldAPI)(iter.next()), indent + indentInc);
- }
- // Display documentation
- if (c.doc_ != null) {
- System.out.print("Class doc block:");
- System.out.println("\"" + c.doc_ + "\"");
- } else
- System.out.println();
- }
-
- /**
- * Display the contents of the Modifiers object.
- *
- * @param c The given Modifiers object.
- * @param indent The number of spaces to indent the output.
- */
- public static void dumpModifiers(Modifiers m, int indent) {
- for (int i = 0; i < indent; i++) System.out.print(" ");
- if (m.isStatic)
- System.out.print("static ");
- if (m.isFinal)
- System.out.print("final ");
- if (m.visibility != null)
- System.out.print("visibility = " + m.visibility + " ");
- // Flush the line
- System.out.println();
- }
-
- /**
- * Display the contents of a constructor.
- *
- * @param c The given constructor object.
- * @param indent The number of spaces to indent the output.
- */
- public static void dumpCtor(ConstructorAPI c, int indent) {
- for (int i = 0; i < indent; i++) System.out.print(" ");
- System.out.println("Ctor type: " + c.type_);
- // Display exceptions
- System.out.print("exceptions: " + c.exceptions_ + " ");
- // Dump modifiers common to all
- dumpModifiers(c.modifiers_, indent);
- // Display documentation
- if (c.doc_ != null) {
- System.out.print("Ctor doc block:");
- System.out.println("\"" + c.doc_ + "\"");
- }
- }
-
- /**
- * Display the contents of a MethodAPI object.
- *
- * @param m The given MethodAPI object.
- * @param indent The number of spaces to indent the output.
- */
- public static void dumpMethod(MethodAPI m, int indent) {
- if (m.inheritedFrom_ != null)
- return;
- for (int i = 0; i < indent; i++) System.out.print(" ");
- System.out.print("Method Name: " + m.name_);
- if (m.inheritedFrom_ != null)
- System.out.println(", inherited from: " + m.inheritedFrom_);
- if (m.returnType_ != null)
- System.out.println(", return type: " + m.returnType_);
- else
- System.out.println();
- // Dump modifiers specific to a method
- if (m.isAbstract_)
- System.out.print("abstract ");
- if (m.isNative_)
- System.out.print("native ");
- if (m.isSynchronized_)
- System.out.print("synchronized ");
- // Display exceptions
- System.out.print("exceptions: " + m.exceptions_ + " ");
- // Dump modifiers common to all
- dumpModifiers(m.modifiers_, indent);
-
- Iterator iter = m.params_.iterator();
- while (iter.hasNext()) {
- dumpParam((ParamAPI)(iter.next()), indent + indentInc);
- }
- // Display documentation
- if (m.doc_ != null) {
- System.out.print("Method doc block:");
- System.out.println("\"" + m.doc_ + "\"");
- }
- }
-
- /**
- * Display the contents of a field.
- * Does not show inherited fields.
- *
- * @param f The given field object.
- * @param indent The number of spaces to indent the output.
- */
- public static void dumpField(FieldAPI f, int indent) {
- if (f.inheritedFrom_ != null)
- return;
- for (int i = 0; i < indent; i++) System.out.print(" ");
- System.out.println("Field Name: " + f.name_ + ", type: " + f.type_);
- if (f.inheritedFrom_ != null)
- System.out.println(", inherited from: " + f.inheritedFrom_);
- if (f.isTransient_)
- System.out.print("transient ");
- if (f.isVolatile_)
- System.out.print("volatile ");
- // Dump modifiers common to all
- dumpModifiers(f.modifiers_, indent);
- // Display documentation
- if (f.doc_ != null)
- System.out.print("Field doc block:");
- System.out.println("\"" + f.doc_ + "\"");
- }
-
- /**
- * Display the contents of a parameter.
- *
- * @param p The given parameter object.
- * @param indent The number of spaces to indent the output.
- */
- public static void dumpParam(ParamAPI p, int indent) {
- for (int i = 0; i < indent; i++) System.out.print(" ");
- System.out.println("Param Name: " + p.name_ + ", type: " + p.type_);
- }
-
- /**
- * Convert all HTML tags to text by placing them inside a CDATA element.
- * Characters still have to be valid Unicode characters as defined by the
- * parser.
- */
- public static String stuffHTMLTags(String htmlText) {
- if (htmlText.indexOf("]]>") != -1) {
- System.out.println("Warning: illegal string ]]> found in text. Ignoring the comment.");
- return "";
- }
- return "";
- }
-
- /**
- * Convert all HTML tags to text by stuffing text into the HTML tag
- * to stop it being an HTML or XML tag. E.g. "foo
"
- * becomes "lEsS_tHaNcode>foolEsS_tHaN/code>". Replace all <
- * characters
- * with the string "lEsS_tHaN". Also replace & character with the
- * string "aNd_cHaR" to avoid text entities. Also replace "
- * character with the
- * string "qUoTe_cHaR".
- */
- public static String hideHTMLTags(String htmlText) {
- StringBuffer sb = new StringBuffer(htmlText);
- int i = 0;
- while (i < sb.length()) {
- if (sb.charAt(i) == '<') {
- sb.setCharAt(i ,'l');
- sb.insert(i+1, "EsS_tHaN");
- } else if (sb.charAt(i) == '&') {
- sb.setCharAt(i ,'a');
- sb.insert(i+1, "Nd_cHaR");
- } else if (sb.charAt(i) == '"') {
- sb.setCharAt(i ,'q');
- sb.insert(i+1, "uote_cHaR");
- }
- i++;
- }
- return sb.toString();
- }
-
- /**
- * Convert text with stuffed HTML tags ("lEsS_tHaN", etc) into HTML text.
- */
- public static String showHTMLTags(String text) {
- StringBuffer sb = new StringBuffer(text);
- StringBuffer res = new StringBuffer();
- int len = sb.length();
- res.setLength(len);
- int i = 0;
- int resIdx = 0;
- while (i < len) {
- char c = sb.charAt(i);
- if (len - i > 8 && c == 'l' &&
- sb.charAt(i+1) == 'E' &&
- sb.charAt(i+2) == 's' &&
- sb.charAt(i+3) == 'S' &&
- sb.charAt(i+4) == '_' &&
- sb.charAt(i+5) == 't' &&
- sb.charAt(i+6) == 'H' &&
- sb.charAt(i+7) == 'a' &&
- sb.charAt(i+8) == 'N') {
- res.setCharAt(resIdx ,'<');
- i += 8;
- } else if (len - i > 9 && c == 'q' &&
- sb.charAt(i+1) == 'U' &&
- sb.charAt(i+2) == 'o' &&
- sb.charAt(i+3) == 'T' &&
- sb.charAt(i+4) == 'e' &&
- sb.charAt(i+5) == '_' &&
- sb.charAt(i+6) == 'c' &&
- sb.charAt(i+7) == 'H' &&
- sb.charAt(i+8) == 'a' &&
- sb.charAt(i+9) == 'R') {
- res.setCharAt(resIdx ,'"');
- i += 9;
- } else if (len - i > 7 && c == 'a' &&
- sb.charAt(i+1) == 'N' &&
- sb.charAt(i+2) == 'd' &&
- sb.charAt(i+3) == '_' &&
- sb.charAt(i+4) == 'c' &&
- sb.charAt(i+5) == 'H' &&
- sb.charAt(i+6) == 'a' &&
- sb.charAt(i+7) == 'R') {
- res.setCharAt(resIdx ,'&');
- i += 7;
- } else {
- res.setCharAt(resIdx, c);
- }
- i++;
- resIdx++;
- }
- res.setLength(resIdx);
- return res.toString();
- }
-
- /**
- * NOT USED.
- *
- * Replace all instances of with
. Just for the small number
- * of HMTL tags which don't require a matching end tag.
- * Also make HTML conform to the simple HTML requirements such as
- * no double hyphens. Double hyphens are replaced by - and the character
- * entity for a hyphen.
- *
- * Cases where this fails and has to be corrected in the XML by hand:
- * Attributes' values missing their double quotes , e.g. size=-2
- * Mangled HTML tags e.g. <ttt>
- *
- * NOT USED. There is often too much bad HTML in
- * doc blocks to try to handle every case correctly. Better just to
- * stuff the *lt; and &: characters with stuffHTMLTags(). Though
- * the resulting XML is not as elegant, it does the job with less
- * intervention by the user.
- */
- public static String convertHTMLTagsToXHTML(String htmlText) {
- StringBuffer sb = new StringBuffer(htmlText);
- int i = 0;
- boolean inTag = false;
- String tag = null;
- // Needs to re-evaluate this length at each loop
- while (i < sb.length()) {
- char c = sb.charAt(i);
- if (inTag) {
- if (c == '>') {
- // OPTION Could fail at or fix some errorneous tags here
- // Make the best guess as to whether this tag is terminated
- if (Comments.isMinimizedTag(tag) &&
- htmlText.indexOf("" + tag + ">", i) == -1)
- sb.insert(i, "/");
- inTag = false;
- } else {
- // OPTION could also make sure that attribute values are
- // surrounded by quotes.
- tag += c;
- }
- }
- if (c == '<') {
- inTag = true;
- tag = "";
- }
- // -- is not allowed in XML, but !-- is part of an comment,
- // and --> is also part of a comment
- if (c == '-' && i > 0 && sb.charAt(i-1) == '-') {
- if (!(i > 1 && sb.charAt(i-2) == '!')) {
- sb.setCharAt(i, '&');
- sb.insert(i+1, "#045;");
- i += 5;
- }
- }
- i++;
- }
- if (inTag) {
- // Oops. Someone forgot to close their HTML tag, e.g. "");
- }
- return sb.toString();
- }
-}
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/APIComparator.java b/thirdparty/jdiff/v-custom/src/jdiff/APIComparator.java
deleted file mode 100644
index b0f42ed0e4..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/APIComparator.java
+++ /dev/null
@@ -1,934 +0,0 @@
-package jdiff;
-
-import java.util.*;
-
-/**
- * This class contains method to compare two API objects.
- * The differences are stored in an APIDiff object.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-public class APIComparator {
-
- /**
- * Top-level object representing the differences between two APIs.
- * It is this object which is used to generate the report later on.
- */
- public APIDiff apiDiff;
-
- /**
- * Package-level object representing the differences between two packages.
- * This object is also used to determine which file to write documentation
- * differences into.
- */
- public PackageDiff pkgDiff;
-
- /** Default constructor. */
- public APIComparator() {
- apiDiff = new APIDiff();
- }
-
- /** For easy local access to the old API object. */
- private static API oldAPI_;
- /** For easy local access to the new API object. */
- private static API newAPI_;
-
- /**
- * Compare two APIs.
- */
- public void compareAPIs(API oldAPI, API newAPI) {
- System.out.println("JDiff: comparing the old and new APIs ...");
- oldAPI_ = oldAPI;
- newAPI_ = newAPI;
-
- double differs = 0.0;
-
- apiDiff.oldAPIName_ = oldAPI.name_;
- apiDiff.newAPIName_ = newAPI.name_;
-
- Collections.sort(oldAPI.packages_);
- Collections.sort(newAPI.packages_);
-
- // Find packages which were removed in the new API
- Iterator iter = oldAPI.packages_.iterator();
- while (iter.hasNext()) {
- PackageAPI oldPkg = (PackageAPI)(iter.next());
- // This search is looking for an *exact* match. This is true in
- // all the *API classes.
- int idx = Collections.binarySearch(newAPI.packages_, oldPkg);
- if (idx < 0) {
- // If there an instance of a package with the same name
- // in both the old and new API, then treat it as changed,
- // rather than removed and added. There will never be more than
- // one instance of a package with the same name in an API.
- int existsNew = newAPI.packages_.indexOf(oldPkg);
- if (existsNew != -1) {
- // Package by the same name exists in both APIs
- // but there has been some or other change.
- differs += 2.0 * comparePackages(oldPkg, (PackageAPI)(newAPI.packages_.get(existsNew)));
- } else {
- if (trace)
- System.out.println("Package " + oldPkg.name_ + " was removed");
- apiDiff.packagesRemoved.add(oldPkg);
- differs += 1.0;
- }
- } else {
- // The package exists unchanged in name or doc, but may
- // differ in classes and their members, so it still needs to
- // be compared.
- differs += 2.0 * comparePackages(oldPkg, (PackageAPI)(newAPI.packages_.get(idx)));
- }
- } // while (iter.hasNext())
-
- // Find packages which were added or changed in the new API
- iter = newAPI.packages_.iterator();
- while (iter.hasNext()) {
- PackageAPI newPkg = (PackageAPI)(iter.next());
- int idx = Collections.binarySearch(oldAPI.packages_, newPkg);
- if (idx < 0) {
- // See comments above
- int existsOld = oldAPI.packages_.indexOf(newPkg);
- if (existsOld != -1) {
- // Don't mark a package as added or compare it
- // if it was already marked as changed
- } else {
- if (trace)
- System.out.println("Package " + newPkg.name_ + " was added");
- apiDiff.packagesAdded.add(newPkg);
- differs += 1.0;
- }
- } else {
- // It will already have been compared above.
- }
- } // while (iter.hasNext())
-
- // Now that the numbers of members removed and added are known
- // we can deduce more information about changes.
- MergeChanges.mergeRemoveAdd(apiDiff);
-
-// The percent change statistic reported for all elements in each API is
-// defined recursively as follows:
-//
-// %age change = 100 * (added + removed + 2*changed)
-// -----------------------------------
-// sum of public elements in BOTH APIs
-//
-// The definition ensures that if all classes are removed and all new classes
-// added, the change will be 100%.
-// Evaluation of the visibility of elements has already been done when the
-// XML was written out.
-// Note that this doesn't count changes in the modifiers of classes and
-// packages. Other changes in members are counted.
- Long denom = new Long(oldAPI.packages_.size() + newAPI.packages_.size());
- // This should never be zero because an API always has packages?
- if (denom.intValue() == 0) {
- System.out.println("Error: no packages found in the APIs.");
- return;
- }
- if (trace)
- System.out.println("Top level changes: " + differs + "/" + denom.intValue());
- differs = (100.0 * differs)/denom.doubleValue();
-
- // Some differences such as documentation changes are not tracked in
- // the difference statistic, so a value of 0.0 does not mean that there
- // were no differences between the APIs.
- apiDiff.pdiff = differs;
- Double percentage = new Double(differs);
- int approxPercentage = percentage.intValue();
- if (approxPercentage == 0)
- System.out.println(" Approximately " + percentage + "% difference between the APIs");
- else
- System.out.println(" Approximately " + approxPercentage + "% difference between the APIs");
-
- Diff.closeDiffFile();
- }
-
- /**
- * Compare two packages.
- */
- public double comparePackages(PackageAPI oldPkg, PackageAPI newPkg) {
- if (trace)
- System.out.println("Comparing old package " + oldPkg.name_ +
- " and new package " + newPkg.name_);
- pkgDiff = new PackageDiff(oldPkg.name_);
- double differs = 0.0;
-
- Collections.sort(oldPkg.classes_);
- Collections.sort(newPkg.classes_);
-
- // Find classes which were removed in the new package
- Iterator iter = oldPkg.classes_.iterator();
- while (iter.hasNext()) {
- ClassAPI oldClass = (ClassAPI)(iter.next());
- // This search is looking for an *exact* match. This is true in
- // all the *API classes.
- int idx = Collections.binarySearch(newPkg.classes_, oldClass);
- if (idx < 0) {
- // If there an instance of a class with the same name
- // in both the old and new package, then treat it as changed,
- // rather than removed and added. There will never be more than
- // one instance of a class with the same name in a package.
- int existsNew = newPkg.classes_.indexOf(oldClass);
- if (existsNew != -1) {
- // Class by the same name exists in both packages
- // but there has been some or other change.
- differs += 2.0 * compareClasses(oldClass, (ClassAPI)(newPkg.classes_.get(existsNew)), pkgDiff);
- } else {
- if (trace)
- System.out.println(" Class " + oldClass.name_ + " was removed");
- pkgDiff.classesRemoved.add(oldClass);
- differs += 1.0;
- }
- } else {
- // The class exists unchanged in name or modifiers, but may
- // differ in members, so it still needs to be compared.
- differs += 2.0 * compareClasses(oldClass, (ClassAPI)(newPkg.classes_.get(idx)), pkgDiff);
- }
- } // while (iter.hasNext())
-
- // Find classes which were added or changed in the new package
- iter = newPkg.classes_.iterator();
- while (iter.hasNext()) {
- ClassAPI newClass = (ClassAPI)(iter.next());
- int idx = Collections.binarySearch(oldPkg.classes_, newClass);
- if (idx < 0) {
- // See comments above
- int existsOld = oldPkg.classes_.indexOf(newClass);
- if (existsOld != -1) {
- // Don't mark a class as added or compare it
- // if it was already marked as changed
- } else {
- if (trace)
- System.out.println(" Class " + newClass.name_ + " was added");
- pkgDiff.classesAdded.add(newClass);
- differs += 1.0;
- }
- } else {
- // It will already have been compared above.
- }
- } // while (iter.hasNext())
-
- // Check if the only change was in documentation. Bug 472521.
- boolean differsFlag = false;
- if (docChanged(oldPkg.doc_, newPkg.doc_)) {
- String link = "";
- String id = oldPkg.name_ + "!package";
- String title = link + "Package " + oldPkg.name_ + "";
- pkgDiff.documentationChange_ = Diff.saveDocDiffs(pkgDiff.name_, null, oldPkg.doc_, newPkg.doc_, id, title);
- differsFlag = true;
- }
-
- // Only add to the parent Diff object if some difference has been found
- if (differs != 0.0 || differsFlag)
- apiDiff.packagesChanged.add(pkgDiff);
-
- Long denom = new Long(oldPkg.classes_.size() + newPkg.classes_.size());
- // This should never be zero because a package always has classes?
- if (denom.intValue() == 0) {
- System.out.println("Warning: no classes found in the package " + oldPkg.name_);
- return 0.0;
- }
- if (trace)
- System.out.println("Package " + pkgDiff.name_ + " had a difference of " + differs + "/" + denom.intValue());
- pkgDiff.pdiff = 100.0 * differs/denom.doubleValue();
- return differs/denom.doubleValue();
- } // comparePackages()
-
- /**
- * Compare two classes.
- *
- * Need to compare constructors, methods and fields.
- */
- public double compareClasses(ClassAPI oldClass, ClassAPI newClass, PackageDiff pkgDiff) {
- if (trace)
- System.out.println(" Comparing old class " + oldClass.name_ +
- " and new class " + newClass.name_);
- boolean differsFlag = false;
- double differs = 0.0;
- ClassDiff classDiff = new ClassDiff(oldClass.name_);
- classDiff.isInterface_ = newClass.isInterface_; // Used in the report
-
- // Track changes in modifiers - class or interface
- if (oldClass.isInterface_ != newClass.isInterface_) {
- classDiff.modifiersChange_ = "Changed from ";
- if (oldClass.isInterface_)
- classDiff.modifiersChange_ += "an interface to a class.";
- else
- classDiff.modifiersChange_ += "a class to an interface.";
- differsFlag = true;
- }
- // Track changes in inheritance
- String inheritanceChange = ClassDiff.diff(oldClass, newClass);
- if (inheritanceChange != null) {
- classDiff.inheritanceChange_ = inheritanceChange;
- differsFlag = true;
- }
- // Abstract or not
- if (oldClass.isAbstract_ != newClass.isAbstract_) {
- String changeText = "";
- if (oldClass.isAbstract_)
- changeText += "Changed from abstract to non-abstract.";
- else
- changeText += "Changed from non-abstract to abstract.";
- classDiff.addModifiersChange(changeText);
- differsFlag = true;
- }
- // Track changes in documentation
- if (docChanged(oldClass.doc_, newClass.doc_)) {
- String fqName = pkgDiff.name_ + "." + classDiff.name_;
- String link = "";
- String id = pkgDiff.name_ + "." + classDiff.name_ + "!class";
- String title = link + "Class " + classDiff.name_ + "";
- classDiff.documentationChange_ = Diff.saveDocDiffs(pkgDiff.name_,
- classDiff.name_, oldClass.doc_, newClass.doc_, id, title);
- differsFlag = true;
- }
- // All other modifiers
- String modifiersChange = oldClass.modifiers_.diff(newClass.modifiers_);
- if (modifiersChange != null) {
- differsFlag = true;
- if (modifiersChange.indexOf("Change from deprecated to undeprecated") != -1) {
- System.out.println("JDiff: warning: change from deprecated to undeprecated for class " + pkgDiff.name_ + "." + newClass.name_);
-
- }
- }
- classDiff.addModifiersChange(modifiersChange);
-
- // Track changes in members
- boolean differsCtors =
- compareAllCtors(oldClass, newClass, classDiff);
- boolean differsMethods =
- compareAllMethods(oldClass, newClass, classDiff);
- boolean differsFields =
- compareAllFields(oldClass, newClass, classDiff);
- if (differsCtors || differsMethods || differsFields)
- differsFlag = true;
-
- if (trace) {
- System.out.println(" Ctors differ? " + differsCtors +
- ", Methods differ? " + differsMethods +
- ", Fields differ? " + differsFields);
- }
-
- // Only add to the parent if some difference has been found
- if (differsFlag)
- pkgDiff.classesChanged.add(classDiff);
-
- // Get the numbers of affected elements from the classDiff object
- differs =
- classDiff.ctorsRemoved.size() + classDiff.ctorsAdded.size() +
- classDiff.ctorsChanged.size() +
- classDiff.methodsRemoved.size() + classDiff.methodsAdded.size() +
- classDiff.methodsChanged.size() +
- classDiff.fieldsRemoved.size() + classDiff.fieldsAdded.size() +
- classDiff.fieldsChanged.size();
- Long denom = new Long(
- oldClass.ctors_.size() +
- numLocalMethods(oldClass.methods_) +
- numLocalFields(oldClass.fields_) +
- newClass.ctors_.size() +
- numLocalMethods(newClass.methods_) +
- numLocalFields(newClass.fields_));
- if (denom.intValue() == 0) {
- // This is probably a placeholder interface, but documentation
- // or modifiers etc may have changed
- if (differsFlag) {
- classDiff.pdiff = 0.0; // 100.0 is too much
- return 1.0;
- } else {
- return 0.0;
- }
- }
- // Handle the case where the only change is in documentation or
- // the modifiers
- if (differsFlag && differs == 0.0) {
- differs = 1.0;
- }
- if (trace)
- System.out.println(" Class " + classDiff.name_ + " had a difference of " + differs + "/" + denom.intValue());
- classDiff.pdiff = 100.0 * differs/denom.doubleValue();
- return differs/denom.doubleValue();
- } // compareClasses()
-
- /**
- * Compare all the constructors in two classes.
- *
- * The compareTo method in the ConstructorAPI class acts only upon the type.
- */
- public boolean compareAllCtors(ClassAPI oldClass, ClassAPI newClass,
- ClassDiff classDiff) {
- if (trace)
- System.out.println(" Comparing constructors: #old " +
- oldClass.ctors_.size() + ", #new " + newClass.ctors_.size());
- boolean differs = false;
- boolean singleCtor = false; // Set if there is only one ctor
-
- Collections.sort(oldClass.ctors_);
- Collections.sort(newClass.ctors_);
-
- // Find ctors which were removed in the new class
- Iterator iter = oldClass.ctors_.iterator();
- while (iter.hasNext()) {
- ConstructorAPI oldCtor = (ConstructorAPI)(iter.next());
- int idx = Collections.binarySearch(newClass.ctors_, oldCtor);
- if (idx < 0) {
- int oldSize = oldClass.ctors_.size();
- int newSize = newClass.ctors_.size();
- if (oldSize == 1 && oldSize == newSize) {
- // If there is one constructor in the oldClass and one
- // constructor in the new class, then mark it as changed
- MemberDiff memberDiff = new MemberDiff(oldClass.name_);
- memberDiff.oldType_ = oldCtor.type_;
- memberDiff.oldExceptions_ = oldCtor.exceptions_;
- ConstructorAPI newCtor = (ConstructorAPI)(newClass.ctors_.get(0));
- memberDiff.newType_ = newCtor.type_;
- memberDiff.newExceptions_ = newCtor.exceptions_;
- // Track changes in documentation
- if (docChanged(oldCtor.doc_, newCtor.doc_)) {
- String type = memberDiff.newType_;
- if (type.compareTo("void") == 0)
- type = "";
- String fqName = pkgDiff.name_ + "." + classDiff.name_;
- String link1 = "";
- String link2 = "";
- String id = pkgDiff.name_ + "." + classDiff.name_ + ".ctor(" + HTMLReportGenerator.simpleName(type) + ")";
- String title = link1 + "Class " + classDiff.name_ +
- ", " + link2 + "constructor " + classDiff.name_ + "(" + HTMLReportGenerator.simpleName(type) + ")";
- memberDiff.documentationChange_ = Diff.saveDocDiffs(
- pkgDiff.name_, classDiff.name_, oldCtor.doc_, newCtor.doc_, id, title);
- }
- String modifiersChange = oldCtor.modifiers_.diff(newCtor.modifiers_);
- if (modifiersChange != null && modifiersChange.indexOf("Change from deprecated to undeprecated") != -1) {
- System.out.println("JDiff: warning: change from deprecated to undeprecated for a constructor in class" + newClass.name_);
- }
- memberDiff.addModifiersChange(modifiersChange);
- if (trace)
- System.out.println(" The single constructor was changed");
- classDiff.ctorsChanged.add(memberDiff);
- singleCtor = true;
- } else {
- if (trace)
- System.out.println(" Constructor " + oldClass.name_ + " was removed");
- classDiff.ctorsRemoved.add(oldCtor);
- }
- differs = true;
- }
- } // while (iter.hasNext())
-
- // Find ctors which were added in the new class
- iter = newClass.ctors_.iterator();
- while (iter.hasNext()) {
- ConstructorAPI newCtor = (ConstructorAPI)(iter.next());
- int idx = Collections.binarySearch(oldClass.ctors_, newCtor);
- if (idx < 0) {
- if (!singleCtor) {
- if (trace)
- System.out.println(" Constructor " + oldClass.name_ + " was added");
- classDiff.ctorsAdded.add(newCtor);
- differs = true;
- }
- }
- } // while (iter.hasNext())
-
- return differs;
- } // compareAllCtors()
-
- /**
- * Compare all the methods in two classes.
- *
- * We have to deal with the cases where:
- * - there is only one method with a given name, but its signature changes
- * - there is more than one method with the same name, and some of them
- * may have signature changes
- * The simplest way to deal with this is to make the MethodAPI comparator
- * check the params and return type, as well as the name. This means that
- * changing a parameter's type would cause the method to be seen as
- * removed and added. To avoid this for the simple case, check for before
- * recording a method as removed or added.
- */
- public boolean compareAllMethods(ClassAPI oldClass, ClassAPI newClass, ClassDiff classDiff) {
- if (trace)
- System.out.println(" Comparing methods: #old " +
- oldClass.methods_.size() + ", #new " +
- newClass.methods_.size());
- boolean differs = false;
-
- Collections.sort(oldClass.methods_);
- Collections.sort(newClass.methods_);
-
- // Find methods which were removed in the new class
- Iterator iter = oldClass.methods_.iterator();
- while (iter.hasNext()) {
- MethodAPI oldMethod = (MethodAPI)(iter.next());
- int idx = -1;
- MethodAPI[] methodArr = new MethodAPI[newClass.methods_.size()];
- methodArr = (MethodAPI[])newClass.methods_.toArray(methodArr);
- for (int methodIdx = 0; methodIdx < methodArr.length; methodIdx++) {
- MethodAPI newMethod = methodArr[methodIdx];
- if (oldMethod.compareTo(newMethod) == 0) {
- idx = methodIdx;
- break;
- }
- }
-// NOTE: there was a problem with the binarySearch for
-// java.lang.Byte.toString(byte b) returning -16 when the compareTo method
-// returned 0 on entry 13. Changed to use arrays instead, so maybe it was
-// an issue with methods having another List of params used indirectly by
-// compareTo(), unlike constructors and fields?
-// int idx = Collections.binarySearch(newClass.methods_, oldMethod);
- if (idx < 0) {
- // If there is only one instance of a method with this name
- // in both the old and new class, then treat it as changed,
- // rather than removed and added.
- // Find how many instances of this method name there are in
- // the old and new class. The equals comparator is just on
- // the method name.
- int startOld = oldClass.methods_.indexOf(oldMethod);
- int endOld = oldClass.methods_.lastIndexOf(oldMethod);
- int startNew = newClass.methods_.indexOf(oldMethod);
- int endNew = newClass.methods_.lastIndexOf(oldMethod);
-
- if (startOld != -1 && startOld == endOld &&
- startNew != -1 && startNew == endNew) {
- MethodAPI newMethod = (MethodAPI)(newClass.methods_.get(startNew));
- // Only one method with that name exists in both packages,
- // so it is valid to compare the two methods. We know it
- // has changed, because the binarySearch did not find it.
- if (oldMethod.inheritedFrom_ == null ||
- newMethod.inheritedFrom_ == null) {
- // We also know that at least one of the methods is
- // locally defined.
- compareMethods(oldMethod, newMethod, classDiff);
- differs = true;
- }
- } else if (oldMethod.inheritedFrom_ == null) {
- // Only concerned with locally defined methods
- if (trace)
- System.out.println(" Method " + oldMethod.name_ +
- "(" + oldMethod.getSignature() +
- ") was removed");
- classDiff.methodsRemoved.add(oldMethod);
- differs = true;
- }
- }
- } // while (iter.hasNext())
-
- // Find methods which were added in the new class
- iter = newClass.methods_.iterator();
- while (iter.hasNext()) {
- MethodAPI newMethod = (MethodAPI)(iter.next());
- // Only concerned with locally defined methods
- if (newMethod.inheritedFrom_ != null)
- continue;
- int idx = -1;
- MethodAPI[] methodArr = new MethodAPI[oldClass.methods_.size()];
- methodArr = (MethodAPI[])oldClass.methods_.toArray(methodArr);
- for (int methodIdx = 0; methodIdx < methodArr.length; methodIdx++) {
- MethodAPI oldMethod = methodArr[methodIdx];
- if (newMethod.compareTo(oldMethod) == 0) {
- idx = methodIdx;
- break;
- }
- }
-// See note above about searching an array instead of binarySearch
-// int idx = Collections.binarySearch(oldClass.methods_, newMethod);
- if (idx < 0) {
- // See comments above
- int startOld = oldClass.methods_.indexOf(newMethod);
- int endOld = oldClass.methods_.lastIndexOf(newMethod);
- int startNew = newClass.methods_.indexOf(newMethod);
- int endNew = newClass.methods_.lastIndexOf(newMethod);
-
- if (startOld != -1 && startOld == endOld &&
- startNew != -1 && startNew == endNew) {
- // Don't mark a method as added if it was marked as changed
- // The comparison will have been done just above here.
- } else {
- if (trace)
- System.out.println(" Method " + newMethod.name_ +
- "(" + newMethod.getSignature() + ") was added");
- classDiff.methodsAdded.add(newMethod);
- differs = true;
- }
- }
- } // while (iter.hasNext())
-
- return differs;
- } // compareAllMethods()
-
- /**
- * Compare two methods which have the same name.
- */
- public boolean compareMethods(MethodAPI oldMethod, MethodAPI newMethod, ClassDiff classDiff) {
- MemberDiff methodDiff = new MemberDiff(oldMethod.name_);
- boolean differs = false;
- // Check changes in return type
- methodDiff.oldType_ = oldMethod.returnType_;
- methodDiff.newType_ = newMethod.returnType_;
- if (oldMethod.returnType_.compareTo(newMethod.returnType_) != 0) {
- differs = true;
- }
- // Check changes in signature
- String oldSig = oldMethod.getSignature();
- String newSig = newMethod.getSignature();
- methodDiff.oldSignature_ = oldSig;
- methodDiff.newSignature_ = newSig;
- if (oldSig.compareTo(newSig) != 0) {
- differs = true;
- }
- // Changes in inheritance
- int inh = changedInheritance(oldMethod.inheritedFrom_, newMethod.inheritedFrom_);
- if (inh != 0)
- differs = true;
- if (inh == 1) {
- methodDiff.addModifiersChange("Method was locally defined, but is now inherited from " + linkToClass(newMethod, true) + ".");
- methodDiff.inheritedFrom_ = newMethod.inheritedFrom_;
- } else if (inh == 2) {
- methodDiff.addModifiersChange("Method was inherited from " + linkToClass(oldMethod, false) + ", but is now defined locally.");
- } else if (inh == 3) {
- methodDiff.addModifiersChange("Method was inherited from " +
- linkToClass(oldMethod, false) + ", and is now inherited from " + linkToClass(newMethod, true) + ".");
- methodDiff.inheritedFrom_ = newMethod.inheritedFrom_;
- }
- // Abstract or not
- if (oldMethod.isAbstract_ != newMethod.isAbstract_) {
- String changeText = "";
- if (oldMethod.isAbstract_)
- changeText += "Changed from abstract to non-abstract.";
- else
- changeText += "Changed from non-abstract to abstract.";
- methodDiff.addModifiersChange(changeText);
- differs = true;
- }
- // Native or not
- if (Diff.showAllChanges &&
- oldMethod.isNative_ != newMethod.isNative_) {
- String changeText = "";
- if (oldMethod.isNative_)
- changeText += "Changed from native to non-native.";
- else
- changeText += "Changed from non-native to native.";
- methodDiff.addModifiersChange(changeText);
- differs = true;
- }
- // Synchronized or not
- if (Diff.showAllChanges &&
- oldMethod.isSynchronized_ != newMethod.isSynchronized_) {
- String changeText = "";
- if (oldMethod.isSynchronized_)
- changeText += "Changed from synchronized to non-synchronized.";
- else
- changeText += "Changed from non-synchronized to synchronized.";
- methodDiff.addModifiersChange(changeText);
- differs = true;
- }
-
- // Check changes in exceptions thrown
- methodDiff.oldExceptions_ = oldMethod.exceptions_;
- methodDiff.newExceptions_ = newMethod.exceptions_;
- if (oldMethod.exceptions_.compareTo(newMethod.exceptions_) != 0) {
- differs = true;
- }
-
- // Track changes in documentation
- if (docChanged(oldMethod.doc_, newMethod.doc_)) {
- String sig = methodDiff.newSignature_;
- if (sig.compareTo("void") == 0)
- sig = "";
- String fqName = pkgDiff.name_ + "." + classDiff.name_;
- String link1 = "";
- String link2 = "";
- String id = pkgDiff.name_ + "." + classDiff.name_ + ".dmethod." + newMethod.name_ + "(" + HTMLReportGenerator.simpleName(sig) + ")";
- String title = link1 + "Class " + classDiff.name_ + ", " +
- link2 + HTMLReportGenerator.simpleName(methodDiff.newType_) + " " + newMethod.name_ + "(" + HTMLReportGenerator.simpleName(sig) + ")";
- methodDiff.documentationChange_ = Diff.saveDocDiffs(pkgDiff.name_, classDiff.name_, oldMethod.doc_, newMethod.doc_, id, title);
- differs = true;
- }
-
- // All other modifiers
- String modifiersChange = oldMethod.modifiers_.diff(newMethod.modifiers_);
- if (modifiersChange != null) {
- differs = true;
- if (modifiersChange.indexOf("Change from deprecated to undeprecated") != -1) {
- System.out.println("JDiff: warning: change from deprecated to undeprecated for method " + classDiff.name_ + "." + newMethod.name_);
-
- }
- }
- methodDiff.addModifiersChange(modifiersChange);
-
- // Only add to the parent if some difference has been found
- if (differs) {
- if (trace) {
- System.out.println(" Method " + newMethod.name_ +
- " was changed: old: " +
- oldMethod.returnType_ + "(" + oldSig + "), new: " +
- newMethod.returnType_ + "(" + newSig + ")");
- if (methodDiff.modifiersChange_ != null)
- System.out.println(" Modifier change: " + methodDiff.modifiersChange_);
- }
- classDiff.methodsChanged.add(methodDiff);
- }
-
- return differs;
- } // compareMethods()
-
- /**
- * Compare all the fields in two classes.
- */
- public boolean compareAllFields(ClassAPI oldClass, ClassAPI newClass,
- ClassDiff classDiff) {
- if (trace)
- System.out.println(" Comparing fields: #old " +
- oldClass.fields_.size() + ", #new "
- + newClass.fields_.size());
- boolean differs = false;
-
- Collections.sort(oldClass.fields_);
- Collections.sort(newClass.fields_);
-
- // Find fields which were removed in the new class
- Iterator iter = oldClass.fields_.iterator();
- while (iter.hasNext()) {
- FieldAPI oldField = (FieldAPI)(iter.next());
- int idx = Collections.binarySearch(newClass.fields_, oldField);
- if (idx < 0) {
- // If there an instance of a field with the same name
- // in both the old and new class, then treat it as changed,
- // rather than removed and added. There will never be more than
- // one instance of a field with the same name in a class.
- int existsNew = newClass.fields_.indexOf(oldField);
- if (existsNew != -1) {
- FieldAPI newField = (FieldAPI)(newClass.fields_.get(existsNew));
- if (oldField.inheritedFrom_ == null ||
- newField.inheritedFrom_ == null) {
- // We also know that one of the fields is locally defined.
- MemberDiff memberDiff = new MemberDiff(oldField.name_);
- memberDiff.oldType_ = oldField.type_;
- memberDiff.newType_ = newField.type_;
- // Changes in inheritance
- int inh = changedInheritance(oldField.inheritedFrom_, newField.inheritedFrom_);
- if (inh != 0)
- differs = true;
- if (inh == 1) {
- memberDiff.addModifiersChange("Field was locally defined, but is now inherited from " + linkToClass(newField, true) + ".");
- memberDiff.inheritedFrom_ = newField.inheritedFrom_;
- } else if (inh == 2) {
- memberDiff.addModifiersChange("Field was inherited from " + linkToClass(oldField, false) + ", but is now defined locally.");
- } else if (inh == 3) {
- memberDiff.addModifiersChange("Field was inherited from " + linkToClass(oldField, false) + ", and is now inherited from " + linkToClass(newField, true) + ".");
- memberDiff.inheritedFrom_ = newField.inheritedFrom_;
- }
- // Transient or not
- if (oldField.isTransient_ != newField.isTransient_) {
- String changeText = "";
- if (oldField.isTransient_)
- changeText += "Changed from transient to non-transient.";
- else
- changeText += "Changed from non-transient to transient.";
- memberDiff.addModifiersChange(changeText);
- differs = true;
- }
- // Volatile or not
- if (oldField.isVolatile_ != newField.isVolatile_) {
- String changeText = "";
- if (oldField.isVolatile_)
- changeText += "Changed from volatile to non-volatile.";
- else
- changeText += "Changed from non-volatile to volatile.";
- memberDiff.addModifiersChange(changeText);
- differs = true;
- }
- // Change in value of the field
- if (oldField.value_ != null &&
- newField.value_ != null &&
- oldField.value_.compareTo(newField.value_) != 0) {
- String changeText = "Changed in value from " + oldField.value_
- + " to " + newField.value_ +".";
- memberDiff.addModifiersChange(changeText);
- differs = true;
- }
- // Track changes in documentation
- if (docChanged(oldField.doc_, newField.doc_)) {
- String fqName = pkgDiff.name_ + "." + classDiff.name_;
- String link1 = "";
- String link2 = "";
- String id = pkgDiff.name_ + "." + classDiff.name_ + ".field." + newField.name_;
- String title = link1 + "Class " + classDiff.name_ + ", " +
- link2 + HTMLReportGenerator.simpleName(memberDiff.newType_) + " " + newField.name_ + "";
- memberDiff.documentationChange_ = Diff.saveDocDiffs(pkgDiff.name_, classDiff.name_, oldField.doc_, newField.doc_, id, title);
- differs = true;
- }
-
- // Other differences
- String modifiersChange = oldField.modifiers_.diff(newField.modifiers_);
- memberDiff.addModifiersChange(modifiersChange);
- if (modifiersChange != null && modifiersChange.indexOf("Change from deprecated to undeprecated") != -1) {
- System.out.println("JDiff: warning: change from deprecated to undeprecated for class " + newClass.name_ + ", field " + newField.name_);
- }
- if (trace)
- System.out.println(" Field " + newField.name_ + " was changed");
- classDiff.fieldsChanged.add(memberDiff);
- differs = true;
- }
- } else if (oldField.inheritedFrom_ == null) {
- if (trace)
- System.out.println(" Field " + oldField.name_ + " was removed");
- classDiff.fieldsRemoved.add(oldField);
- differs = true;
- }
- }
- } // while (iter.hasNext())
-
- // Find fields which were added in the new class
- iter = newClass.fields_.iterator();
- while (iter.hasNext()) {
- FieldAPI newField = (FieldAPI)(iter.next());
- // Only concerned with locally defined fields
- if (newField.inheritedFrom_ != null)
- continue;
- int idx = Collections.binarySearch(oldClass.fields_, newField);
- if (idx < 0) {
- // See comments above
- int existsOld = oldClass.fields_.indexOf(newField);
- if (existsOld != -1) {
- // Don't mark a field as added if it was marked as changed
- } else {
- if (trace)
- System.out.println(" Field " + newField.name_ + " was added");
- classDiff.fieldsAdded.add(newField);
- differs = true;
- }
- }
- } // while (iter.hasNext())
-
- return differs;
- } // compareFields()
-
- /**
- * Decide if two blocks of documentation changed.
- *
- * @return true if both are non-null and differ,
- * or if one is null and the other is not.
- */
- public static boolean docChanged(String oldDoc, String newDoc) {
- if (!HTMLReportGenerator.reportDocChanges)
- return false; // Don't even count doc changes as changes
- if (oldDoc == null && newDoc != null)
- return true;
- if (oldDoc != null && newDoc == null)
- return true;
- if (oldDoc != null && newDoc != null && oldDoc.compareTo(newDoc) != 0)
- return true;
- return false;
- }
-
- /**
- * Decide if two elements changed where they were defined.
- *
- * @return 0 if both are null, or both are non-null and are the same.
- * 1 if the oldInherit was null and newInherit is non-null.
- * 2 if the oldInherit was non-null and newInherit is null.
- * 3 if the oldInherit was non-null and newInherit is non-null
- * and they differ.
- */
- public static int changedInheritance(String oldInherit, String newInherit) {
- if (oldInherit == null && newInherit == null)
- return 0;
- if (oldInherit == null && newInherit != null)
- return 1;
- if (oldInherit != null && newInherit == null)
- return 2;
- if (oldInherit.compareTo(newInherit) == 0)
- return 0;
- else
- return 3;
- }
-
- /**
- * Generate a link to the Javadoc page for the given method.
- */
- public static String linkToClass(MethodAPI m, boolean useNew) {
- String sig = m.getSignature();
- if (sig.compareTo("void") == 0)
- sig = "";
- return linkToClass(m.inheritedFrom_, m.name_, sig, useNew);
- }
-
- /**
- * Generate a link to the Javadoc page for the given field.
- */
- public static String linkToClass(FieldAPI m, boolean useNew) {
- return linkToClass(m.inheritedFrom_, m.name_, null, useNew);
- }
-
- /**
- * Given the name of the class, generate a link to a relevant page.
- * This was originally for inheritance changes, so the JDiff page could
- * be a class changes page, or a section in a removed or added classes
- * table. Since there was no easy way to tell which type the link
- * should be, it is now just a link to the relevant Javadoc page.
- */
- public static String linkToClass(String className, String memberName,
- String memberType, boolean useNew) {
- if (!useNew && HTMLReportGenerator.oldDocPrefix == null) {
- return "" + className + ""; // No link possible
- }
- API api = oldAPI_;
- String prefix = HTMLReportGenerator.oldDocPrefix;
- if (useNew) {
- api = newAPI_;
- prefix = HTMLReportGenerator.newDocPrefix;
- }
- ClassAPI cls = (ClassAPI)api.classes_.get(className);
- if (cls == null) {
- if (useNew)
- System.out.println("Warning: class " + className + " not found in the new API when creating Javadoc link");
- else
- System.out.println("Warning: class " + className + " not found in the old API when creating Javadoc link");
- return "" + className + "";
- }
- int clsIdx = className.indexOf(cls.name_);
- if (clsIdx != -1) {
- String pkgRef = className.substring(0, clsIdx);
- pkgRef = pkgRef.replace('.', '/');
- String res = "" + "" + cls.name_ + "";
- return res;
- }
- return "" + className + "";
- }
-
- /**
- * Return the number of methods which are locally defined.
- */
- public int numLocalMethods(List methods) {
- int res = 0;
- Iterator iter = methods.iterator();
- while (iter.hasNext()) {
- MethodAPI m = (MethodAPI)(iter.next());
- if (m.inheritedFrom_ == null)
- res++;
- }
- return res;
- }
-
- /**
- * Return the number of fields which are locally defined.
- */
- public int numLocalFields(List fields) {
- int res = 0;
- Iterator iter = fields.iterator();
- while (iter.hasNext()) {
- FieldAPI f = (FieldAPI)(iter.next());
- if (f.inheritedFrom_ == null)
- res++;
- }
- return res;
- }
-
- /** Set to enable increased logging verbosity for debugging. */
- private boolean trace = false;
-}
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/APIDiff.java b/thirdparty/jdiff/v-custom/src/jdiff/APIDiff.java
deleted file mode 100644
index 4b4fd2691d..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/APIDiff.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package jdiff;
-
-import java.util.*;
-import com.sun.javadoc.*;
-
-/**
- * The class contains the changes between two API objects; packages added,
- * removed and changed. The packages are represented by PackageDiff objects,
- * which contain the changes in each package, and so on.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-public class APIDiff {
-
- /** Packages added in the new API. */
- public List packagesAdded = null; // PackageAPI[]
- /** Packages removed in the new API. */
- public List packagesRemoved = null; // PackageAPI[]
- /** Packages changed in the new API. */
- public List packagesChanged = null; // PackageDiff[]
-
- /** Name of the old API. */
- public static String oldAPIName_;
- /** Name of the old API. */
- public static String newAPIName_;
-
- /* The overall percentage difference between the two APIs. */
- public double pdiff = 0.0;
-
- /** Default constructor. */
- public APIDiff() {
- oldAPIName_ = null;
- newAPIName_ = null;
- packagesAdded = new ArrayList(); // PackageAPI[]
- packagesRemoved = new ArrayList(); // PackageAPI[]
- packagesChanged = new ArrayList(); // PackageDiff[]
- }
-}
-
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/APIHandler.java b/thirdparty/jdiff/v-custom/src/jdiff/APIHandler.java
deleted file mode 100644
index be1a6fcafe..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/APIHandler.java
+++ /dev/null
@@ -1,362 +0,0 @@
-package jdiff;
-
-import java.io.*;
-import java.util.*;
-
-/* For SAX parsing in APIHandler */
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Handle the parsing of an XML file and the generation of an API object.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-class APIHandler extends DefaultHandler {
-
- /** The API object which is populated from the XML file. */
- public API api_;
-
- /** Default constructor. */
- public APIHandler(API api, boolean createGlobalComments) {
- api_ = api;
- createGlobalComments_ = createGlobalComments;
- tagStack = new LinkedList();
- }
-
- /** If set, then check that each comment is a sentence. */
- public static boolean checkIsSentence = false;
-
- /**
- * Contains the name of the current package element type
- * where documentation is being added. Also used as the level
- * at which to add documentation into an element, i.e. class-level
- * or package-level.
- */
- private String currentElement = null;
-
- /** If set, then create the global list of comments. */
- private boolean createGlobalComments_ = false;
-
- /** Set if inside a doc element. */
- private boolean inDoc = false;
-
- /** The current comment text being assembled. */
- private String currentText = null;
-
- /** The current text from deprecation, null if empty. */
- private String currentDepText = null;
-
- /**
- * The stack of SingleComment objects awaiting the comment text
- * currently being assembled.
- */
- private LinkedList tagStack = null;
-
- /** Called at the start of the document. */
- public void startDocument() {
- }
-
- /** Called when the end of the document is reached. */
- public void endDocument() {
- if (trace)
- api_.dump();
- System.out.println(" finished");
- }
-
- /** Called when a new element is started. */
- public void startElement(java.lang.String uri, java.lang.String localName,
- java.lang.String qName, Attributes attributes) {
- // The change to JAXP compliance produced this change.
- if (localName.equals(""))
- localName = qName;
- if (localName.compareTo("api") == 0) {
- String apiName = attributes.getValue("name");
- String version = attributes.getValue("jdversion"); // Not used yet
- XMLToAPI.nameAPI(apiName);
- } else if (localName.compareTo("package") == 0) {
- currentElement = localName;
- String pkgName = attributes.getValue("name");
- XMLToAPI.addPackage(pkgName);
- } else if (localName.compareTo("class") == 0) {
- currentElement = localName;
- String className = attributes.getValue("name");
- String parentName = attributes.getValue("extends");
- boolean isAbstract = false;
- if (attributes.getValue("abstract").compareTo("true") == 0)
- isAbstract = true;
- XMLToAPI.addClass(className, parentName, isAbstract, getModifiers(attributes));
- } else if (localName.compareTo("interface") == 0) {
- currentElement = localName;
- String className = attributes.getValue("name");
- String parentName = attributes.getValue("extends");
- boolean isAbstract = false;
- if (attributes.getValue("abstract").compareTo("true") == 0)
- isAbstract = true;
- XMLToAPI.addInterface(className, parentName, isAbstract, getModifiers(attributes));
- } else if (localName.compareTo("implements") == 0) {
- String interfaceName = attributes.getValue("name");
- XMLToAPI.addImplements(interfaceName);
- } else if (localName.compareTo("constructor") == 0) {
- currentElement = localName;
- String ctorType = attributes.getValue("type");
- XMLToAPI.addCtor(ctorType, getModifiers(attributes));
- } else if (localName.compareTo("method") == 0) {
- currentElement = localName;
- String methodName = attributes.getValue("name");
- String returnType = attributes.getValue("return");
- boolean isAbstract = false;
- if (attributes.getValue("abstract").compareTo("true") == 0)
- isAbstract = true;
- boolean isNative = false;
- if (attributes.getValue("native").compareTo("true") == 0)
- isNative = true;
- boolean isSynchronized = false;
- if (attributes.getValue("synchronized").compareTo("true") == 0)
- isSynchronized = true;
- XMLToAPI.addMethod(methodName, returnType, isAbstract, isNative,
- isSynchronized, getModifiers(attributes));
- } else if (localName.compareTo("field") == 0) {
- currentElement = localName;
- String fieldName = attributes.getValue("name");
- String fieldType = attributes.getValue("type");
- boolean isTransient = false;
- if (attributes.getValue("transient").compareTo("true") == 0)
- isTransient = true;
- boolean isVolatile = false;
- if (attributes.getValue("volatile").compareTo("true") == 0)
- isVolatile = true;
- String value = attributes.getValue("value");
- XMLToAPI.addField(fieldName, fieldType, isTransient, isVolatile,
- value, getModifiers(attributes));
- } else if (localName.compareTo("param") == 0) {
- String paramName = attributes.getValue("name");
- String paramType = attributes.getValue("type");
- XMLToAPI.addParam(paramName, paramType);
- } else if (localName.compareTo("exception") == 0) {
- String paramName = attributes.getValue("name");
- String paramType = attributes.getValue("type");
- XMLToAPI.addException(paramName, paramType, currentElement);
- } else if (localName.compareTo("doc") == 0) {
- inDoc = true;
- currentText = null;
- } else {
- if (inDoc) {
- // Start of an element, probably an HTML element
- addStartTagToText(localName, attributes);
- } else {
- System.out.println("Error: unknown element type: " + localName);
- System.exit(-1);
- }
- }
- }
-
- /** Called when the end of an element is reached. */
- public void endElement(java.lang.String uri, java.lang.String localName,
- java.lang.String qName) {
- if (localName.equals(""))
- localName = qName;
- // Deal with the end of doc blocks
- if (localName.compareTo("doc") == 0) {
- inDoc = false;
- // Add the assembled comment text to the appropriate current
- // program element, as determined by currentElement.
- addTextToComments();
- } else if (inDoc) {
- // An element was found inside the HTML text
- addEndTagToText(localName);
- } else if (currentElement.compareTo("constructor") == 0 &&
- localName.compareTo("constructor") == 0) {
- currentElement = "class";
- } else if (currentElement.compareTo("method") == 0 &&
- localName.compareTo("method") == 0) {
- currentElement = "class";
- } else if (currentElement.compareTo("field") == 0 &&
- localName.compareTo("field") == 0) {
- currentElement = "class";
- } else if (currentElement.compareTo("class") == 0 ||
- currentElement.compareTo("interface") == 0) {
- // Feature request 510307 and bug 517383: duplicate comment ids.
- // The end of a member element leaves the currentElement at the
- // "class" level, but the next class may in fact be an interface
- // and so the currentElement here will be "interface".
- if (localName.compareTo("class") == 0 ||
- localName.compareTo("interface") == 0) {
- currentElement = "package";
- }
- }
- }
-
- /** Called to process text. */
- public void characters(char[] ch, int start, int length) {
- if (inDoc) {
- String chunk = new String(ch, start, length);
- if (currentText == null)
- currentText = chunk;
- else
- currentText += chunk;
- }
- }
-
- /**
- * Trim the current text, check it is a sentence and add it to the
- * current program element.
- */
- public void addTextToComments() {
- // Eliminate any whitespace at each end of the text.
- currentText = currentText.trim();
- // Convert any @link tags to HTML links.
- if (convertAtLinks) {
- currentText = Comments.convertAtLinks(currentText, currentElement,
- api_.currPkg_, api_.currClass_);
- }
- // Check that it is a sentence
- if (checkIsSentence && !currentText.endsWith(".") &&
- currentText.compareTo(Comments.placeHolderText) != 0) {
- System.out.println("Warning: text of comment does not end in a period: " + currentText);
- }
- // The construction of the commentID assumes that the
- // documentation is the final element to be parsed. The format matches
- // the format used in the report generator to look up comments in the
- // the existingComments object.
- String commentID = null;
- // Add this comment to the current API element.
- if (currentElement.compareTo("package") == 0) {
- api_.currPkg_.doc_ = currentText;
- commentID = api_.currPkg_.name_;
- } else if (currentElement.compareTo("class") == 0 ||
- currentElement.compareTo("interface") == 0) {
- api_.currClass_.doc_ = currentText;
- commentID = api_.currPkg_.name_ + "." + api_.currClass_.name_;
- } else if (currentElement.compareTo("constructor") == 0) {
- api_.currCtor_.doc_ = currentText;
- commentID = api_.currPkg_.name_ + "." + api_.currClass_.name_ +
- ".ctor_changed(";
- if (api_.currCtor_.type_.compareTo("void") == 0)
- commentID = commentID + ")";
- else
- commentID = commentID + api_.currCtor_.type_ + ")";
- } else if (currentElement.compareTo("method") == 0) {
- api_.currMethod_.doc_ = currentText;
- commentID = api_.currPkg_.name_ + "." + api_.currClass_.name_ +
- "." + api_.currMethod_.name_ + "_changed(" +
- api_.currMethod_.getSignature() + ")";
- } else if (currentElement.compareTo("field") == 0) {
- api_.currField_.doc_ = currentText;
- commentID = api_.currPkg_.name_ + "." + api_.currClass_.name_ +
- "." + api_.currField_.name_;
- }
- // Add to the list of possible comments for use when an
- // element has changed (not removed or added).
- if (createGlobalComments_ && commentID != null) {
- String ct = currentText;
- // Use any deprecation text as the possible comment, ignoring
- // any other comment text.
- if (currentDepText != null) {
- ct = currentDepText;
- currentDepText = null; // Never reuse it. Bug 469794
- }
- String ctOld = (String)(Comments.allPossibleComments.put(commentID, ct));
- if (ctOld != null) {
- System.out.println("Error: duplicate comment id: " + commentID);
- System.exit(5);
- }
- }
- }
-
- /**
- * Add the start tag to the current comment text.
- */
- public void addStartTagToText(String localName, Attributes attributes) {
- // Need to insert the HTML tag into the current text
- String currentHTMLTag = localName;
- // Save the tag in a stack
- tagStack.add(currentHTMLTag);
- String tag = "<" + currentHTMLTag;
- // Now add all the attributes into the current text
- int len = attributes.getLength();
- for (int i = 0; i < len; i++) {
- String name = attributes.getLocalName(i);
- String value = attributes.getValue(i);
- tag += " " + name + "=\"" + value+ "\"";
- }
-
- // End the tag
- if (Comments.isMinimizedTag(currentHTMLTag)) {
- tag += "/>";
- } else {
- tag += ">";
- }
- // Now insert the HTML tag into the current text
- if (currentText == null)
- currentText = tag;
- else
- currentText += tag;
- }
-
- /**
- * Add the end tag to the current comment text.
- */
- public void addEndTagToText(String localName) {
- // Close the current HTML tag
- String currentHTMLTag = (String)(tagStack.removeLast());
- if (!Comments.isMinimizedTag(currentHTMLTag))
- currentText += "" + currentHTMLTag + ">";
- }
-
- /** Extra modifiers which are common to all program elements. */
- public Modifiers getModifiers(Attributes attributes) {
- Modifiers modifiers = new Modifiers();
- modifiers.isStatic = false;
- if (attributes.getValue("static").compareTo("true") == 0)
- modifiers.isStatic = true;
- modifiers.isFinal = false;
- if (attributes.getValue("final").compareTo("true") == 0)
- modifiers.isFinal = true;
- modifiers.isDeprecated = false;
- String cdt = attributes.getValue("deprecated");
- if (cdt.compareTo("not deprecated") == 0) {
- modifiers.isDeprecated = false;
- currentDepText = null;
- } else if (cdt.compareTo("deprecated, no comment") == 0) {
- modifiers.isDeprecated = true;
- currentDepText = null;
- } else {
- modifiers.isDeprecated = true;
- currentDepText = API.showHTMLTags(cdt);
- }
- modifiers.visibility = attributes.getValue("visibility");
- return modifiers;
- }
-
- public void warning(SAXParseException e) {
- System.out.println("Warning (" + e.getLineNumber() + "): parsing XML API file:" + e);
- e.printStackTrace();
- }
-
- public void error(SAXParseException e) {
- System.out.println("Error (" + e.getLineNumber() + "): parsing XML API file:" + e);
- e.printStackTrace();
- System.exit(1);
- }
-
- public void fatalError(SAXParseException e) {
- System.out.println("Fatal Error (" + e.getLineNumber() + "): parsing XML API file:" + e);
- e.printStackTrace();
- System.exit(1);
- }
-
- /**
- * If set, then attempt to convert @link tags to HTML links.
- * A few of the HTML links may be broken links.
- */
- private static boolean convertAtLinks = true;
-
- /** Set to enable increased logging verbosity for debugging. */
- private static boolean trace = false;
-
-}
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/ClassAPI.java b/thirdparty/jdiff/v-custom/src/jdiff/ClassAPI.java
deleted file mode 100644
index 9490cc7cf8..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/ClassAPI.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package jdiff;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Class to represent a class, analogous to ClassDoc in the
- * Javadoc doclet API.
- *
- * The method used for Collection comparison (compareTo) must make its
- * comparison based upon everything that is known about this class.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-class ClassAPI implements Comparable {
-
- /** Name of the class, not fully qualified. */
- public String name_;
-
- /** Set if this class is an interface. */
- public boolean isInterface_;
-
- /** Set if this class is abstract. */
- boolean isAbstract_ = false;
-
- /** Modifiers for this class. */
- public Modifiers modifiers_;
-
- /** Name of the parent class, or null if there is no parent. */
- public String extends_; // Can only extend zero or one class or interface
-
- /** Interfaces implemented by this class. */
- public List implements_; // String[]
-
- /** Constructors in this class. */
- public List ctors_; // ConstructorAPI[]
-
- /** Methods in this class. */
- public List methods_; // MethodAPI[]
-
- /** Fields in this class. */
- public List fields_; //FieldAPI[]
-
- /** The doc block, default is null. */
- public String doc_ = null;
-
- /** Constructor. */
- public ClassAPI(String name, String parent, boolean isInterface,
- boolean isAbstract, Modifiers modifiers) {
- name_ = name;
- extends_ = parent;
- isInterface_ = isInterface;
- isAbstract_ = isAbstract;
- modifiers_ = modifiers;
-
- implements_ = new ArrayList(); // String[]
- ctors_ = new ArrayList(); // ConstructorAPI[]
- methods_ = new ArrayList(); // MethodAPI[]
- fields_ = new ArrayList(); // FieldAPI[]
- }
-
- /** Compare two ClassAPI objects by all the known information. */
- public int compareTo(Object o) {
- ClassAPI oClassAPI = (ClassAPI)o;
- int comp = name_.compareTo(oClassAPI.name_);
- if (comp != 0)
- return comp;
- if (isInterface_ != oClassAPI.isInterface_)
- return -1;
- if (isAbstract_ != oClassAPI.isAbstract_)
- return -1;
- comp = modifiers_.compareTo(oClassAPI.modifiers_);
- if (comp != 0)
- return comp;
- if (APIComparator.docChanged(doc_, oClassAPI.doc_))
- return -1;
- return 0;
- }
-
- /**
- * Tests two methods for equality using just the class name,
- * used by indexOf().
- */
- public boolean equals(Object o) {
- if (name_.compareTo(((ClassAPI)o).name_) == 0)
- return true;
- return false;
- }
-
-}
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/ClassDiff.java b/thirdparty/jdiff/v-custom/src/jdiff/ClassDiff.java
deleted file mode 100644
index 8742ab1b81..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/ClassDiff.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package jdiff;
-
-import java.util.*;
-import com.sun.javadoc.*;
-
-/**
- * The changes between two classes.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-class ClassDiff {
-
- /** Name of the class. */
- public String name_;
-
- /** Set if this class is an interface in the new API. */
- public boolean isInterface_;
-
- /**
- * A string describing the changes in inheritance.
- */
- public String inheritanceChange_ = null;
-
- /**
- * A string describing the changes in documentation.
- */
- public String documentationChange_ = null;
-
- /**
- * A string describing the changes in modifiers.
- * Changes can be in whether this is a class or interface, whether it is
- * abstract, static, final, and in its visibility.
- */
- public String modifiersChange_ = null;
-
- /** Constructors added in the new API. */
- public List ctorsAdded = null;
- /** Constructors removed in the new API. */
- public List ctorsRemoved = null;
- /** Constructors changed in the new API. */
- public List ctorsChanged = null;
-
- /** Methods added in the new API. */
- public List methodsAdded = null;
- /** Methods removed in the new API. */
- public List methodsRemoved = null;
- /** Methods changed in the new API. */
- public List methodsChanged = null;
-
- /** Fields added in the new API. */
- public List fieldsAdded = null;
- /** Fields removed in the new API. */
- public List fieldsRemoved = null;
- /** Fields changed in the new API. */
- public List fieldsChanged = null;
-
- /* The percentage difference for this class. */
- public double pdiff = 0.0;
-
- /** Default constructor. */
- public ClassDiff(String name) {
- name_ = name;
- isInterface_ = false;
-
- ctorsAdded = new ArrayList(); // ConstructorAPI[]
- ctorsRemoved = new ArrayList(); // ConstructorAPI[]
- ctorsChanged = new ArrayList(); // MemberDiff[]
-
- methodsAdded = new ArrayList(); // MethodAPI[]
- methodsRemoved = new ArrayList(); // MethodAPI[]
- methodsChanged = new ArrayList(); // MemberDiff[]
-
- fieldsAdded = new ArrayList(); // FieldAPI[]
- fieldsRemoved = new ArrayList(); // FieldAPI[]
- fieldsChanged = new ArrayList(); // MemberDiff[]
- }
-
- /**
- * Compare the inheritance details of two classes and produce
- * a String for the inheritanceChanges_ field in this class.
- * If there is no difference, null is returned.
- */
- public static String diff(ClassAPI oldClass, ClassAPI newClass) {
- Collections.sort(oldClass.implements_);
- Collections.sort(newClass.implements_);
- String res = "";
- boolean hasContent = false;
- if (oldClass.extends_ != null && newClass.extends_ != null &&
- oldClass.extends_.compareTo(newClass.extends_) != 0) {
- res += "The superclass changed from " + oldClass.extends_ + "
to " + newClass.extends_ + "
.
";
- hasContent = true;
- }
- // Check for implemented interfaces which were removed
- String removedInterfaces = "";
- int numRemoved = 0;
- Iterator iter = oldClass.implements_.iterator();
- while (iter.hasNext()) {
- String oldInterface = (String)(iter.next());
- int idx = Collections.binarySearch(newClass.implements_, oldInterface);
- if (idx < 0) {
- if (numRemoved != 0)
- removedInterfaces += ", ";
- removedInterfaces += oldInterface;
- numRemoved++;
- }
- }
- String addedInterfaces = "";
- int numAdded = 0;
- iter = newClass.implements_.iterator();
- while (iter.hasNext()) {
- String newInterface = (String)(iter.next());
- int idx = Collections.binarySearch(oldClass.implements_, newInterface);
- if (idx < 0) {
- if (numAdded != 0)
- addedInterfaces += ", ";
- addedInterfaces += newInterface;
- numAdded++;
- }
- }
- if (numRemoved != 0) {
- if (hasContent)
- res += " ";
- if (numRemoved == 1)
- res += "Removed interface " + removedInterfaces + "
.
";
- else
- res += "Removed interfaces " + removedInterfaces + "
.
";
- hasContent = true;
- }
- if (numAdded != 0) {
- if (hasContent)
- res += " ";
- if (numAdded == 1)
- res += "Added interface " + addedInterfaces + "
.
";
- else
- res += "Added interfaces " + addedInterfaces + "
.
";
- hasContent = true;
- }
- if (res.compareTo("") == 0)
- return null;
- return res;
- }
-
- /** Add a change in the modifiers. */
- public void addModifiersChange(String commonModifierChanges) {
- if (commonModifierChanges != null) {
- if (modifiersChange_ == null)
- modifiersChange_ = commonModifierChanges;
- else
- modifiersChange_ += " " + commonModifierChanges;
- }
- }
-}
-
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/Comments.java b/thirdparty/jdiff/v-custom/src/jdiff/Comments.java
deleted file mode 100644
index baac430301..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/Comments.java
+++ /dev/null
@@ -1,537 +0,0 @@
-package jdiff;
-
-import java.io.*;
-import java.util.*;
-
-/* For SAX XML parsing */
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.*;
-
-/**
- * Creates a Comments from an XML file. The Comments object is the internal
- * representation of the comments for the changes.
- * All methods in this class for populating a Comments object are static.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-public class Comments {
-
- /**
- * All the possible comments known about, accessible by the commentID.
- */
- public static Hashtable allPossibleComments = new Hashtable();
-
- /** The old Comments object which is populated from the file read in. */
- private static Comments oldComments_ = null;
-
- /** Default constructor. */
- public Comments() {
- commentsList_ = new ArrayList(); // SingleComment[]
- }
-
- // The list of comments elements associated with this objects
- public List commentsList_ = null; // SingleComment[]
-
- /**
- * Read the file where the XML for comments about the changes between
- * the old API and new API is stored and create a Comments object for
- * it. The Comments object may be null if no file exists.
- */
- public static Comments readFile(String filename) {
- // If validation is desired, write out the appropriate comments.xsd
- // file in the same directory as the comments XML file.
- if (XMLToAPI.validateXML) {
- writeXSD(filename);
- }
-
- // If the file does not exist, return null
- File f = new File(filename);
- if (!f.exists())
- return null;
-
- // The instance of the Comments object which is populated from the file.
- oldComments_ = new Comments();
- try {
- DefaultHandler handler = new CommentsHandler(oldComments_);
- XMLReader parser = null;
- try {
- String parserName = System.getProperty("org.xml.sax.driver");
- if (parserName == null) {
- parser = org.xml.sax.helpers.XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
- } else {
- // Let the underlying mechanisms try to work out which
- // class to instantiate
- parser = org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
- }
- } catch (SAXException saxe) {
- System.out.println("SAXException: " + saxe);
- saxe.printStackTrace();
- System.exit(1);
- }
-
- if (XMLToAPI.validateXML) {
- parser.setFeature("http://xml.org/sax/features/namespaces", true);
- parser.setFeature("http://xml.org/sax/features/validation", true);
- parser.setFeature("http://apache.org/xml/features/validation/schema", true);
- }
- parser.setContentHandler(handler);
- parser.setErrorHandler(handler);
- parser.parse(new InputSource(new FileInputStream(new File(filename))));
- } catch(org.xml.sax.SAXNotRecognizedException snre) {
- System.out.println("SAX Parser does not recognize feature: " + snre);
- snre.printStackTrace();
- System.exit(1);
- } catch(org.xml.sax.SAXNotSupportedException snse) {
- System.out.println("SAX Parser feature is not supported: " + snse);
- snse.printStackTrace();
- System.exit(1);
- } catch(org.xml.sax.SAXException saxe) {
- System.out.println("SAX Exception parsing file '" + filename + "' : " + saxe);
- saxe.printStackTrace();
- System.exit(1);
- } catch(java.io.IOException ioe) {
- System.out.println("IOException parsing file '" + filename + "' : " + ioe);
- ioe.printStackTrace();
- System.exit(1);
- }
-
- Collections.sort(oldComments_.commentsList_);
- return oldComments_;
- } //readFile()
-
- /**
- * Write the XML Schema file used for validation.
- */
- public static void writeXSD(String filename) {
- String xsdFileName = filename;
- int idx = xsdFileName.lastIndexOf('\\');
- int idx2 = xsdFileName.lastIndexOf('/');
- if (idx == -1 && idx2 == -1) {
- xsdFileName = "";
- } else if (idx == -1 && idx2 != -1) {
- xsdFileName = xsdFileName.substring(0, idx2+1);
- } else if (idx != -1 && idx2 == -1) {
- xsdFileName = xsdFileName.substring(0, idx+1);
- } else if (idx != -1 && idx2 != -1) {
- int max = idx2 > idx ? idx2 : idx;
- xsdFileName = xsdFileName.substring(0, max+1);
- }
- xsdFileName += "comments.xsd";
- try {
- FileOutputStream fos = new FileOutputStream(xsdFileName);
- PrintWriter xsdFile = new PrintWriter(fos);
- // The contents of the comments.xsd file
- xsdFile.println("");
- xsdFile.println("");
- xsdFile.println();
- xsdFile.println("");
- xsdFile.println(" ");
- xsdFile.println(" Schema for JDiff comments.");
- xsdFile.println(" ");
- xsdFile.println("");
- xsdFile.println();
- xsdFile.println("");
- xsdFile.println();
- xsdFile.println("");
- xsdFile.println(" ");
- xsdFile.println(" ");
- xsdFile.println(" ");
- xsdFile.println(" ");
- xsdFile.println(" ");
- xsdFile.println("");
- xsdFile.println();
- xsdFile.println("");
- xsdFile.println(" ");
- xsdFile.println(" ");
- xsdFile.println(" ");
- xsdFile.println(" ");
- xsdFile.println("");
- xsdFile.println();
- xsdFile.println("");
- xsdFile.println(" ");
- xsdFile.println("");
- xsdFile.println();
- xsdFile.println("");
- xsdFile.close();
- } catch(IOException e) {
- System.out.println("IO Error while attempting to create " + xsdFileName);
- System.out.println("Error: " + e.getMessage());
- System.exit(1);
- }
- }
-
-//
-// Methods to add data to a Comments object. Called by the XML parser and the
-// report generator.
-//
-
- /**
- * Add the SingleComment object to the list of comments kept by this
- * object.
- */
- public void addComment(SingleComment comment) {
- commentsList_.add(comment);
- }
-
-//
-// Methods to get data from a Comments object. Called by the report generator
-//
-
- /**
- * The text placed into XML comments file where there is no comment yet.
- * It never appears in reports.
- */
- public static final String placeHolderText = "InsertCommentsHere";
-
- /**
- * Return the comment associated with the given id in the Comment object.
- * If there is no such comment, return the placeHolderText.
- */
- public static String getComment(Comments comments, String id) {
- if (comments == null)
- return placeHolderText;
- SingleComment key = new SingleComment(id, null);
- int idx = Collections.binarySearch(comments.commentsList_, key);
- if (idx < 0) {
- return placeHolderText;
- } else {
- int startIdx = comments.commentsList_.indexOf(key);
- int endIdx = comments.commentsList_.indexOf(key);
- int numIdx = endIdx - startIdx + 1;
- if (numIdx != 1) {
- System.out.println("Warning: " + numIdx + " identical ids in the existing comments file. Using the first instance.");
- }
- SingleComment singleComment = (SingleComment)(comments.commentsList_.get(idx));
- // Convert @link tags to links
- return singleComment.text_;
- }
- }
-
- /**
- * Convert @link tags to HTML links.
- */
- public static String convertAtLinks(String text, String currentElement,
- PackageAPI pkg, ClassAPI cls) {
- if (text == null)
- return null;
-
- StringBuffer result = new StringBuffer();
-
- int state = -1;
-
- final int NORMAL_TEXT = -1;
- final int IN_LINK = 1;
- final int IN_LINK_IDENTIFIER = 2;
- final int IN_LINK_IDENTIFIER_REFERENCE = 3;
- final int IN_LINK_IDENTIFIER_REFERENCE_PARAMS = 6;
- final int IN_LINK_LINKTEXT = 4;
- final int END_OF_LINK = 5;
-
- StringBuffer identifier = null;
- StringBuffer identifierReference = null;
- StringBuffer linkText = null;
-
- // Figure out relative reference if required.
- String ref = "";
- if (currentElement.compareTo("class") == 0 ||
- currentElement.compareTo("interface") == 0) {
- ref = pkg.name_ + "." + cls.name_ + ".";
- } else if (currentElement.compareTo("package") == 0) {
- ref = pkg.name_ + ".";
- }
- ref = ref.replace('.', '/');
-
- for (int i=0; i < text.length(); i++) {
- char c = text.charAt(i);
- char nextChar = i < text.length()-1 ? text.charAt(i+1) : (char)-1;
- int remainingChars = text.length() - i;
-
- switch (state) {
- case NORMAL_TEXT:
- if (c == '{' && remainingChars >= 6) {
- if ("{@link".equals(text.substring(i, i + 6))) {
- state = IN_LINK;
- identifier = null;
- identifierReference = null;
- linkText = null;
- i += 5;
- continue;
- }
- }
- result.append(c);
- break;
- case IN_LINK:
- if (Character.isWhitespace(nextChar)) continue;
- if (nextChar == '}') {
- // End of the link
- state = END_OF_LINK;
- } else if (!Character.isWhitespace(nextChar)) {
- state = IN_LINK_IDENTIFIER;
- }
- break;
- case IN_LINK_IDENTIFIER:
- if (identifier == null) {
- identifier = new StringBuffer();
- }
-
- if (c == '#') {
- // We have a reference.
- state = IN_LINK_IDENTIFIER_REFERENCE;
- // Don't append #
- continue;
- } else if (Character.isWhitespace(c)) {
- // We hit some whitespace: the next character is the beginning
- // of the link text.
- state = IN_LINK_LINKTEXT;
- continue;
- }
- identifier.append(c);
- // Check for a } that ends the link.
- if (nextChar == '}') {
- state = END_OF_LINK;
- }
- break;
- case IN_LINK_IDENTIFIER_REFERENCE:
- if (identifierReference == null) {
- identifierReference = new StringBuffer();
- }
- if (Character.isWhitespace(c)) {
- state = IN_LINK_LINKTEXT;
- continue;
- }
- identifierReference.append(c);
-
- if (c == '(') {
- state = IN_LINK_IDENTIFIER_REFERENCE_PARAMS;
- }
-
- if (nextChar == '}') {
- state = END_OF_LINK;
- }
- break;
- case IN_LINK_IDENTIFIER_REFERENCE_PARAMS:
- // We're inside the parameters of a reference. Spaces are allowed.
- if (c == ')') {
- state = IN_LINK_IDENTIFIER_REFERENCE;
- }
- identifierReference.append(c);
- if (nextChar == '}') {
- state = END_OF_LINK;
- }
- break;
- case IN_LINK_LINKTEXT:
- if (linkText == null) linkText = new StringBuffer();
-
- linkText.append(c);
-
- if (nextChar == '}') {
- state = END_OF_LINK;
- }
- break;
- case END_OF_LINK:
- if (identifier != null) {
- result.append(""); // target=_top?
-
- result.append("");
- if (linkText != null) {
- result.append(linkText);
- } else {
- result.append(identifier);
- if (identifierReference != null) {
- result.append(".");
- result.append(identifierReference);
- }
- }
- result.append("");
- result.append("");
- }
- state = NORMAL_TEXT;
- break;
- }
- }
- return result.toString();
- }
-
-//
-// Methods to write a Comments object out to a file.
-//
-
- /**
- * Write the XML representation of comments to a file.
- *
- * @param outputFileName The name of the comments file.
- * @param oldComments The old comments on the changed APIs.
- * @param newComments The new comments on the changed APIs.
- * @return true if no problems encountered
- */
- public static boolean writeFile(String outputFileName,
- Comments newComments) {
- try {
- FileOutputStream fos = new FileOutputStream(outputFileName);
- outputFile = new PrintWriter(fos);
- newComments.emitXMLHeader(outputFileName);
- newComments.emitComments();
- newComments.emitXMLFooter();
- outputFile.close();
- } catch(IOException e) {
- System.out.println("IO Error while attempting to create " + outputFileName);
- System.out.println("Error: "+ e.getMessage());
- System.exit(1);
- }
- return true;
- }
-
- /**
- * Write the Comments object out in XML.
- */
- public void emitComments() {
- Iterator iter = commentsList_.iterator();
- while (iter.hasNext()) {
- SingleComment currComment = (SingleComment)(iter.next());
- if (!currComment.isUsed_)
- outputFile.println("");
- }
- }
-
- /**
- * Dump the contents of a Comments object out for inspection.
- */
- public void dump() {
- Iterator iter = commentsList_.iterator();
- int i = 0;
- while (iter.hasNext()) {
- i++;
- SingleComment currComment = (SingleComment)(iter.next());
- System.out.println("Comment " + i);
- System.out.println("id = " + currComment.id_);
- System.out.println("text = \"" + currComment.text_ + "\"");
- System.out.println("isUsed = " + currComment.isUsed_);
- }
- }
-
- /**
- * Emit messages about which comments are now unused and which are new.
- */
- public static void noteDifferences(Comments oldComments, Comments newComments) {
- if (oldComments == null) {
- System.out.println("Note: all the comments have been newly generated");
- return;
- }
-
- // See which comment ids are no longer used and add those entries to
- // the new comments, marking them as unused.
- Iterator iter = oldComments.commentsList_.iterator();
- while (iter.hasNext()) {
- SingleComment oldComment = (SingleComment)(iter.next());
- int idx = Collections.binarySearch(newComments.commentsList_, oldComment);
- if (idx < 0) {
- System.out.println("Warning: comment \"" + oldComment.id_ + "\" is no longer used.");
- oldComment.isUsed_ = false;
- newComments.commentsList_.add(oldComment);
- }
- }
-
- }
-
- /**
- * Emit the XML header.
- */
- public void emitXMLHeader(String filename) {
- outputFile.println("");
- outputFile.println("");
- outputFile.println();
- outputFile.println("");
- outputFile.println("");
- outputFile.println();
- outputFile.println("");
- outputFile.println("");
- outputFile.println("");
- outputFile.println("");
- outputFile.println("");
- outputFile.println("");
- outputFile.println("");
- }
-
- /**
- * Emit the XML footer.
- */
- public void emitXMLFooter() {
- outputFile.println();
- outputFile.println("");
- }
-
- private static List oldAPIList = null;
- private static List newAPIList = null;
-
- /**
- * Return true if the given HTML tag has no separate end element.
- *
- * If you want to be able to use sloppy HTML in your comments, then you can
- * add the element, e.g. li back into the condition here. However, if you
- * then become more careful and do provide the closing tag, the output is
- * generally just the closing tag, which is incorrect.
- *
- * tag.equalsIgnoreCase("tr") || // Is sometimes minimized
- * tag.equalsIgnoreCase("th") || // Is sometimes minimized
- * tag.equalsIgnoreCase("td") || // Is sometimes minimized
- * tag.equalsIgnoreCase("dt") || // Is sometimes minimized
- * tag.equalsIgnoreCase("dd") || // Is sometimes minimized
- * tag.equalsIgnoreCase("img") || // Is sometimes minimized
- * tag.equalsIgnoreCase("code") || // Is sometimes minimized (error)
- * tag.equalsIgnoreCase("font") || // Is sometimes minimized (error)
- * tag.equalsIgnoreCase("ul") || // Is sometimes minimized
- * tag.equalsIgnoreCase("ol") || // Is sometimes minimized
- * tag.equalsIgnoreCase("li") // Is sometimes minimized
- */
- public static boolean isMinimizedTag(String tag) {
- if (tag.equalsIgnoreCase("p") ||
- tag.equalsIgnoreCase("br") ||
- tag.equalsIgnoreCase("hr")
- ) {
- return true;
- }
- return false;
- }
-
- /**
- * The file where the XML representing the new Comments object is stored.
- */
- private static PrintWriter outputFile = null;
-
-}
-
-
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/CommentsHandler.java b/thirdparty/jdiff/v-custom/src/jdiff/CommentsHandler.java
deleted file mode 100644
index 8061fbe63e..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/CommentsHandler.java
+++ /dev/null
@@ -1,210 +0,0 @@
-package jdiff;
-
-import java.io.*;
-import java.util.*;
-
-/* For SAX XML parsing */
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Handle the parsing of an XML file and the generation of a Comments object.
- *
- * All HTML written for the comments sections in the report must
- * use tags such as <p/> rather than just <p>, since the XML
- * parser used requires that or matching end elements.
- *
- * From http://www.w3.org/TR/2000/REC-xhtml1-20000126:
- * "Empty elements must either have an end tag or the start tag must end with /<".
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-class CommentsHandler extends DefaultHandler {
-
- /** The Comments object which is populated from the XML file. */
- public Comments comments_ = null;
-
- /** The current SingleComment object being populated. */
- private List currSingleComment_ = null; // SingleComment[]
-
- /** Set if in text. */
- private boolean inText = false;
-
- /** The current text which is being assembled from chunks. */
- private String currentText = null;
-
- /** The stack of SingleComments still waiting for comment text. */
- private LinkedList tagStack = null;
-
- /** Default constructor. */
- public CommentsHandler(Comments comments) {
- comments_ = comments;
- tagStack = new LinkedList();
- }
-
- public void startDocument() {
- }
-
- public void endDocument() {
- if (trace)
- comments_.dump();
- }
-
- public void startElement(java.lang.String uri, java.lang.String localName,
- java.lang.String qName, Attributes attributes) {
- // The change to JAXP compliance produced this change.
- if (localName.equals(""))
- localName = qName;
- if (localName.compareTo("comments") == 0) {
- String commentsName = attributes.getValue("name");
- String version = attributes.getValue("jdversion"); // Not used yet
- if (commentsName == null) {
- System.out.println("Error: no identifier found in the comments XML file.");
- System.exit(3);
- }
- // Check the given names against the names of the APIs
- int idx1 = JDiff.oldFileName.lastIndexOf('.');
- int idx2 = JDiff.newFileName.lastIndexOf('.');
- String filename2 = JDiff.oldFileName.substring(0, idx1) +
- "_to_" + JDiff.newFileName.substring(0, idx2);
- if (filename2.compareTo(commentsName) != 0) {
- System.out.println("Warning: API identifier in the comments XML file (" + filename2 + ") differs from the name of the file.");
- }
- } else if (localName.compareTo("comment") == 0) {
- currSingleComment_ = new ArrayList(); // SingleComment[];
- } else if (localName.compareTo("identifier") == 0) {
- // May have multiple identifiers for one comment's text
- String id = attributes.getValue("id");
- SingleComment newComment = new SingleComment(id, null);
- // Store it here until we can add text to it
- currSingleComment_.add(newComment);
- } else if (localName.compareTo("text") == 0) {
- inText = true;
- currentText = null;
- } else {
- if (inText) {
- // Start of an element, probably an HTML element
- addStartTagToText(localName, attributes);
- } else {
- System.out.println("Error: unknown element type: " + localName);
- System.exit(-1);
- }
- }
- }
-
- public void endElement(java.lang.String uri, java.lang.String localName,
- java.lang.String qName) {
- if (localName.equals(""))
- localName = qName;
- if (localName.compareTo("text") == 0) {
- inText = false;
- addTextToComments();
- } else if (inText) {
- addEndTagToText(localName);
- }
-
- }
-
- /** Deal with a chunk of text. The text may come in multiple chunks. */
- public void characters(char[] ch, int start, int length) {
- if (inText) {
- String chunk = new String(ch, start, length);
- if (currentText == null)
- currentText = chunk;
- else
- currentText += chunk;
- }
- }
-
- /**
- * Trim the current text, check it is a sentence and add it to all
- * the comments which are waiting for it.
- */
- public void addTextToComments() {
- // Eliminate any whitespace at each end of the text.
- currentText = currentText.trim();
- // Check that it is a sentence
- if (!currentText.endsWith(".") &&
- !currentText.endsWith("?") &&
- !currentText.endsWith("!") &&
- currentText.compareTo(Comments.placeHolderText) != 0) {
- System.out.println("Warning: text of comment does not end in a period: " + currentText);
- }
- // Add this comment to all the SingleComments waiting for it
- Iterator iter = currSingleComment_.iterator();
- while (iter.hasNext()) {
- SingleComment currComment = (SingleComment)(iter.next());
- if (currComment.text_ == null)
- currComment.text_ = currentText;
- else
- currComment.text_ += currentText;
- comments_.addComment(currComment);
- }
- }
-
- /**
- * Add the start tag to the current comment text.
- */
- public void addStartTagToText(String localName, Attributes attributes) {
- // Need to insert the HTML tag into the current text
- String currentHTMLTag = localName;
- // Save the tag in a stack
- tagStack.add(currentHTMLTag);
- String tag = "<" + currentHTMLTag;
- // Now add all the attributes into the current text
- int len = attributes.getLength();
- for (int i = 0; i < len; i++) {
- String name = attributes.getLocalName(i);
- String value = attributes.getValue(i);
- tag += " " + name + "=\"" + value+ "\"";
- }
-
- // End the tag
- if (Comments.isMinimizedTag(currentHTMLTag)) {
- tag += "/>";
- } else {
- tag += ">";
- }
- // Now insert the HTML tag into the current text
- if (currentText == null)
- currentText = tag;
- else
- currentText += tag;
- }
-
- /**
- * Add the end tag to the current comment text.
- */
- public void addEndTagToText(String localName) {
- // Close the current HTML tag
- String currentHTMLTag = (String)(tagStack.removeLast());
- if (!Comments.isMinimizedTag(currentHTMLTag))
- currentText += "" + currentHTMLTag + ">";
- }
-
- public void warning(SAXParseException e) {
- System.out.println("Warning (" + e.getLineNumber() + "): parsing XML comments file:" + e);
- e.printStackTrace();
- }
-
- public void error(SAXParseException e) {
- System.out.println("Error (" + e.getLineNumber() + "): parsing XML comments file:" + e);
- e.printStackTrace();
- System.exit(1);
- }
-
- public void fatalError(SAXParseException e) {
- System.out.println("Fatal Error (" + e.getLineNumber() + "): parsing XML comments file:" + e);
- e.printStackTrace();
- System.exit(1);
- }
-
- /** Set to enable increased logging verbosity for debugging. */
- private static final boolean trace = false;
-
-}
-
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/CompareClassPdiffs.java b/thirdparty/jdiff/v-custom/src/jdiff/CompareClassPdiffs.java
deleted file mode 100644
index bd0bf95d50..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/CompareClassPdiffs.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package jdiff;
-
-import java.util.*;
-
-/**
- * Class to compare two ClassDiff objects.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-class CompareClassPdiffs implements Comparator {
- /**
- * Compare two class diffs by their percentage difference,
- * and then by name.
- */
- public int compare(Object obj1, Object obj2){
- ClassDiff c1 = (ClassDiff)obj1;
- ClassDiff c2 = (ClassDiff)obj2;
- if (c1.pdiff < c2.pdiff)
- return 1;
- if (c1.pdiff > c2.pdiff)
- return -1;
- return c1.name_.compareTo(c2.name_);
- }
-}
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/ComparePkgPdiffs.java b/thirdparty/jdiff/v-custom/src/jdiff/ComparePkgPdiffs.java
deleted file mode 100644
index 187e7bfdf5..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/ComparePkgPdiffs.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package jdiff;
-
-import java.util.*;
-
-/**
- * Class to compare two PackageDiff objects.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-class ComparePkgPdiffs implements Comparator {
- /**
- * Compare two package diffs by their percentage difference,
- * and then by name.
- */
- public int compare(Object obj1, Object obj2){
- PackageDiff p1 = (PackageDiff)obj1;
- PackageDiff p2 = (PackageDiff)obj2;
- if (p1.pdiff < p2.pdiff)
- return 1;
- if (p1.pdiff > p2.pdiff)
- return -1;
- return p1.name_.compareTo(p2.name_);
- }
-}
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/ConstructorAPI.java b/thirdparty/jdiff/v-custom/src/jdiff/ConstructorAPI.java
deleted file mode 100644
index 7390a4df50..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/ConstructorAPI.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package jdiff;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Class to represent a constructor, analogous to ConstructorDoc in the
- * Javadoc doclet API.
- *
- * The method used for Collection comparison (compareTo) must make its
- * comparison based upon everything that is known about this constructor.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-class ConstructorAPI implements Comparable {
- /**
- * The type of the constructor, being all the parameter types
- * separated by commas.
- */
- public String type_ = null;
-
- /**
- * The exceptions thrown by this constructor, being all the exception types
- * separated by commas. "no exceptions" if no exceptions are thrown.
- */
- public String exceptions_ = "no exceptions";
-
- /** Modifiers for this class. */
- public Modifiers modifiers_;
-
- /** The doc block, default is null. */
- public String doc_ = null;
-
- /** Constructor. */
- public ConstructorAPI(String type, Modifiers modifiers) {
- type_ = type;
- modifiers_ = modifiers;
- }
-
- /** Compare two ConstructorAPI objects by type and modifiers. */
- public int compareTo(Object o) {
- ConstructorAPI constructorAPI = (ConstructorAPI)o;
- int comp = type_.compareTo(constructorAPI.type_);
- if (comp != 0)
- return comp;
- comp = exceptions_.compareTo(constructorAPI.exceptions_);
- if (comp != 0)
- return comp;
- comp = modifiers_.compareTo(constructorAPI.modifiers_);
- if (comp != 0)
- return comp;
- if (APIComparator.docChanged(doc_, constructorAPI.doc_))
- return -1;
- return 0;
- }
-
- /**
- * Tests two constructors, using just the type, used by indexOf().
- */
- public boolean equals(Object o) {
- if (type_.compareTo(((ConstructorAPI)o).type_) == 0)
- return true;
- return false;
- }
-}
diff --git a/thirdparty/jdiff/v-custom/src/jdiff/Diff.java b/thirdparty/jdiff/v-custom/src/jdiff/Diff.java
deleted file mode 100644
index a9c977636d..0000000000
--- a/thirdparty/jdiff/v-custom/src/jdiff/Diff.java
+++ /dev/null
@@ -1,654 +0,0 @@
-package jdiff;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Class to generate colored differences between two sections of HTML text.
- *
- * See the file LICENSE.txt for copyright details.
- * @author Matthew Doar, mdoar@pobox.com
- */
-class Diff {
-
- /**
- * Save the differences between the two strings in a DiffOutput object
- * for later use.
- *
- * @param id A per-package unique identifier for each documentation
- * change.
- */
- static String saveDocDiffs(String pkgName, String className,
- String oldDoc, String newDoc,
- String id, String title) {
- // Generate the string which will link to this set of diffs
- if (noDocDiffs)
- return "Documentation changed from ";
- if (oldDoc == null || newDoc == null) {
- return "Documentation changed from ";
- }
-
- // Generate the differences.
- generateDiffs(pkgName, className, oldDoc, newDoc, id, title);
-
- return "Documentation changed from ";
- }
-
- /**
- * Generate the differences.
- */
- static void generateDiffs(String pkgName, String className,
- String oldDoc, String newDoc,
- String id, String title) {
- String[] oldDocWords = parseDoc(oldDoc);
- String[] newDocWords = parseDoc(newDoc);
-
- DiffMyers diff = new DiffMyers(oldDocWords, newDocWords);
- DiffMyers.change script = diff.diff_2(false);
- script = mergeDiffs(oldDocWords, newDocWords, script);
- String text = "" + title + "
";
- // Generate the differences in blockquotes to cope with unterminated
- // HTML tags
- text += "";
- text = addDiffs(oldDocWords, newDocWords, script, text);
- text += "
";
- docDiffs.add(new DiffOutput(pkgName, className, id, title, text));
- }
-
- /**
- * Convert the string to an array of strings, but don't break HTML tags up.
- */
- static String[] parseDoc(String doc) {
- String delimiters = " .,;:?!(){}[]\"'~@#$%^&*+=_-|\\<>/";
- StringTokenizer st = new StringTokenizer(doc, delimiters, true);
- List docList = new ArrayList();
- boolean inTag = false;
- String tag = null;
- while (st.hasMoreTokens()) {
- String tok = st.nextToken();
- if (!inTag) {
- if (tok.compareTo("<") == 0) {
- tag = tok;
- if (st.hasMoreTokens()) {
- // See if this really is a tag
- tok = st.nextToken();
- char ch = tok.charAt(0);
- if (Character.isLetter(ch) || ch == '/') {
- inTag = true;
- tag += tok;
- }
- }
- if (!inTag)
- docList.add(tag);
- } else {
- docList.add(tok);
- }
- } else {
- // Add all tokens to the tag until the closing > is seen
- if (tok.compareTo(">") == 0) {
- inTag = false;
- tag += tok;
- docList.add(tag);
- } else {
- tag += tok;
- }
- }
- }
- if (inTag) {
- // An unterminated tag, or more likely, < used instead of <
- // There are no nested tags such as > in HTML
- docList.add(tag);
- }
- String[] docWords = new String[docList.size()];
- docWords = (String[])docList.toArray(docWords);
- return docWords;
- }
-
- /**
- * For improved readability, merge changes of the form
- * "delete 1, insert 1, space, delete 1, insert 1"
- * to
- * "delete 3, insert 3" (including the space).
- *
- * @param oldDocWords The original documentation as a String array
- * @param newDocWords The new documentation as a String array
- */
- static DiffMyers.change mergeDiffs(String[] oldDocWords, String[] newDocWords,
- DiffMyers.change script) {
- if (script.link == null)
- return script; // Only one change
- DiffMyers.change hunk = script;
- DiffMyers.change lasthunk = null; // Set to the last potential hunk
- int startOld = 0;
- for (; hunk != null; hunk = hunk.link) {
- int deletes = hunk.deleted;
- int inserts = hunk.inserted;
- if (lasthunk == null) {
- if (deletes == 1 && inserts == 1) {
- // This is the start of a potential merge
- lasthunk = hunk;
- }
- continue;
- } else {
- int first0 = hunk.line0; // Index of first deleted word
- int first1 = hunk.line1; // Index of first inserted word
- if (deletes == 1 && inserts == 1 &&
- oldDocWords[first0 - 1].compareTo(" ") == 0 &&
- newDocWords[first1 - 1].compareTo(" ") == 0 &&
- first0 == lasthunk.line0 + lasthunk.deleted + 1 &&
- first1 == lasthunk.line1 + lasthunk.inserted + 1) {
- // Merge this change into the last change
- lasthunk.deleted += 2;
- lasthunk.inserted += 2;
- lasthunk.link = hunk.link;
- } else {
- lasthunk = null;
- }
- }
- }
- return script;
- }
-
- /**
- * Add the differences to the text passed in. The old documentation is
- * edited using the edit script provided by the DiffMyers object.
- * Do not display diffs in HTML tags.
- *
- * @param oldDocWords The original documentation as a String array
- * @param newDocWords The new documentation as a String array
- * @return The text for this documentation difference
- */
- static String addDiffs(String[] oldDocWords, String[] newDocWords,
- DiffMyers.change script, String text) {
- String res = text;
- DiffMyers.change hunk = script;
- int startOld = 0;
- if (trace) {
- System.out.println("Old Text:");
- for (int i = 0; i < oldDocWords.length; i++) {
- System.out.print(oldDocWords[i]);
- }
- System.out.println(":END");
- System.out.println("New Text:");
- for (int i = 0; i < newDocWords.length; i++) {
- System.out.print(newDocWords[i]);
- }
- System.out.println(":END");
- }
-
- for (; hunk != null; hunk = hunk.link) {
- int deletes = hunk.deleted;
- int inserts = hunk.inserted;
- if (deletes == 0 && inserts == 0) {
- continue; // Not clear how this would occur, but handle it
- }
-
- // Determine the range of word and delimiter numbers involved
- // in each file.
- int first0 = hunk.line0; // Index of first deleted word
- // Index of last deleted word, invalid if deletes == 0
- int last0 = hunk.line0 + hunk.deleted - 1;
- int first1 = hunk.line1; // Index of first inserted word
- // Index of last inserted word, invalid if inserts == 0
- int last1 = hunk.line1 + hunk.inserted - 1;
-
- if (trace) {
- System.out.println("HUNK: ");
- System.out.println("inserts: " + inserts);
- System.out.println("deletes: " + deletes);
- System.out.println("first0: " + first0);
- System.out.println("last0: " + last0);
- System.out.println("first1: " + first1);
- System.out.println("last1: " + last1);
- }
-
- // Emit the original document up to this change
- for (int i = startOld; i < first0; i++) {
- res += oldDocWords[i];
- }
- // Record where to start the next hunk from
- startOld = last0 + 1;
- // Emit the deleted words, but struck through
- // but do not emit deleted HTML tags
- if (deletes != 0) {
- boolean inStrike = false;
- for (int i = first0; i <= last0; i++) {
- if (!oldDocWords[i].startsWith("<") &&
- !oldDocWords[i].endsWith(">")) {
- if (!inStrike) {
- if (deleteEffect == 0)
- res += "";
- else if (deleteEffect == 1)
- res += "";
- inStrike = true;
- }
- res += oldDocWords[i];
- }
- }
- if (inStrike) {
- if (deleteEffect == 0)
- res += "";
- else if (deleteEffect == 1)
- res += "