chg: replaced ant with gradle

This commit is contained in:
Tobi Schäfer 2020-03-16 16:53:52 +01:00
parent cee0be52e0
commit 5cbeb9f01d
609 changed files with 87626 additions and 638 deletions

View file

@ -0,0 +1,47 @@
#
# Configuration file for JSDoc
#
# The following hashes are used for supplying user-defined @attribute tags
# that will be parsed. Non-standard attributes (such as @subclass) can be
# added into these hashes, along with a code reference. The return value
# from the code reference will be included in the documentation. All
# non-standard tags that are not in the below hashes will be ignored.
# The code reference will receive a reference to an array of
# values that were supplied with the @... tag
#
# Class attributes
#eval {
# $CLASS_ATTRS_MAP{subclass} =
# # subclass is the name of the @... tag
# sub {
# # Body from which a string is returned
# '<DT><B>Subclasses:</B><DD>-' .
# join('<DD>-',
# map ({"<A HREF=\"$_.html\">$_</A>"}
# map ( { s/\s*(\w+)\s*/$1/; $_} @{@_->[0]})
# )
# ) . '<P>'
# };
#
# $CLASS_ATTRS_MAP{with} =
# sub {
# 'This class has a \'@with\' attribute'
# };
#};
# Method attributes
# eval {
#
# Uncomment this to allow the filename to be displayed for
# each function
#
# $METHOD_ATTRS_MAP{filename} =
# sub {
# '<DT><B>Filename:</B> ' . $_[0] . '<P>'
# };
# $CLASS_ATTRS_MAP{filename} = $METHOD_ATTRS_MAP{filename};
#
# };
#

View file

@ -0,0 +1,605 @@
JSDoc 1.9.9.2
=============
- Fixed disappearing argument list for package-style class constructors
JSDoc 1.9.9.1
=============
- Fixed bug in template dir designation that caused JSDoc to crash if
run from an absolute path
JSDoc 1.9.9
===========
- Added a commandline parameter for supplying a template directory
- Adding sorting of class names on overview-summary-$filename.js
(sf.net bug #1416564)
- Fix for broken anchors from the overview-summary-$filename page to static
methods (SF.net bug #1416543)
JSDoc 1.9.8.1
=============
- Don't touch the file source (src) when processing the file overview data
- Pick up functions as constructors of the @class tag is used
JSDoc 1.9.8
===========
- Allow the @base tag to accept the form: @base ClassName URL (RFE 1114510)
- Be more lenient with @param and @return types (RFE 1104728)
- Corrected CSS error, changed "pts" to "pt"
JSDoc 1.9.7
===========
- Added "--no-lexical-privates" option to ignore locally-defined values
from within constructors
- Fixed linking to static fields/methods
JSDoc 1.9.6.2
=============
- Set correct permissions on files in packaging script
- Fixed compile error on some versions of perl
- Create distinct anchors for static methods and fields in HTML so that
if there is a static and instance method of the same name, the links work
correctly
JSDoc 1.9.6.1
=============
- Updated unit tests for clearing of function contents
- Removed collapsing of string literals; this was originally added for version
1.9.5.1 to avoid segfaults, but the decision has been made that it is up
to the user to use a version of perl that doesn't segfault instead of
trying to work around it in perl code.
- Added (experimental) @exec tag for initialization blocks that should be 'run'
JSDoc 1.9.6
===========
- Fix for incorrect return type and parameter types for static method
listing in file overview
- Clear out unused nested functions with the preprocessor to avoid problems
JSDoc 1.9.5.8
=============
- Yet another fix for __defineGetter__ and __defineSetter__
JSDoc 1.9.5.7
=============
- Fixed bug in syntax highlighting for single-line inline comments
- Fixed bug in preprocessing of __defineGetter__ and __defineSetter__
JSDoc 1.9.5.6
=============
- Fixed incorrect listing of private classes when --private not enabled
JSDoc 1.9.5.4
=============
- Corrected bug with function assignment inside constructor
JSDoc 1.9.5.3
=============
- Added ability to specify different file extensions on commandline
JSDoc 1.9.5.2
=============
- Fixed formatted text munging for @class description
- Added support for @package tag to be used with XMI export
JSDoc 1.9.5.1
=============
- Added collapsing of string literals during preprocessing
JSDoc 1.9.5
===========
- Added listing of global (static) methods to file overview summary, code
submitted by Jeremy Gillick
- Allow a global variable to be defined as a class from an anonymous
function declaration
JSDoc 1.9.4.2.1
===============
- Further fix for typed parameter names starting with a dollar sign
JSDoc 1.9.4.2
=============
- Added ability to handle parameter names starting with a dollar sign
JSDoc 1.9.4.1
=============
- Only use the first sentence for file and class summary on the
overview pages
- Add a non-breaking space in the overview summary tables when there is no
appropriate value to display
JSDoc 1.9.4
===========
- If there are multiple source files documented, the index page defaults
to the overview summary for the main frame
- Made JSDoc site link open in parent frame
- Added overview and file summary tables (similar to package overview table
in JavaDoc)
JSDoc 1.9.3.1
=============
- Fixed duplicate class-tree output
JSDoc 1.9.3
===========
- Added alpha release of XML and XMI output formats
- Upgrade a function to a class if the @base tag is used
- Fixed issue with sub-package nested classes requiring the @addon tag
- Added the implicit "Object" class to the inheritance tree, as well as
other classes that are referenced but not defined
JSDoc 1.9.2.1
=============
- Added @addon tag, which is used when adding static methods to core classes
or classes not defined within the files being documented
- Fix for the base class of nested classes not being properly set
- Fix for infinite recursion when all classes are private
JSDoc 1.9.2
===========
- Removed unecessary table from overview-summary.tmpl
- Added the @ignore tag to allow total hiding of functions
- Fix for incorrect marking of methods as void when the return value is
enclosed in parentheses
- Fix so that methods with a @return tag but without a return statement
are not marked as void
- Fixed issue with not all files being listed in the file listing
JSDoc 1.9.1.3
=============
- Fixed issue with backslashes in path
- Fixed issue with <pre> tags and JavaScript code within fileoverview sections
- Made documented versions of a method take precedence over a
non-documented version
- Added support for prototype assignment without parentheses
- Added new @return label {type typeLink} Description... syntax
JSDoc 1.9.1.2
=============
- Further improvements to mark_void_method
- Improved handling of dynamically-bound methods within functions
- Improved handling of erroneous documenting of 'this'
- Fixed quoting on error message
- Added a few new unit tests for testing general behaviour
JSDoc 1.9.1.1
=============
- Fix for embarrassing bug in mark_void_method
JSDoc 1.9.1
===========
- Fix for the incorrect void marking of methods that return a string literal
- Fix to stop dynamic prototyping from adding non-dynamic classes
- Added ability to add a link to parameter-type data, as follows:
@param {TypeName http://my.link.com/} myParam Description of parameter
JSDoc 1.9
=========
- Added support for a Constant Values page like in Javadoc
- Added support for private classes (by marking the constructor with
the @private attribute)
- Added a "File" page with links to it in the navbar. The "File" page includes
the file overview if one has been supplied, as well as the source view
(unless jsdoc has been invoked with the --no-sources flag)
- Added a --no-sources commandline option to not show the sourcecode for
the JavaScript files
- Added --package-naming commandline option, which specifies that the path
leading to each source file will be preserved. This allows for the same
filename to be used in different directories. Using the same class name
in different packages is _not_ supported (yet)
- Added JSDoc link and creation time in the footer of each page
- Added support for @member tag to explicitly mark a method as a member of
a class
JSDoc 1.8.4
===========
- Added step in prepocessing to attempt to add missing @constructor tags where
the 'new' operator is used in combination with a function name elsewhere
in the source.
- Only the first @extends marking (or assignment of an instance to a sub-
class's prototype) will be used in determining the base class of a class.
- Updated test.js to show off more features of JSDoc, as well as a general
clean-up.
- Changed the parser to consider a method to be a class declaration if its
documentation contains a @class tag (in addition to the @constructor tag)
JSDoc 1.8.3.1
=============
- Some general code cleanup and refactoring.
- Properly fixed marking of void/non-void methods, and at the same time
re-introduced recursive regexes (this time non-dynamic, as dynamic seem
to be much too unstable)
JSDoc 1.8.3
===========
- Changed the handling for __defineGetter__ and __defineSetter__
to define a property instead of a method in the documentation
- Fixed bug in parse_jsdoc_comment that didn't allow for email addresses
to be entered verbatim (instead, the domain of the address was parsed
as a tag)
- Re-did the @fileoverview parsing, now other tags and inner {@link...}
tags are included. Additionally, if only one file is processed and there
is no project overview file included, the file's overview (if it exists)
is used as the project overview. Thanks to Robert Flaherty for input
and bug reports on this issue.
JSDoc 1.8.2.1
=============
- Got rid of extra '*' with @fileoverview
JSDoc 1.8.2
=============
- Fixed bug where other @tags were included as part of the @fileoverview
- Added support for @version in method documentation
- Partial fix for incorrect marking of void methods
- Made field and return @type handling more robust and flexible
JSDoc 1.8.1
===========
- Added @extends as a synonym for @base
- Fixed doubled-up <UL> tags in hierarchy tree code (thanks to Robert Flaherty)
- Fixed bug where a class's base class would not get recorded if
there was a forward assignment of a static value to the class
(thanks to Robert Flaherty)
JSDoc 1.8
=========
- Remove the GLOBALS class if it is empty
- Fixed case-sensitive sort in index
- Added support for comments with long blocks of '*'s in the opening and
closing of the doc string
- Added sourcecode view
- Fixed bug where named anonymous functions were not recognized as methods
when assigned to prototypes
- Allow for singletons to be declared with var
- Allow for binding static properties to classes before they are defined
- Added @overviewfile attribute for class documentation, inlines html or
textfiles into the documentation
- Added beginnings of unit testing
- Don't add 'constructor' as an instance or class property
- Added an @overviewfile tag which can be put in an independent
jsdoc-comment block at the top of each file. This results in a project
overview page for each file with an overview, similar to JavaDoc's
package pages.
- Added support for Mozilla's __defineGetter__ and __defineSetter__
- Return type for methods is now Object, and is displayed instead of the
'function' declaration. The 'void' type is shown if no return can be
found in the function and no other type is defined. The defaulting to
Object also goes for fields, and is shown instead of the 'var' declaration
- Allow usage of the {@link url label} construct for the @type tag
JSDoc 1.7.2.1
=============
- Fixed segfault problem in huge constructors with deconstruct_constructor
selection regex
JSDoc 1.7.2
===========
- Added a @class tag to constructors, for providing class-specific information
- Added handling for Singleton classes
- Added handler for @base tag to denote inheritance
JSDoc 1.7.1.4
=============
- Fixed bug introduced by refactoring of &format_link
JSDoc 1.7.1.3
=============
- Added workaround in &format_link for apparent bug in some builds of
perl 5.8.0
- Fixed bug in handling of --recursive (was always recursive)
JSDoc 1.7.1.2
=============
- Fixed problems with new preprocessor when confronted with nested classes
JSDoc 1.7.1.1
=============
- Fixed bug where {@link}s inside of @params weren't processed
JSDoc 1.7.1
===========
- Added --quiet switch and message to signify ending of successful execution
- Fixed problem with perl segfaulting on big class prototype block definitions
- Fixed incorrectly formatted {@link}s nested in other @attributes
- Added preprocessor for handling private methods to replace bulky
and buggy evaluate_constructor method
JSDoc 1.7
=========
- Added usage of strict and warnings in JSDoc.pm
- Added ability to set type information for method parameters
(e.g. /** @param {String} userName The name of the current user */ )
- Added support for class prototype initialization blocks (finally!)
JSDoc 1.6.3.1
=============
- Fixed bug where static fields initialized to 0 are not picked up
JSDoc 1.6.3
===========
- Removed the constraint that a nested class constructor must be marked
with the @constructor attribute
- Allow @constructor attribute to mark nested class constructors which would
otherwise be considered static methods
- Allow newlines as well as semi-colon for line-endings
- Allow a leading '$' for field names
JSDoc 1.6.2.1
=============
- Fixed splicing error for nested classes, thanks again to jdber
JSDoc 1.6.2
===========
- Carry over overridden method description attributes even if there is
no text description to carry over
- Improved HTML in main.tmpl
- Fixed infinite loop and recognition for when static inner class construct is
used (thanks to jdber for the patch)
- Added a Nested Class Summary section to the output documentation to display
inner classes
JSDoc 1.6.1.1
=============
- Fixed bug in carrying over description of overridden methods
JSDoc 1.6.1
===========
- Improved the format_link function in jsdoc.pl so that {@links} will
not be made to non-existent resources, and parentheses are not placed
after a field name (as opposed to a method name)
- Carry over method documentation for overridden methods if no new
documentation has been supplied for the method. This is in following with
javadoc functionality
- Fixed /* functionality(whatever) bug
- Fixed remaining problems with comments inside of parameter lists
JSDoc 1.6
=========
- Big cleanup in jsdoc.pl in terms of writing templates to file
- Fixed bug where multi-line @params don't work
- Added filename-scoped frame, as well as the name of the filename for
each class
- Improved the linking implementation for @link and @see to do a better job
in terms of not building broken links
JSDoc 1.5.2
===========
- Changed the name '[default context]' for non-class functions to be
GLOBALS, also made this name configurable with command-line parameters
- Made jsdoc easily runnable from anywhere on the filesystem, without
requiring installing JSDoc.pm in the @INC
JSDoc 1.5.1
===========
- Added support for @requires in methods
- Generic '@' attributes now work for constructors, such as @see and @throws.
Also added support for @return and @returns for constructors
- Fixed the @link construct to allow custom labels
- Added standard support for @author in methods as well as classes
(Thanks for Rainer Eschen for bringing me to my senses)
- Fixed spacing for @author attributes
JSDoc 1.5
===========
- Fixed bug that would break HTML links within documentation
- Fixed bug in path to logo in IMG tags
- Added support for type information for both methods and fields
- Added suppport for @private in instance fields
- Fixed bug where private methods would show up in the inherited methods list
in subclasses
- Private class methods are now also supported
- Method parameters details are displayed in the same order as the parameter
list for a method
- Moved more info into the 'vars' member of methods, and away from the parser
- Added @final (with synonym @const) for class and instance properties
- Fix in parser where string literals bound to classes in a constructor were
not caught by the parser
JSDoc 1.4
=========
- Added @attributes: @author, @deprecated, @see, @version, @requires, @throws
- Updated pod (removed documentation for non-existant parse_jsdoc_source,
added a small example)
- Added function to reset the parser (reset_parser)
- Fixed bug where the same property could be bound to a class's prototype
more than once
- Fixed bug where embedded // comments would break the parser
- Added ability to set project name, page footer, logo and project summary
(thanks to Jeff Conrad for code and suggestions)
- Added overview summary (thanks to Jeff Conrad for code)
- Split up loading/parsing of sources file to prevent crashes that were caused
by overloading the regex engine
- Added overview-tree (thanks to Jeff Conrad for the code contribution)
- Fixed bug where some assignments of methods to instances in a constructor
would get lost
- Fix in doc-parsing where a line with only a star and a newline would get
passed over
- Added ability to 'hide' methods with @private
JSDoc 1.3
=========
- When a function is marked with @constructor, it will always be dealt
with as a class
- Improved doc regex
- Added recursive directory handling

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,291 @@
package JSDoc::XMI;
use strict;
use warnings;
use HTML::Template;
use Data::Dumper;
=head1 DESCRIPTION
@packages
@classes
$classname
$classid
$classuuid
$classvisibility (public|protected|private)
@specializationids
$specializationid
$generalizationid
@attributes
$attributeid
$attributeuuid
$attributename
$attributevisibility (public|protected|private)
$ownerscope (instance|classifier)
$classid
$typeid
@methods
$methodid
$methoduuid
$methodname
$methodvisibility (public|protected|private)
$ownerscope (instance|classifier)
$returnid
$returnuuid
$returntypeid
@datatypes
$datatypeid
$datatypeuuid
$datatypename
@generalizations
$generalizationid
$generalizationuuid
$generalizationchild
$generalizationparent
=cut
sub new {
my ($package, $location) = @_;
bless {
location => "${location}JSDoc/",
idcounter => 2,
types => {},
classes => {},
generalizations => {}
}, $package;
}
sub output {
my ($self, $classes) = @_;
my $template = HTML::Template->new(
filename => $self->{location} . 'xmi.tmpl',
die_on_bad_params => 1);
my @packages = $self->get_packages($classes);
my @datatypes = $self->get_datatypes;
my @generalizations = $self->get_generalizations;
$template->param(
packages => \@packages,
datatypes => \@datatypes,
generalizations => \@generalizations );
return $template->output;
}
sub get_id {
'xmi.' . shift->{idcounter}++;
}
sub get_uuid {
my @chars = ('A'..'Z', 'a'..'z', 0..9);
my @uuid;
for (1..32){
push @uuid, $chars[rand(@chars)];
}
join("", @uuid);
}
sub get_packages {
my ($self, $classes) = @_;
my %packages;
push(@{$packages{$_->{package}}}, $_)
for $self->get_classes($classes);
map {
name => $_,
classes => $packages{$_},
packageid => $self->get_id,
packageuuid => $self->get_uuid
}, keys %packages;
}
sub get_classes {
my ($self, $classes) = @_;
my @classes;
# Store all the class-ids before we start on anything else
$self->add_class($_) for keys %$classes;
for my $cname (keys %$classes){
my $class = {
classname => $cname,
classid => $self->add_class($cname),
classuuid => $self->get_uuid,
classvisibility =>
defined($classes->{$cname}->{constructor_vars}->{private})
? 'private' : 'public'
};
$class->{attributes} = $self->get_attributes(
$class->{classid},
$classes->{$cname});
$class->{methods} = $self->get_methods(
$class->{classid},
$classes->{$cname});
$class->{generalizationid} =
$self->get_generalizationid($classes->{$cname});
$class->{package} =
defined($classes->{$cname}->{constructor_vars}->{package})
? $classes->{$cname}->{constructor_vars}->{package}->[0] : '';
push @classes, $class;
}
for my $class (@classes){
$class->{specializationids} = $self->get_specializationids($class);
}
@classes;
}
sub get_methods {
my ($self, $classid, $class) = @_;
my @methods;
for my $k (qw(instance class)){
for my $method (@{$class->{"${k}_methods"}}){
my $type = defined($method->{vars}->{type})
? $method->{vars}->{type}->[0] : 'Object';
my $meth = {
methodid => $self->get_id,
methoduuid => $self->get_uuid,
methodname => $method->{mapped_name},
methodvisibility =>
defined($method->{vars}->{private})
? 'private' : 'public',
ownerscope =>
$k eq 'class' ? 'classifier' : 'instance',
returnid => $self->get_id,
returnuuid => $self->get_uuid,
returntypeid => $self->add_type($type)
};
push @methods, $meth;
}
}
return \@methods;
}
sub get_attributes {
my ($self, $classid, $class) = @_;
my @attributes;
for my $k (qw(instance class)){
for my $field (@{$class->{"${k}_fields"}}){
my $type = defined($field->{field_vars}->{type})
? $field->{field_vars}->{type}->[0] : 'Object';
my $attr = {
attributeid => $self->get_id,
attributeuuid => $self->get_uuid,
attributename => $field->{field_name},
attributevisibility =>
defined($field->{field_vars}->{private})
? 'private' : 'public',
ownerscope =>
$k eq 'class' ? 'classifier' : 'instance',
classid => $classid,
typeid => $self->add_type($type)
};
push @attributes, $attr;
}
}
\@attributes;
}
sub get_generalizationid {
my ($self, $class) = @_;
if ($class->{extends}){
return $self->add_generalization(
$class->{classname},
$class->{extends});
}
'';
}
sub get_specializationids {
my ($self, $class) = @_;
my $cname = $class->{classname};
my $cid = $self->add_class($cname);
my @specializationids;
for my $id (keys %{$self->{generalizations}}){
my $generalization = $self->{generalizations}->{$id};
if ($generalization->{parent} eq $cid){
push @specializationids, { specializationid => $id };
}
}
\@specializationids;
}
sub get_datatypes {
my ($self) = @_;
my @datatypes;
while (my ($type, $id) = each(%{$self->{types}})){
push @datatypes, {
datatypeid => $id,
datatypeuuid => $self->get_uuid,
datatypename => $type };
}
@datatypes;
}
sub get_generalizations {
my ($self) = @_;
my @generalizations;
while (my ($id, $generalization) = each(%{$self->{generalizations}})){
push @generalizations, {
generalizationid => $id,
generalizationuuid => $self->get_uuid,
generalizationchild => $generalization->{parent},
generalizationparent => $generalization->{child}};
}
@generalizations;
}
sub add_type {
my ($self, $type) = @_;
$type =~ s/^\s*(\S+)\s*$/$1/;
if (defined($self->{classes}->{$type})){
return $self->add_class($type);
} elsif (defined($self->{types}->{$type})){
return $self->{types}->{$type};
}
$self->{types}->{$type} = $self->get_id;
}
sub add_class {
my ($self, $class) = @_;
$class =~ s/^\s*(\S+)\s*$/$1/;
if (defined($self->{classes}->{$class})){
return $self->{classes}->{$class};
}
$self->{classes}->{$class} = $self->get_id;
}
sub add_generalization {
my ($self, $subclassname, $superclassname) = @_;
my $subclassid = $self->add_class($subclassname);
my $superclassid = $self->add_class($superclassname);
my $generalization = {
child => $subclassid,
parent => $superclassid };
my $generalizationid = $self->get_id;
$self->{generalizations}->{$generalizationid} = $generalization;
$generalizationid;
}
1;

View file

@ -0,0 +1,72 @@
package JSDoc::XML;
use strict;
use warnings;
use HTML::Template;
sub new {
my ($package, $location) = @_;
bless { location => "${location}JSDoc/" }, $package;
}
sub output {
my ($self, $classes) = @_;
my @classes = _preprocess(
grep {defined($_->{classname})} values %$classes);
my $template = HTML::Template->new(
filename => $self->{location} . 'xml.tmpl',
die_on_bad_params => 1);
$template->param(classes => \@classes);
return $template->output;
}
sub _preprocess {
my @classes = @_;
for (@classes){
$_->{inherits} = _preprocess_inherits($_->{inherits});
$_->{constructor_vars} = _preprocess_vars($_->{constructor_vars});
for my $method (@{$_->{instance_methods}}, @{$_->{class_methods}}){
$method->{vars} = _preprocess_vars($method->{vars});
}
for my $field (@{$_->{instance_fields}}, @{$_->{class_fields}}){
$field->{field_vars} = _preprocess_vars($field->{field_vars});
}
}
@classes;
}
sub _preprocess_inherits {
my ($inherits) = @_;
my @inherits;
for my $class (keys %$inherits){
my $inherit = {
class => $class,
methods => [map { name => $_ },
@{$inherits->{$class}->{instance_methods}}]};
push @inherits, $inherit;
}
\@inherits;
}
sub _preprocess_vars {
my ($vars) = @_;
return $vars if ref($vars) eq 'ARRAY';
my @vars;
for my $key (keys %$vars){
my $var;
if (ref($vars->{$key}) eq 'ARRAY'){
$var = {
'@name' => $key,
values => [map { val => $_ }, @{$vars->{$key}}] };
} else {
$var = {
'@name' => $key,
values => [ { val => $vars->{$key} } ] };
}
push @vars, $var;
}
\@vars;
}
1;

View file

@ -0,0 +1,250 @@
<?xml version="1.0" encoding="UTF-8"?>
<XMI xmi.version="1.0">
<XMI.header>
<XMI.documentation>
<XMI.exporter>JSDoc XMI Export</XMI.exporter>
<XMI.exporterVersion>0.1</XMI.exporterVersion>
</XMI.documentation>
<XMI.metamodel xmi.name="UML" xmi.version="1.3"/>
</XMI.header>
<XMI.content>
<Model_Management.Model xmi.id="xmi.1" xmi.uuid="10-0-0-5-3605f878:101c2e18bff:-8000">
<Foundation.Core.ModelElement.name>JSDoc</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Namespace.ownedElement>
<!-- BEGIN PACKAGES -->
<TMPL_LOOP NAME="packages">
<TMPL_IF NAME="name">
<Model_Management.Package
xmi.id="<TMPL_VAR NAME="packageid">"
xmi.uuid="<TMPL_VAR NAME="packageuuid">">
<Foundation.Core.ModelElement.name><TMPL_VAR NAME="name"></Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
</TMPL_IF>
<!-- BEGIN CLASS DESCRIPTIONS -->
<TMPL_LOOP NAME="classes">
<TMPL_IF NAME="package">
<Foundation.Core.Namespace.ownedElement>
</TMPL_IF>
<!-- BEGIN CLASS -->
<Foundation.Core.Class
xmi.id="<TMPL_VAR NAME=classid>"
xmi.uuid="<TMPL_VAR NAME=classuuid>">
<!-- CLASS NAME -->
<Foundation.Core.ModelElement.name><!-- TMPL_VAR NAME="classname" --></Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility
xmi.value="<TMPL_VAR NAME=classvisibility>"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<!-- BEGIN REFERENCE TO INHERITANCE -->
<TMPL_IF NAME="generalizationid">
<Foundation.Core.GeneralizableElement.generalization>
<Foundation.Core.Generalization
xmi.idref="<TMPL_VAR NAME=generalizationid >"/>
</Foundation.Core.GeneralizableElement.generalization>
</TMPL_IF>
<TMPL_LOOP NAME="specializationids">
<Foundation.Core.GeneralizableElement.specialization>
<Foundation.Core.Generalization
xmi.idref="<TMPL_VAR NAME=specializationid >"/>
</Foundation.Core.GeneralizableElement.specialization>
</TMPL_LOOP>
<!-- END REFERENCE TO INHERITANCE -->
<Foundation.Core.Classifier.feature>
<!-- BEGIN ATTRIBUTES -->
<TMPL_LOOP NAME="attributes">
<!-- BEGIN ATTRIBUTE -->
<Foundation.Core.Attribute
xmi.id="<TMPL_VAR NAME=attributeid>"
xmi.uuid="<TMPL_VAR NAME=attributeuuid>">
<Foundation.Core.ModelElement.name><!-- TMPL_VAR NAME="attributename" --></Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="<TMPL_VAR NAME=attributevisibility>"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope
xmi.value="<TMPL_VAR NAME=ownerscope>"/>
<!--Foundation.Core.StructuralFeature.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.id="xmi.5">
<Foundation.Data_Types.Multiplicity.range>
<Foundation.Data_Types.MultiplicityRange xmi.id="xmi.6">
<Foundation.Data_Types.MultiplicityRange.lower>1</Foundation.Data_Types.MultiplicityRange.lower>
<Foundation.Data_Types.MultiplicityRange.upper>1</Foundation.Data_Types.MultiplicityRange.upper>
</Foundation.Data_Types.MultiplicityRange>
</Foundation.Data_Types.Multiplicity.range>
</Foundation.Data_Types.Multiplicity>
</Foundation.Core.StructuralFeature.multiplicity-->
<Foundation.Core.StructuralFeature.changeability xmi.value="changeable"/>
<Foundation.Core.StructuralFeature.targetScope xmi.value="instance"/>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier
xmi.idref="<TMPL_VAR NAME=classid>"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier
xmi.idref="<TMPL_VAR NAME=typeid>"/>
</Foundation.Core.StructuralFeature.type>
<!--Foundation.Core.ModelElement.taggedValue>
<Foundation.Extension_Mechanisms.TaggedValue xmi.id="xmi.8">
<Foundation.Extension_Mechanisms.TaggedValue.tag>transient</Foundation.Extension_Mechanisms.TaggedValue.tag>
<Foundation.Extension_Mechanisms.TaggedValue.value>false</Foundation.Extension_Mechanisms.TaggedValue.value>
<Foundation.Extension_Mechanisms.TaggedValue.modelElement>
<Foundation.Core.ModelElement xmi.idref="xmi.4"/>
</Foundation.Extension_Mechanisms.TaggedValue.modelElement>
</Foundation.Extension_Mechanisms.TaggedValue>
<Foundation.Extension_Mechanisms.TaggedValue xmi.id="xmi.9">
<Foundation.Extension_Mechanisms.TaggedValue.tag>volatile</Foundation.Extension_Mechanisms.TaggedValue.tag>
<Foundation.Extension_Mechanisms.TaggedValue.value>false</Foundation.Extension_Mechanisms.TaggedValue.value>
<Foundation.Extension_Mechanisms.TaggedValue.modelElement>
<Foundation.Core.ModelElement xmi.idref="xmi.4"/>
</Foundation.Extension_Mechanisms.TaggedValue.modelElement>
</Foundation.Extension_Mechanisms.TaggedValue>
</Foundation.Core.ModelElement.taggedValue-->
</Foundation.Core.Attribute>
<!-- END ATTRIBUTE -->
</TMPL_LOOP>
<!-- END ATTRIBUTES -->
<!-- BEGIN METHODS -->
<TMPL_LOOP NAME="methods">
<!-- BEGIN METHOD -->
<Foundation.Core.Operation
xmi.id="<TMPL_VAR NAME=methodid>"
xmi.uuid="<TMPL_VAR NAME=methoduuid>">
<Foundation.Core.ModelElement.name><!-- TMPL_VAR NAME="methodname" --></Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility
xmi.value="<TMPL_VAR NAME=methodvisibility>"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope
xmi.value="<TMPL_VAR NAME=ownerscope>"/>
<Foundation.Core.BehavioralFeature.isQuery xmi.value="false"/>
<Foundation.Core.Operation.concurrency xmi.value="sequential"/>
<Foundation.Core.Operation.isRoot xmi.value="false"/>
<Foundation.Core.Operation.isLeaf xmi.value="false"/>
<Foundation.Core.Operation.isAbstract xmi.value="false"/>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier
xmi.idref="<TMPL_VAR NAME=classid>"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.BehavioralFeature.parameter>
<!-- BEGIN RETURN TYPE -->
<Foundation.Core.Parameter
xmi.id="<TMPL_VAR NAME=returnid>"
xmi.uuid="<TMPL_VAR NAME=returnuuid>">
<Foundation.Core.ModelElement.name>return</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Parameter.kind xmi.value="return"/>
<!--Foundation.Core.Parameter.behavioralFeature>
<Foundation.Core.BehavioralFeature xmi.idref="xmi.10"/>
</Foundation.Core.Parameter.behavioralFeature-->
<Foundation.Core.Parameter.type>
<Foundation.Core.Classifier
xmi.idref="<TMPL_VAR NAME=returntypeid>"/>
</Foundation.Core.Parameter.type>
</Foundation.Core.Parameter>
<!-- END RETURN TYPE -->
</Foundation.Core.BehavioralFeature.parameter>
</Foundation.Core.Operation>
<!-- END METHOD -->
</TMPL_LOOP>
<!-- END METHODS -->
</Foundation.Core.Classifier.feature>
</Foundation.Core.Class>
<!-- END CLASS -->
<TMPL_IF NAME="package">
</Foundation.Core.Namespace.ownedElement>
</TMPL_IF>
</TMPL_LOOP>
<!-- END CLASS DESCRIPTIONS -->
<TMPL_IF name="name">
</Model_Management.Package>
</TMPL_IF>
</TMPL_LOOP>
<!-- END PACKAGES -->
<!-- BEGIN DATATYPE DESCRIPTIONS -->
<TMPL_LOOP name="datatypes">
<!-- BEGIN DATATYPE -->
<Foundation.Core.DataType
xmi.id="<TMPL_VAR NAME=datatypeid>"
xmi.uuid="<TMPL_VAR NAME=datatypeuuid>">
<Foundation.Core.ModelElement.name><!-- TMPL_VAR NAME="datatypename" --></Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.DataType>
<!-- END DATATYPE -->
</TMPL_LOOP>
<!-- END DATATYPE DESCRIPTIONS -->
<!-- BEGIN GENERALIZATIONS -->
<TMPL_LOOP NAME="generalizations">
<!-- BEGIN GENERALIZATION -->
<Foundation.Core.Generalization
xmi.id="<TMPL_VAR NAME=generalizationid >"
xmi.uuid="<TMPL_VAR NAME=generalizationuuid >" >
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Generalization.child>
<Foundation.Core.GeneralizableElement
xmi.idref="<TMPL_VAR NAME=generalizationchild >"/>
</Foundation.Core.Generalization.child>
<Foundation.Core.Generalization.parent>
<Foundation.Core.GeneralizableElement
xmi.idref="<TMPL_VAR NAME=generalizationparent >"/>
</Foundation.Core.Generalization.parent>
</Foundation.Core.Generalization>
<!-- END GENERALIZATION -->
</TMPL_LOOP>
<!-- END GENERALIZATIONS -->
</Foundation.Core.Namespace.ownedElement>
</Model_Management.Model>
</XMI.content>
</XMI>

View file

@ -0,0 +1,128 @@
<?xml version="1.0"?>
<javascript>
<classes>
<TMPL_LOOP NAME="classes">
<class
name="<TMPL_VAR NAME="classname">"
<TMPL_IF NAME="extends">extends="<TMPL_VAR NAME='extends'>"</TMPL_IF> >
<constructor_args><!-- TMPL_VAR NAME="constructor_args" --></constructor_args>
<constructor_vars>
<TMPL_LOOP NAME="constructor_vars">
<var name="<TMPL_VAR NAME='@name'>">
<TMPL_LOOP NAME="values">
<value><![CDATA[<TMPL_VAR NAME="val">]]></value>
</TMPL_LOOP>
</var>
</TMPL_LOOP>
</constructor_vars>
<constructor_detail><![CDATA[<TMPL_VAR NAME="constructor_detail">]]></constructor_detail>
<instance-methods>
<TMPL_LOOP NAME="instance_methods">
<method mapped_name="<TMPL_VAR NAME='mapped_name'>">
<description><![CDATA[<TMPL_VAR NAME="description">]]></description>
<argument_list><!--
TMPL_VAR NAME="argument_list"
--></argument_list>
<vars>
<TMPL_LOOP NAME="vars">
<var name="<TMPL_VAR NAME='@name'>">
<TMPL_LOOP NAME="values">
<value><![CDATA[<TMPL_VAR NAME="val">]]></value>
</TMPL_LOOP>
</var>
</TMPL_LOOP>
</vars>
</method>
</TMPL_LOOP>
</instance-methods>
<instance-fields>
<TMPL_LOOP NAME="instance_fields">
<field name="<TMPL_VAR NAME='field_name'>">
<field-value><![CDATA[<TMPL_VAR NAME="field_value">]]></field-value>
<field-description><![CDATA[<TMPL_VAR NAME="field_description">]]></field-description>
<vars>
<TMPL_LOOP NAME="field_vars">
<var name="<TMPL_VAR NAME='@name'>">
<TMPL_LOOP NAME="values">
<value><![CDATA[<TMPL_VAR NAME="val">]]></value>
</TMPL_LOOP>
</var>
</TMPL_LOOP>
</vars>
</field>
</TMPL_LOOP>
</instance-fields>
<class-methods>
<TMPL_LOOP NAME="class_methods">
<method mapped_name="<TMPL_VAR NAME='mapped_name'>">
<description><![CDATA[<TMPL_VAR NAME="description">]]></description>
<argument_list><!--
TMPL_VAR NAME="argument_list"
--></argument_list>
<vars>
<TMPL_LOOP NAME="vars">
<var name="<TMPL_VAR NAME='@name'>">
<TMPL_LOOP NAME="values">
<value><![CDATA[<TMPL_VAR NAME="val">]]></value>
</TMPL_LOOP>
</var>
</TMPL_LOOP>
</vars>
</method>
</TMPL_LOOP>
</class-methods>
<class-fields>
<TMPL_LOOP NAME="class_fields">
<field name="<TMPL_VAR NAME='field_name'>">
<field-value><![CDATA[<TMPL_VAR NAME="field_value">]]></field-value>
<field-description><![CDATA[<TMPL_VAR NAME="field_description">]]></field-description>
<vars>
<TMPL_LOOP NAME="field_vars">
<var name="<TMPL_VAR NAME='@name'>">
<TMPL_LOOP NAME="values">
<value><![CDATA[<TMPL_VAR NAME="val">]]></value>
</TMPL_LOOP>
</var>
</TMPL_LOOP>
</vars>
</field>
</TMPL_LOOP>
</class-fields>
<inner-classes>
<TMPL_LOOP NAME="inner_classes">
<class name="<TMPL_VAR NAME='class_name'>"/>
</TMPL_LOOP>
</inner-classes>
<TMPL_LOOP NAME="inherits">
<inherits from="<TMPL_VAR NAME='class'>">
<TMPL_IF NAME="methods">
<methods>
<TMPL_LOOP NAME="methods">
<method><!-- TMPL_VAR NAME="name" --></method>
</TMPL_LOOP>
</methods>
</TMPL_IF>
<TMPL_IF NAME="fields">
<fields>
</fields>
</TMPL_IF>
</inherits>
</TMPL_LOOP>
</class>
</TMPL_LOOP>
</classes>
</javascript>

View file

@ -0,0 +1,95 @@
package JavaScript::Syntax::HTML;
=head1 NAME
JavaScript::Syntax::HTML - Convert JavaScript sourcecode to HTML
=head1 SYNOPSIS
use JavaScript::Syntax::HTML qw(to_html to_html_document);
my $html_fragment = to_html($js_src);
my $html_doc = output_html_document($js_src);
=head1 DESCRIPTION
JavaScript::Syntax::HTML processes JavaScript code and outputs HTML with
all reserved words marked up.
The to_html method only outputs an HTML fragment (no <body> or <html> tags),
and only marks up the reserved words with CSS styles.
The to_html_document method outputs a full HTML document, and does include
style information for the reserved words markup.
The style classes that can be defined for use with to_html are C<comment>,
C<literal>, and C<reserved>.
=head1 AUTHOR
Gabriel Reid gab_reid@users.sourceforge.net
=cut
use warnings;
use strict;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(to_html to_html_document);
sub to_html {
local $_ = shift;
s/\&/&amp;/g;
s/</&lt;/g;
s/>/&gt;/g;
s/
((?:\/\*.*?\*\/)
|
(?:\/\/[^\n]*$))
|
('[^']*'|"[^"]*")
|
\b(function|for|if|while|return|else|prototype|this)\b
/ get_substitution($1, $2, $3) /egsxm;
$_;
}
sub get_substitution {
my ($comment, $stringliteral, $resword) = @_;
my $content;
if ($comment){
$comment =~ s/(\@\w+)\b/get_span('attrib', $1)/eg;
return get_span('comment', $comment);
} elsif ($stringliteral){
return get_span('literal', $stringliteral);
} elsif ($resword){
return get_span('reserved', $resword);
}
}
sub get_span {
my ($class, $inner) = @_;
qq(<span class="$class">$inner</span>);
}
sub to_html_document {
my ($src) = @_;
$src = &to_html($src);
qq(
<html>
<head>
<style>
body { background: #FFFFFF }
.reserved { color: #DD3333 }
.comment { color: #339933 }
.attrib { color: #FF0000 }
.literal { color: #5555FF }
</style>
</head>
<body>
<pre>
$src
</pre>
</body>
</html>);
}

View file

@ -0,0 +1,30 @@
README for jsdoc.pl
jsdoc.pl is a script that produces javadoc-style documentation from well-formed
JavaScript sourcefiles. At the moment, this means it supports sourcefiles where
all functions are mapped to a class using prototype-based inheritance.
Anonymous function definitions
(e.g. Circle.prototype.getRadius = function(){ ...} ) are supported.
This application requires Perl5, as well as one non-standard addon module:
- HTML::Template, which is available from CPAN (cpan.org)
Invocation is simple: Just run the application, giving one or more well-formed
OO JavaScript sourcefilename(s) as arguments. A sample JS sourcefile, test.js,
is given along with this application. An example of running the application is
shown below:
$ ./jsdoc.pl test.js
OR
perl jsdoc.pl test.js
Further information about using JsDoc can be found at
http://jsdoc.sourceforge.net
If there are any questions, comments, problems or anything else, please mail
the jsdoc-user mailing list; more information can be found at
http://sourceforge.net/mail/?group_id=30801. This application has been
successfully tested on Linux (Debian and Redhat), and Windows 2000 with
ActivePerl.

View file

@ -0,0 +1,46 @@
TODO for JSDoc
- XML / XMI export
- Improve the --package-naming option so that there are separate namespaces
for each package (so that you can have the same class name defined in
different packages)
- Fix some spacing/table issues in the navbar in the templates (use a td
border in the stylesheet to debug)
- Introduce a more generalized system for generating the navbar
- Handle additional information (such as @see) for fields
- Uncallable methods/functions should be marked as private, or show the scope
from which they can be called
- Dynamic handling of assignment of prototype to a temp variable (preprocessor)
- Add support for interfaces, but first this has to be better defined
- Top-level var documenting (maybe add a '@global' tag to force toplevel vars
to be documented
- Add an FAQ, more and better documentation
- Java port (someday...)
- Make a more polished API for using other doclets, like javadoc
- Add a deprecated page, make deprecated support more like javadoc
- Add support for js files without .js extension
- Support for a time stamp
- Some of the ->{vars} are set to undef, should always be an empty map
- Add command line params --dump-tree, --dump-xml
- Add command line param --stylesheet
- Make navbar links selective so they are never broken
- Update the help doc

View file

@ -0,0 +1,679 @@
#!/usr/bin/perl
package JSDoc;
#
# Unit testing of JSDoc
#
# Run with 'perl TestJSDoc.pl' or './TestJSDoc.pl'
#
use strict;
use warnings;
use JSDoc;
use Data::Dumper;
use Test::More qw(no_plan);
$|++;
# parse_jsdoc_comment
diag("Testing parse_jsdoc_comment");
is_deeply(parse_jsdoc_comment(''), {summary => ''},
"Ensure only summary is filled in");
is(parse_jsdoc_comment('')->{summary}, '', 'Empty comment value');
is(parse_jsdoc_comment(
'************************* test *************')->{summary},
'test', 'long leading and trailing stars');
# annotate_comment
diag("Testing annotate_comment");
is(annotate_comment, "\n/** \@private */", 'annotate_comment w/o arg');
like(annotate_comment("/** This is a test */"),
qr#^/\s*\*\*\s*This is a test\s+\@private\s*\*/\s*$#,
'annotate_comment w/ arg');
like(annotate_comment("/** This is a test */", '@testtag value'),
qr#^/\s*\*\*\s*This is a test\s+\@testtag\svalue\s*\*/\s*$#,
'annotate_comment w/ tag argument');
# find_balanced_block
diag("Testing find_balanced_block");
my @blocks = (
# basic simple input
['{', '}', '{ this is in the braces } {this is after}{{',
['{ this is in the braces }', ' {this is after}{{'] ,
'basic input'],
# discard leading chars before opening char
['{', '}', 'discard {inner} after',
['{inner}', ' after'], 'discard leading chars'],
# empty input string
['{', '}', '',
['', ''], 'empty input string'],
# nothing to match at all
['{', '}', 'there is nothing to match',
['', 'there is nothing to match'], 'nothing to match'],
);
for my $test (@blocks){
my @args = @{$test}[0..2];
my ($expect, $explain) = @{$test}[3,4];
is_deeply([find_balanced_block(@args)], $expect, $explain);
}
#
# Test the @member tag
#
diag('Testing the @member tag');
reset_parser();
my $src = q#
/** @constructor */
function Foo(){
this.x = function(){return null;};
}
/** Unrelated */
function myfunc(){return null;}
#;
my $classes = parse_code_tree(\$src);
my %method_names = map { $_->{mapped_name} => 1 }
@{$classes->{Foo}->{instance_methods}};
ok(not(defined($method_names{myfunc})),
'Unrelated method is not added to class without @member tag');
reset_parser();
$src = q#
/** @constructor */
function Foo(){
this.x = function(){return null;};
}
/**
* @member Foo
*/
function myfunc(){return null;}
#;
$classes = parse_code_tree(\$src);
%method_names = map { $_->{mapped_name} => 1 }
@{$classes->{Foo}->{instance_methods}};
ok(defined($method_names{myfunc}),
'Add method marked with @member to class');
reset_parser();
#
# preprocess_source
#
diag("Testing preprocess_source");
# Make sure that:
#
# Foo.prototype = {
# bar: function(){ return "Eep!"; },
# baz: "Ha!"
# }
#
# becomes:
#
# Foo.prototype.bar = function(){ return "Eep!"; };
# Foo.prototype.baz = "Ha!";
my $before = q/
Foo.prototype = {
bar: function(){ return "Eep!"; },
baz: "Ha!"
} /;
my $after_re = qr/^\s*(?:$JSDOC_COMMENT)?\s*Foo.prototype.bar
\s*=\s*
function\(\s*\)\s*\{[^\}]*}\s*;\s*
Foo\.prototype\.baz\s*=\s*"[^"]+"\s*;\s*$/x;
like(preprocess_source($before), $after_re,
'Unpack prototype block assignment');
#
# Make sure that:
#
# /** @constructor */
# Foo.Bar = function(){this.x = 2;var y = 3;}
# becomes:
# /** @constructor */
# Foo.Bar = function(){};
#
# /** @constructor */
# function Foo.Bar(){}
#
# Foo.Bar.prototype.x = 2;
#
# /** @private */
# Foo.Bar.prototype.y = 3;
#
$before = q#
/** @constructor */
Foo.Bar = function(){this.x = 2; var y = 3; }#;
$after_re = qr{
^\s*/\*\*\s*\@constructor\s*\*/\s*
Foo\.Bar\s*=\s*function\s*\(\s*\)\s*\{\s*\}\s*;\s*
/\*\*\s*\@constructor\s*\*/\s*
function\s+Foo\.Bar\s*\(\s*\)\s*\{\s*\}
\s*
Foo\.Bar\.prototype\.x\s*=\s*2\s*;\s*
/\*\*\s*\@private\s*\*/\s*
Foo\.Bar\.prototype\.y\s*=\s*3\s*;\s*$
}x;
like(preprocess_source($before), $after_re,
'Unpack nested class');
#
# Make sure that:
# MySingleton = new function(){this.x=function(){}}
# and
# var MySingleton = new function(){this.x=function(){}}
# become:
# function MySingleton(){}
# MySingleton.prototype.x = function(){};
#
$before = q# MySingleton = new function(){this.x=function(){}} #;
$after_re = qr{
^\s*(?:$JSDOC_COMMENT)?
\s*function\s*MySingleton\s*\(\)\s*\{\s*\}\s*
(?:$JSDOC_COMMENT)?\s*
MySingleton\.prototype\.x\s*=\s*function\s*\(\s*\)\s*\{\s*\}\s*;\s*$}x;
like(preprocess_source($before), $after_re,
'Unpack singleton');
# Same thing, but with var before the declaration
$before = q#var MySingleton = new function(){this.x=function(){}} #;
like(preprocess_source($before), $after_re,
"Unpack var'd singleton");
#
# Test unpacking a constructor into a bunch of
# prototype-based declarations
#
$before = q#
/**
* @constructor
*/
function MyClass(){
/** Private variable 'x' */
var x = 3;
/**
* This is my function
*/
this.myFunction = function(){ return null; };
/**
* This is a private function
*/
function myPrivateFunction(x){
return null;
}
}
#;
$after_re = qr{
/\*\*\s*
\*\s*\@constructor\s*
\*/\s*
function\s+MyClass\s*\(\s*\)\s*\{\s*\}\s*
/\*\*\s*Private\svariable\s'x'\s*
\@private\s*\*/\s*
MyClass\.prototype\.x\s*=\s*3\s*;\s*
/\*\*\s*
\*\s*This\sis\smy\sfunction\s*\*/\s*
MyClass\.prototype\.myFunction\s*=\s*function\s*\(\s*\)\s*\{
[^\}]*\}\s*;\s*
/\*\*\s*
\*\s*This\sis\sa\sprivate\sfunction\s*
\@private\s*\*/\s*
MyClass\.prototype\.myPrivateFunction\s*=\s*function\(\s*x\s*\)\s*
\{[^\}]*\}\s*$
}x;
like(preprocess_source($before), $after_re,
'Testing unpacking a constructor into prototype-based assignments');
#
# Test the marking of void methods
#
$before = q'function MyFunc(){}';
$after_re = qr{/\*\*\s*\@type\s+void\s*\*/\s*function\s+MyFunc\s*\(\)\{\}};
like(preprocess_source($before), $after_re,
"Testing basic marking of void method without a docstring");
$before = q'
/** Method */
function MyFunc(){}
';
$after_re = qr{/\*\*\s*Method\s+\@type\s+void\s*\*/\s*
function\s+MyFunc\(\)\{\}}x;
like(preprocess_source($before), $after_re,
"Testing basic marking of void methods");
$before = '/** Method */
Shape.prototype.MyFunc = function(){}';
$after_re = qr{
/\*\*\s*
Method\s+
\@type\s+void\s*
\*/\s*Shape\.prototype\.MyFunc\s*=\s*function\(\)\{\}}x;
like(preprocess_source($before), $after_re,
"Testing marking of void anonymous method");
$before = 'Shape.prototype.MyFunc = function(){return null;}';
$after_re = qr{^\s*Shape\.prototype\.MyFunc\s*=
\s*function\(\)\{[^\}]*\}}x;
like(preprocess_source($before), $after_re,
"Testing marking of void anonymous method");
$before = "function x(){return null;}";
$after_re = qr{\s*function\sx\(\)\s*\{[^\}]*\}\s*$};
like(preprocess_source($before), $after_re,
"Leave non-void methods without docstrings alone");
$before = "/** My test function */\nfunction x(){return null;}";
$after_re = qr{\s*/\*\*\s*My\stest\sfunction\s*\*/\s*
function\sx\(\)\s*\{[^\}]*\}\s*$}x;
like(preprocess_source($before), $after_re,
"Leave non-void methods with docstrings alone");
reset_parser();
$src = q#
/**
* @constructor
*/
function MyClass(){
this.af = afunc;
this.bf = bfunc;
this.cf = cfunc;
function afunc(){}
function bfunc(){}
function cfunc(){}
}
#;
$classes = parse_code_tree(\$src);
ok(eq_set(
[ map { $_->{mapped_name} }
@{$classes->{MyClass}->{instance_methods}}],
['af', 'bf', 'cf', 'afunc', 'bfunc', 'cfunc']),
"Ensure instance methods in constructor are correctly assigned");
reset_parser();
$src = 'function MyFunction(){ return ""; }';
$classes = parse_code_tree(\$src);
ok(!defined($classes->{GLOBALS}->{class_methods}->[0]->{vars}->{type}),
"Ensure a function returning an empty string is not marked as void");
reset_parser();
$src = 'function A(){ var x = "x"; }';
$classes = parse_code_tree(\$src);
ok($classes->{GLOBALS}->{class_methods}->[0]->{vars}->{type}->[0] eq 'void',
"Ensure a global void is void");
reset_parser();
$src = 'function A(c){ c.someFunc = function(){ return 2; }; }';
$classes = parse_code_tree(\$src);
ok($classes->{GLOBALS}->{class_methods}->[0]->{vars}->{type}->[0] eq 'void',
"Ensure inner function definitions don't affect the return type");
reset_parser();
$src = 'function A(c){ c.someFunc = function(){ return 2; }; return ""; }';
$classes = parse_code_tree(\$src);
ok(!defined($classes->{GLOBALS}->{class_methods}->[0]->{vars}->{type}->[0]),
"Ensure inner-function measures don't affect non-void functions");
reset_parser();
$src = '/** @return {int} Description */function f(){}';
$classes = parse_code_tree(\$src);
ok(!defined($classes->{GLOBALS}->{class_methods}->[0]->{vars}->{type}->[0]),
'Methods with a @return tag but no return statement are not marked void');
reset_parser();
$src = 'function f(){ return (true ? "t" : "f");}';
$classes = parse_code_tree(\$src);
ok(!defined($classes->{GLOBALS}->{class_methods}->[0]->{vars}->{type}->[0]),
"Non-void with non-trivial return statement is not marked as void");
#
# Try huge constructor input
#
my @testsrc = (q#
/**
* @class This is class information
* @constructor
*/
function MyClass(){
#);
for (1..30){
push @testsrc, "
/** This is a private method */
function f$_(){ return null; }
/**
* THis is function number $_
* \@return Nothing
*/
this.func$_ = function(){if(true){if(false){return null;}}} ;\n";
}
push @testsrc, "\n}\n";
my $testsrc = join("\n", @testsrc);
# This could crash everything
preprocess_source($testsrc);
pass("Process huge constructor with preprocess_source");
#
# Huge constructor with unbalanced input
#
@testsrc = (q#
/**
* @class This is class information
* @constructor
*/
function MyClass(){
#);
for (1..100){
push @testsrc, "
/**
* THis is function number $_
* \@return Nothing
*/
this.func$_ = function(){if(true){if(false){return null;}};\n";
}
push @testsrc, "\n}\n";
$testsrc = join("\n", @testsrc);
# This could crash everything
preprocess_source($testsrc);
pass("Process huge unbalanced constructor with preprocess_source");
#
# deconstruct_mozilla_getset
#
$before = 'MyClass.prototype.__defineGetter__("myProp", function(){return null;});';
$after_re = qr{
^\s*MyClass\.prototype\.myProp\s*=\s*null\s*;\s*$}x;
#\s*function\s*\(\s*\)\s*\{\s*return\s+null\s*;\s*\}\s*;\s*$}x;
like(deconstruct_getset($before), $after_re,
"Testing behaviour of __defineGetter__");
like(preprocess_source($before), $after_re,
"Testing behaviour of __defineGetter__ in preprocess_source");
$before = 'MyClass.prototype.__defineSetter__("myProp", function(){return null;});';
$after_re = qr{
^\s*MyClass\.prototype\.myProp\s*=\s*null\s*;\s*$}x;
like(deconstruct_getset($before), $after_re,
"Testing behaviour of __defineSetter__");
like(preprocess_source($before), $after_re,
"Testing behaviour of __defineSetter__ in preprocess_source");
reset_parser();
$src = "
function MyFunc(theclass){
var x = 2;
theclass.prototype.f = function(){};
return x;
}
MyClass.prototype.f = function(){};
";
$classes = parse_code_tree(\$src);
ok(not(defined($classes->{theclass})),
"Ensure that dynamic prototyping doesn't add classes");
ok(defined($classes->{MyClass}),
"Ensure that normal classes are added with static prototyping");
#
# miscellaneous tests
#
diag("Miscellaneous tests");
reset_parser();
$src = "
/** \@constructor */
function A(){}
/** \@constructor */
function C(){}
/** \@constructor
\@extends A
*/
function B(){}
B.prototype = new C();";
$classes = parse_code_tree(\$src);
is($classes->{B}->{extends}, 'A',
"Test that the first extends marking is the good one, others are ignored");
reset_parser();
$src = "function A(){ this.n = function(){return 2};}
var a = new A(); ";
$classes = parse_code_tree(\$src);
ok(defined($classes->{A}),
"Functions are later used with 'new' must be treated as a constructor");
ok(!defined($classes->{this}), "'this' cannot be added as a class");
#
# Ensure using the @base tag automatically qualifies a function as a class,
# even if the base class isn't defined
#
reset_parser();
$src = '/** @base SomeOtherClass */
function MyClass(){}';
$classes = parse_code_tree(\$src);
ok(defined($classes->{MyClass}),
'A function must be upgraded to a class if the @base tag is used');
#
# Allow an anonymous function to be assigned to a global variable,
# resulting in a new class
#
reset_parser();
$src = '
/**
* Some function
* @constructor
*/
var SomeClass = function(){ this.x = 2; }
';
$classes = parse_code_tree(\$src);
ok(defined($classes->{SomeClass}),
"Allow anonymous function to be assigned to a global variable");
#
# Make sure that dynamically binding methods to a object at a later time
# do not affect the documentation
#
reset_parser();
$src = '
function AddCallback(obj){
obj.callback = function(){ return null; };
}';
$classes = parse_code_tree(\$src);
ok(!defined($classes->{obj}),
"Don't add passed-in objects as classes when doing dynamic binding");
reset_parser();
$src = '
/** @constructor */
function A(){}
A.prototype.setup = A_Setup;
A.prototype.tearDown = A_TearDown;
function A_Setup(){
this.callback = function(){ return null; };
}
function A_TearDown(){
this.tornDown = true;
}';
$classes = parse_code_tree(\$src);
ok(!defined($classes->{this}),
"Don't add 'this' as a class when dynamically adding methods in a method");
#
# Test block prototype assignment
#
diag("Test block prototype assignment");
reset_parser();
$src = '
SomeClass.prototype = {
funcA: function(){ return null; },
valA: 3,
funcB: function(){ return null; },
valB: "just testing",
funcC: function(){}
};';
$classes = parse_code_tree(\$src);
ok(eq_set(
[ map { $_->{mapped_name} }
@{$classes->{SomeClass}->{instance_methods}}],
['funcA', 'funcB', 'funcC']),
"Ensure instance methods are assigned in prototype definition block");
ok(eq_set(
[ map { $_->{field_name} }
@{$classes->{SomeClass}->{instance_fields}}],
['valA', 'valB']),
"Ensure instance fields are assigned in prototype definition block");
#
# Test prototype assignment
#
diag("Test prototype assignment");
reset_parser();
$src = '
function Base(){}
function Sub(){}
Sub.prototype = new Base();
';
$classes = parse_code_tree(\$src);
ok($classes->{Sub}->{extends} eq 'Base',
"Prototype assignment results in inheritance");
reset_parser();
$src = '
function Base(){}
function Sub(){}
Sub.prototype = new Base;
';
$classes = parse_code_tree(\$src);
ok($classes->{Sub}->{extends} eq 'Base',
"Prototype assignment results in inheritance (2)");
#
# Test the handling of methods defined more than once
#
reset_parser();
$src = '
function f(){}
/** doc */
function f(){}
';
$classes = parse_code_tree(\$src);
ok($classes->{GLOBALS}->{class_methods}->[0]->{description} eq 'doc',
"In case of double function definition, the one with most info wins");
reset_parser();
$src = '
/** doc */
function f(){}
function f(){}
';
$classes = parse_code_tree(\$src);
ok($classes->{GLOBALS}->{class_methods}->[0]->{description} eq 'doc',
"In case of double function definition, the one with most info wins (2)");
#
# Make sure that extra JSDoc-style comment blocks are not viewed as source
#
reset_parser();
$src = '
/** @constructor */
function x(){}
/** more doc
function y(){}
*/
/** @constructor */
function z(){}
';
$classes = parse_code_tree(\$src);
ok(!defined($classes->{GLOBALS}->{class_methods}->[0]),
"Ignore JSDoc in extra JSDoc-comment blocks");
#
# Test the behaviour of the @ignore tag
#
reset_parser();
$src = '
/** This method is normal */
function Normal(){}
/** @ignore */
function Hidden(){}
';
$classes = parse_code_tree(\$src);
my %fnames = map { $_->{mapped_name} => 1 }
@{$classes->{GLOBALS}->{class_methods}};
ok(defined $fnames{Normal}, "A normal method is picked up and documented");
ok(!defined $fnames{Hidden}, 'An @ignored method is not picked up');
#
# Test the behaviour of the @addon tag
#
reset_parser();
$src = '
/**
* Should be ignored
*/
ClassOne.funcOne = function(){};
/**
* Should not be ignored
* @addon
*/
ClassTwo.funcOne = function(){};
ClassThree.prototype = new Object();
ClassThree.funcThree = function(){}';
$classes = parse_code_tree(\$src);
ok(!defined($classes->{ClassOne}),
'Extensions to undefined classes/objects without @addon are ignored');
ok(defined($classes->{ClassTwo}),
'Extensions to undefined classes/objects with @addon are not ignored');
ok($classes->{ClassThree}->{class_methods}->[0]->{mapped_name} eq 'funcThree',
'Class methods without @addon work on pre-defined classes');
#
# Ensure enclosing package-classes are still recognized without using @addon
#
reset_parser();
$src = '
/**
* @constructor
*/
package.MyClass = function MyClass(){}
package.MyClass.prototype.foo = function foo(){}
';
$classes = parse_code_tree(\$src);
ok(defined($classes->{package}),
'Super-package-classes must be recognized without the @addon tag');
ok(defined($classes->{'package.MyClass'}),
'Sub-package-classes must be recognized without the @addon tag');

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,37 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
<TMPL_VAR NAME="project_name"> <TMPL_VAR NAME="filename">
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="<TMPL_VAR NAME="project_name"> <TMPL_VAR NAME="filename">";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<TMPL_IF NAME="logo">
<IMG SRC="<TMPL_VAR NAME="logo">"/>
</TMPL_IF>
<H3 class="FrameHeadingFont"><B><TMPL_VAR NAME="project_name"></B></H3>
<FONT size="+1" CLASS="FrameHeadingFont">
<B><TMPL_VAR NAME="fname_link"></B></FONT>
<BR>
<TABLE BORDER="0" WIDTH="100%">
<TMPL_LOOP name="classnames">
<TR>
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="<TMPL_VAR name="classname">.html" TARGET="classFrame"><TMPL_VAR name="classname"></A>
<BR>
</FONT></TD>
</TR>
</TMPL_LOOP>
</TABLE>
</BODY>
</HTML>

View file

@ -0,0 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>
<TMPL_VAR NAME="project_name"> All Classes
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="<TMPL_VAR NAME="project_name"> All Classes";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<TMPL_IF NAME="logo">
<IMG SRC="<TMPL_VAR NAME="logo">"/>
</TMPL_IF>
<H3 CLASS="FrameHeadingFont"><TMPL_VAR NAME="project_name"></H3>
<FONT size="+1" CLASS="FrameHeadingFont">
<B><a href="overview-summary.html">All Classes</a></B></FONT>
<BR>
<TABLE BORDER="0" WIDTH="100%">
<TMPL_LOOP name="classnames">
<TR>
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="<TMPL_VAR name="classname">.html" ><TMPL_VAR name="classname"></A>
<BR>
</FONT></TD>
</TR>
</TMPL_LOOP>
</TABLE>
</BODY>
</HTML>

View file

@ -0,0 +1,151 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>
<TMPL_VAR NAME="project_name"> Constant Values
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="<TMPL_VAR NAME="project_help"> Constant Values";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD-->
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B><TMPL_VAR NAME="project_name"></B>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<CENTER> <H1>Constant Field Values</H1> </CENTER>
<HR>
<UL>
<TMPL_LOOP NAME="classnames">
<LI><A HREF="#<TMPL_VAR NAME="name">"><TMPL_VAR NAME="name"></A></LI>
</TMPL_LOOP>
</UL>
<HR>
<TMPL_LOOP NAME="static_finals">
<A NAME="<TMPL_VAR NAME="classname">"></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD colspan="2">
<B><A HREF="<TMPL_VAR NAME="classname">.html"><TMPL_VAR NAME="classname"></A></B>
</TD>
</TR>
<TMPL_LOOP NAME="static_values">
<TR>
<TD><CODE><A HREF="<TMPL_VAR NAME="classname">.html#<TMPL_VAR NAME="name">"><TMPL_VAR NAME="name"></A></CODE></TD>
<TD ALIGN="right"><CODE><TMPL_VAR NAME="value"></CODE></TD>
</TR>
</TMPL_LOOP>
</TABLE>
<P>
<P>
</TMPL_LOOP>
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A>&nbsp;</TD>
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD-->
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B><TMPL_VAR NAME="project_name"></B>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<FONT SIZE="-1">
<TMPL_VAR NAME="page_footer">
</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on <TMPL_VAR NAME="ctime"></div>
</BODY>
</HTML>

View file

@ -0,0 +1,160 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>
<TMPL_VAR NAME="project_name"> API Help
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="<TMPL_VAR NAME="project_help"> API Help";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD-->
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B><TMPL_VAR NAME="project_name"></B>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<CENTER>
<H1>
How This API Document Is Organized</H1>
</CENTER>
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.<H3>
Class</H3>
<BLOCKQUOTE>
<P>
Each class has its own separate page. Each of these pages has three sections consisting of a class description, summary tables, and detailed member descriptions:<UL>
<LI>Class inheritance diagram<LI>Direct Subclasses<LI>Class declaration<LI>Class description
<P>
<LI>Field Summary<LI>Constructor Summary<LI>Method Summary
<P>
<LI>Field Detail<LI>Constructor Detail<LI>Method Detail</UL>
Each summary entry contains the first sentence from the detailed description for that item. </BLOCKQUOTE>
<!--H3>
Tree (Class Hierarchy)</H3>
<BLOCKQUOTE>
There is a <A HREF="overview-tree.html">Class Hierarchy</A> page for all classes. The hierarchy page contains a list of classes. The classes are organized by inheritance structure starting with <code>Object</code>.<UL>
</BLOCKQUOTE-->
<!-- H3>
Deprecated API</H3>
<BLOCKQUOTE>
The <A HREF="deprecated-list.html">Deprecated API</A> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</BLOCKQUOTE-->
<H3>
Index</H3>
<BLOCKQUOTE>
The <A HREF="index-all.html">Index</A> contains an alphabetic list of all classes, constructors, methods, and fields.</BLOCKQUOTE>
<H3>
Prev/Next</H3>
These links take you to the next or previous class, interface, package, or related page.<H3>
Frames/No Frames</H3>
These links show and hide the HTML frames. All pages are available with or without frames.
<P>
<FONT SIZE="-1">
<EM>
This help file applies to API documentation generated using the standard doclet.</EM>
</FONT>
<BR>
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A>&nbsp;</TD>
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD-->
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B><TMPL_VAR NAME="project_name"></B>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<FONT SIZE="-1">
<TMPL_VAR NAME="page_footer">
</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on <TMPL_VAR NAME="ctime"></div>
</BODY>
</HTML>

View file

@ -0,0 +1,142 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
Index ()
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="Index ()";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD-->
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B><TMPL_VAR NAME="project_name"></B>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="index-all.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<TMPL_IF NAME="letters">
<!--
Listing of letters
-->
<TMPL_LOOP NAME="letters">&nbsp;<A HREF="index-all.html#__<TMPL_VAR NAME="letter_name">__"><TMPL_VAR NAME="letter_name"></A></TMPL_LOOP>
<HR>
<!-- End letter listing -->
<TMPL_LOOP NAME="index_list">
<A NAME="__<TMPL_VAR NAME="letter">__"><!-- --></A><H2>
<B><TMPL_VAR NAME="letter"></B></H2>
<TMPL_LOOP NAME="value">
<DL>
<DT><A HREF="<TMPL_VAR NAME="class">.html#<TMPL_VAR NAME="linkname">"><B><TMPL_VAR NAME="name"></B></A> -
<TMPL_VAR NAME="type"> class <A HREF="<TMPL_VAR NAME="class">.html"><TMPL_VAR NAME="class"></A>
<DD>&nbsp;
</DL>
</TMPL_LOOP>
<HR>
</TMPL_LOOP>
<!--
Listing of letters
-->
<TMPL_LOOP NAME="letters">&nbsp;<A HREF="index-all.html#__<TMPL_VAR NAME="letter_name">__"><TMPL_VAR NAME="letter_name"></A></TMPL_LOOP>
</TMPL_IF>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A>&nbsp;</TD>
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD-->
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B><TMPL_VAR NAME="project_name"></B>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="index-all.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<FONT SIZE="-1">
<TMPL_VAR NAME="page_footer">
</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/">JSDoc</a> on <TMPL_VAR NAME="ctime"></div>
</BODY>
</HTML>

View file

@ -0,0 +1,27 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>
Generated Javascript Documentation
</TITLE>
</HEAD>
<FRAMESET cols="20%,80%">
<TMPL_IF NAME="multifile">
<FRAMESET rows="40%,50%">
<FRAME src="overview-frame.html" name="overviewFrame">
</TMPL_IF>
<FRAME src="allclasses-frame.html" name="packageFrame">
<TMPL_IF NAME="multifile">
</FRAMESET>
</TMPL_IF>
<FRAME src="<TMPL_VAR name="default_classname">.html" name="classFrame">
</FRAMESET>
<NOFRAMES>
<H2>
Frame Alert</H2>
<P>
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
<BR>
Link to <A HREF="allclasses-frame.html">Non-frame version.</A></NOFRAMES>
</HTML>

View file

@ -0,0 +1,448 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
<TMPL_VAR name="classname">
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="<TMPL_VAR name="classname">";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <TMPL_IF NAME="file_overview"> <A HREF="<TMPL_VAR NAME="file_overview">"></TMPL_IF><FONT CLASS="NavBarFont1"><TMPL_IF NAME="file_overview"><B></TMPL_IF>File<TMPL_IF NAME="file_overview"></B></TMPL_IF></FONT><TMPL_IF NAME="file_overview"></A></TMPL_IF>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">&nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B><TMPL_VAR NAME="project_name"></B>
</EM>
</TD
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<TMPL_IF NAME="prev_class"><A HREF="<TMPL_VAR NAME="prev_class">.html"></TMPL_IF><B>PREV CLASS</B><TMPL_IF NAME="prev_class"></A></TMPL_IF><!--
NEXT CLASS
-->
&nbsp;<TMPL_IF NAME="next_class"><A HREF="<TMPL_VAR NAME="next_class">.html"></TMPL_IF><B>NEXT CLASS</B><TMPL_IF NAME="next_class"></A></TMPL_IF></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="<TMPL_VAR NAME="classname">.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>Class <TMPL_VAR NAME="classname"></H2>
<PRE><TMPL_VAR name="class_tree"></PRE>
<TMPL_IF NAME="subclasses">
<DL>
<DT>
<B>Direct Known Subclasses:</B>
<DD>
<TMPL_VAR NAME="subclasses">
</DD>
</DL>
</TMPL_IF>
<HR>
<DL>
<!-- Class definition -->
<DT><TMPL_IF NAME="class_attribs"><TMPL_VAR NAME="class_attribs">&nbsp;</TMPL_IF>class
<B><TMPL_VAR NAME="classname"></B>
<TMPL_IF NAME="superclass">
<DT>extends <TMPL_VAR NAME="superclass">
</TMPL_IF>
</DL>
<TMPL_IF NAME="class_summary">
<P>
<TMPL_VAR name="class_summary">
</P>
</TMPL_IF>
<HR>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<TMPL_IF NAME="inner_classes">
<A NAME="inner_classes"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TD>
</TR>
<TMPL_LOOP name="inner_classes">
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&lt;static&nbsp;class&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="<TMPL_VAR name="class_name">.html"><TMPL_VAR name="class_name"></A></B></CODE></TD>
</TR>
</TMPL_LOOP>
</TABLE>
&nbsp;
</TMPL_IF>
<!-- ======== END NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<TMPL_IF NAME="fields">
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<!-- This is one instance field summary -->
<TMPL_LOOP name="fields">
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE><TMPL_IF NAME="is_private">&lt;private&gt;&nbsp;</TMPL_IF><TMPL_IF NAME="is_class_field">&lt;static&gt; </TMPL_IF><TMPL_IF NAME="is_final">&nbsp;&lt;final&gt;</TMPL_IF>&nbsp;<TMPL_VAR NAME="type"></CODE></FONT></TD>
<TD><CODE><B><A HREF="#<TMPL_IF NAME="is_class_field">!s!</TMPL_IF><TMPL_VAR name="field_name">"><TMPL_VAR name="field_name"></A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<TMPL_VAR name="field_summary"></TD>
</TR>
</TMPL_LOOP>
</TABLE>
&nbsp;
</TMPL_IF>
<TMPL_LOOP name="field_inheritance">
<TMPL_IF NAME="inherited_fields">
&nbsp;<A NAME=""><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class <A HREF="<TMPL_VAR name="superclass_name">.html"><TMPL_VAR name="superclass_name"></A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>
<TMPL_VAR NAME="inherited_fields">
</CODE></TD>
</TR>
</TABLE>
&nbsp;
</TMPL_IF>
</TMPL_LOOP>
<!-- =========== END FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<TMPL_IF NAME="constructor_args">
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD>
<CODE>
<B>
<A HREF="<TMPL_VAR name="classname">.html#<TMPL_VAR name="classname">()"><TMPL_VAR name="classname"></A>
</B>
<TMPL_VAR name="constructor_args">
</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TMPL_VAR name="constructor_summary">
</TD>
</TR>
</TABLE>
</TMPL_IF>
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<TMPL_IF NAME="methods">
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TMPL_LOOP name="methods">
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
<FONT SIZE="-1">
<CODE><TMPL_IF NAME="is_class_method">&lt;static&gt;</TMPL_IF><TMPL_IF NAME="is_private">&nbsp;&lt;private&gt; </TMPL_IF>&nbsp;<TMPL_VAR NAME="type"></CODE>
</FONT>
</TD>
<TD>
<CODE>
<B>
<A HREF="#<TMPL_IF NAME="is_class_method">!s!</TMPL_IF><TMPL_VAR name="method_name">"><TMPL_VAR name="method_name"></A></B><TMPL_VAR name="method_arguments">
</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TMPL_VAR name="method_summary">
</TD>
</TR>
</TMPL_LOOP>
</TABLE>
</TMPL_IF>
<TMPL_LOOP name="method_inheritance">
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class <a href="<TMPL_VAR name="superclass_name">.html"><TMPL_VAR name="superclass_name"></a></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>
<!-- Inherited methods -->
<TMPL_VAR NAME="inherited_methods">
</CODE></TD>
</TR>
</TABLE>
&nbsp;
</TMPL_LOOP>
<P>
<!-- ========== END METHOD SUMMARY =========== -->
<!-- ============ FIELD DETAIL START =========== -->
<TMPL_IF NAME="fields">
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<TMPL_LOOP NAME="fields">
<A NAME="<TMPL_IF NAME="is_class_field">!s!</TMPL_IF><TMPL_VAR NAME="field_name">"><!-- --></A>
<H3><TMPL_VAR NAME="field_name"></H3>
<PRE><TMPL_IF NAME="is_private">&lt;private&gt;&nbsp;</TMPL_IF><TMPL_IF NAME="is_class_field">&lt;static&gt;&nbsp;</TMPL_IF><TMPL_IF NAME="is_final">&lt;final&gt;&nbsp;</TMPL_IF><TMPL_VAR NAME="type">&nbsp;<B><TMPL_VAR NAME="field_name"></B></PRE>
<UL>
<TMPL_VAR NAME="field_description">
<TMPL_IF NAME="const_link">
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="constant-values.html#java.awt.AWTEvent.COMPONENT_EVENT_MASK">Constant Field Values</A></DL>
</DL>
</TMPL_IF>
</UL>
<HR>
</TMPL_LOOP>
</TMPL_IF>
<!-- ============ FIELD DETAIL END =========== -->
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
<TMPL_IF NAME="constructor_args">
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1>
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
</TD>
</TR>
</TABLE>
<A NAME="<TMPL_VAR name="classname">()"><!-- --></A><H3>
<TMPL_VAR name="classname"></H3>
<PRE><B><TMPL_VAR name="classname"></B><TMPL_VAR name="constructor_args"></PRE>
<TMPL_IF NAME="constructor_detail">
<UL>
<TMPL_VAR name="constructor_detail">
</UL>
</TMPL_IF>
<TMPL_IF name="constructor_params">
<UL>
<B>Parameters:</B>
<TMPL_LOOP name="constructor_params">
<UL><CODE><TMPL_VAR name="varname"></CODE> - <TMPL_VAR name="vardescrip">
</UL>
</TMPL_LOOP>
</TMPL_IF>
</UL>
</TMPL_IF>
<!-- Constructor return value(s) -->
<TMPL_IF name="constructor_returns">
<UL>
<B>Returns:</B>
<UL>
<TMPL_VAR name="constructor_returns">
</UL>
</UL>
</TMPL_IF>
<!-- End constructor return value(s) -->
<!-- ADDITIONAL ATTRIBUTES -->
<TMPL_IF name="constructor_attrs">
<UL>
<TMPL_VAR name="constructor_attrs">
</UL>
</TMPL_IF>
<HR/>
<!-- END ADDITIONAL ATTRIBUTES -->
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
<!-- ============ METHOD DETAIL START ========== -->
<TMPL_IF NAME="methods">
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT>
</TD>
</TR>
</TABLE>
<!-- One single method detail entry -->
<TMPL_LOOP name="methods">
<A NAME="<TMPL_IF NAME="is_class_method">!s!</TMPL_IF><TMPL_VAR name="method_name">"><!-- --></A>
<H3><TMPL_VAR name="method_name"></H3>
<PRE><TMPL_IF NAME="is_class_method">&lt;static&gt; </TMPL_IF><TMPL_IF NAME="is_private">&nbsp;&lt;private&gt; </TMPL_IF><TMPL_VAR NAME="type"> <B><TMPL_VAR name="method_name"></B><TMPL_VAR name="method_arguments"></PRE>
<TMPL_IF name="method_description">
<UL><TMPL_VAR name="method_description"></UL>
</TMPL_IF>
<!-- METHOD PARAMETERS START -->
<TMPL_IF name="method_params">
<UL>
<B>Parameters:</B>
<TMPL_LOOP name="method_params">
<UL><CODE><TMPL_VAR name="varname"></CODE> - <TMPL_VAR name="vardescrip">
</UL>
</TMPL_LOOP>
</UL>
</TMPL_IF>
<!-- METHOD PARAMETERS END -->
<TMPL_IF name="method_returns">
<UL>
<B>Returns:</B>
<UL>
<TMPL_VAR name="method_returns">
</UL>
</UL>
</TMPL_IF>
<!-- ADDITIONAL ATTRIBUTES START -->
<TMPL_IF name="attributes">
<UL>
<TMPL_VAR name="attributes">
</UL>
</TMPL_IF>
<!-- ADDITIONAL ATTRIBUTES END -->
<HR>
</TMPL_LOOP>
</TMPL_IF>
<!-- ============ METHOD DETAIL END ========== -->
<!-- ========= END OF CLASS DATA ========= -->
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <TMPL_IF NAME="file_overview"> <A HREF="<TMPL_VAR NAME="file_overview">"></TMPL_IF><FONT CLASS="NavBarFont1"><TMPL_IF NAME="file_overview"><B></TMPL_IF>File<TMPL_IF NAME="file_overview"></B></TMPL_IF></FONT><TMPL_IF NAME="file_overview"></A></TMPL_IF>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A>&nbsp;</TD>
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B><TMPL_VAR NAME="project_name"></B>
</EM>
</TD
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<TMPL_IF NAME="prev_class"><A HREF="<TMPL_VAR NAME="prev_class">.html"></TMPL_IF><B>PREV CLASS</B><TMPL_IF NAME="prev_class"></A></TMPL_IF><!--
NEXT CLASS
-->
&nbsp;<TMPL_IF NAME="next_class"><A HREF="<TMPL_VAR NAME="next_class">.html"></TMPL_IF><B>NEXT CLASS</B><TMPL_IF NAME="next_class"></A></TMPL_IF></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="<TMPL_VAR NAME="classname">.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<FONT SIZE="-1">
<TMPL_VAR NAME="page_footer">
</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on <TMPL_VAR NAME="ctime"></div>
</BODY>
</HTML>

View file

@ -0,0 +1,43 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>
Overview ()
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="Overview ()";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<TMPL_IF NAME="logo">
<IMG SRC="<TMPL_VAR NAME="logo">"/>
</TMPL_IF>
<H3 class="FrameHeadingFont"><B><TMPL_VAR NAME="project_name"></B></H3>
<TABLE BORDER="0" WIDTH="100%">
<TR>
<B></B></FONT></TD>
</TR>
</TABLE>
<TABLE BORDER="0" WIDTH="100%">
<TR>
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="allclasses-frame.html" TARGET="packageFrame">All Classes</A></FONT>
<P>
<FONT size="+1" CLASS="FrameHeadingFont">
Files</FONT>
<BR>
<TMPL_LOOP name="filenames">
<FONT CLASS="FrameItemFont"><A HREF="overview-<TMPL_VAR NAME="mangledfilename">.html" TARGET="packageFrame"><TMPL_VAR NAME="filename"></A></FONT><BR>
</TMPL_LOOP>
</TD>
</TR>
</TABLE>
<P>
&nbsp;
</BODY>
</HTML>

View file

@ -0,0 +1,222 @@
<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
<tmpl_var name="project_name"> Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
<tmpl_if name="is_file_summary">
parent.document.title="<tmpl_var name="project_title"> Overview";
<tmpl_else>
parent.document.title="<tmpl_var name="project_name"> Overview";
</tmpl_if>
}
</script>
</head>
<body bgcolor="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tr align="center" valign="top">
<tmpl_unless name="is_file_summary">
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> &nbsp;<font class="NavBarFont1Rev"><b>Overview</b></font>&nbsp;</td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <font class="NavBarFont1">File</font>&nbsp;</td>
<tmpl_else>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> &nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
</tmpl_unless>
<td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b><tmpl_var name="project_name"></b></em>
</td>
</tr>
<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
<a href="index.html" target="_top"><b>FRAMES</b></a> &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->
<hr>
<center>
<tmpl_if name="project_title">
<h2><tmpl_var name="project_title"></h2>
<tmpl_else>
<h2>JSDoc Documentation</h2>
</tmpl_if>
</center>
<tmpl_if name="project_title">
<tmpl_if name="generic">
<p>
This document is the API Specification for
<tmpl_var name="project_title">.
</p>
</tmpl_if>
</tmpl_if>
<h4>Summary</h4>
<p>
<tmpl_if name="project_summary">
<tmpl_var name="project_summary">
<tmpl_else>
No summary generated for these documents.
</tmpl_if>
</p>
<hr>
<tmpl_if name="overviews">
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan=2><font size="+2">
<tmpl_if name="is_file_summary">
<b>Class Summary</b>
<tmpl_else>
<b>File Summary</b>
</tmpl_if>
</font></td>
</tr>
<tmpl_loop name="overviews">
<tr bgcolor="white" class="TableRowColor">
<td width="15%"><b><a href="<TMPL_VAR NAME="link">"><tmpl_var name="name"></a></b></td>
<td><tmpl_var name="overview"></td>
</tr>
</tmpl_loop>
</table>
<hr/>
</tmpl_if>
<!-- ========== METHOD SUMMARY =========== -->
<tmpl_if name="methods">
<a name="method_summary"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan=2>
<font size="+2">
<b>Method Summary</b>
</font>
</td>
</tr>
<tmpl_loop name="methods">
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code><tmpl_if name="is_class_method">static</tmpl_if><tmpl_if name="is_private">&nbsp;private </tmpl_if>&nbsp;<tmpl_var name="type"></code>
</font>
</td>
<td>
<code>
<b>
<a href="<TMPL_VAR NAME="file_link">#<TMPL_VAR name="method_anchor">"><tmpl_var name="method_name"></a></b><tmpl_var name="method_arguments">
</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<tmpl_var name="method_summary">
</td>
</tr>
</tmpl_loop>
</table>
<p>
</tmpl_if>
<!-- ========== END METHOD SUMMARY =========== -->
<tmpl_if name="sourcecode">
<pre class="sourceview"><tmpl_var name="sourcecode"></pre>
<hr>
</tmpl_if>
<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tr align="center" valign="top">
<tmpl_unless name="is_file_summary">
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> &nbsp;<font class="NavBarFont1Rev"><b>Overview</b></font>&nbsp;</td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <font class="NavBarFont1">File</font>&nbsp;</td>
<tmpl_else>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> &nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
</tmpl_unless>
<td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b><tmpl_var name="project_name"></b></em>
</td>
</tr>
<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
<a href="index.html" target="_top"><b>FRAMES</b></a> &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->
<hr>
<font size="-1">
<tmpl_var name="page_footer">
</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on <tmpl_var name="ctime"></div>
</body>
</html>

View file

@ -0,0 +1,121 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
<TMPL_VAR name="project_name"> Class Hierarchy
</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT>
function asd()
{
parent.document.title="<TMPL_VAR NAME="project_name"> Class Hierarchy";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"><A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><b>Overview</b></A></FONT>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><b>Tree</b></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><b>Index</b></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><b>Help</b></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD BGCOLOR="#FFFFFF" ALIGN="right" VALIGN="top"><EM>
<B><TMPL_VAR NAME="project_name"></B></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="overview-summary.html" TARGET="_top"><B>NO FRAMES</B></A>
&nbsp;&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<H2>Class Hierarchy</H2>
<TMPL_VAR name="classtrees">
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"><A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><b>Overview</b></A></FONT>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><b>Tree</b></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><b>Index</b></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><b>Help</b></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD BGCOLOR="#FFFFFF" ALIGN="right" VALIGN="top"><EM>
<B><TMPL_VAR NAME="project_name"></B></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="overview-summary.html" TARGET="_top"><B>NO FRAMES</B></A>
&nbsp;&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<hr>
<FONT SIZE="-1">
<TMPL_VAR NAME="page_footer">
</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" parent="_parent">JSDoc</a> on <TMPL_VAR NAME="ctime"></div>
</BODY>
</HTML>

View file

@ -0,0 +1,39 @@
/* JSDoc style sheet */
/* Define colors, fonts and other style attributes here to override the defaults */
/* Page background color */
body { background-color: #FFFFFF }
/* Table colors */
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
.TableRowColor { background: #FFFFFF } /* White */
/* Font used in left-hand frame lists */
.FrameTitleFont { font-size: 10pt; font-family: Helvetica, Arial, san-serif }
.FrameHeadingFont { font-size: 10pt; font-family: Helvetica, Arial, san-serif }
.FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, san-serif }
/* Example of smaller, sans-serif font in frames */
/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
/* Navigation bar fonts and colors */
.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */
.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
.jsdoc_ctime { font-family: Arial, Helvetica, sans-serif; font-size: 9pt;
text-align: right }
/* Sourcecode view */
.sourceview { background: #FFFFFF }
.attrib { color: #DD7777 }
.comment { color: #55AA55 }
.reserved { color: #FF5555 }
.literal { color: #5555FF }

View file

@ -0,0 +1,505 @@
/**
* @fileoverview This file is to be used for testing the JSDoc parser
* It is not intended to be an example of good JavaScript OO-programming,
* nor is it intended to fulfill any specific purpose apart from
* demonstrating the functionality of the
* {@link http://sourceforge.net/projects/jsdoc JSDoc} parser
*
* @author Gabriel Reid gab_reid@users.sourceforge.net
* @version 0.1
*/
/**
* Construct a new Shape object.
* @class This is the basic Shape class.
* It can be considered an abstract class, even though no such thing
* really existing in JavaScript
* @constructor
* @throws MemoryException if there is no more memory
* @throws GeneralShapeException rarely (if ever)
* @return A new shape
*/
function Shape(){
/**
* This is an example of a function that is not given as a property
* of a prototype, but instead it is assigned within a constructor.
* For inner functions like this to be picked up by the parser, the
* function that acts as a constructor <b>must</b> be denoted with
* the <b>&#64;constructor</b> tag in its comment.
* @type String
*/
this.getClassName = function(){
return "Shape";
}
/**
* This is a private method, just used here as an example
*/
function addReference(){
// Do nothing...
}
}
/**
* Create a new Hexagon instance.
* @extends Shape
* @class Hexagon is a class that is a <i>logical</i> sublcass of
* {@link Shape} (thanks to the <code>&#64;extends</code> tag), but in
* reality it is completely unrelated to Shape.
* @param {int} sideLength The length of one side for the new Hexagon
*/
function Hexagon(sideLength) {
}
/**
* This is an unattached (static) function that adds two integers together.
* @param {int} One The first number to add
* @param {int http://jsdoc.sourceforge.net/} Two The second number to add
* @author Gabriel Reid
* @deprecated So you shouldn't use it anymore!
*/
function Add(One, Two){
return One + Two;
}
/**
* The color of this shape
* @type Color
*/
Shape.prototype.color = null;
/**
* The border of this shape.
* @type int
*/
Shape.prototype.border = null;
/*
* The assignment of function implementations for Shape, documentation will
* be taken over from the method declaration.
*/
Shape.prototype.getCoords = Shape_GetCoords;
Shape.prototype.getColor = Shape_GetColor;
Shape.prototype.setCoords = Shape_SetCoords;
Shape.prototype.setColor = Shape_SetColor;
/*
* These are all the instance method implementations for Shape
*/
/**
* Get the coordinates of this shape. It is assumed that we're always talking
* about shapes in a 2D location here.
* @requires Shape The shape class
* @returns A Coordinate object representing the location of this Shape
* @type Coordinate
*/
function Shape_GetCoords(){
return this.coords;
}
/**
* Get the color of this shape.
* @see #setColor
* @type Color
*/
function Shape_GetColor(){
return this.color;
}
/**
* Set the coordinates for this Shape
* @param {Coordinate} coordinates The coordinates to set for this Shape
*/
function Shape_SetCoords(coordinates){
this.coords = coordinates;
}
/**
* Set the color for this Shape
* @param {Color} color The color to set for this Shape
* @param other There is no other param, but it can still be documented if
* optional parameters are used
* @throws NonExistantColorException (no, not really!)
* @see #getColor
*/
function Shape_SetColor(color){
this.color = color;
}
/**
* Clone this shape
* @returns A copy of this shape
* @type Shape
* @author Gabriel Reid
*/
Shape.prototype.clone = function(){
return new Shape();
}
/**
* Create a new Rectangle instance.
* @class A basic rectangle class, inherits from Shape.
* This class could be considered a concrete implementation class
* @constructor
* @param {int} width The optional width for this Rectangle
* @param {int} height Thie optional height for this Rectangle
* @author Gabriel Reid
* @see Shape Shape is the base class for this
*/
function Rectangle(width, // This is the width
height // This is the height
){
if (width){
this.width = width;
if (height){
this.height = height;
}
}
}
/* Inherit from Shape */
Rectangle.prototype = new Shape();
/**
* Value to represent the width of the Rectangle.
* <br>Text in <b>bold</b> and <i>italic</i> and a
* link to <a href="http://sf.net">SourceForge</a>
* @private
* @type int
*/
Rectangle.prototype.width = 0;
/**
* Value to represent the height of the Rectangle
* @private
* @type int
*/
Rectangle.prototype.height = 0;
/**
* Get the type of this object.
* @type String
*/
Rectangle.prototype.getClassName= function(){
return "Rectangle";
}
/*
* These are all the instance method implementations for Rectangle
*/
Rectangle.prototype.getWidth = Rectangle_GetWidth;
Rectangle.prototype.getHeight = Rectangle_GetHeight;
Rectangle.prototype.setWidth = Rectangle_SetWidth;
Rectangle.prototype.setHeight = Rectangle_SetHeight;
Rectangle.prototype.getArea = Rectangle_GetArea;
/**
* Get the value of the width for the Rectangle
* @type int
* @see #setWidth
*/
function Rectangle_GetWidth(){
return this.width;
}
/**
* Get the value of the height for the Rectangle.
* Another getter is the {@link Shape#getColor} method in the
* {@link Shape base Shape class}.
* @return The height of this Rectangle
* @type int
* @see #setHeight
*/
function Rectangle_GetHeight(){
return this.height;
}
/**
* Set the width value for this Rectangle.
* @param {int} width The width value to be set
* @see #getWidth
*/
function Rectangle_SetWidth(width){
this.width = width;
}
/**
* Set the height value for this Rectangle.
* @param {int} height The height value to be set
* @see #getHeight
*/
function Rectangle_SetHeight(height){
this.height = height;
}
/**
* Get the value for the total area of this Rectangle
* @return total area of this Rectangle
* @type int
*/
function Rectangle_GetArea(){
return width * height;
}
/**
* Create a new Square instance.
* @class A Square is a subclass of {@link Rectangle}
* @param {int} width The optional width for this Rectangle
* @param {int} height The optional height for this Rectangle
*/
function Square(width, height){
if (width){
this.width = width;
if (height){
this.height = height;
}
}
}
/* Square is a subclass of Rectangle */
Square.prototype = new Rectangle();
/*
* The assignment of function implementation for Shape.
*/
Square.prototype.setWidth = Square_SetWidth;
Square.prototype.setHeight = Square_SetHeight;
/**
* Set the width value for this Square.
* @param {int} width The width value to be set
* @see #getWidth
*/
function Square_SetWidth(width){
this.width = this.height = width;
}
/**
* Set the height value for this Square
* Sets the {@link Rectangle#height height} attribute in the Rectangle.
* @param {int} height The height value to be set
*/
function Square_SetHeight(height){
this.height = this.width = height;
}
/**
* Create a new Circle instance based on a radius.
* @class Circle class is another subclass of Shape
* @param {int} radius The optional radius of this Circle
*/
function Circle(radius){
if (radius){
this.radius = radius;
}
}
/* Circle inherits from Shape */
Circle.prototype = new Shape();
/**
* The radius value for this Circle
* @private
* @type int
*/
Circle.prototype.radius = 0;
/**
* A very simple class (static) field that is also a constant
* @final
* @type float
*/
Circle.PI = 3.14;
Circle.createCircle = Circle_CreateCircle;
Circle.prototype.getRadius = Circle_GetRadius;
Circle.prototype.setRadius = Circle_SetRadius;
/**
* Get the radius value for this Circle
* @type int
* @see #setRadius
*/
function Circle_GetRadius(){
return this.radius;
}
/**
* Set the radius value for this Circle
* @param {int} radius The radius value to set
* @see #getRadius
*/
function Circle_SetRadius(radius){
this.radius = radius;
}
/**
* An example of a class (static) method that acts as a factory for Circle
* objects. Given a radius value, this method creates a new Circle.
* @param {int} radius The radius value to use for the new Circle.
* @type Circle
*/
function Circle_CreateCircle(radius){
return new Circle(radius);
}
/**
* Create a new Coordinate instance based on x and y grid data.
* @class Coordinate is a class that can encapsulate location information.
* @param {int} x The optional x portion of the Coordinate
* @param {int} y The optinal y portion of the Coordinate
*/
function Coordinate(x, y){
if (x){
this.x = x;
if (y){
this.y = y;
}
}
}
/**
* The x portion of the Coordinate
* @type int
* @see #getX
* @see #setX
*/
Coordinate.prototype.x = 0;
/**
* The y portion of the Coordinate
* @type int
* @see #getY
* @see #setY
*/
Coordinate.prototype.y = 0;
Coordinate.prototype.getX = Coordinate_GetX;
Coordinate.prototype.getY = Coordinate_GetY;
Coordinate.prototype.setX = Coordinate_SetX;
Coordinate.prototype.setY = Coordinate_SetY;
/**
* Gets the x portion of the Coordinate.
* @type int
* @see #setX
*/
function Coordinate_GetX(){
return this.x;
}
/**
* Get the y portion of the Coordinate.
* @type int
* @see #setY
*/
function Coordinate_GetY(){
return this.y;
}
/**
* Sets the x portion of the Coordinate.
* @param {int} x The x value to set
* @see #getX
*/
function Coordinate_SetX(x){
this.x = x;
}
/**
* Sets the y portion of the Coordinate.
* @param {int} y The y value to set
* @see #getY
*/
function Coordinate_SetY(y){
this.y = y;
}
/**
* @class This class exists to demonstrate the assignment of a class prototype
* as an anonymous block.
*/
function ShapeFactory(){
}
ShapeFactory.prototype = {
/**
* Creates a new {@link Shape} instance.
* @return A new {@link Shape}
* @type Shape
*/
createShape: function(){
return new Shape();
}
}
/**
* An example of a singleton class
*/
MySingletonShapeFactory = new function(){
/**
* Get the next {@link Shape}
* @type Shape
* @return A new {@link Shape}
*/
this.getShape = function(){
return null;
}
}
/**
* Create a new Foo instance.
* @class This is the Foo class. It exists to demonstrate 'nested' classes.
* @constructor
* @see Foo.Bar
*/
function Foo(){}
/**
* Creates a new instance of Bar.
* @class This class exists to demonstrate 'nested' classes.
* @constructor
* @see Foo.Bar
*/
function Bar(){}
/**
* Nested class
* @constructor
*/
Foo.Bar = function(){this.x = 2;}
Foo.Bar.prototype = new Bar();
Foo.Bar.prototype.y = '3';

View file

@ -0,0 +1,69 @@
::
:: Jala Project [http://opensvn.csie.org/traccgi/jala]
::
:: Copyright 2004 ORF Online und Teletext GmbH
::
:: Licensed under the Apache License, Version 2.0 (the ``License'');
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an ``AS IS'' BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
::
:: $Revision$
:: $LastChangedBy$
:: $LastChangedDate$
:: $HeadURL$
::
@echo off
rem This is build.bat for Ant 1.7
rem Define the path to the ANT binary directory
rem (traling slash is mandatory!)
rem set ANT_HOME=%PROGRAMFILES%\Apache Group\apache-ant-1.7.0\bin\
rem Set this to the directory of your Helma installation if necessary
set HELMA_HOME=""
rem ==========================================================================
rem No need to edit anything past here
rem store path of this script as BUILD_HOME
set BUILD_HOME=%~dp0
rem Set this to the directory of your Helma installation
if "%HELMA_HOME%"=="""" set HELMA_HOME="%BUILD_HOME%/../../../.."
rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
set ANT_CMD_LINE_ARGS=%1
if ""%1""=="""" goto runAnt
shift
:setupArgs
if ""%1""=="""" goto runAnt
if ""%1""==""-noclasspath"" goto runAnt
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs
:runAnt
rem ---- if there is no build.xml in the working directory, use the library
rem ---- in this directory
if not exist ".\build.xml" (
set ANT_CMD_LINE_ARGS=-file "%BUILD_HOME%lib.xml" %ANT_CMD_LINE_ARGS%
)
echo BUILD_HOME: %BUILD_HOME%
ant -Dant.home=. -Dbasedir=. -lib "%BUILD_HOME%\lib;%HELMA_HOME%\lib" -propertyfile "%CD%\build.properties" %ANT_CMD_LINE_ARGS%
:end

View file

@ -0,0 +1,71 @@
#!/bin/sh
##
## Jala Project [http://opensvn.csie.org/traccgi/jala]
##
## Copyright 2004 ORF Online und Teletext GmbH
##
## Licensed under the Apache License, Version 2.0 (the ``License'');
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an ``AS IS'' BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## $Revision: 3 $
## $LastChangedBy: tobi $
## $LastChangedDate: 2007-01-19 14:33:08 +0100 (Fri, 19 Jan 2007) $
## $HeadURL: https://robert@opensvn.csie.org/jala/trunk/util/HopKit/build.bat $
##
# Uncomment and set this to the directory of your Helma installation
# if you installed jala in a different subdirectory than "modules/jala"
# HELMA_HOME="path/to/helma/installation"
#--------------------------------------------
# No need to change anything below
# buildfile for ant 1.7.0
#--------------------------------------------
if test -z "${ANT_HOME}" ; then
echo "ERROR: ANT_HOME not found in your environment."
echo "Please, set the ANT_HOME variable in your environment to match the"
echo "location of the Apache Ant installation you want to use."
exit
fi
#---- store path of this script as BUILD_HOME
BUILD_HOME=$(dirname $0)
if [ "${BUILD_HOME:0:1}" != "/" ] ; then
# convert to absolute path
BUILD_HOME=${PWD}/${BUILD_HOME}
fi
export BUILD_HOME
#---- store HELMA_HOME if not defined above
if [ -z "$HELMA_HOME" ] ; then
HELMA_HOME=$BUILD_HOME/../../../..
fi
#---- Slurp the command line arguments.
while [ $# -ne 0 ]
do
ANT_CMD_LINE_ARGS="${ANT_CMD_LINE_ARGS} $1"
shift
done
#---- if there is no build.xml in the working directory, use the lib.xml
#---- in this directory
if test ! -f ${PWD}/build.xml ; then
BUILD_XML="${BUILD_HOME}/lib.xml"
else
BUILD_XML="${PWD}/build.xml"
fi
${ANT_HOME}/bin/ant -Dant.home="${BUILD_HOME}" -Dbasedir="${PWD}" -lib "${BUILD_HOME}/lib:${HELMA_HOME}/lib" -propertyfile "${PWD}/build.properties" -file $BUILD_XML ${ANT_CMD_LINE_ARGS}
exit

107
modules/jala/util/HopKit/js.bat Executable file
View file

@ -0,0 +1,107 @@
::
:: Jala Project [http://opensvn.csie.org/traccgi/jala]
::
:: Copyright 2004 ORF Online und Teletext GmbH
::
:: Licensed under the Apache License, Version 2.0 (the ``License'');
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an ``AS IS'' BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
::
:: $Revision$
:: $LastChangedBy$
:: $LastChangedDate$
:: $HeadURL$
::
@echo off
set HOPKIT=%~dp0
set JAVA=java
set JSJAR="%HOPKIT%\lib\js.jar"
set JSTOOLS=org.mozilla.javascript.tools
goto %1
rem -- S H E L L --
:shell
if "%2"=="" (
%JAVA% -cp "%JSJAR%" "%JSTOOLS%.shell.Main"
) else (
%JAVA% -cp "%JSJAR%" "%JSTOOLS%.shell.Main" "%2"
)
goto end
rem -- T E S T --
:test
rem -- C O M P I L E --
:compile
%JAVA% -cp "%JSJAR%" "%JSTOOLS%.jsc.Main" -nosource "%2"
goto end
rem -- L I N T --
:lint
%JAVA% -cp "%JSJAR%" "%JSTOOLS%.shell.Main jslint.js" "%2"
goto end
rem -- D O C S --
:docs
if "%3"=="" (
set DOCDIR=docs
) else (
set DOCDIR=%3
)
"%HOPKIT%\JSDoc\jsdoc.pl" -q -r -d "%DOCDIR%" --template-dir "%HOPKIT%/JSDoc/templates" --package-naming --globals-name Global --project-name "%2" --project-summary "./.jsdoc/summary.html" .
goto end
rem -- M I N I F Y --
:minify
"%HOPKIT%\jsmin" "%2"
rem -- P A C K --
:pack
rem -- H E L P --
:help
echo Currently the following build targets are supported:
echo docs - Create JSDoc API documentation.
echo help - Output this information.
echo compile - Compile a JavaScript file as Java class.
echo lint - Apply JavaScript Lint to a file.
echo minify - Minify JavaScript source files.
rem echo pack - Pack and obsfucate JavaScript source files.
echo shell - Start Rhino's interactive JavaScript shell.
echo test - Apply unit tests to JavaScript code.
rem -- E N D --
:end

View file

@ -0,0 +1,433 @@
<?xml version="1.0"?>
<project name="jala-utils" default="usage">
<property environment="env"/>
<property name="work" value="${env.BUILD_HOME}/work" />
<!-- load javascript libraries -->
<loadfile property="file_jsmin" srcFile="${env.BUILD_HOME}/scripts/jsmin.js" />
<loadfile property="file_jslint" srcFile="${env.BUILD_HOME}/scripts/jslint.js" />
<loadfile property="file_jsant" srcFile="${env.BUILD_HOME}/scripts/jsant.js" />
<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
<target name="help" depends="usage" />
<target name="usage">
<echo message="" />
<echo message=" Available targets are:" />
<echo message=" jslint -> Run jslint on the current directory (validation)" />
<echo message=" docs -> Run jsdoc on a helma application" />
<echo message=" pot -> Parse i18n methods out of function files and skins and" />
<echo message=" create a gettext template file." />
<echo message=" messages -> Compile Gnu PO-files into JavaScript message files" />
<echo message="" />
<echo message=" Macro definitions that can be used in other build files:" />
<echo message=" - jslint" />
<echo message=" - jsdoc" />
<echo message=" - jsmin" />
<echo message="" />
<echo message=" See comments inside this file (lib.xml) for more details." />
<echo message="----------------------------------------------------------" />
<echo message="" />
<echo message="" />
</target>
<!-- =================================================================== -->
<!-- Validates a version -->
<!-- =================================================================== -->
<target name="jslint">
<echo message="Validating source files in ${user.dir}" />
<jslint printWarnings="true" failOnError="false">
<fileset dir="${user.dir}" includes="**/*.js" />
</jslint>
</target>
<!-- =================================================================== -->
<!-- Create documentation for a Helma application with jsdoc.pl -->
<!-- =================================================================== -->
<target name="hopdoc">
<input message="Directory containing the application code (./code):"
addproperty="docs.source" defaultvalue="./code" />
<input message="Destination directory for the documentation (./docs):"
addproperty="docs.destination" defaultvalue="./docs" />
<input message="Name of the project:"
addproperty="docs.projectName" defaultvalue="" />
<!-- convert inputs to absolute paths -->
<property name="srcdir" location="${docs.source}" />
<property name="destdir" location="${docs.destination}" />
<mkdir dir="${work}" />
<helmadoc srcdir="${srcdir}"
destdir="${destdir}"
projectName="${docs.projectName}" />
<delete dir="${work}" />
</target>
<!-- =================================================================== -->
<!-- Create documentation with jsdoc.pl -->
<!-- =================================================================== -->
<target name="docs">
<input message="Directory containing the code (./code):"
addproperty="docs.source" defaultvalue="./code" />
<input message="Destination directory for the documentation (./docs):"
addproperty="docs.destination" defaultvalue="./docs" />
<input message="Name of the project:"
addproperty="docs.projectName" defaultvalue="" />
<!-- convert inputs to absolute paths -->
<property name="srcdir" location="${docs.source}" />
<property name="destdir" location="${docs.destination}" />
<mkdir dir="${work}" />
<jsdoc srcdir="${srcdir}"
destdir="${destdir}"
projectName="${docs.projectName}" />
<delete dir="${work}" />
</target>
<!-- =================================================================== -->
<!-- Parse i18n methods and macros in function files and skins -->
<!-- and create a GNU gettext compatible template file -->
<!-- =================================================================== -->
<target name="pot">
<input message="Name of the template file to generate:"
addproperty="i18n.template" defaultvalue="messages.pot" />
<echo message="Using '${i18n.template}' as output" />
<input message="Directories containing code/skins separated by spaces:"
addproperty="i18n.scan" />
<input message="Encoding of code/skin files (default is UTF-8):"
addproperty="i18n.fileEncoding" />
<!-- convert inputs to absolute paths -->
<property name="dest" location="${i18n.template}" />
<property name="src" location="${i18n.scan}" />
<java classname="org.mozilla.javascript.tools.shell.Main">
<arg value="${env.BUILD_HOME}/scripts/MessageParser.js" />
<arg value="-o" />
<arg value="${dest}" />
<arg value="-e" />
<arg value="${i18n.fileEncoding}" />
<arg line="${src}" />
</java>
</target>
<!-- =================================================================== -->
<!-- Generates JavaScript message files out of the .po files in a given -->
<!-- directory -->
<!-- =================================================================== -->
<target name="messages">
<input message="Directory containing PO-files:"
addproperty="i18n.poDirectory" />
<input message="Destination directory for generated message files:"
addproperty="i18n.destination" />
<input message="Namespace to use for generated messages (optional):"
addproperty="i18n.namespace" />
<!-- convert inputs to absolute paths -->
<property name="src" location="${i18n.poDirectory}" />
<property name="dest" location="${i18n.destination}" />
<echo message="Generating message files from PO-files in '${src}'..." />
<echo message="Using '${dest}' as output directory" />
<java classname="org.mozilla.javascript.tools.shell.Main">
<arg value="${env.BUILD_HOME}/scripts/PoParser.js" />
<arg value="${src}" />
<arg value="${dest}" />
<arg line="${i18n.namespace}" />
</java>
</target>
<!-- =================================================================== -->
<!-- Create documentation with jsdoc.pl -->
<!-- =================================================================== -->
<macrodef name="jsdoc">
<attribute name="srcdir" />
<attribute name="destdir" />
<attribute name="projectName" />
<sequential>
<echo message="Generating JSDoc API documentation for @{srcdir}" />
<property name="workJSdoc" value="${work}/jsdoc-worker" />
<mkdir dir="${workJSdoc}" />
<copy todir="${workJSdoc}">
<fileset dir="@{srcdir}">
<exclude name=".svn/**" />
<include name="**/*.js" />
</fileset>
</copy>
<mkdir dir="@{destdir}" />
<exec executable="perl">
<arg value="${env.BUILD_HOME}/JSDoc/jsdoc.pl" />
<arg value="--template-dir=${env.BUILD_HOME}/JSDoc/templates" />
<arg value="-d=@{destdir}" />
<arg value="--extensions=js" />
<arg value="--no-sources" />
<arg value="--recursive" />
<arg value="--quiet" />
<arg value="--package-naming" />
<arg value="--project-name=@{projectName}" />
<arg value="--project-summary=@{srcdir}/.jsdoc/summary.html" />
<arg value="--globals-name=Global" />
<arg value="${workJSdoc}" />
</exec>
<delete dir="${workJSdoc}" />
</sequential>
</macrodef>
<!-- =================================================================== -->
<!-- Create documentation for a helma appplication with jsdoc.pl -->
<!-- (copies the application to a temp directory, works on the js -->
<!-- source code to make it work with jsdoc and runs the doc task) -->
<!-- =================================================================== -->
<macrodef name="helmadoc">
<attribute name="srcdir" />
<attribute name="destdir" />
<attribute name="projectName" />
<sequential>
<echo message="Generating API specification for Helma application in @{srcdir}" />
<property name="workHelmadoc" value="${work}/helmadocs-worker" />
<mkdir dir="${workHelmadoc}" />
<copy todir="${workHelmadoc}">
<fileset dir="@{srcdir}">
<exclude name=".svn/**" />
<include name="**/*.js" />
<include name="**/*.hac" />
<include name="**/*.properties" />
</fileset>
</copy>
<echo message="Preparing files for JSDoc ..." />
<script language="javascript"> <![CDATA[
// load libraries:
eval(file_jsant);
var fs = project.createDataType("fileset");
fs.setDir(new java.io.File(workHelmadoc));
fs.setIncludes("**/*.js,**/*.hac,**/*.properties");
fs.setExcludes("app.properties,db.properties,Global/**");
var ds = fs.getDirectoryScanner(project);
var srcFiles = ds.getIncludedFiles();
var files = [];
for (var i=0; i<srcFiles.length; i++) {
var f = new java.io.File(workHelmadoc + "/" + srcFiles[i]);
files[files.length] = f.getCanonicalPath();
}
// slice filename into dir (= name of prototype), filename, file-extension
var fileNameReg = /([^\\\/]+)[\\\/]([^\\\/]+)\.([^\.]*)$/i;
// find plain function definitions
var functionReg = /(^|[^=]\s+)function\s+(\w+)\s*\(/gi;
// find constructor functions (after replacing plain function definitions
var ctorReg = /.prototype.constructor/gi;
// find object/collection/mountpoint mappings in type.properties
var mappingReg = /(.*)\s*\(\s*(.*)\s*\)/;
// store helper javascripts
var propsDef = "";
// keep track of constructor functions
var ctorTracker = {};
for (var i=0; i<files.length; i++) {
var fileNameResult = files[i].match(fileNameReg);
if (ctorTracker[fileNameResult[1]] === null) {
ctorTracker[fileNameResult[1]] = false;
}
var content = Util.readFile(files[i]);
if (fileNameResult[3].toLowerCase() == "properties") {
// add mappings of type.properties to the field summary
var props = Util.loadProperties(files[i]);
for (var e=props.keys(); e.hasMoreElements();) {
var key = e.nextElement();
var value = props.getProperty(key);
if (key.indexOf(".") > -1 || (key.indexOf("_") == 0 && key != "_id" && key != "_children")) {
continue;
}
var re = value.match(mappingReg);
if (re) {
propsDef += "/**\n * mapped to " + re[1] + "\n * {@link " + re[2].capitalize() + "}\n */\n";
} else {
propsDef += "/** mapped to database column <b>" + value + "</b> */\n";
}
propsDef += fileNameResult[1] + ".prototype." + key + " = null;\n\n";
}
} else if (fileNameResult[3].toLowerCase() == "hac") {
// wrap helma action files in a block: function XXX_action { }
var str = fileNameResult[1] + ".prototype." + fileNameResult[2] + "_action = function() {\n" + content + "\n}\n";
Util.writeToFile(files[i], str);
} else {
// in common javascript files switch to .prototype. definition
var str = content.replace(functionReg, "$1" + fileNameResult[1] + ".prototype.$2 = function(");
if (str.match(ctorReg)) {
str = str.replace(ctorReg, "");
ctorTracker[fileNameResult[1]] = true;
}
Util.writeToFile(files[i], str);
}
}
// all constructors that haven't been defined in functions are added to helper-file
for (var key in ctorTracker) {
if (key.toLowerCase() == "root" || key.toLowerCase() == "hopobject") {
continue;
}
if (ctorTracker[key] === false) {
propsDef += "function " + key + "(){return;}\n"
}
}
var file = Util.getFile(workHelmadoc, "definitions.js");
Util.writeToFile(file, propsDef);
]]> </script>
<echo message="... prepared files for JSDoc." />
<mkdir dir="@{destdir}" />
<exec executable="perl">
<arg value="${env.BUILD_HOME}/JSDoc/jsdoc.pl" />
<arg value="--template-dir=${env.BUILD_HOME}/JSDoc/templates" />
<arg value="-d=@{destdir}" />
<arg value="--extensions=js,hac,properties" />
<arg value="--no-sources" />
<arg value="--recursive" />
<arg value="--quiet" />
<arg value="--package-naming" />
<arg value="--project-name=@{projectName}" />
<arg value="--project-summary=@{srcdir}/.jsdoc/summary.html" />
<arg value="--globals-name=Global" />
<arg value="${workHelmadoc}" />
</exec>
<delete dir="${workHelmadoc}" />
</sequential>
</macrodef>
<!-- =================================================================== -->
<!-- Compresses javascript files in a fileset -->
<!-- -->
<!-- nested element: -->
<!-- <fileset> - the files to compress -->
<!-- =================================================================== -->
<macrodef name="jsmin">
<element name="filesetEl" implicit="true" />
<sequential>
<path id="filepath">
<filesetEl />
</path>
<script language="javascript"> <![CDATA[
// load libraries:
eval(file_jsant);
eval(file_jsmin);
// loop through files in fileset passed by reference
var files = filepath.list();
for (var i=0; i<files.length; i++) {
// read original code
var f = new java.io.File(files[i]);
var oldCode = Util.readFile(f.getCanonicalPath());
// compress
try {
var newCode = jsmin("", oldCode, 2);
} catch (anyerror) {
Util.log(files[i] + " could not be compressed because of an error: " + anyerror);
continue;
}
// load comment
var comment = Util.readFile(new java.io.File(f.getParent(), "COPYRIGHT.txt").toString());
newCode = comment + newCode + "\n";
Util.writeToFile(f.getCanonicalPath(), newCode);
// log message
var msg = "Reduced " + files[i] + " from " + oldCode.length + " to " + newCode.length + " bytes";
msg += " (" + (Math.round(newCode.length / oldCode.length * 1000) / 10) + "% of original size)";
Util.log(msg);
}
]]> </script>
</sequential>
</macrodef>
<!-- =================================================================== -->
<!-- Validate javascript files in a fileset -->
<!-- -->
<!-- nested element: -->
<!-- <fileset> - the files to validate -->
<!-- -->
<!-- attributes: -->
<!-- printWarnings: if "true", syntax warnings are written too -->
<!-- (and not just errors) -->
<!-- failOnError: if "true" build process fails if there are -->
<!-- any javascript errors -->
<!-- =================================================================== -->
<macrodef name="jslint">
<attribute name="printWarnings" default="true" />
<attribute name="failOnError" default="false" />
<element name="filesetEl" implicit="true" />
<sequential>
<!-- copy attributes to local properties (that can be used in the script task) -->
<property name="printWarningsProp" value="@{printWarnings}" />
<property name="failOnErrorProp" value="@{failOnError}" />
<!-- nested elements can't be used from script task, so wrap <path> around the <fileset> -->
<path id="filepath">
<filesetEl />
</path>
<script language="javascript"> <![CDATA[
// load libraries:
eval(file_jsant);
eval(file_jslint);
// store whether there was a major error in any of the files
var fail = false;
var failStr = "";
// loop through files in fileset passed by reference
var files = filepath.list();
for (var i=0; i<files.length; i++) {
// get file object and parse source file
var f = new java.io.File(files[i]);
var re = JSLINT(Util.readFile(f.getCanonicalPath()) ,{browser:true, passfail:false, undef:true});
// loop through error and warning messages
for (var j=0; j<JSLINT.errors.length; j++) {
var e = JSLINT.errors[j];
if(e && printWarningsProp == "true") {
// warning message
Util.log("Javascript Warning in " + files[i] + ", line " + (e.line+1) + ", character " + (e.character+1)+ ":\n" + e.reason + "\n\n");
} else if (!e) {
// if last element of the array is null, the one
// before that element was an error
e = JSLINT.errors[j-1];
failStr += "Javascript error in " + files[i] + ", line " + (e.line+1) + ", character " + (e.character+1)+ ":\n" + e.reason + "\n\n";
fail = true;
}
}
}
if (fail && failOnErrorProp == "true") {
// failing directly from javascript using createTask("fail")
// results in a bulk of stack traces.
// so set the property here ... and fail outside the script task
Util.setProperty("validateFailed", "true");
Util.log(failStr);
}
]]> </script>
<fail if="validateFailed">validate failed: error(s) in javascript code.</fail>
</sequential>
</macrodef>
</project>

Binary file not shown.

View file

@ -0,0 +1,428 @@
//
// Jala Project [http://opensvn.csie.org/traccgi/jala]
//
// Copyright 2004 ORF Online und Teletext GmbH
//
// Licensed under the Apache License, Version 2.0 (the ``License'');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ``AS IS'' BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// $Revision$
// $LastChangedBy$
// $LastChangedDate$
// $HeadURL$
//
/**
* @fileoverview
* MessageParser script that extracts all gettext message macros
* out of skin files and all calls of gettext functions
* (that is "gettext", "ngettext" and "_") out of function
* files and directly generates a .pot file from it.
* If an argument "-o" is given and it is followed by
* a path to a file, the output is written to this file.
* Any other argument is interpreted as directory or file
* that should be parsed.
*/
/**
* @constructor
*/
var Message = function(id, pluralId) {
this.id = id && String(id);
this.pluralId = pluralId && String(pluralId);
this.locations = [];
return this;
};
/**
* Static method that constructs a message key by
* which a message can be identified in the messages map.
* @param {String} id The message Id
* @param {String} pluralId The plural message Id
* @returns The generated message key
* @type String
*/
Message.getKey = function(id, pluralId) {
if (id && pluralId) {
return id + pluralId;
} else {
return id;
}
};
/**
* Encloses the string passed as argument in quotes
* and wraps the string if it is longer than 80 characters.
* @param {String} str The string to format
* @param {Boolean} wrap If true the message string will be splitted in
* parts where each one is max. 80 characters long
* @returns The formatted string.
* @type String
*/
Message.formatId = function(str, wrap) {
var escapeQuotes = function(s) {
return s.replace(/(^|[^\\])"/g, '$1\\"');
};
var len = 80;
var buf = new java.lang.StringBuffer();
if (wrap == true && str.length > len) {
buf.append('""\n');
var offset = 0;
while (offset < str.length) {
buf.append('"');
buf.append(escapeQuotes(str.substring(offset, offset += len)));
buf.append('"');
buf.append("\n");
}
return buf.toString();
} else {
buf.append('"');
buf.append(escapeQuotes(str));
buf.append('"\n');
}
return buf.toString();
};
/**
* Adds a new location to this Message instance.
* @param {String} filePath The path to the file this message
* is located in.
* @param {Number} lineNum The line number at which this message
* was found at
*/
Message.prototype.addLocation = function(filePath, lineNum) {
this.locations.push(filePath + ":" + lineNum);
};
/**
* Writes this Message instance as .po compatible string to
* the StringBuffer passed as argument.
* @param {java.lang.StringBuffer} buf The StringBuffer instance
* to write into
*/
Message.prototype.write = function(buf) {
for (var i=0;i<this.locations.length;i++) {
buf.append("#: ");
buf.append(this.locations[i]);
buf.append("\n");
}
if (this.id.indexOf("{") > -1
|| (this.pluralId != null && this.pluralId.indexOf("{") > -1)) {
buf.append("#, java-format\n");
}
buf.append('msgid ');
buf.append(Message.formatId(this.id));
if (this.pluralId != null) {
buf.append('msgid_plural ');
buf.append(Message.formatId(this.pluralId));
buf.append('msgstr[0] ""\nmsgstr[1] ""\n')
} else {
buf.append('msgstr ""\n')
}
buf.append("\n");
return;
};
/**
* @constructor
*/
var MessageParser = function() {
this.messages = {};
return this;
};
/**
* Object containing the accepted function names, currently
* supported are "gettext", "ngettext" and "_". This is used
* as a lookup map during function file parsing.
* @type Object
*/
MessageParser.FUNCTION_NAMES = {
"_": true,
"gettext": true,
"ngettext": true,
"markgettext": true
};
/**
* The name of the gettext macro
* @type String
*/
MessageParser.MACRO_NAME = "message";
/**
* The name of the macro attribute that will be interpreted
* as gettext attribute.
* @type String
*/
MessageParser.ATTRIBUTE_NAME = MessageParser.MACRO_NAME;
/**
* A regular expression for parsing macros in a skin. The result
* of this regular expression contains:
* result[1] = macro handler name (can be empty for global macros)
* result[2] = macro name
* result[3] = the macro's attributes
* @type RegExp
*/
MessageParser.REGEX_MACRO = /<%\s*(?:([\w]+)\.)?([\w]+)\s+([^%]+?)\s*%>/gm;
/**
* A regular expression for parsing the attributes of a macro. The result
* of this regular expression contains:
* result[1] = attribute name
* result[2] = attribute value
* @type RegExp
*/
MessageParser.REGEX_PARAM = /([\w]*)\s*=\s*["'](.*?)["']\s*(?=\w+=|$)/gm;
/**
* Calculates the line number in the string passed as argument
* at which the specified index position is located.
* @param {String} str The source string
* @param {Number} idx The index position to get the line number for.
* @returns The line number of the index position in the source string.
* @type Number
*/
MessageParser.getLineNum = function(str, idx) {
return str.substring(0, idx).split(/.*(?:\r\n|\n\r|\r|\n)/).length;
};
/**
* Parses the file passed as argument. If the file
* is a directory, this method recurses down the directory
* tree and parses all skin and function files.
* @param {java.io.File} file The file or directory to start at.
* @param {String} encoding The encoding to use
*/
MessageParser.prototype.parse = function(file, encoding) {
if (file.isDirectory()) {
var list = file.list();
for (var i=0;i<list.length;i++) {
this.parse(new java.io.File(file, list[i]), encoding);
}
} else {
var fName, dotIdx;
fName = file.getName();
if ((dotIdx = fName.lastIndexOf(".")) > -1) {
switch (String(fName.substring(dotIdx+1))) {
case "skin":
print("Parsing skin file " + file.getAbsolutePath() + "...");
this.parseSkinFile(file, encoding);
break;
case "hac":
case "js":
print("Parsing function file " + file.getAbsolutePath() + "...");
this.parseFunctionFile(file, encoding);
break;
default:
break;
}
}
}
return;
};
/** @ignore */
MessageParser.prototype.toString = function() {
return "[Jala Message Parser]";
};
/**
* Parses a .js file and creates Message instances for all
* calls of "gettext", "ngettext", "markgettext" and "_".
* @param {java.io.File} file The function file to parse
* @param {String} encoding The encoding to use
*/
MessageParser.prototype.parseFunctionFile = function(file, encoding) {
var fis = new java.io.FileInputStream(file);
var isr = new java.io.InputStreamReader(fis, encoding || "UTF-8");
var reader = new java.io.BufferedReader(isr);
var tokenizer = new java.io.StreamTokenizer(reader);
var messages = [], stack = [];
var c;
while ((c = tokenizer.nextToken()) != java.io.StreamTokenizer.TT_EOF) {
switch (c) {
case java.io.StreamTokenizer.TT_WORD:
if (MessageParser.FUNCTION_NAMES[tokenizer.sval] == true) {
stack.push({name: tokenizer.sval, lineNr: tokenizer.lineno()});
} else if (stack.length > 0) {
// it's something else than a string argument inside a gettext method call
// so finalize the argument parsing here as we aren't interested in that
messages.push(stack.pop());
}
break;
case java.io.StreamTokenizer.TT_NUMBER:
break;
default:
if (stack.length > 0) {
if ("\u0028".charCodeAt(0) == c) {
// start of arguments (an opening bracket)
stack[stack.length-1].args = [];
} else if ("\u0029".charCodeAt(0) == c) {
// end of arguments (a closing bracket)
messages.push(stack.pop());
} else if ("\u0022".charCodeAt(0) == c || "\u0027".charCodeAt(0) == c) {
// a quoted string argument
stack[stack.length-1].args.push(tokenizer.sval);
}
}
break;
}
}
if (messages.length > 0) {
var msgParam, key, msg;
for (var i=0;i<messages.length;i++) {
msgParam = messages[i];
if (msgParam.args && msgParam.args.length > 0) {
key = Message.getKey(msgParam.args[0]);
if (!(msg = this.messages[key])) {
this.messages[key] = msg = new Message(msgParam.args[0], msgParam.args[1]);
}
if (!msg.pluralId && msgParam.args.length > 1) {
msg.pluralId = msgParam.args[1];
}
msg.addLocation(file.getAbsolutePath(), msgParam.lineNr);
}
}
}
fis.close();
isr.close();
reader.close();
return;
};
/**
* Parses a skin file and creates Message instances for
* all macros which name is either "message" or
* that have attributes named "message" and optional
* "plural"
* @param {java.io.File} file The skin file to parse
* @param {String} encoding The encoding to use
*/
MessageParser.prototype.parseSkinFile = function(file, encoding) {
var content = readFile(file.getAbsolutePath(), encoding || "UTF-8");
var macro, id, pluralId, params, key;
while (macro = MessageParser.REGEX_MACRO.exec(content)) {
while (params = MessageParser.REGEX_PARAM.exec(macro[3])) {
if (macro[2] == MessageParser.MACRO_NAME) {
if (params[1] == "text") {
id = params[2];
pluralId = null;
} else if (params[1] == "plural") {
pluralId = params[2];
}
} else {
if (params[1] == MessageParser.ATTRIBUTE_NAME) {
id = params[2];
pluralId = null;
} else if (params[1] == "plural") {
pluralId = params[2];
}
}
}
if (id != null) {
// create new Message instance or update the existing one
key = Message.getKey(id);
if (!(msg = this.messages[key])) {
this.messages[key] = msg = new Message(id, pluralId, file.getAbsolutePath());
}
msg.addLocation(file.getAbsolutePath(),
MessageParser.getLineNum(content, macro.index));
}
}
return;
};
/**
* Prints a standard Header of a .po file
* FIXME: why the hell is Plural-Forms ignored in poEdit?
* @see http://drupal.org/node/17564
*/
MessageParser.prototype.getPotString = function() {
var buf = new java.lang.StringBuffer();
buf.append('# SOME DESCRIPTIVE TITLE.\n');
buf.append('# Copyright (C) YEAR THE PACKAGE\'S COPYRIGHT HOLDER\n');
buf.append('# This file is distributed under the same license as the PACKAGE package.\n');
buf.append('# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n');
buf.append('#\n');
buf.append('#, fuzzy\n');
buf.append('msgid ""\n');
buf.append('msgstr ""\n');
buf.append('"Project-Id-Version: PACKAGE VERSION\\n"\n');
buf.append('"Report-Msgid-Bugs-To: \\n"\n');
var sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mmZ");
buf.append('"POT-Creation-Date: ' + sdf.format(new java.util.Date()) + '\\n"\n');
buf.append('"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"\n');
buf.append('"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n"\n');
buf.append('"Language-Team: LANGUAGE <LL@li.org>\\n"\n');
buf.append('"MIME-Version: 1.0\\n"\n');
buf.append('"Content-Type: text/plain; charset=utf-8\\n"\n');
buf.append('"Content-Transfer-Encoding: 8bit\\n"\n');
buf.append('"Plural-Forms: nplurals=2; plural=(n != 1);\\n"\n');
buf.append('\n');
// sort all messages by their singular key
var keys = [];
for (var i in this.messages) {
keys[keys.length] = this.messages[i].id;
}
keys.sort();
// add all the messages
for (var i=0;i<keys.length;i++) {
this.messages[keys[i]].write(buf);
}
return buf.toString();
};
/**
* Write the parsed contents into the file passed as argument.
* @param {java.io.File} file The file to write to
*/
MessageParser.prototype.writeToFile = function(file) {
var writer = new java.io.FileWriter(file);
writer.write(new java.lang.String(this.getPotString().getBytes("UTF-8")));
writer.close();
return;
};
/**
* Main script body
*/
var toParse = [];
var arg, outFile, file, fileEncoding;
for (var i=0;i<arguments.length;i++) {
arg = arguments[i];
if (arg.indexOf("-o") === 0 && i < arguments.length -1) {
outFile = new java.io.File(arguments[i += 1]);
} else if (arg.indexOf("-e") === 0 && i < arguments.length -1) {
fileEncoding = arguments[i += 1];
} else {
// add argument to list of files and directories to parse
toParse.push(new java.io.File(arg));
}
}
// start parsing
var parser = new MessageParser();
for (var i=0;i<toParse.length;i++) {
parser.parse(toParse[i], fileEncoding);
}
if (outFile != null) {
parser.writeToFile(outFile);
} else {
print(parser.getPotString());
}

View file

@ -0,0 +1,336 @@
//
// Jala Project [http://opensvn.csie.org/traccgi/jala]
//
// Copyright 2004 ORF Online und Teletext GmbH
//
// Licensed under the Apache License, Version 2.0 (the ``License'');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ``AS IS'' BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// $Revision$
// $LastChangedBy$
// $LastChangedDate$
// $HeadURL$
//
/**
* @fileoverview
* A parser script that converts GNU Gettext .po files into plain JavaScript objects
* for use with jala.I18n. To run it either start the build script of HopKit
* or call it directly using the JavaScript shell of Rhino:
* <code>java -cp rhino.jar org.mozilla.javascript.tools.shell.Main PoParser.js <input> <output> [namespace]</code>
*
* The accepted arguments are:
* <ul>
* <li><code>input</code>: Either a single .po file or a directory containing multiple files</li>
* <li><code>output</code>: The directory where to put the generated message files</li>
* <li><code>namespace</code>: An optional namespace in which the generated message object will reside
* (eg. if the namespace is called "jala", the messages will be stored in global.jala.messages)</li>
* </ul>
*/
/**
* Constructs a new PoParser instance.
* @class Instances of this class can generate JavaScript message files out
* of GNU Gettext .po files for use with jala.I18n (and possibly other internationalization
* environments too).
* @param {String} handler An optional namespace where the parsed messages should be stored
* @returns A newly created instance of PoParser
* @constructor
*/
var PoParser = function(namespace) {
/**
* An array containing the parsed messages
* @type Array
*/
this.messages = [];
/**
* The locale key string (eg. "de_AT") of the .po file
* @type String
*/
this.localeKey = null;
/**
* The namespace (optional) where to store the generated messages
* @type String
*/
this.namespace = namespace;
return this;
};
/**
* A regular expression for splitting the contents of a .po file into
* single lines
* @type RegExp
*/
PoParser.REGEX_LINES = /\r\n|\r|\n|\u0085|\u2028|\u2029/;
/**
* A regular expression for parsing singular message keys
* @type RegExp
*/
PoParser.REGEX_MSGID = /^\s*msgid(?!_plural)\s+\"(.*)\"\s*$/;
/**
* A regular expression for parsing plural message keys
* @type RegExp
*/
PoParser.REGEX_MSGID_PLURAL = /^\s*msgid_plural\s+\"(.*)\"\s*$/;
/**
* A regular expression for parsing message key continuations
* @type RegExp
*/
PoParser.REGEX_MSG_CONT = /^\s*\"(.*)\"\s*$/;
/**
* A regular expression for parsing a message translation
* @type RegExp
*/
PoParser.REGEX_MSGSTR = /^\s*msgstr(?:\[(\d)\])?\s+\"(.*)\"\s*$/;
/**
* A regular expression used to detect lines other than whitespace
* and comments
* @type RegExp
*/
PoParser.REGEX_DATA = /^\s*msg/;
PoParser.isData = function(str) {
return PoParser.REGEX_DATA.test(str);
};
/**
* Reads the file passed as argument, assuming that it is UTF-8 encoded
* @param {java.io.File} file The file to read
* @returns The contents of the file
* @type java.lang.String
*/
PoParser.readFile = function(file) {
var inStream = new java.io.InputStreamReader(new java.io.FileInputStream(file), "UTF-8");
var buffer = new java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 2048);
var read = 0;
var r = 0;
while ((r = inStream.read(buffer, read, buffer.length - read)) > -1) {
read += r;
if (read == buffer.length) {
// grow input buffer
var newBuffer = new java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, buffer.length * 2);
java.lang.System.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
buffer = newBuffer;
}
}
inStream.close();
return new java.lang.String(buffer, 0, read);
}
/**
* Parses the PO file passed as argument into the messages array
* of this PoParser instance.
* @param {java.io.File} file The .po file to parse
*/
PoParser.prototype.parse = function(file) {
// parse the locale key out of the file name
var fileName = file.getName();
if (!(this.localeKey = fileName.substring(0, fileName.indexOf(".")))) {
throw "Invalid PO file name: " + fileName;
}
// read the PO file content and parse it into messages
var content = PoParser.readFile(file);
var start = new Date();
var lines = content.split(PoParser.REGEX_LINES);
var idx = -1;
var line = null;
var m, value, nr;
var msg;
var hasMoreLines = function() {
return idx < lines.length - 1;
};
var nextLine = function() {
return (line = lines[idx += 1]) != null;
};
var getContinuation = function(str) {
var nLine;
while ((nLine = lines[idx + 1]) != null) {
if ((m = nLine.match(PoParser.REGEX_MSG_CONT)) != null) {
str += m[1];
nextLine();
} else {
break;
}
}
return str;
}
while (nextLine()) {
if ((m = line.match(PoParser.REGEX_MSGID)) != null) {
value = getContinuation(m[1]);
if (value) {
msg = this.messages[this.messages.length] = new Message(value);
}
} else if ((m = line.match(PoParser.REGEX_MSGID_PLURAL)) != null) {
value = getContinuation(m[1]);
if (value && msg != null) {
msg.pluralKey = value;
}
} else if ((m = line.match(PoParser.REGEX_MSGSTR)) != null) {
nr = m[1];
value = getContinuation(m[2]);
if (value && msg != null) {
nr = parseInt(nr, 10);
msg.translations[nr || 0] = value;
}
}
}
return;
};
/**
* Converts the array containing the parsed messages into a message
* catalog script file and saves it on disk.
* @param {java.io.File} outputDir The directory where the message
* file should be saved
*/
PoParser.prototype.writeToFile = function(output) {
var buf = new java.lang.StringBuffer();
// write header
buf.append('/**\n');
buf.append(' * Instantiate the messages namespace if it\'s not already existing\n');
buf.append(' */\n');
var objPath = "";
if (this.namespace) {
objPath += this.namespace;
buf.append('if (!global.' + objPath + ') {\n');
buf.append(' global.' + objPath + ' = {};\n');
buf.append('}\n');
objPath += ".";
}
objPath += "messages";
buf.append('if (!global.' + objPath + ') {\n');
buf.append(' global.' + objPath + ' = {};\n');
buf.append('}\n\n');
buf.append('/**\n');
buf.append(' * Messages for locale "' + this.localeKey + '"\n');
buf.append(' */\n');
objPath += "." + this.localeKey;
buf.append('global.' + objPath + ' = {\n');
// write messages
for (var i=0;i<this.messages.length; i++) {
this.messages[i].write(buf);
}
// write footer
buf.append('};\n');
// write the message catalog into the outFile
var file = new java.io.File(output, objPath + ".js");
var writer = new java.io.FileWriter(file);
writer.write(buf.toString());
// writer.write(buf.toString().getBytes("UTF-8"));
writer.close();
print("generated messages file " + file.getAbsolutePath());
return;
};
/**
* Constructs a new message object containing the singular- and
* plural key plus their translations
* @param {String} singularKey The singular key of the message
* @returns A newly created Message instance
* @constructor
*/
var Message = function(singularKey) {
this.singularKey = singularKey;
this.pluralKey = null;
this.translations = [];
return this;
}
/**
* Dumps this message as JavaScript literal key-value pair(s)
* @param {java.lang.StringBuffer} buf The buffer to append the dumped
* string to
*/
Message.prototype.write = function(buf) {
var writeLine = function(key, value) {
buf.append(' "');
buf.append(key);
buf.append('": "');
if (value !== null && value !== undefined) {
buf.append(value);
}
buf.append('",\n');
};
if (this.singularKey != null) {
writeLine(this.singularKey, this.translations[0]);
if (this.pluralKey != null) {
writeLine(this.pluralKey, this.translations[1]);
}
}
return;
}
/**
* Main script body
*/
if (arguments.length < 2) {
print("Usage:");
print("PoParser.js <input> <output> [namespace]");
print("<input>: Either a single .po file or a directory containing .po files");
print("<output>: The directory where the generated messages files should be stored");
print("[namespace]: An optional global namespace where the messages should be");
print(" stored (eg. a namespace like 'jala' will lead to messages");
print(" stored in global.jala.messages by their locale.");
quit();
}
var input = new java.io.File(arguments[0]);
var output = new java.io.File(arguments[1]);
var namespace = arguments[2];
// check if the output destination is a directory
if (output.isFile()) {
print("Invalid arguments: the output destination must be a directory.");
quit();
}
if (namespace && namespace.indexOf(".") != -1) {
print("Invalid arguments: Please don't specify complex object paths, as this");
print("would corrupt the messages file.");
quit();
}
// parse the PO file(s) and create the message catalog files
var parser;
if (input.isDirectory()) {
var files = input.listFiles();
var file;
for (var i=0;i<files.length;i++) {
file = files[i];
if (file.getName().endsWith(".po")) {
parser = new PoParser(namespace);
parser.parse(file);
parser.writeToFile(output);
}
}
} else {
parser = new PoParser(namespace);
parser.parse(input);
parser.writeToFile(output);
}

View file

@ -0,0 +1,92 @@
//
// Jala Project [http://opensvn.csie.org/traccgi/jala]
//
// Copyright 2004 ORF Online und Teletext GmbH
//
// Licensed under the Apache License, Version 2.0 (the ``License'');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ``AS IS'' BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// $Revision$
// $LastChangedBy$
// $LastChangedDate$
// $HeadURL$
//
/**
* @fileoverview Helper methods for use as embedded JavaScript in Ant.
*/
Util = {
counter:0
};
Util.readFile = function (filename) {
Util.counter++;
var loader = project.createTask("loadfile");
loader.setSrcFile(new java.io.File(filename));
loader.setProperty("loaderResult" + Util.counter);
try {
loader.execute();
return String(project.getProperty("loaderResult" + Util.counter));
} catch (anyerror) {
return "";
}
};
Util.loadProperties = function(filename) {
var props = new java.util.Properties();
var inStream = new java.io.FileInputStream(filename);
props.load(inStream);
return props;
};
Util.log = function (str) {
java.lang.System.out.println(str);
};
Util.getFile = function(dir, file) {
return new java.io.File(new java.io.File(dir).getCanonicalPath(), file);
};
Util.writeToFile = function(filename, str) {
var echo = project.createTask("echo");
echo.setMessage(str);
echo.setFile(new java.io.File(filename));
echo.execute();
return true;
};
Util.setProperty = function(propName, propValue) {
var prop = project.createTask("property");
prop.setName(propName);
prop.setValue(propValue);
prop.execute();
};
String.prototype.trim = function() {
return this.match(/^\s*(.*?)\s*$/)[1];
};
/**
* transforms the first n characters of a string to uppercase
* @param Number amount of characters to transform
* @return String the resulting string
*/
String.prototype.capitalize = function(limit) {
if (limit == null)
limit = 1;
var head = this.substring(0, limit);
var tail = this.substring(limit, this.length);
return head.toUpperCase() + tail.toLowerCase();
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,316 @@
/* jsmin.js - 2006-08-31
Author: Franck Marcia
This work is an adaptation of jsminc.c published by Douglas Crockford.
Permission is hereby granted to use the Javascript version under the same
conditions as the jsmin.c on which it is based.
jsmin.c
2006-05-04
Copyright (c) 2002 Douglas Crockford (www.crockford.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The Software shall be used for Good, not Evil.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Update:
add level:
1: minimal, keep linefeeds if single
2: normal, the standard algorithm
3: agressive, remove any linefeed and doesn't take care of potential
missing semicolons (can be regressive)
store stats
jsmin.oldSize
jsmin.newSize
*/
String.prototype.has = function(c) {
return this.indexOf(c) > -1;
};
function jsmin(comment, input, level) {
if (input === undefined) {
input = comment;
comment = '';
level = 2;
} else if (level === undefined || level < 1 || level > 3) {
level = 2;
}
if (comment.length > 0) {
comment += '\n';
}
var a = '',
b = '',
EOF = -1,
LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
DIGITS = '0123456789',
ALNUM = LETTERS + DIGITS + '_$\\',
theLookahead = EOF;
/* isAlphanum -- return true if the character is a letter, digit, underscore,
dollar sign, or non-ASCII character.
*/
function isAlphanum(c) {
return c != EOF && (ALNUM.has(c) || c.charCodeAt(0) > 126);
}
/* get -- return the next character. Watch out for lookahead. If the
character is a control character, translate it to a space or
linefeed.
*/
function get() {
var c = theLookahead;
if (get.i == get.l) {
return EOF;
}
theLookahead = EOF;
if (c == EOF) {
c = input.charAt(get.i);
++get.i;
}
if (c >= ' ' || c == '\n') {
return c;
}
if (c == '\r') {
return '\n';
}
return ' ';
}
get.i = 0;
get.l = input.length;
/* peek -- get the next character without getting it.
*/
function peek() {
theLookahead = get();
return theLookahead;
}
/* next -- get the next character, excluding comments. peek() is used to see
if a '/' is followed by a '/' or '*'.
*/
function next() {
var c = get();
if (c == '/') {
switch (peek()) {
case '/':
for (;;) {
c = get();
if (c <= '\n') {
return c;
}
}
break;
case '*':
get();
for (;;) {
switch (get()) {
case '*':
if (peek() == '/') {
get();
return ' ';
}
break;
case EOF:
throw 'Error: Unterminated comment.';
}
}
break;
default:
return c;
}
}
return c;
}
/* action -- do something! What you do is determined by the argument:
1 Output A. Copy B to A. Get the next B.
2 Copy B to A. Get the next B. (Delete A).
3 Get the next B. (Delete B).
action treats a string as a single character. Wow!
action recognizes a regular expression if it is preceded by ( or , or =.
*/
function action(d) {
var r = [];
if (d == 1) {
r.push(a);
}
if (d < 3) {
a = b;
if (a == '\'' || a == '"') {
for (;;) {
r.push(a);
a = get();
if (a == b) {
break;
}
if (a <= '\n') {
throw 'Error: unterminated string literal: ' + a;
}
if (a == '\\') {
r.push(a);
a = get();
}
}
}
}
b = next();
if (b == '/' && '(,=:[!&|'.has(a)) {
r.push(a);
r.push(b);
for (;;) {
a = get();
if (a == '/') {
break;
} else if (a =='\\') {
r.push(a);
a = get();
} else if (a <= '\n') {
throw 'Error: unterminated Regular Expression literal';
}
r.push(a);
}
b = next();
}
return r.join('');
}
/* m -- Copy the input to the output, deleting the characters which are
insignificant to JavaScript. Comments will be removed. Tabs will be
replaced with spaces. Carriage returns will be replaced with
linefeeds.
Most spaces and linefeeds will be removed.
*/
function m() {
var r = [];
a = '\n';
r.push(action(3));
while (a != EOF) {
switch (a) {
case ' ':
if (isAlphanum(b)) {
r.push(action(1));
} else {
r.push(action(2));
}
break;
case '\n':
switch (b) {
case '{':
case '[':
case '(':
case '+':
case '-':
r.push(action(1));
break;
case ' ':
r.push(action(3));
break;
default:
if (isAlphanum(b)) {
r.push(action(1));
} else {
if (level == 1 && b != '\n') {
r.push(action(1));
} else {
r.push(action(2));
}
}
}
break;
default:
switch (b) {
case ' ':
if (isAlphanum(a)) {
r.push(action(1));
break;
}
r.push(action(3));
break;
case '\n':
if (level == 1 && a != '\n') {
r.push(action(1));
} else {
switch (a) {
case '}':
case ']':
case ')':
case '+':
case '-':
case '"':
case '\'':
if (level == 3) {
r.push(action(3));
} else {
r.push(action(1));
}
break;
default:
if (isAlphanum(a)) {
r.push(action(1));
} else {
r.push(action(3));
}
}
}
break;
default:
r.push(action(1));
break;
}
}
}
return r.join('');
}
jsmin.oldSize = input.length;
ret = m(input);
jsmin.newSize = ret.length;
return comment + ret;
}