japi-cvs Mailing List for JAPI (Page 28)
Status: Beta
Brought to you by:
christianhujer
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(115) |
May
(11) |
Jun
(5) |
Jul
(2) |
Aug
(10) |
Sep
(35) |
Oct
(14) |
Nov
(49) |
Dec
(27) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(57) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(25) |
Jun
(134) |
Jul
(76) |
Aug
(34) |
Sep
(27) |
Oct
(5) |
Nov
|
Dec
(1) |
| 2008 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(63) |
Nov
(30) |
Dec
(43) |
| 2009 |
Jan
(10) |
Feb
(420) |
Mar
(67) |
Apr
(3) |
May
(61) |
Jun
(21) |
Jul
(19) |
Aug
|
Sep
(6) |
Oct
(16) |
Nov
(1) |
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
(7) |
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: <chr...@us...> - 2008-12-26 14:43:21
|
Revision: 735
http://japi.svn.sourceforge.net/japi/?rev=735&view=rev
Author: christianhujer
Date: 2008-12-26 14:43:17 +0000 (Fri, 26 Dec 2008)
Log Message:
-----------
Added automatic setting of module.version / distName.
Modified Paths:
--------------
common/trunk/commonBuild.xml
Modified: common/trunk/commonBuild.xml
===================================================================
--- common/trunk/commonBuild.xml 2008-12-25 17:54:46 UTC (rev 734)
+++ common/trunk/commonBuild.xml 2008-12-26 14:43:17 UTC (rev 735)
@@ -30,6 +30,23 @@
<property file="developer.properties" />
<property file="module.properties" />
+<basename property="dir.version" file="${user.dir}" />
+<dirname property="parent" file="${user.dir}" />
+<basename property="parentRegion" file="${parent}" />
+<exec outputproperty="svnversion" executable="svnversion">
+ <env key="LC_ALL" value="C" />
+</exec>
+<condition property="module.version" value="trunk-${svnversion}">
+ <equals arg1="trunk" arg2="${dir.version}" />
+</condition>
+<condition property="module.version" value="branch-${dir.version}-${svnversion}">
+ <equals arg1="branches" arg2="${parentRegion}" />
+</condition>
+<condition property="module.version" value="${dir.version}">
+ <equals arg1="tags" arg2="${parentRegion}" />
+</condition>
+<property name="module.version" value="${parentRegion}-${dir.version}-${svnversion}" />
+
<property name="commonPath" value="common" />
<property name="distName" value="${module.name}-${module.version}" />
<property name="distPath" value="dist/${distName}" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-25 17:54:49
|
Revision: 734
http://japi.svn.sourceforge.net/japi/?rev=734&view=rev
Author: christianhujer
Date: 2008-12-25 17:54:46 +0000 (Thu, 25 Dec 2008)
Log Message:
-----------
Added LICENSE and COPYING to common.
Added Paths:
-----------
common/trunk/COPYING
common/trunk/LICENSE
Added: common/trunk/COPYING
===================================================================
--- common/trunk/COPYING (rev 0)
+++ common/trunk/COPYING 2008-12-25 17:54:46 UTC (rev 734)
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
Property changes on: common/trunk/COPYING
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: common/trunk/LICENSE
===================================================================
--- common/trunk/LICENSE (rev 0)
+++ common/trunk/LICENSE 2008-12-25 17:54:46 UTC (rev 734)
@@ -0,0 +1,9 @@
+JAPI COMMON LICENSE INFORMATION
+-------------------------------
+
+Japi Common is licensed under GPL. See file COPYING.
+
+Japi Common uses some third part libraries, especially for building. These
+libraries are contained in the lib/ directory and have their own licenses. See
+the corresponding LICENSE-*-files in the common/lib/ directory for the licenses
+of third party libraries.
Property changes on: common/trunk/LICENSE
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-24 23:08:33
|
Revision: 733
http://japi.svn.sourceforge.net/japi/?rev=733&view=rev
Author: christianhujer
Date: 2008-12-24 23:08:28 +0000 (Wed, 24 Dec 2008)
Log Message:
-----------
Updated / synchronized svn:ignore property of all trunks.
Property Changed:
----------------
common/trunk/
games/jmines/trunk/
historic/trunk/
imajar/trunk/
libs/finance/trunk/
libs/logging/trunk/
libs/registry/trunk/
libs/swing-about/trunk/
libs/swing-action/trunk/
libs/swing-app/trunk/
libs/swing-bookmarks/trunk/
libs/swing-extlib/trunk/
libs/swing-font/trunk/
libs/swing-keyprefs/trunk/
libs/swing-misc/trunk/
libs/swing-prefs/trunk/
libs/swing-proxyprefs/trunk/
libs/swing-recent/trunk/
libs/swing-tod/trunk/
libs/swing-treetable/trunk/
libs/util/trunk/
libs/xml/trunk/
progs/batcher/trunk/
progs/cardlearn/trunk/
progs/jeduca/trunk/
progs/jhexedit/trunk/
progs/jhexview/trunk/
progs/jirus/trunk/
progs/jtype/trunk/
progs/midilearn/trunk/
progs/textedit/trunk/
site/trunk/
tools/archStat/trunk/
tools/cstyle/trunk/
tools/dircount/trunk/
tools/findLongestPath/trunk/
tools/fontbrowser/trunk/
tools/gdbControl/trunk/
tools/jgrep/trunk/
tools/jwget/trunk/
tools/keystrokes/trunk/
tools/mail/trunk/
tools/midiDeviceLister/trunk/
tools/midiMonitor/trunk/
tools/prefsbrowser/trunk/
tools/replacer/trunk/
tools/scriptInterpreter/trunk/
tools/string2bytes/trunk/
tools/todoScanner/trunk/
Property changes on: common/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: games/jmines/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: historic/trunk
___________________________________________________________________
Modified: svn:ignore
- classes
dest
developer.properties
dist
make
+ classes
dest
developer.properties
dist
docs
Property changes on: imajar/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/finance/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/logging/trunk
___________________________________________________________________
Modified: svn:ignore
- classes
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/registry/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-about/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-action/trunk
___________________________________________________________________
Modified: svn:ignore
- dest
dist
classes
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-app/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-bookmarks/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-extlib/trunk
___________________________________________________________________
Modified: svn:ignore
- dest
dist
classes
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-font/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-keyprefs/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-misc/trunk
___________________________________________________________________
Modified: svn:ignore
- dest
dist
classes
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-prefs/trunk
___________________________________________________________________
Modified: svn:ignore
- dest
dist
classes
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-proxyprefs/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-recent/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-tod/trunk
___________________________________________________________________
Modified: svn:ignore
- dest
dist
classes
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/swing-treetable/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/util/trunk
___________________________________________________________________
Modified: svn:ignore
- dest
dist
classes
+ classes
dest
developer.properties
dist
docs
Property changes on: libs/xml/trunk
___________________________________________________________________
Modified: svn:ignore
- dest
dist
classes
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/batcher/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/cardlearn/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/jeduca/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/jhexedit/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/jhexview/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/jirus/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/jtype/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/midilearn/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/textedit/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: site/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/archStat/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/cstyle/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/dircount/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/findLongestPath/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/fontbrowser/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/gdbControl/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/jgrep/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/jwget/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/keystrokes/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/mail/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/midiDeviceLister/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/midiMonitor/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/prefsbrowser/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/replacer/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/scriptInterpreter/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/string2bytes/trunk
___________________________________________________________________
Modified: svn:ignore
- classes
+ classes
dest
developer.properties
dist
docs
Property changes on: tools/todoScanner/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-24 11:08:16
|
Revision: 732
http://japi.svn.sourceforge.net/japi/?rev=732&view=rev
Author: christianhujer
Date: 2008-12-24 11:08:12 +0000 (Wed, 24 Dec 2008)
Log Message:
-----------
Updated svn:externals property to be in sync on all trunks.
Property Changed:
----------------
games/jmines/trunk/
historic/trunk/
imajar/trunk/
libs/logging/trunk/
libs/midi/trunk/
progs/batcher/trunk/
progs/cardlearn/trunk/
progs/jeduca/trunk/
progs/jhexedit/trunk/
progs/jhexview/trunk/
progs/jirus/trunk/
progs/jtype/trunk/
progs/midilearn/trunk/
progs/textedit/trunk/
site/trunk/
tools/jgrep/trunk/
tools/mail/trunk/
tools/midiDeviceLister/trunk/
tools/midiMonitor/trunk/
tools/scriptInterpreter/trunk/
tools/string2bytes/trunk/
Property changes on: games/jmines/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: historic/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: imajar/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: libs/logging/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
Property changes on: libs/midi/trunk
___________________________________________________________________
Added: svn:ignore
+ classes
dest
developer.properties
dist
docs
Property changes on: progs/batcher/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: progs/cardlearn/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: progs/jeduca/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: progs/jhexedit/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: progs/jhexview/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: progs/jirus/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: progs/jtype/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: progs/midilearn/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: progs/textedit/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: site/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: tools/jgrep/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: tools/mail/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: tools/midiDeviceLister/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: tools/midiMonitor/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: tools/scriptInterpreter/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
Property changes on: tools/string2bytes/trunk
___________________________________________________________________
Added: svn:externals
+ common https://japi.svn.sourceforge.net/svnroot/japi/common/trunk
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-24 10:55:01
|
Revision: 731
http://japi.svn.sourceforge.net/japi/?rev=731&view=rev
Author: christianhujer
Date: 2008-12-24 10:54:54 +0000 (Wed, 24 Dec 2008)
Log Message:
-----------
Update license file.
Modified Paths:
--------------
libs/argparser/trunk/COPYING
libs/io/trunk/COPYING
libs/lang/trunk/COPYING
libs/net/trunk/COPYING
libs/taglets/trunk/COPYING
Added Paths:
-----------
games/jmines/trunk/COPYING
libs/logging/trunk/COPYING
libs/midi/trunk/COPYING
libs/registry/trunk/COPYING
libs/swing-action/trunk/COPYING
libs/swing-app/trunk/COPYING
libs/swing-bookmarks/trunk/COPYING
libs/swing-extlib/trunk/COPYING
libs/swing-font/trunk/COPYING
libs/swing-keyprefs/trunk/COPYING
libs/swing-list/trunk/COPYING
libs/swing-misc/trunk/COPYING
libs/swing-prefs/trunk/COPYING
libs/swing-proxyprefs/trunk/COPYING
libs/swing-recent/trunk/COPYING
libs/swing-tod/trunk/COPYING
libs/swing-treetable/trunk/COPYING
libs/util/trunk/COPYING
libs/xml/trunk/COPYING
progs/batcher/trunk/COPYING
progs/cardlearn/trunk/COPYING
progs/jeduca/trunk/COPYING
progs/jhexedit/trunk/COPYING
progs/jhexview/trunk/COPYING
progs/jirus/trunk/COPYING
progs/jtype/trunk/COPYING
progs/midilearn/trunk/COPYING
progs/textedit/trunk/COPYING
tools/archStat/trunk/COPYING
tools/cstyle/trunk/COPYING
tools/findLongestPath/trunk/COPYING
tools/fontbrowser/trunk/COPYING
tools/gdbControl/trunk/COPYING
tools/jwget/trunk/COPYING
tools/keystrokes/trunk/COPYING
tools/mail/trunk/COPYING
tools/midiDeviceLister/trunk/COPYING
tools/midiMonitor/trunk/COPYING
tools/prefsbrowser/trunk/COPYING
tools/scriptInterpreter/trunk/COPYING
tools/todoScanner/trunk/COPYING
Added: games/jmines/trunk/COPYING
===================================================================
--- games/jmines/trunk/COPYING (rev 0)
+++ games/jmines/trunk/COPYING 2008-12-24 10:54:54 UTC (rev 731)
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
Property changes on: games/jmines/trunk/COPYING
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Modified: libs/argparser/trunk/COPYING
===================================================================
--- libs/argparser/trunk/COPYING 2008-11-30 18:12:40 UTC (rev 730)
+++ libs/argparser/trunk/COPYING 2008-12-24 10:54:54 UTC (rev 731)
@@ -1,221 +1,397 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
- a) You must cause the modified files to carry prominent notices
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
+identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
+on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
+entire whole, and thus to each and every part regardless of who wrote
+it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
-collective works based on the Program.
+collective works based on the Library.
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
- 5. You are not required to accept this License, since you have not
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
+distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
+the Library or works based on it.
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+You are not responsible for enforcing compliance by third parties with
this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
+
+ 11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
+refrain entirely from distribution of the Library.
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
+integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
@@ -226,115 +402,103 @@
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
- 8. If the distribution and/or use of the Program is restricted in
+ 12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
NO WARRANTY
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
- How to Apply These Terms to Your New Programs
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
+ <one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
Also add information on how to...
[truncated message content] |
|
From: <chr...@us...> - 2008-11-30 18:12:41
|
Revision: 730
http://japi.svn.sourceforge.net/japi/?rev=730&view=rev
Author: christianhujer
Date: 2008-11-30 18:12:40 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Updated IntelliJ IDEA project to reflect the recent changes of today.
Modified Paths:
--------------
japi.ipr
Modified: japi.ipr
===================================================================
--- japi.ipr 2008-11-30 18:10:04 UTC (rev 729)
+++ japi.ipr 2008-11-30 18:12:40 UTC (rev 730)
@@ -28,6 +28,7 @@
</option>
<option name="LINE_SEPARATOR" value=" " />
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
+ <option name="INDENT_CASE_FROM_SWITCH" value="false" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="BLANK_LINES_BEFORE_PACKAGE" value="1" />
@@ -48,6 +49,7 @@
<emptyLine />
</value>
</option>
+ <option name="OPTIMIZE_IMPORTS_ON_THE_FLY" value="true" />
<option name="RIGHT_MARGIN" value="159" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
@@ -100,6 +102,7 @@
</component>
<component name="DependencyValidationManager">
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ <deny_rule from_scope="Production" to_scope="Tests" is_deny="true" />
</component>
<component name="EclipseCompilerSettings">
<option name="DEBUGGING_INFO" value="true" />
@@ -159,7 +162,7 @@
</option>
<option name="IGNORE_DEPRECATED" value="false" />
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
- <option name="myAdditionalJavadocTags" value="note,todo" />
+ <option name="myAdditionalJavadocTags" value="note,todo,retval,pre,warning" />
</inspection_tool>
<inspection_tool class="MagicNumber" level="WARNING" enabled="true">
<option name="m_ignoreInHashCode" value="true" />
@@ -222,6 +225,222 @@
<inspection_tool class="UnnecessaryInterfaceModifier" level="WARNING" enabled="true" />
<inspection_tool class="UnnecessaryQualifierForThis" level="WARNING" enabled="true" />
<inspection_tool class="FallthruInSwitchStatement" level="WARNING" enabled="true" />
+ <inspection_tool class="ClassReferencesSubclass" level="WARNING" enabled="true" />
+ <inspection_tool class="InstanceofThis" level="WARNING" enabled="true" />
+ <inspection_tool class="OverlyStrongTypeCast" level="WARNING" enabled="true">
+ <option name="ignoreInMatchingInstanceof" value="false" />
+ </inspection_tool>
+ <inspection_tool class="TypeMayBeWeakened" level="WARNING" enabled="true">
+ <option name="useRighthandTypeAsWeakestTypeInAssignments" value="true" />
+ </inspection_tool>
+ <inspection_tool class="FinalMethodInFinalClass" level="WARNING" enabled="true" />
+ <inspection_tool class="MultipleTopLevelClassesInFile" level="WARNING" enabled="true" />
+ <inspection_tool class="ProtectedMemberInFinalClass" level="WARNING" enabled="true" />
+ <inspection_tool class="PublicConstructorInNonPublicClass" level="WARNING" enabled="true" />
+ <inspection_tool class="UtilityClassWithPublicConstructor" level="WARNING" enabled="true" />
+ <inspection_tool class="UtilityClassWithoutPrivateConstructor" level="WARNING" enabled="true">
+ <option name="ignoreClassesWithOnlyMain" value="false" />
+ </inspection_tool>
+ <inspection_tool class="ObsoleteCollection" level="WARNING" enabled="true">
+ <option name="ignoreLibraryArguments" value="false" />
+ </inspection_tool>
+ <inspection_tool class="DuplicateBooleanBranch" level="WARNING" enabled="true" />
+ <inspection_tool class="DuplicateCondition" level="WARNING" enabled="true">
+ <option name="ignoreMethodCalls" value="false" />
+ </inspection_tool>
+ <inspection_tool class="DoubleNegation" level="WARNING" enabled="true" />
+ <inspection_tool class="SwitchStatementsWithoutDefault" level="WARNING" enabled="true">
+ <option name="m_ignoreFullyCoveredEnums" value="true" />
+ </inspection_tool>
+ <inspection_tool class="UnnecessaryDefault" level="WARNING" enabled="true" />
+ <inspection_tool class="ReuseOfLocalVariable" level="WARNING" enabled="true" />
+ <inspection_tool class="TooBroadScope" level="WARNING" enabled="true">
+ <option name="m_allowConstructorAsInitializer" value="false" />
+ <option name="m_onlyLookAtBlocks" value="false" />
+ </inspection_tool>
+ <inspection_tool class="RedundantSuppression" level="WARNING" enabled="true" />
+ <inspection_tool class="UnusedLibrary" level="WARNING" enabled="true" />
+ <inspection_tool class="CyclicClassDependency" level="WARNING" enabled="true" />
+ <inspection_tool class="CyclicPackageDependency" level="WARNING" enabled="true" />
+ <inspection_tool class="PublicField" level="WARNING" enabled="true">
+ <option name="ignoreEnums" value="false" />
+ </inspection_tool>
+ <inspection_tool class="ReturnOfCollectionField" level="WARNING" enabled="true">
+ <option name="ignorePrivateMethods" value="true" />
+ </inspection_tool>
+ <inspection_tool class="ReturnOfDateField" level="WARNING" enabled="true" />
+ <inspection_tool class="CatchGenericClass" level="WARNING" enabled="true" />
+ <inspection_tool class="InstanceofCatchParameter" level="WARNING" enabled="true" />
+ <inspection_tool class="FinalizeNotProtected" level="WARNING" enabled="true" />
+ <inspection_tool class="EqualsAndHashcode" level="WARNING" enabled="true" />
+ <inspection_tool class="OnDemandImport" level="WARNING" enabled="true" />
+ <inspection_tool class="SamePackageImport" level="WARNING" enabled="true" />
+ <inspection_tool class="JavaLangImport" level="WARNING" enabled="true" />
+ <inspection_tool class="UnusedImport" level="WARNING" enabled="true" />
+ <inspection_tool class="RedundantImport" level="WARNING" enabled="true" />
+ <inspection_tool class="ExtendsUtilityClass" level="WARNING" enabled="true" />
+ <inspection_tool class="RedundantMethodOverride" level="WARNING" enabled="true" />
+ <inspection_tool class="TypeParameterExtendsFinalClass" level="WARNING" enabled="true" />
+ <inspection_tool class="AbstractMethodCallInConstructor" level="WARNING" enabled="true" />
+ <inspection_tool class="InstanceVariableInitialization" level="WARNING" enabled="true">
+ <option name="m_ignorePrimitives" value="true" />
+ </inspection_tool>
+ <inspection_tool class="InstanceVariableUninitializedUse" level="WARNING" enabled="true">
+ <option name="m_ignorePrimitives" value="false" />
+ </inspection_tool>
+ <inspection_tool class="NonFinalStaticVariableUsedInClassInitialization" level="WARNING" enabled="true" />
+ <inspection_tool class="OverridableMethodCallDuringObjectConstruction" level="WARNING" enabled="true" />
+ <inspection_tool class="OverriddenMethodCallDuringObjectConstruction" level="WARNING" enabled="true" />
+ <inspection_tool class="StaticVariableInitialization" level="WARNING" enabled="true">
+ <option name="m_ignorePrimitives" value="false" />
+ </inspection_tool>
+ <inspection_tool class="StaticVariableUninitializedUse" level="WARNING" enabled="true">
+ <option name="m_ignorePrimitives" value="false" />
+ </inspection_tool>
+ <inspection_tool class="ThisEscapedInConstructor" level="WARNING" enabled="true" />
+ <inspection_tool class="NonThreadSafeLazyInitialization" level="WARNING" enabled="true" />
+ <inspection_tool class="DuplicatePropertyInspection" level="WARNING" enabled="true">
+ <option name="CURRENT_FILE" value="true" />
+ <option name="MODULE_WITH_DEPENDENCIES" value="false" />
+ <option name="CHECK_DUPLICATE_VALUES" value="true" />
+ <option name="CHECK_DUPLICATE_KEYS" value="true" />
+ <option name="CHECK_DUPLICATE_KEYS_WITH_DIFFERENT_VALUES" value="true" />
+ </inspection_tool>
+ <inspection_tool class="LossyEncoding" level="WARNING" enabled="true" />
+ <inspection_tool class="IndexOfReplaceableByContains" level="WARNING" enabled="true" />
+ <inspection_tool class="RawUseOfParameterizedType" level="WARNING" enabled="true">
+ <option name="ignoreObjectConstruction" value="true" />
+ <option name="ignoreTypeCasts" value="false" />
+ </inspection_tool>
+ <inspection_tool class="EnumerationCanBeIteration" level="WARNING" enabled="true" />
+ <inspection_tool class="AssertAsName" level="WARNING" enabled="true" />
+ <inspection_tool class="EnumAsName" level="WARNING" enabled="true" />
+ <inspection_tool class="BeforeOrAfterIsPublicVoidNoArg" level="WARNING" enabled="true" />
+ <inspection_tool class="BeforeClassOrAfterClassIsPublicStaticVoidNoArg" level="WARNING" enabled="true" />
+ <inspection_tool class="AssertsWithoutMessages" level="WARNING" enabled="true" />
+ <inspection_tool class="MisorderedAssertEqualsParameters" level="WARNING" enabled="true" />
+ <inspection_tool class="SetupCallsSuperSetup" level="WARNING" enabled="true" />
+ <inspection_tool class="MisspelledSetUp" level="WARNING" enabled="true" />
+ <inspection_tool class="SetupIsPublicVoidNoArg" level="WARNING" enabled="true" />
+ <inspection_tool class="SimplifiableJUnitAssertion" level="WARNING" enabled="true" />
+ <inspection_tool class="StaticSuite" level="WARNING" enabled="true" />
+ <inspection_tool class="TeardownCallsSuperTeardown" level="WARNING" enabled="true" />
+ <inspection_tool class="MisspelledTearDown" level="WARNING" enabled="true" />
+ <inspection_tool class="TeardownIsPublicVoidNoArg" level="WARNING" enabled="true" />
+ <inspection_tool class="UnconstructableTestCase" level="WARNING" enabled="true" />
+ <inspection_tool class="TestMethodIsPublicVoidNoArg" level="WARNING" enabled="true" />
+ <inspection_tool class="TestCaseWithConstructor" level="WARNING" enabled="true" />
+ <inspection_tool class="TestCaseInProductCode" level="WARNING" enabled="true" />
+ <inspection_tool class="TestMethodWithoutAssertion" level="WARNING" enabled="true" />
+ <inspection_tool class="TestMethodInProductCode" level="WARNING" enabled="true" />
+ <inspection_tool class="JUnitTestClassNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[A-Z][A-Za-z\d]*Test" />
+ <option name="m_minLength" value="8" />
+ <option name="m_maxLength" value="64" />
+ </inspection_tool>
+ <inspection_tool class="TestCaseWithNoTestMethods" level="WARNING" enabled="true">
+ <option name="ignoreSupers" value="false" />
+ </inspection_tool>
+ <inspection_tool class="JUnitAbstractTestClassNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[A-Z][A-Za-z\d]*TestCase" />
+ <option name="m_minLength" value="12" />
+ <option name="m_maxLength" value="64" />
+ </inspection_tool>
+ <inspection_tool class="AnnotationNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[A-Z][A-Za-z\d]*" />
+ <option name="m_minLength" value="8" />
+ <option name="m_maxLength" value="64" />
+ </inspection_tool>
+ <inspection_tool class="BooleanMethodNameMustStartWithQuestion" level="WARNING" enabled="true">
+ <option name="questionString" value="is,can,has,should,could,will,shall,check,contains,equals,add,put,remove,startsWith,endsWith" />
+ </inspection_tool>
+ <inspection_tool class="ClassNameSameAsAncestorName" level="WARNING" enabled="true" />
+ <inspection_tool class="ClassNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[A-Z][A-Za-z\d]*" />
+ <option name="m_minLength" value="8" />
+ <option name="m_maxLength" value="64" />
+ </inspection_tool>
+ <inspection_tool class="ConfusingMainMethod" level="WARNING" enabled="true" />
+ <inspection_tool class="ConstantNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[A-Z_\d]*" />
+ <option name="m_minLength" value="5" />
+ <option name="m_maxLength" value="32" />
+ </inspection_tool>
+ <inspection_tool class="EnumeratedClassNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[A-Z][A-Za-z\d]*" />
+ <option name="m_minLength" value="8" />
+ <option name="m_maxLength" value="64" />
+ </inspection_tool>
+ <inspection_tool class="EnumeratedConstantNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[A-Z][A-Za-z\d]*|[A-Z_\d]*" />
+ <option name="m_minLength" value="5" />
+ <option name="m_maxLength" value="32" />
+ </inspection_tool>
+ <inspection_tool class="ExceptionNameDoesntEndWithException" level="WARNING" enabled="true" />
+ <inspection_tool class="InstanceMethodNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[a-z][A-Za-z\d]*" />
+ <option name="m_minLength" value="4" />
+ <option name="m_maxLength" value="32" />
+ </inspection_tool>
+ <inspection_tool class="InstanceVariableNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[a-z][A-Za-z\d]*" />
+ <option name="m_minLength" value="3" />
+ <option name="m_maxLength" value="32" />
+ </inspection_tool>
+ <inspection_tool class="InterfaceNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[A-Z][A-Za-z\d]*" />
+ <option name="m_minLength" value="8" />
+ <option name="m_maxLength" value="64" />
+ </inspection_tool>
+ <inspection_tool class="LocalVariableNamingConvention" level="WARNING" enabled="true">
+ <option name="m_ignoreForLoopParameters" value="false" />
+ <option name="m_ignoreCatchParameters" value="false" />
+ <option name="m_regex" value="[a-z][A-Za-z\d]*" />
+ <option name="m_minLength" value="1" />
+ <option name="m_maxLength" value="32" />
+ </inspection_tool>
+ <inspection_tool class="MethodNameSameAsClassName" level="WARNING" enabled="true" />
+ <inspection_tool class="MethodNameSameAsParentName" level="WARNING" enabled="true" />
+ <inspection_tool class="MethodNamesDifferOnlyByCase" level="WARNING" enabled="true" />
+ <inspection_tool class="ParameterNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[a-z][A-Za-z\d]*" />
+ <option name="m_minLength" value="1" />
+ <option name="m_maxLength" value="20" />
+ </inspection_tool>
+ <inspection_tool class="NonBooleanMethodNameMayNotStartWithQuestion" level="WARNING" enabled="true">
+ <option name="questionString" value="is,can,has,should,could,will,shall,check,contains,equals,startsWith,endsWith" />
+ </inspection_tool>
+ <inspection_tool class="UpperCaseFieldNameNotConstant" level="WARNING" enabled="true" />
+ <inspection_tool class="NonExceptionNameEndsWithException" level="WARNING" enabled="true" />
+ <inspection_tool class="OverloadedVarargsMethod" level="WARNING" enabled="true" />
+ <inspection_tool class="ParameterNameDiffersFromOverriddenParameter" level="WARNING" enabled="true">
+ <option name="m_ignoreSingleCharacterNames" value="false" />
+ <option name="m_ignoreOverridesOfLibraryMethods" value="false" />
+ </inspection_tool>
+ <inspection_tool class="QuestionableName" level="WARNING" enabled="true">
+ <option name="nameString" value="aa,abc,bad,bar,bar2,baz,baz1,baz2,baz3,bb,blah,bogus,bool,cc,dd,defau1t,dummy,dummy2,ee,fa1se,ff,foo,foo1,foo2,foo3,foobar,four,fred,fred1,fred2,gg,hh,hello,hello1,hello2,hello3,ii,nu11,one,silly,silly2,string,two,that,then,three,whi1e,var" />
+ </inspection_tool>
+ <inspection_tool class="StandardVariableNames" level="WARNING" enabled="true" />
+ <inspection_tool class="StaticMethodNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[a-z][A-Za-z\d]*" />
+ <option name="m_minLength" value="4" />
+ <option name="m_maxLength" value="32" />
+ </inspection_tool>
+ <inspection_tool class="StaticVariableNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[a-z][A-Za-z\d]*" />
+ <option name="m_minLength" value="5" />
+ <option name="m_maxLength" value="32" />
+ </inspection_tool>
+ <inspection_tool class="TypeParameterNamingConvention" level="WARNING" enabled="true">
+ <option name="m_regex" value="[A-Z\d]" />
+ <option name="m_minLength" value="1" />
+ <option name="m_maxLength" value="1" />
+ </inspection_tool>
+ <inspection_tool class="DollarSignInName" level="WARNING" enabled="true" />
+ <inspection_tool class="MethodOverloadsParentMethod" level="WARNING" enabled="true" />
+ <inspection_tool class="SuspiciousMethodCalls" level="WARNING" enabled="true">
+ <option name="REPORT_CONVERTIBLE_METHOD_CALLS" value="false" />
+ </inspection_tool>
</profile>
</profiles>
<list size="4">
@@ -411,13 +630,23 @@
<component name="ProjectFileVersion" converted="true" />
<component name="ProjectModuleManager">
<modules>
+ <module fileurl="file://$PROJECT_DIR$/progs/batcher/trunk/Batcher.iml" filepath="$PROJECT_DIR$/progs/batcher/trunk/Batcher.iml" group="progs" />
<module fileurl="file://$PROJECT_DIR$/progs/jeduca/trunk/JEduca.iml" filepath="$PROJECT_DIR$/progs/jeduca/trunk/JEduca.iml" group="progs" />
+ <module fileurl="file://$PROJECT_DIR$/tools/archStat/trunk/archStat.iml" filepath="$PROJECT_DIR$/tools/archStat/trunk/archStat.iml" group="tools" />
+ <module fileurl="file://$PROJECT_DIR$/progs/cardlearn/trunk/cardlearn.iml" filepath="$PROJECT_DIR$/progs/cardlearn/trunk/cardlearn.iml" group="progs" />
<module fileurl="file://$PROJECT_DIR$/common/trunk/common.iml" filepath="$PROJECT_DIR$/common/trunk/common.iml" />
<module fileurl="file://$PROJECT_DIR$/tools/cstyle/trunk/cstyle.iml" filepath="$PROJECT_DIR$/tools/cstyle/trunk/cstyle.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/tools/dircount/trunk/dircount.iml" filepath="$PROJECT_DIR$/tools/dircount/trunk/dircount.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/tools/findLongestPath/trunk/findLongestPath.iml" filepath="$PROJECT_DIR$/tools/findLongestPath/trunk/findLongestPath.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/tools/fontbrowser/trunk/fontbrowser.iml" filepath="$PROJECT_DIR$/tools/fontbrowser/trunk/fontbrowser.iml" group="tools" />
+ <module fileurl="file://$PROJECT_DIR$/tools/gdbControl/trunk/gdbControl.iml" filepath="$PROJECT_DIR$/tools/gdbControl/trunk/gdbControl.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/historic/trunk/historic.iml" filepath="$PROJECT_DIR$/historic/trunk/historic.iml" />
+ <module fileurl="file://$PROJECT_DIR$/tools/jgrep/jgrep/jgrep.iml" filepath="$PROJECT_DIR$/tools/jgrep/jgrep/jgrep.iml" group="tools" />
+ <module fileurl="file://$PROJECT_DIR$/progs/jhexedit/trunk/jhexedit.iml" filepath="$PROJECT_DIR$/progs/jhexedit/trunk/jhexedit.iml" group="progs" />
+ <module fileurl="file://$PROJECT_DIR$/progs/jhexview/trunk/jhexview.iml" filepath="$PROJECT_DIR$/progs/jhexview/trunk/jhexview.iml" group="progs" />
+ <module fileurl="file://$PROJECT_DIR$/progs/jirus/trunk/jirus.iml" filepath="$PROJECT_DIR$/progs/jirus/trunk/jirus.iml" group="progs" />
+ <module fileurl="file://$PROJECT_DIR$/games/jmines/trunk/jmines.iml" filepath="$PROJECT_DIR$/games/jmines/trunk/jmines.iml" group="games" />
+ <module fileurl="file://$PROJECT_DIR$/progs/jtype/trunk/jtype.iml" filepath="$PROJECT_DIR$/progs/jtype/trunk/jtype.iml" group="progs" />
<module fileurl="file://$PROJECT_DIR$/tools/jwget/trunk/jwget.iml" filepath="$PROJECT_DIR$/tools/jwget/trunk/jwget.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/tools/keystrokes/trunk/keystrokes.iml" filepath="$PROJECT_DIR$/tools/keystrokes/trunk/keystrokes.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/libs/argparser/trunk/libs-argparser.iml" filepath="$PROJECT_DIR$/libs/argparser/trunk/libs-argparser.iml" group="libs" />
@@ -444,15 +673,44 @@
<module fileurl="file://$PROJECT_DIR$/libs/taglets/trunk/libs-taglets.iml" filepath="$PROJECT_DIR$/libs/taglets/trunk/libs-taglets.iml" group="libs" />
<module fileurl="file://$PROJECT_DIR$/libs/util/trunk/libs-util.iml" filepath="$PROJECT_DIR$/libs/util/trunk/libs-util.iml" group="libs" />
<module fileurl="file://$PROJECT_DIR$/libs/xml/trunk/libs-xml.iml" filepath="$PROJECT_DIR$/libs/xml/trunk/libs-xml.iml" group="libs" />
+ <module fileurl="file://$PROJECT_DIR$/tools/mail/trunk/mail.iml" filepath="$PROJECT_DIR$/tools/mail/trunk/mail.iml" group="tools" />
+ <module fileurl="file://$PROJECT_DIR$/libs/midi/trunk/midi.iml" filepath="$PROJECT_DIR$/libs/midi/trunk/midi.iml" group="libs" />
+ <module fileurl="file://$PROJECT_DIR$/tools/midiDeviceLister/trunk/midiDeviceLister.iml" filepath="$PROJECT_DIR$/tools/midiDeviceLister/trunk/midiDeviceLister.iml" group="tools" />
+ <module fileurl="file://$PROJECT_DIR$/tools/midiMonitor/trunk/midiMonitor.iml" filepath="$PROJECT_DIR$/tools/midiMonitor/trunk/midiMonitor.iml" group="tools" />
+ <module fileurl="file://$PROJECT_DIR$/progs/midilearn/trunk/midilearn.iml" filepath="$PROJECT_DIR$/progs/midilearn/trunk/midilearn.iml" group="progs" />
<module fileurl="file://$PROJECT_DIR$/tools/prefsbrowser/trunk/prefsbrowser.iml" filepath="$PROJECT_DIR$/tools/prefsbrowser/trunk/prefsbrowser.iml" group="tools" />
- <module fileurl="file://$PROJECT_DIR$/progs/requisitor/trunk/requisitor.iml" filepath="$PROJECT_DIR$/progs/requisitor/trunk/requisitor.iml" group="progs" />
+ <module fileurl="file://$PROJECT_DIR$/tools/replacer/trunk/replacer.iml" filepath="$PROJECT_DIR$/tools/replacer/trunk/replacer.iml" group="tools" />
+ <module fileurl="file://$PROJECT_DIR$/tools/scriptEngineLister/trunk/scriptEngineLister.iml" filepath="$PROJECT_DIR$/tools/scriptEngineLister/trunk/scriptEngineLister.iml" group="tools" />
+ <module fileurl="file://$PROJECT_DIR$/tools/scriptInterpreter/trunk/scriptInterpreter.iml" filepath="$PROJECT_DIR$/tools/scriptInterpreter/trunk/scriptInterpreter.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/site/trunk/site.iml" filepath="$PROJECT_DIR$/site/trunk/site.iml" />
<module fileurl="file://$PROJECT_DIR$/tools/string2bytes/trunk/string2bytes.iml" filepath="$PROJECT_DIR$/tools/string2bytes/trunk/string2bytes.iml" group="tools" />
+ <module fileurl="file://$PROJECT_DIR$/progs/textedit/trunk/textedit.iml" filepath="$PROJECT_DIR$/progs/textedit/trunk/textedit.iml" group="progs" />
+ <module fileurl="file://$PROJECT_DIR$/tools/todoScanner/trunk/todoScanner.iml" filepath="$PROJECT_DIR$/tools/todoScanner/trunk/todoScanner.iml" group="tools" />
</modules>
</component>
- <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
+ <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="latest" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
+ <component name="ProjectRunConfigurationManager">
+ <configuration default="false" name="JEduca" type="Application" factoryName="Application" enabled="false" merge="false">
+ <option name="MAIN_CLASS_NAME" value="net.sf.japi.progs.jeduca.jtest.Main" />
+ <option name="VM_PARAMETERS" value="" />
+ <option name="PROGRAM_PARAMETERS" value="" />
+ <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" value="" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <module name="JEduca" />
+ <envs />
+ <RunnerSettings RunnerId="Run" />
+ <ConfigurationWrapper RunnerId="Run" />
+ <method>
+ <option name="Make" value="true" />
+ </method>
+ </configuration>
+ </component>
<component name="ResourceManagerContainer">
<option name="myResourceBundles">
<value>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 18:10:09
|
Revision: 729
http://japi.svn.sourceforge.net/japi/?rev=729&view=rev
Author: christianhujer
Date: 2008-11-30 18:10:04 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Removed classes from historic that are now in separate modules.
Modified Paths:
--------------
historic/trunk/historic.iml
historic/trunk/src/app/net/sf/japi/io/BCD.java
historic/trunk/src/app/net/sf/japi/sql/ResultSetTableModel.java
historic/trunk/src/app/net/sf/japi/sql/ScrollResultSetTableModel.java
historic/trunk/src/app/net/sf/japi/util/PrintStreamThrowableHandler.java
historic/trunk/src/doc/guide/io/src/CatPlain.java
historic/trunk/src/doc/guide/swing/action/fromScratch/src/net/sf/japi/examples/editor/Editor.java
historic/trunk/src/doc/guide/swing/tod/src/ex/TodExampleApp.java
historic/trunk/src/test/net/sf/japi/io/BCDTest.java
Removed Paths:
-------------
historic/trunk/src/app/net/sf/japi/swing/ColumnLayout.java
historic/trunk/src/app/net/sf/japi/swing/IconManager.java
historic/trunk/src/app/net/sf/japi/swing/JFileChooserButton.java
historic/trunk/src/app/net/sf/japi/swing/JFileField.java
historic/trunk/src/app/net/sf/japi/swing/JSAXErrorHandler.java
historic/trunk/src/app/net/sf/japi/swing/LocaleListCellRenderer.java
historic/trunk/src/app/net/sf/japi/swing/Progress.java
historic/trunk/src/app/net/sf/japi/swing/ProgressDisplay.java
historic/trunk/src/app/net/sf/japi/swing/TipOfTheDayManager.java
historic/trunk/src/app/net/sf/japi/swing/ToolBarLayout.java
historic/trunk/src/app/net/sf/japi/swing/bookmarks/
historic/trunk/src/app/net/sf/japi/swing/font/
historic/trunk/src/app/net/sf/japi/swing/io/
historic/trunk/src/app/net/sf/japi/swing/prefs/
historic/trunk/src/app/net/sf/japi/swing/treetable/
historic/trunk/src/app/net/sf/japi/tools/Tool.java
historic/trunk/src/app/net/sf/japi/util/Arrays2.java
historic/trunk/src/app/net/sf/japi/util/Collections2.java
historic/trunk/src/app/net/sf/japi/util/EmptyEnumeration.java
historic/trunk/src/app/net/sf/japi/util/EmptyIterator.java
historic/trunk/src/app/net/sf/japi/util/EndianConverter.java
historic/trunk/src/app/net/sf/japi/util/EnumerationIterator.java
historic/trunk/src/app/net/sf/japi/util/IteratorEnumeration.java
historic/trunk/src/app/net/sf/japi/util/IteratorIterable.java
historic/trunk/src/app/net/sf/japi/util/NotNullIterator.java
historic/trunk/src/app/net/sf/japi/util/ThrowableHandler.java
historic/trunk/src/app/net/sf/japi/util/filter/
historic/trunk/src/test/net/sf/japi/lang/
historic/trunk/src/test/net/sf/japi/util/EnumerationIteratorTest.java
historic/trunk/src/test/net/sf/japi/util/NodeListIteratorTest.java
historic/trunk/src/test/net/sf/japi/util/UtilTest.java
Modified: historic/trunk/historic.iml
===================================================================
--- historic/trunk/historic.iml 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/historic.iml 2008-11-30 18:10:04 UTC (rev 729)
@@ -9,6 +9,7 @@
<sourceFolder url="file://$MODULE_DIR$/src/doc/guide/swing/action/fromScratch/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/doc/guide/swing/prefs/keys/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/doc/guide/swing/tod/src" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" packagePrefix="test" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
@@ -17,6 +18,12 @@
<orderEntry type="module" module-name="libs-swing-action" />
<orderEntry type="module" module-name="libs-swing-keyprefs" />
<orderEntry type="module" module-name="libs-argparser" />
+ <orderEntry type="module" module-name="libs-util" />
+ <orderEntry type="module" module-name="libs-swing-tod" />
+ <orderEntry type="module" module-name="libs-swing-extlib" />
+ <orderEntry type="module" module-name="libs-swing-prefs" />
+ <orderEntry type="library" name="junit" level="project" />
+ <orderEntry type="module" module-name="libs-xml" />
<orderEntryProperties />
</component>
<component name="copyright">
Modified: historic/trunk/src/app/net/sf/japi/io/BCD.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/io/BCD.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/io/BCD.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -59,7 +59,7 @@
return bcd;
}
- /** Check wether a BCD value is correct.
+ /** Check whether a BCD value is correct.
* If the supplied value contains a nibble with a value >= 10, it will throw an IllegalArgumentException.
* Otherwise it will simply return.
* @param bcd number to check
@@ -72,7 +72,7 @@
}
}
- /** Check wether a BCD value is correct.
+ /** Check whether a BCD value is correct.
* @param bcd bcd value to check
* @return <code>true</code> if supplied value is bcd, otherwise <code>false</code>
*/
Modified: historic/trunk/src/app/net/sf/japi/sql/ResultSetTableModel.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/sql/ResultSetTableModel.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/sql/ResultSetTableModel.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -23,7 +23,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.swing.table.TableModel;
-import net.sf.japi.util.ThrowableHandler;
+import net.sf.japi.util.ThrowableHandler;import org.jetbrains.annotations.Nullable;
/** Interface for TableModels which handle information from ResultSets.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
@@ -38,7 +38,7 @@
/** Get the ResultSet.
* @return ResultSet or <code>null</code> if there is no current result set
*/
- ResultSet getResultSet();
+ @Nullable ResultSet getResultSet();
/** Adds a ThrowableHandler to this model.
* @param throwableHandler ThrowableHandler to add
Modified: historic/trunk/src/app/net/sf/japi/sql/ScrollResultSetTableModel.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/sql/ScrollResultSetTableModel.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/sql/ScrollResultSetTableModel.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -88,7 +88,7 @@
}
/** {@inheritDoc} */
- public void setResultSet(final ResultSet resultSet) {
+ public void setResultSet(@Nullable final ResultSet resultSet) {
this.resultSet = resultSet;
updateResultSetData();
}
@@ -107,7 +107,7 @@
}
/** {@inheritDoc} */
- public ResultSet getResultSet() {
+ @Nullable public ResultSet getResultSet() {
return resultSet;
}
@@ -361,7 +361,7 @@
/** Get the meta data.
* @return meta data
*/
- public ResultSetMetaData getMetaData() {
+ @Nullable public ResultSetMetaData getMetaData() {
return metaData;
}
Deleted: historic/trunk/src/app/net/sf/japi/swing/ColumnLayout.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/ColumnLayout.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/ColumnLayout.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,168 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Insets;
-import java.awt.LayoutManager;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-/** Layout similar to FlowLayout, but using columns (vertical layout) instead of rows (horizontal layout).
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- */
-@SuppressWarnings({"NonPrivateFieldAccessedInSynchronizedContext", "FieldAccessedSynchronizedAndUnsynchronized"})
-public class ColumnLayout implements LayoutManager {
-
- /** Horizontal Gap. */
- private int hgap = 4;
-
- /** Vertical Gap. */
- private int vgap = 4;
-
- /** Create a ColumnLayout with default gaps (4, 4). */
- public ColumnLayout() {
- }
-
- /** Create a ColumnLayout with defined gaps.
- * @param hgap horizontal gap
- * @param vgap vertical gap
- */
- public ColumnLayout(final int hgap, final int vgap) {
- this.hgap = hgap;
- this.vgap = vgap;
- }
-
- /** Returns horizontal Gap.
- * @return horizontal Gap.
- */
- public int getHgap() {
- return hgap;
- }
-
- /** Sets horizontal Gap.
- * @param hgap horizontal Gap.
- */
- public void setHgap(final int hgap) {
- this.hgap = hgap;
- }
-
- /** Returns vertical Gap.
- * @return vertical Gap.
- */
- public int getVgap() {
- return vgap;
- }
-
- /** Sets vertical Gap.
- * @param vgap vertical Gap.
- */
- public void setVgap(final int vgap) {
- this.vgap = vgap;
- }
-
- /** {@inheritDoc} */
- public void addLayoutComponent(@Nullable final String name, @Nullable final Component comp) {
- // Superfluous
- }
-
- /** {@inheritDoc} */
- public void removeLayoutComponent(@Nullable final Component comp) {
- // Superfluous
- }
-
- /** {@inheritDoc} */
- @NotNull public Dimension preferredLayoutSize(@NotNull final Container parent) {
- synchronized (parent.getTreeLock()) {
- final Dimension preferredLayoutSize = new Dimension();
- final int nmembers = parent.getComponentCount();
- for (int i = 0; i < nmembers; i++) {
- final Component comp = parent.getComponent(i);
- if (comp.isVisible()) {
- final Dimension dim = comp.getPreferredSize();
- preferredLayoutSize.width = Math.max(preferredLayoutSize.width, dim.width);
- if (i > 0) {
- preferredLayoutSize.height += vgap;
- }
- preferredLayoutSize.height += dim.height;
- }
- }
- final Insets insets = parent.getInsets();
- preferredLayoutSize.width += insets.left + insets.right + (hgap << 1);
- preferredLayoutSize.height += insets.top + insets.bottom + (vgap << 1);
- return preferredLayoutSize;
- }
- }
-
- /** {@inheritDoc} */
- @NotNull public Dimension minimumLayoutSize(@NotNull final Container parent) {
- synchronized (parent.getTreeLock()) {
- final Dimension minimumLayoutSize = new Dimension();
- final int nmembers = parent.getComponentCount();
- for (int i = 0; i < nmembers; i++) {
- final Component comp = parent.getComponent(i);
- if (comp.isVisible()) {
- final Dimension dim = comp.getMinimumSize();
- minimumLayoutSize.width = Math.max(minimumLayoutSize.width, dim.width);
- if (i > 0) {
- minimumLayoutSize.height += vgap;
- }
- minimumLayoutSize.height += dim.height;
- }
- }
- final Insets insets = parent.getInsets();
- minimumLayoutSize.width += insets.left + insets.right + (hgap << 1);
- minimumLayoutSize.height += insets.top + insets.bottom + (vgap << 1);
- return minimumLayoutSize;
- }
- }
-
- /** {@inheritDoc} */
- public void layoutContainer(@NotNull final Container parent) {
- synchronized (parent.getTreeLock()) {
- final Insets insets = parent.getInsets();
- final int nmembers = parent.getComponentCount();
- final int maxheight = parent.getHeight() - (insets.left + insets.right + (vgap << 1));
- int maxwidth = 0;
- int y = 0;
- int x = insets.left + hgap;
- for (int i = 0; i < nmembers; i++) {
- final Component comp = parent.getComponent(i);
- if (comp.isVisible()) {
- final Dimension dim = comp.getPreferredSize();
- comp.setSize(dim);
- if (y + vgap + comp.getHeight() > maxheight) {
- y = 0;
- x += maxwidth + hgap;
- maxwidth = 0;
- }
- maxwidth = comp.getWidth() > maxwidth ? comp.getWidth() : maxwidth;
- y += vgap;
- comp.setLocation(x, y);
- y += comp.getHeight();
- }
- }
- }
- }
-
-} // class ColumnLayout
Deleted: historic/trunk/src/app/net/sf/japi/swing/IconManager.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/IconManager.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/IconManager.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,156 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.WeakHashMap;
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-import org.jetbrains.annotations.Nullable;
-
-/** Class to handle icons.
- * Default size is 16.
- * Instances must have an associated ClassLoader, otherwise several methods will not work properly but throw a NullPointerException instead.
- * So if you do not provide a ClassLoader, be sure the class you provide has one, or if you use the no-arg constructor resp. the default instance, be
- * sure the IconManager class itself was loaded with some ClassLoader other than <code>null</code>.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- * @todo this class should be refactored into a more generic version and accessible through ActionBuilder?
- * @todo it should be possible to initialize the paths through properties
- */
-public final class IconManager {
-
- /** The default IconManager. */
- private static final IconManager DEFAULT_ICON_MANAGER = createDefaultIconManager();
-
- /** Create the default IconManager.
- * @return default IconManager
- */
- private static IconManager createDefaultIconManager() {
- final IconManager defaultIconManager = new IconManager();
- defaultIconManager.iconPaths.add("icons/");
- defaultIconManager.iconPaths.add("toolbarButtonGraphics/");
- return defaultIconManager;
- }
-
- /** ClassLoader to get icons from, must not be null. */
- private final ClassLoader classLoader;
-
- /** The available sizes provided by this IconManager. */
- private final int[] availableSizes = { 16, 24 };
-
- /** The icon cache.
- * Key: short name for icon, which is likely to be used as a relative file name.
- * Value: Icon
- */
- private final Map<String,Icon> smallCache = new WeakHashMap<String,Icon>();
-
- /** The paths to search icons in. */
- private final List<String> iconPaths = new ArrayList<String>();
-
- /** Get the default IconManager.
- * The ClassLoader in use is the classloader IconManager was loaded with, whatever classloader that was.
- * @return default IconManaager
- */
- public static IconManager getDefaultIconManager() {
- return DEFAULT_ICON_MANAGER;
- }
-
- /** Create a IconManager.
- * Uses the IconManager's class loader.
- * Only use this if you want to be independent of the global icon size settings.
- * The recommended way to get a default IconManager instance is {#getDefaultIconManager()}.
- */
- public IconManager() {
- this(getContextClassLoader());
- //this(IconManager.class.getClassLoader());
- }
-
- private static ClassLoader getContextClassLoader() {
- return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- try {
- return Thread.currentThread().getContextClassLoader();
- } catch (final SecurityException e) {
- return getClass().getClassLoader();
- }
- }
- });
- }
-
- /** Create an IconManager.
- * @param clazz Class to get ClassLoader for IconManager
- */
- public IconManager(final Class<?> clazz) {
- classLoader = clazz.getClassLoader();
- }
-
- /** Create an IconManager.
- * @param cl ClassLoader to create IconManager for
- */
- public IconManager(final ClassLoader cl) {
- classLoader = cl;
- }
-
- /** Return the available sizes for icons.
- * @return available icon sizes
- */
- public int[] getAvailableSizes() {
- return availableSizes.clone();
- }
-
- /** Load an icon.
- * @param s icon name, like "general/About" or "navigation/Forward"
- * @return Icon for <var>s</var>
- */
- @Nullable public Icon getIcon(final String s) {
- Icon icon = smallCache.get(s);
- if (icon == null) {
- URL url = null;
- // Search the configured class loader
- for (final Iterator<String> it = iconPaths.iterator(); url == null && it.hasNext();) {
- final String path = it.next();
- final String iconPath = path + (path.endsWith("/") ? "" : "/") + s + ".gif";
- url = classLoader.getResource(iconPath);
- }
- if (url == null) {
- // if searching the configured class loader failed, search the system class loader
- for (final Iterator<String> it = iconPaths.iterator(); url == null && it.hasNext();) {
- final String path = it.next();
- final String iconPath = path + (path.endsWith("/") ? "" : "/") + s + ".gif";
- url = ClassLoader.getSystemResource(iconPath);
- }
- }
- if (url == null) {
- return null;
- }
- icon = new ImageIcon(url);
- smallCache.put(s, icon);
- }
- return icon;
- }
-
-} // class IconManager
Deleted: historic/trunk/src/app/net/sf/japi/swing/JFileChooserButton.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/JFileChooserButton.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/JFileChooserButton.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,159 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.awt.Insets;
-import java.io.File;
-import java.io.IOException;
-import javax.swing.JButton;
-import javax.swing.JFileChooser;
-import javax.swing.JTextField;
-
-/** JButton for choosing a file from hd.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- */
-public class JFileChooserButton extends JButton {
-
- /** Action Builder. */
- private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.japi.swing");
-
- /** The JTextField to read/write the file path to.
- * @serial include
- */
- private JTextField textField;
-
- /** The file selection mode.
- * @serial include
- */
- private int fileSelectionMode;
-
- /** The base directory for choosing files.
- * @serial include
- */
- private File base;
-
- /** The JFileChooser to use.
- * @serial include
- */
- private JFileChooser chooser;
-
- /** Create a ChooseButton.
- * A default chooser is used.
- * The current working directory is used as base directory.
- * @param textField JTextField to create button for
- * @param fileSelectionMode see {@link JFileChooser}
- */
- public JFileChooserButton(final JTextField textField, final int fileSelectionMode) {
- this(new File(System.getProperty("user.dir")), null, textField, fileSelectionMode);
- }
-
- /** Create a ChooseButton.
- * A default chooser is used.
- * @param base base directory to use
- * @param textField JTextField to create button for
- * @param fileSelectionMode see {@link JFileChooser}
- */
- public JFileChooserButton(final File base, final JTextField textField, final int fileSelectionMode) {
- this(base, null, textField, fileSelectionMode);
- }
-
- /** Create a ChooseButton.
- * A default chooser is used.
- * The current working directory is used as base directory.
- * @param chooser JFileChooser to associate with
- * @param textField JTextField to create button for
- * @param fileSelectionMode see {@link JFileChooser}
- */
- public JFileChooserButton(final JFileChooser chooser, final JTextField textField, final int fileSelectionMode) {
- this(new File(System.getProperty("user.dir")), chooser, textField, fileSelectionMode);
- }
-
- /** Create a ChooserButton.
- * @param base base directory to use
- * @param chooser JFileChooser to associate with
- * @param textField JTextField to create button for
- * @param fileSelectionMode see {@link JFileChooser}
- */
- public JFileChooserButton(final File base, final JFileChooser chooser, final JTextField textField, final int fileSelectionMode) {
- setAction(ACTION_BUILDER.createAction(false, "optionsChooseFile", this));
- this.textField = textField;
- this.fileSelectionMode = fileSelectionMode;
- setMargin(new Insets(0, 0, 0, 0));
- setChooser(chooser);
- setBase(base);
- }
-
- /** Set the JFileChooser associated with this JFileChooserButton.
- * @param chooser new JFileChooser to associate or <code>null</code> to instruct the button to create its own
- */
- public void setChooser(final JFileChooser chooser) {
- this.chooser = chooser != null ? chooser : new JFileChooser();
- }
-
- /** Set the base directory to choose files from.
- * This method always tries to convert the base file to canonical form.
- * If that fails, the base file is converted to absolute form instead.
- * @param base directory to choose files from
- */
- public void setBase(final File base) {
- try {
- this.base = base.getCanonicalFile();
- } catch (final IOException e) {
- this.base = base.getAbsoluteFile();
- }
- }
-
- /** Get the base directory to choose files from.
- * @return base directrory to which chosen files are resolved
- */
- public File getBase() {
- return base;
- }
-
- /** Get the JFileChooser associated with this JFileChooserButton.
- * @return associated JFileChooser
- */
- public JFileChooser getChooser() {
- return chooser;
- }
-
- /** Action method.
- * @used
- */
- public void optionsChooseFile() {
- final String oldFilename = textField.getText();
- final File oldFile = new File(base, oldFilename);
- chooser.setFileSelectionMode(fileSelectionMode);
- chooser.setMultiSelectionEnabled(false);
- if (oldFilename.length() > 0) {
- chooser.setCurrentDirectory(oldFile.getParentFile());
- chooser.setSelectedFile(oldFile);
- } else {
- chooser.setCurrentDirectory(base);
- chooser.setSelectedFile(null);
- }
- final int returnVal = chooser.showOpenDialog(this);
- if (returnVal == JFileChooser.APPROVE_OPTION) {
- textField.setText(base.toURI().relativize(chooser.getSelectedFile().toURI()).toString());
- }
- }
-
-} // class JFileChooserButton
Deleted: historic/trunk/src/app/net/sf/japi/swing/JFileField.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/JFileField.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/JFileField.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,75 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.awt.BorderLayout;
-import java.io.File;
-import javax.swing.JComponent;
-import javax.swing.JFileChooser;
-import javax.swing.JTextField;
-
-/** A class that displays a textfield for a file and a button for choosing the file.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- */
-public final class JFileField extends JComponent {
-
- /** The JTextField used to display the filename.
- * @serial include
- */
- private final JTextField textField;
-
- /** Create a FileField.
- * @param size Number of columns for the textfield part.
- */
- public JFileField(final int size) {
- textField = new JTextField(size);
- final JFileChooserButton button = new JFileChooserButton(textField, JFileChooser.FILES_ONLY);
- setLayout(new BorderLayout());
- add(textField, BorderLayout.CENTER);
- add(button, BorderLayout.LINE_END);
- }
-
- /** Create a FileField.
- * @param size Number of columns for the textfield part.
- */
- public JFileField(final JFileChooser fileChooser, final int size) {
- textField = new JTextField(size);
- final JFileChooserButton button = new JFileChooserButton(fileChooser, textField, JFileChooser.FILES_ONLY);
- setLayout(new BorderLayout());
- add(textField, BorderLayout.CENTER);
- add(button, BorderLayout.LINE_END);
- }
-
- /** Return the selected file.
- * @return selected file
- */
- public File getSelectedFile() {
- return new File(textField.getText());
- }
-
- /** Return the selected filename.
- * @return selected filename
- */
- public String getSelectedFilename() {
- return textField.getText();
- }
-
-} // class FileField
Deleted: historic/trunk/src/app/net/sf/japi/swing/JSAXErrorHandler.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/JSAXErrorHandler.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/JSAXErrorHandler.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,146 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.awt.Component;
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JOptionPane;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/** Implementation of {@link ErrorHandler} for displaying XML parser errors on the screen.
- * @warning DO NOT RELY ON THE INHERITANCE!
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- */
-public final class JSAXErrorHandler extends JOptionPane implements ErrorHandler {
-
- /** Action Builder. */
- private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.japi.swing");
-
- /** The JTextArea which displays the errors.
- * @serial include
- */
- private JTextArea errorPane = new JTextArea();
-
- /** The Dialog.
- * @serial include
- */
- private JDialog dialog;
-
- /** Parent component.
- * @serial include
- */
- private final Component parent;
-
- /** Button for closing.
- * @serial include
- */
- private JButton closeButton;
-
- /** Create a JSAXErrorHandler.
- * @param parent
- */
- public JSAXErrorHandler(final Component parent) {
- errorPane.setEditable(false);
- setMessage(new JScrollPane(errorPane));
- final JButton clearButton = new JButton(ACTION_BUILDER.createAction(false, "saxErrorClear", this));
- closeButton = new JButton(ACTION_BUILDER.createAction(false, "saxErrorClose", this));
- this.parent = parent;
- setOptions(new Object[] { closeButton, clearButton });
- }
-
- /** {@inheritDoc} */
- public void warning(final SAXParseException exception) throws SAXException {
- add("warning", exception);
- }
-
- /** {@inheritDoc} */
- public void error(final SAXParseException exception) throws SAXException {
- add("error", exception);
- }
-
- /** {@inheritDoc} */
- public void fatalError(final SAXParseException exception) throws SAXException {
- add("fatal", exception);
- }
-
- /** Add an exception.
- * @param level Error level
- * @param exception Exception
- */
- private void add(final String level, final SAXParseException exception) {
- final StringBuilder errorMsg = new StringBuilder();
- final int lineNumber = exception.getLineNumber();
- final int columnNumber = exception.getColumnNumber();
- errorMsg.append(exception.getSystemId());
- errorMsg.append(':');
- if (lineNumber != 0) {
- errorMsg.append(lineNumber);
- errorMsg.append(':');
- if (columnNumber != 0) {
- errorMsg.append(columnNumber);
- errorMsg.append(':');
- }
- }
- errorMsg.append(' ');
- errorMsg.append(level);
- errorMsg.append(": ");
- errorMsg.append(exception.getMessage());
- if (exception.getException() != null) {
- errorMsg.append(" (Cause: ");
- errorMsg.append(exception.getException().toString());
- errorMsg.append(')');
- }
- errorMsg.append('\n');
- errorPane.append(errorMsg.toString());
- showDialog();
- }
-
- /** Show the dialog. */
- private void showDialog() {
- if (dialog == null) {
- dialog = createDialog(parent, ACTION_BUILDER.getString("saxError_title"));
- closeButton.requestFocusInWindow();
- dialog.getRootPane().setDefaultButton(closeButton);
- dialog.setModal(false);
- dialog.setResizable(true);
- dialog.setVisible(true);
- }
- }
-
- /** Action method for clearing. */
- public void saxErrorClear() {
- errorPane.setText("");
- }
-
- /** Action method for closing. */
- public void saxErrorClose() {
- setValue(closeButton);
- dialog.setVisible(false);
- dialog.dispose();
- dialog = null;
- }
-
-} // class JSAXErrorHandler
Deleted: historic/trunk/src/app/net/sf/japi/swing/LocaleListCellRenderer.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/LocaleListCellRenderer.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/LocaleListCellRenderer.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,44 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.awt.Component;
-import java.util.Locale;
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.JLabel;
-import javax.swing.JList;
-
-/** Implementation of a ListCellRenderer that renders lists of {@link Locale} instances according to their names in the current default locale.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- */
-public final class LocaleListCellRenderer extends DefaultListCellRenderer {
-
- /** Serial Version UID. */
- private static final long serialVersionUID = 1L;
-
- /** {@inheritDoc} */
- @Override public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) {
- final JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
- label.setText(value == null ? "Default" : ((Locale) value).getDisplayName());
- return label;
- }
-
-} // class LocaleRenderer
Deleted: historic/trunk/src/app/net/sf/japi/swing/Progress.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/Progress.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/Progress.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,50 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.awt.Component;
-
-/** Interface for classes that are able to display progress.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- */
-public interface Progress {
-
- /** Progress has finished. */
- void finished();
-
- /** Get the Component that is responsible for rendering the progress.
- * This is useful if it is neccessary to open dialogs during the progress.
- * @return Component responsible for rendering the progress
- */
- Component getParentComponent();
-
- /** Set progress information text.
- * @param msg progress information text
- * @param max maximum progress value
- */
- void setLabel(String msg, int max);
-
- /** Set progress value.
- * @param value progress value
- */
- void setValue(int value);
-
-} // interface Progress
Deleted: historic/trunk/src/app/net/sf/japi/swing/ProgressDisplay.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/ProgressDisplay.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/ProgressDisplay.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,109 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.awt.BorderLayout;
-import static java.awt.Color.BLACK;
-import java.awt.Component;
-import java.awt.GridLayout;
-import static javax.swing.BorderFactory.createEmptyBorder;
-import javax.swing.JDialog;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JProgressBar;
-import static javax.swing.SwingConstants.CENTER;
-
-/** ProgressDisplay handles a popup dialog for the mainview
- * which displays a process progressBar.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- */
-public final class ProgressDisplay extends JDialog implements Progress {
-
- /** Serial Version UID. */
- private static final long serialVersionUID = 1L;
-
- /** The progress progressBar.
- * @serial include
- */
- private final JProgressBar progressBar; // the progress progressBar
-
- /** The text label.
- * @serial include
- */
- private final JLabel label;
-
- /** Create a ProgressDisplay.
- * @param parent Frame to display dialog on
- * @param title Title string for progress dialog
- * @param max initial maximum of progress points
- * @param text the initial label text
- */
- public ProgressDisplay(final JFrame parent, final String title, final int max, final String text) {
- super(parent, title, false);
- setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); // can't close
-
- final JPanel panel = new JPanel(new GridLayout(2, 1));
- panel.setBorder(createEmptyBorder(20, 15, 30, 15));
- label = new JLabel(text);
- label.setForeground(BLACK);
- panel.add(label);
-
- progressBar = new JProgressBar(0, max);
- progressBar.setValue(0);
- progressBar.setStringPainted(true);
- progressBar.setAlignmentY(CENTER);
- panel.add(progressBar);
-
- getContentPane().setLayout(new BorderLayout());
- getContentPane().add(panel);
- setSize(300, 140);
- setLocationRelativeTo(parent);
-
- setVisible(true);
- }
-
- /** {@inheritDoc} */
- public void finished() {
- setVisible(false);
- removeAll();
- dispose();
- }
-
- /** {@inheritDoc} */
- public void setValue(final int value) {
- final int max = progressBar.getMaximum();
- progressBar.setValue(value > max ? max : value);
- }
-
- /** {@inheritDoc} */
- public void setLabel(final String msg, final int max) {
- label.setText(msg);
- progressBar.setMaximum(max);
- progressBar.setValue(0);
- }
-
- /** {@inheritDoc} */
- public Component getParentComponent() {
- return this;
- }
-
-} // class ProgressDisplay
Deleted: historic/trunk/src/app/net/sf/japi/swing/TipOfTheDayManager.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/TipOfTheDayManager.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/TipOfTheDayManager.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,331 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.MissingResourceException;
-import java.util.Random;
-import java.util.ResourceBundle;
-import static java.util.ResourceBundle.getBundle;
-import java.util.prefs.Preferences;
-import static java.util.prefs.Preferences.userNodeForPackage;
-import javax.swing.Action;
-import static javax.swing.Action.ACCELERATOR_KEY;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JDialog;
-import javax.swing.JEditorPane;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JScrollPane;
-import javax.swing.KeyStroke;
-import static javax.swing.SwingConstants.TRAILING;
-import static net.sf.japi.swing.ActionBuilder.ACCELERATOR_KEY_2;
-import static net.sf.japi.swing.IconManager.getDefaultIconManager;
-import org.jetbrains.annotations.Nullable;
-
-/** Class that manages tips of the day.
- * The tips of the day are read from a property file.
- * The name of the property file is tried to retrieve in exactly the following order:
- * <ol>
- * <li>The System Property <code>net.sf.japi.swing.tod</code> is queried and taken as a ResourceBundle base name.</li>
- * <li>The Service file <code>META-INF/services/net.sf.japi.swing.tod</code> is read and its first line taken as a ResourceBundle base name.</li>
- * </ol>
- * If both fails, the behaviour is undefined.
- * <p/>
- * Setting the ResourceBundle for the TipOfTheDayManager via services is the preferred way, because you do not need any additional coding apart from
- * invoking the TipOfTheDayManager somewhere at startup.
- * <p />
- * The format of that property file follows the normal Java Properties convention, with the property keys being numbered, starting at "tod.text.1".
- * Example:
- * <pre># Tip Of The Days, English Version
- * tod.text.1=<html>For analysis with other tools you can export the symbol map to XML, MS-Excel and CSV.
- * tod.text.2=<html>For analysis with other tools you can export the mapping map to XML, MS-Excel and CSV.
- * tod.text.3=<html>The supported map file formats are: Intel, GCC and MSVC.
- * </pre>
- * @fixme The preferences properties lastTipOfTheDayNumber and showTipOfTheDayAtStartup are stored in the wrong package, they must be stored in the client package instead of this package
- * @todo Allow parametrization of properties, e.g. via a String sequence like <code>${property.name}</code>, which should then be looked up using
- * a defined scheme from one or perhaps more definable {@link ActionBuilder ActionBuilders}.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- * @serial exclude
- */
-public final class TipOfTheDayManager extends JOptionPane {
-
- /** Action Builder. */
- private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.japi.swing");
-
- /** Random number generator for random tods. */
- private static final Random RND = new Random();
-
- /** Preferences. */
- private static final Preferences PREFS = userNodeForPackage(TipOfTheDayManager.class);
-
- /** The Action keys used for accelerators. */
- private static final String[] ACCELERATOR_KEYS = new String[] { ACCELERATOR_KEY, ACCELERATOR_KEY_2 };
-
- /** The static instance. */
- private static final TipOfTheDayManager INSTANCE = new TipOfTheDayManager();
-
- /** JButton for close. */
- private JButton closeButton;
-
- /** JDialog. */
- private JDialog dialog;
-
- /** JCheckBox for showing at startup. */
- private JCheckBox showAtStartup = new JCheckBox(ACTION_BUILDER.createAction(false, "todShowAtStartup", null));
-
- /** The JLabel showing the current number of the tod. */
- private JLabel currentTodIndex = new JLabel();
-
- /** The JEditorPane displaying the tod text. */
- private JEditorPane todText = new JEditorPane("text/html", "");
-
- /** List with tod texts. */
- private List<String> todTexts = new ArrayList<String>();
-
- /** Number of current Tip of the day.
- * In visible state, the index must range between 0 and the number of tods available - 1, inclusive.
- */
- private int todIndex;
-
- /** Show Tip Of The Day at startup.
- * This method is only a proxy for show(Component) but looks at user preferences.
- * If the user chose not to see TipOfTheDays this method simply returns.
- * @param parentComponent the parent component of this dialog.
- */
- public static void showAtStartup(final Component parentComponent) {
- if (PREFS.getBoolean("showTipOfTheDayAtStartup", true)) {
- show(parentComponent);
- }
- }
-
- /** Show a Tip Of The Day.
- * @param parentComponent the parent component of this dialog.
- */
- public static void show(final Component parentComponent) {
- if (INSTANCE.dialog == null) {
- INSTANCE.dialog = INSTANCE.createDialog(parentComponent, ACTION_BUILDER.getString("tipOfTheDay.windowTitle"));
- }
- INSTANCE.dialog.getRootPane().setDefaultButton(INSTANCE.closeButton);
- INSTANCE.dialog.setModal(false);
- INSTANCE.dialog.setResizable(true);
- INSTANCE.dialog.setVisible(true);
- INSTANCE.closeButton.requestFocusInWindow();
- }
-
- /** Finds the bundle name.
- * @return bundle name
- */
- private static String getBundleName() {
- String bundleName = System.getProperty("net.sf.japi.swing.tod");
- if (bundleName == null) {
- bundleName = getServiceValue(getClassLoader());
- }
- return bundleName;
- }
-
- /** This method attempts to return the first line of the resource META_INF/services/net.sf.japi.swing.tod from the provided ClassLoader.
- * @param classLoader ClassLoader, may not be <code>null</code>.
- * @return first line of resource, or <code>null</code>
- */
- @Nullable private static String getServiceValue(final ClassLoader classLoader) {
- BufferedReader rd = null;
- try {
- final String serviceId = "META-INF/services/net.sf.japi.swing.tod";
- final InputStream in = getResourceAsStream(classLoader, serviceId);
- if (in != null) {
- try {
- rd = new BufferedReader(new InputStreamReader(in, "UTF-8"));
- } catch (final UnsupportedEncodingException e) {
- rd = new BufferedReader(new InputStreamReader(in));
- }
- return rd.readLine();
- }
- } catch (final Exception e) {
- /* ignore. */
- } finally {
- try { rd.close(); } catch (final Exception e) { /* ignore */ } finally { rd = null; }
- }
- return null;
- }
-
- /** Get a resource from a classloader as stream.
- * @param classLoader ClassLoader to get resource from
- * @param serviceId service file to get stream from
- * @return stream for resource <var>serviceId</var> in <var>classLoader</var>
- */
- private static InputStream getResourceAsStream(final ClassLoader classLoader, final String serviceId) {
- return AccessController.doPrivileged(new PrivilegedAction<InputStream>() {
-
- /** {@inheritDoc} */
- public InputStream run() {
- return classLoader == null ?
- ClassLoader.getSystemResourceAsStream(serviceId) :
- classLoader.getResourceAsStream(serviceId);
- }
-
- });
- }
-
- /** Get the ClassLoader.
- * @return ClassLoader
- */
- private static ClassLoader getClassLoader() {
- try {
- final ClassLoader contextClassLoader = getContextClassLoader();
- if (contextClassLoader != null) {
- return contextClassLoader;
- }
- } catch (final Exception e) {
- /* ignore */
- }
- return TipOfTheDayManager.class.getClassLoader();
- }
-
- /** Get the context ClassLoader.
- * @return context ClassLoader
- */
- private static ClassLoader getContextClassLoader() {
- return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
-
- /** {@inheritDoc} */
- @Nullable public ClassLoader run() {
- try {
- return Thread.currentThread().getContextClassLoader();
- } catch (final SecurityException ex) {
- return null;
- }
- }
-
- });
- }
-
- /** Constructor. */
- private TipOfTheDayManager() {
- final String[] keys = { "todPrev", "todRand", "todNext", "todClose" };
- final Action[] actions = new Action[keys.length];
- final Object[] newOptions = new Object[keys.length];
- for (int i = 0; i < keys.length; i++) {
- actions[i] = ACTION_BUILDER.createAction(false, keys[i], this);
- newOptions[i] = new JButton(actions[i]);
- if ("todClose".equals(keys[i])) {
- closeButton = (JButton) newOptions[i];
- }
- for (final String key : ACCELERATOR_KEYS) {
- final KeyStroke ks = (KeyStroke) actions[i].getValue(key);
- if (ks != null) {
- getInputMap(WHEN_IN_FOCUSED_WINDOW).put(ks, keys[i]);
- getActionMap().put(keys[i], actions[i]);
- }
- }
- }
- final Dimension size = new Dimension(512, 128);
- showAtStartup.setSelected(PREFS.getBoolean("showTipOfTheDayAtStartup", true));
- final JScrollPane todTextScroller = new JScrollPane(todText);
- todTextScroller.setMinimumSize(size);
- todTextScroller.setPreferredSize(size);
- todTextScroller.setFocusable(true);
- todTextScroller.setAutoscrolls(true);
- todText.setEditable(false);
- todText.setRequestFocusEnabled(false);
- currentTodIndex.setHorizontalAlignment(TRAILING);
- loadTodTexts();
- setTodIndex(PREFS.getInt("lastTipOfTheDayNumber", -1) + 1);
- setIcon(getDefaultIconManager().getIcon(ACTION_BUILDER.getString("tipOfTheDay.icon")));
- final JLabel heading = new JLabel(ACTION_BUILDER.getString("todHeading"));
- final Font oldFont = heading.getFont();
- heading.setFont(oldFont.deriveFont((float) (oldFont.getSize2D() * 1.5)));
- setMessage(new Object[] { heading, todTextScroller, currentTodIndex, showAtStartup });
- setMessageType(INFORMATION_MESSAGE);
- setOptions(newOptions);
- }
-
- /** Loads the Tip of the day texts. */
- private void loadTodTexts() {
- final ResourceBundle todBundle = getBundle(getBundleName());
- for (int i = 1;; i++) {
- try {
- todTexts.add(todBundle.getString(new StringBuilder().append("tod.text.").append(i).toString()));
- } catch (final MissingResourceException e) {
- break;
- }
- }
- }
-
- /** Sets the tod index.
- * @param todIndex new todIndex
- */
- private void setTodIndex(final int todIndex) {
- try {
- this.todIndex = (todIndex + todTexts.size()) % todTexts.size();
- todText.setText(todTexts.get(this.todIndex));
- currentTodIndex.setText(ACTION_BUILDER.format("todIndex", this.todIndex + 1, todTexts.size()));
- } catch (final ArithmeticException e) {
- todText.setText(ACTION_BUILDER.getString("todsUnavailable"));
- currentTodIndex.setText("");
- }
- }
-
- /** Returns number of current Tip of the day.
- * In visible state, the index must range between 0 and the number of tods available - 1, inclusive.
- * @return number of current Tip of the day.
- */
- public int getTodIndex() {
- return todIndex;
- }
-
- /** Action method for close. */
- public void todClose() {
- setValue(closeButton);
- PREFS.putBoolean("showTipOfTheDayAtStartup", showAtStartup.isSelected());
- PREFS.putInt("lastTipOfTheDayNumber", todIndex);
- dialog.setVisible(false);
- dialog.dispose();
- dialog = null;
- }
-
- /** Action method for next. */
- public void todNext() {
- setTodIndex(todIndex + 1);
- }
-
- /** Action method for previous. */
- public void todPrev() {
- setTodIndex(todIndex - 1);
- }
-
- /** Action method for random. */
- public void todRand() {
- setTodIndex(RND.nextInt(todTexts.size()));
- }
-
-} // class TipOfTheDayManager
Deleted: historic/trunk/src/app/net/sf/japi/swing/ToolBarLayout.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/ToolBarLayout.java 2008-11-30 18:04:35 UTC (rev 728)
+++ historic/trunk/src/app/net/sf/japi/swing/ToolBarLayout.java 2008-11-30 18:10:04 UTC (rev 729)
@@ -1,423 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.swing;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Insets;
-import java.io.Serializable;
-import static java.lang.Math.max;
-import java.util.ArrayList;
-import java.util.List;
-import javax.swing.JToolBar;
-
-/** A LayoutManager that manages a layout of a {@link Container} similar to {@link BorderLayout} but with an important difference, it is possible to
- * add as many components to a side layout region as you want. The desired purpose is to serve as LayoutManager for containers that shall contain
- * toolbars. So this is a LayoutManager you always were looking for.
- * <p />
- * Technically, this class is not a 100% replacement for {@link BorderLayout}. {@link JToolBar}'s UI ({@link
- * javax.swing.plaf.basic.BasicToolBarUI}) directly looks for some features of the class {@link BorderLayout}, and if it is not {@link BorderLayout},
- * it uses some defaults.
- * This class has been developed to make these defaults work as good as possible.
- * Though this class doesn't technically replace {@link BorderLayout} - neither is this class a subclass of {@link BorderLayout} nor does it provide
- * <em>all</em> methods {@link BorderLayout} does - it still does practically.
- * <p />
- * The constant values {@link #NORTH}, {@link #SOUTH}, {@link #EAST}, {@link #WEST} and {@link #CENTER} are references to those of {@link
- * BorderLayout}.
- * The behaviour of {@link #CENTER} is that of {@link BorderLayout}: only one component can be added, subsequently added components overried all
- * previously added.
- * <p />
- * The behaviour of {@link #NORTH}, {@link #SOUTH}, {@link #EAST} and {@link #WEST} differs from {@link BorderLayout}. The position and layout
- * behaviour is the same, with the slight difference that this LayoutManager is able to manage more than on single component in these four regions.
- * Subsequently added components are placed from the outer to the inner. The first added component is the outmost component of that region, the last
- * added component is the innermost component of that region. To place a component to the innermost level, simply add it to the same region again.
- * <p />
- * Placing a component another level than the innermost of its destination region i...
[truncated message content] |
|
From: <chr...@us...> - 2008-11-30 18:04:37
|
Revision: 728
http://japi.svn.sourceforge.net/japi/?rev=728&view=rev
Author: christianhujer
Date: 2008-11-30 18:04:35 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Removed code that is now redundant with the rest if JAPI.
Modified Paths:
--------------
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/MCAnswerText.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/MCQuestionText.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/Program.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/QuestionCollection.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/QuestionText.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/Settings.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/AnswerGUI.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/FirstSettingsModule.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/GUIOptionsSettingsModule.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/ProgramFrame.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/QuestionCollectionGUI.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/action.properties
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/action_de.properties
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/io/AbstractJTestImport.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/io/JTestV1.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/AbstractManager.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/AbstractCachingImporter.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/IOModuleProvider.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/Importer.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/MimeData.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/StringToTextComparatorAdapter.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/Text.java
Added Paths:
-----------
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/IOUtilities.java
Removed Paths:
-------------
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/ISwingUtilities.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/EndingFileFilter.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/FilenameFileFilter.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/settings/
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/MCAnswerText.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/MCAnswerText.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/MCAnswerText.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -87,7 +87,7 @@
return checked;
}
- /** Get wether this answer has been checked correctly.
+ /** Get whether or not this answer has been checked correctly.
* @return true if checked correctly, false otherwise
*/
public boolean isCheckedCorrectly() {
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/MCQuestionText.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/MCQuestionText.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/MCQuestionText.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -191,8 +191,8 @@
return answerTexts;
}
- /** Get wether this question has been answered correctly.
- * @return true if this question has been answered correctly, false otherwise
+ /** Get whether or not this question has been answered correctly.
+ * @return <code>true</code> if this question has been answered correctly, <code>false</code> otherwise
*/
@Override public boolean isAnsweredCorrectly() {
boolean answeredCorrectly = true;
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/Program.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/Program.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/Program.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -26,7 +26,7 @@
import net.sf.japi.progs.jeduca.jtest.io.JTestV1;
import net.sf.japi.progs.jeduca.jtest.io.KEduca;
import net.sf.japi.progs.jeduca.swing.io.IOModuleProvider;
-import net.sf.japi.progs.jeduca.swing.recent.PrefsRecentURLs;
+import net.sf.japi.swing.recent.PrefsRecentURLs;
import org.xml.sax.SAXException;
/** The Program contains the basic references such as the current QuestionCollection and provides important main operations like loading and saving
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/QuestionCollection.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/QuestionCollection.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/QuestionCollection.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -102,7 +102,7 @@
}
/** Add a Question.
- * Because this method cannot know wether the QuestionText is or is not made solely for this QuestionCollection, the QuestionText is not cloned.
+ * Because this method cannot know whether or not the QuestionText is or is not made solely for this QuestionCollection, the QuestionText is not cloned.
* But it is generally a good idea to clone QuestionTexts coming from other QuestionCollections before adding them to this QuestionCollection,
* otherwise strange effects might occur if a user copies a QuestionText from one QuestionCollection to another and the copy is not a duplicate.
* @param question Question to add
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/QuestionText.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/QuestionText.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/QuestionText.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -125,8 +125,8 @@
this.marked = marked;
}
- /** Get wether this question has been answered correctly.
- * @return true if this question has been answered correctly, false otherwise
+ /** Get whether this question has been answered correctly.
+ * @return <code>true</code> if this question has been answered correctly, <code>false</code> otherwise
*/
public abstract boolean isAnsweredCorrectly();
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/Settings.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/Settings.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/Settings.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -23,9 +23,9 @@
import java.util.ArrayList;
import java.util.List;
import java.util.prefs.Preferences;
-import net.sf.japi.progs.jeduca.swing.recent.RecentURLs;
-import net.sf.japi.progs.jeduca.swing.recent.RecentURLsEvent;
-import net.sf.japi.progs.jeduca.swing.recent.RecentURLsListener;
+import net.sf.japi.swing.recent.RecentURLs;
+import net.sf.japi.swing.recent.RecentURLsEvent;
+import net.sf.japi.swing.recent.RecentURLsListener;
/** Class representing the settings for JTest.
* It also manages the list of recent URLs.
@@ -33,7 +33,7 @@
*/
public class Settings implements RecentURLs {
- /** Wether to show the solution for each question. */
+ /** Whether to show the solution for each question. */
private boolean showQuestionSolution;
/** How many files to show in the last opened list. */
@@ -81,15 +81,15 @@
}
}
- /** Tell wether to show the solution for each question.
+ /** Tell whether to show the solution for each question.
* @return boolean
*/
public boolean isShowQuestionSolution() {
return showQuestionSolution;
}
- /** Set wether to show the solution for each question
- * @param showQuestionSolution wether to show the solution for each question
+ /** Set whether to show the solution for each question
+ * @param showQuestionSolution whether to show the solution for each question
*/
public void setShowQuestionSolution(final boolean showQuestionSolution) {
this.showQuestionSolution = showQuestionSolution;
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/AnswerGUI.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/AnswerGUI.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/AnswerGUI.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -82,7 +82,7 @@
add(button);
}
- /** Get wether this single answer has been checked correctly.
+ /** Get whether this single answer has been checked correctly.
* @return true if the user checked this answer in correct state, false otherwise
*/
public boolean isCorrectlyChecked() {
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/FirstSettingsModule.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/FirstSettingsModule.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/FirstSettingsModule.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -20,28 +20,24 @@
package net.sf.japi.progs.jeduca.jtest.gui;
-import java.awt.Component;
import java.awt.GridBagConstraints;
import static java.awt.GridBagConstraints.HORIZONTAL;
import static java.awt.GridBagConstraints.NORTHWEST;
import static java.awt.GridBagConstraints.REMAINDER;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
-import java.net.URL;
import static javax.swing.BorderFactory.createTitledBorder;
import javax.swing.ButtonGroup;
-import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import net.sf.japi.progs.jeduca.jtest.Settings;
-import net.sf.japi.progs.jeduca.swing.settings.SettingsModule;
-import org.jetbrains.annotations.Nullable;
+import net.sf.japi.swing.prefs.AbstractPrefs;
/** Settings module.
* @author $Author: chris $
* @version $Id: FirstSettingsModule.java,v 1.2 2006/01/31 23:09:18 chris Exp $
*/
-public class FirstSettingsModule extends JPanel implements SettingsModule {
+public class FirstSettingsModule extends AbstractPrefs {
/** Serial Version. */
@SuppressWarnings({"AnalyzingVariableNaming"})
@@ -83,6 +79,9 @@
gbc.weighty = 1.0;
add(showSolutionPanel, gbc);
setSettings(settings);
+ setHelpURL(getClass().getClassLoader().getResource("help/FirstSettingsModule.html"));
+ setListLabelText("Dummy Auflösung");
+ setLabelText("Dummy Einstellungen zum Anzeigen der Auflösungen");
}
/** Returns the Settings.
@@ -108,26 +107,6 @@
}
/** {@inheritDoc} */
- public Component getSettingsPanel() {
- return this;
- }
-
- /** {@inheritDoc} */
- @Nullable public Icon getSettingsIcon() {
- return null; // TODO
- }
-
- /** {@inheritDoc} */
- public String getSettingsName() {
- return "Dummy Auflösung";
- }
-
- /** {@inheritDoc} */
- public String getSettingsTitle() {
- return "Dummy Einstellungen zum Anzeigen der Auflösungen";
- }
-
- /** {@inheritDoc} */
public String getSettingsId() {
return "displaySolution";
}
@@ -138,19 +117,18 @@
}
/** {@inheritDoc} */
- public void resetToDefaults() {
+ public void defaults() {
+ //To change body of implemented methods use File | Settings | File Templates.
// TODO
restore();
}
- /** {@inheritDoc} */
- public URL getHelpURL() {
- return getClass().getClassLoader().getResource("help/FirstSettingsModule.html");
+ public boolean isChanged() {
+ return false;//To change body of implemented methods use File | Settings | File Templates.
}
- /** {@inheritDoc} */
- public boolean isDefaults() {
- return false;
+ public void revert() {
+ //To change body of implemented methods use File | Settings | File Templates.
}
} // class FirstSettingsModule
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/GUIOptionsSettingsModule.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/GUIOptionsSettingsModule.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/GUIOptionsSettingsModule.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -20,28 +20,24 @@
package net.sf.japi.progs.jeduca.jtest.gui;
-import java.awt.Component;
import java.awt.GridBagConstraints;
import static java.awt.GridBagConstraints.HORIZONTAL;
import static java.awt.GridBagConstraints.NORTHWEST;
import static java.awt.GridBagConstraints.REMAINDER;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
-import java.net.URL;
import static javax.swing.BorderFactory.createTitledBorder;
import javax.swing.ButtonGroup;
-import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import net.sf.japi.progs.jeduca.jtest.Settings;
-import net.sf.japi.progs.jeduca.swing.settings.SettingsModule;
-import org.jetbrains.annotations.Nullable;
+import net.sf.japi.swing.prefs.AbstractPrefs;
/** Settings module.
* @author $Author: chris $
* @version $Id: GUIOptionsSettingsModule.java,v 1.2 2006/01/31 23:09:18 chris Exp $
*/
-public class GUIOptionsSettingsModule extends JPanel implements SettingsModule {
+public class GUIOptionsSettingsModule extends AbstractPrefs {
/** Serial Version. */
@SuppressWarnings({"AnalyzingVariableNaming"})
@@ -76,6 +72,9 @@
gbc.weighty = 1.0;
add(askForQuitPanel, gbc);
setSettings(settings);
+ setHelpURL(getClass().getClassLoader().getResource("help/GUIOptionsSettingsModule.html")); // TODO localize this
+ setListLabelText("Dummy Auflösung2");
+ setLabelText("Dummy Einstellungen zum Anzeigen der Auflösungen");
}
/** Set the Settings Object to be attached.
@@ -93,26 +92,6 @@
}
/** {@inheritDoc} */
- public Component getSettingsPanel() {
- return this;
- }
-
- /** {@inheritDoc} */
- @Nullable public Icon getSettingsIcon() {
- return null; // TODO
- }
-
- /** {@inheritDoc} */
- public String getSettingsName() {
- return "Dummy Auflösung2";
- }
-
- /** {@inheritDoc} */
- public String getSettingsTitle() {
- return "Dummy Einstellungen zum Anzeigen der Auflösungen";
- }
-
- /** {@inheritDoc} */
public String getSettingsId() {
return "askForQuit";
}
@@ -123,19 +102,18 @@
}
/** {@inheritDoc} */
- public void resetToDefaults() {
+ public void defaults() {
+ //To change body of implemented methods use File | Settings | File Templates.
// TODO
restore();
}
- /** {@inheritDoc} */
- public URL getHelpURL() {
- return getClass().getClassLoader().getResource("help/GUIOptionsSettingsModule.html"); // localize this
+ public boolean isChanged() {
+ return false;//To change body of implemented methods use File | Settings | File Templates.
}
- /** {@inheritDoc} */
- public boolean isDefaults() {
- return false;
+ public void revert() {
+ //To change body of implemented methods use File | Settings | File Templates.
}
/** Returns the Settings.
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/ProgramFrame.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/ProgramFrame.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/ProgramFrame.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -27,9 +27,6 @@
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.ResourceBundle;
import javax.swing.Action;
import javax.swing.JFileChooser;
import static javax.swing.JFileChooser.APPROVE_OPTION;
@@ -49,17 +46,18 @@
import net.sf.japi.progs.jeduca.swing.OpenURLPane;
import net.sf.japi.progs.jeduca.swing.ToolBarManager;
import net.sf.japi.progs.jeduca.swing.io.ImporterFileFilter;
-import net.sf.japi.progs.jeduca.swing.recent.RecentURLsMenu;
-import net.sf.japi.progs.jeduca.swing.settings.SettingsModule;
-import net.sf.japi.progs.jeduca.swing.settings.SettingsPane;
import net.sf.japi.swing.ActionBuilder;
import net.sf.japi.swing.ActionBuilderFactory;
-import net.sf.japi.swing.ComponentFactory;
+import net.sf.japi.swing.ActionMethod;
import net.sf.japi.swing.LookAndFeelManager;
import net.sf.japi.swing.ToolBarLayout;
import net.sf.japi.swing.about.AboutDialog;
+import net.sf.japi.swing.app.Document;
import net.sf.japi.swing.bookmarks.BookmarkManager;
import net.sf.japi.swing.bookmarks.Bookmarkable;
+import net.sf.japi.swing.prefs.PreferencesGroup;
+import net.sf.japi.swing.prefs.PreferencesPane;
+import net.sf.japi.swing.recent.RecentURLsMenu;
import org.jetbrains.annotations.NotNull;
/** Programmfenster.
@@ -74,9 +72,6 @@
/** Serial Version. */
private static final long serialVersionUID = 1L;
- /** The Resource bundle. */
- private static final ResourceBundle RES = ResourceBundle.getBundle("net.sf.japi.progs.jeduca.jtest.gui.action");
-
/** The Program this Frame displays. */
private transient Program program;
@@ -96,10 +91,10 @@
*/
private QuestionCollectionGUI questionCollectionGUI;
- /** The Settings modules.
+ /** The Preferences modules.
* @serial include
*/
- private List<SettingsModule> settingModules = new ArrayList<SettingsModule>();
+ private PreferencesGroup prefsGroup;
/** The URL of the current question collection.
* @serial include
@@ -118,8 +113,7 @@
/** Initialize GUI. */
private void initUI() {
setLayout(new ToolBarLayout());
- settingModules.add(new FirstSettingsModule(program.getSettings()));
- settingModules.add(new GUIOptionsSettingsModule(program.getSettings()));
+ prefsGroup = new PreferencesGroup("Dummy title", new FirstSettingsModule(program.getSettings()), new GUIOptionsSettingsModule(program.getSettings()));
fileChooser = new JFileChooser();
final JMenuBar menuBar = new JMenuBar();
final JMenu mView = new JMenu(view);
@@ -139,10 +133,11 @@
setTitle("JEduca");
add(questionCollectionGUI);
- final JToolBar menuToolBar = new JToolBar(RES.getString("menuToolBar.name")); menuToolBar.add(menuBar);
- //menuToolBar.putClientProperty(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(RES.getString("menuToolBar.accel"))); // FIXME #1
+ final JToolBar menuToolBar = new JToolBar(ACTION_BUILDER.getString("menuToolBar.name"));
+ menuToolBar.add(menuBar);
+ //menuToolBar.putClientProperty(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(ACTION_BUILDER.getString("menuToolBar.accel"))); // FIXME #1
final JToolBar bookmarkToolBar = bookmarkManager.createBookmarkToolBar();
- final JToolBar programToolBar = createProgramToolBar();
+ final JToolBar programToolBar = ACTION_BUILDER.createToolBar(this, "programToolBar");
final JToolBar navigationToolBar = questionCollectionGUI.createNavigationToolBar();
add(menuToolBar, NORTH);
add(programToolBar, NORTH);
@@ -189,6 +184,7 @@
}
/** Load Action. */
+ @ActionMethod
public void open() {
final String newUrl = OpenURLPane.showOpenURLDialog(this, fileChooser);
if (newUrl != null) {
@@ -221,58 +217,63 @@
}
/** {@inheritDoc} */
- public boolean load(@NotNull final String newUrl) {
+ // TODO Do not return null if loading was successful.
+ @NotNull
+ public Document<Object> load(@NotNull final String uri) {
boolean okay;
try {
// TODO: IOManager
// program.eduImport(url);
- program.load(newUrl);
+ program.load(uri);
questionCollectionGUI.setQuestionCollection(program.getQuestionCollection());
- setTitle("JEduca: " + program.getQuestionCollection().getTitle() + " (" + newUrl + ')');
- final String fragmentId = new URL(newUrl).getRef();
+ setTitle("JEduca: " + program.getQuestionCollection().getTitle() + " (" + uri + ')');
+ final String fragmentId = new URL(uri).getRef();
if (fragmentId != null && fragmentId.startsWith("question")) {
final String questionNumber = fragmentId.substring("question".length());
questionCollectionGUI.displayQuestion(Integer.parseInt(questionNumber));
}
okay = true;
- url = newUrl;
+ url = uri;
} catch (final Exception e) {
- JOptionPane.showMessageDialog(this, e, RES.getString("open.error.text") + ':', ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(this, e, ACTION_BUILDER.getString("open.error.text") + ':', ERROR_MESSAGE);
System.err.println(e);
okay = false;
url = null;
}
bookmarkManager.setAddBookmarkEnabled(isBookmarkPossible());
- return okay;
+ return okay ? null : null;
}
/** Save Action. */
+ @ActionMethod
public void save() {
if (fileChooser.showSaveDialog(this) == APPROVE_OPTION) {
try {
program.eduExport(fileChooser.getSelectedFile());
// TOOD: JTest
} catch (IOException e) {
- JOptionPane.showMessageDialog(this, e, RES.getString("save.error.text") + ':', ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(this, e, ACTION_BUILDER.getString("save.error.text") + ':', ERROR_MESSAGE);
System.err.println(e);
}
}
}
/** Print Action. */
+ @ActionMethod
public void print() {
// TODO
}
/** Prefs Action. */
+ @ActionMethod
public void config() {
- // TODO eventually change SettingsPane and its usage so a SettingsPane can't be displayed twice for the same application.
- SettingsPane.showSettingsDialog(this, "Dummy Title", settingModules);
+ PreferencesPane.showPreferencesDialog(this, prefsGroup, true);
}
/** Quit Action. */
+ @ActionMethod
public void quit() {
- if (JOptionPane.showConfirmDialog(this, RES.getString("quit.question"), RES.getString("quit.text"), YES_NO_OPTION) == YES_OPTION) {
+ if (JOptionPane.showConfirmDialog(this, ACTION_BUILDER.getString("quit.question"), ACTION_BUILDER.getString("quit.text"), YES_NO_OPTION) == YES_OPTION) {
dispose();
}
}
@@ -281,6 +282,7 @@
private final AboutDialog aboutDialog = new AboutDialog(ACTION_BUILDER);
/** About Action. */
+ @ActionMethod
public void about() {
aboutDialog.showAboutDialog(this);
}
@@ -335,13 +337,6 @@
*/
private Action about = ACTION_BUILDER.createAction(true, "about", this);
- /** Create Toolbar with essential program actions.
- * @return Toolbar with essential program actions
- */
- public JToolBar createProgramToolBar() {
- return ComponentFactory.createJToolBar(RES.getString("programToolBar.name"), open, save, print);
- }
-
/** Create Menu with essential program actions.
* @return Menu with essential program actions
*/
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/QuestionCollectionGUI.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/QuestionCollectionGUI.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/QuestionCollectionGUI.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -36,7 +36,6 @@
import net.sf.japi.progs.jeduca.jtest.Settings;
import net.sf.japi.swing.ActionBuilder;
import net.sf.japi.swing.ActionBuilderFactory;
-import net.sf.japi.swing.ComponentFactory;
/** User Interface for a Collection of Questions.
* @author $Author: chris $
@@ -104,7 +103,7 @@
*/
private ReviewGUI reviewGUI;
- /** Wether currently showing a solution. */
+ /** Whether currently showing a solution. */
private transient boolean showingSolution;
/** The Settings.
@@ -118,16 +117,9 @@
public QuestionCollectionGUI(final Settings settings) {
this.settings = settings;
initUI();
+ updateButtonState();
}
- /** Create a GUI for a Collection of Questions.
- * @param col QuestionCollection to create GUI for
- */
- public QuestionCollectionGUI(final QuestionCollection col) {
- initUI();
- setQuestionCollection(col);
- }
-
/** Set the QuestionCollection to be displayed.
* @param col QuestionCollection to be displayed
*/
@@ -264,13 +256,19 @@
/** Update the state of the actions. */
public void updateButtonState() {
- first.setEnabled(index > 0);
- prev.setEnabled(index > 0 || showingSolution && index != -1);
- start.setEnabled(index == -1);
- next.setEnabled(index >= 0 && index < col.getSize() - 1);
- last.setEnabled(index >= 0 && index < col.getSize() - 1);
- review.setEnabled(index != -1);
- end.setEnabled(index != -1);
+ if (col == null) {
+ for (final Action action : navigationActions) {
+ action.setEnabled(false);
+ }
+ } else {
+ first.setEnabled(index > 0);
+ prev.setEnabled(index > 0 || showingSolution && index != -1);
+ start.setEnabled(index == -1);
+ next.setEnabled(index >= 0 && index < col.getSize() - 1);
+ last.setEnabled(index >= 0 && index < col.getSize() - 1);
+ review.setEnabled(index != -1);
+ end.setEnabled(index != -1);
+ }
}
/** Action for start test.
@@ -330,7 +328,7 @@
* @return Navigation Toolbar
*/
public JToolBar createNavigationToolBar() {
- return ComponentFactory.createJToolBar(res.getString("navigationToolBar.name"), navigationActions);
+ return ACTION_BUILDER.createToolBar(this, "navigationToolBar");
}
/** Get the index of the question currently being displayed.
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/action.properties
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/action.properties 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/action.properties 2008-11-30 18:04:35 UTC (rev 728)
@@ -74,7 +74,9 @@
menuToolBar.name=Menubar
menuToolBar.accel=ctrl pressed M
+programToolBar.toolbar=open save print
programToolBar.name=Program toolbar
+navigationToolBar.toolbar=start first prev next last review end
navigationToolBar.name=Navigation toolbar
menus.text=Menus
@@ -182,5 +184,5 @@
selectFile.icon=general/Open16
-about=<html><head><meta http-equiv='Content-Type' content='text/html'></meta><title>About</title></head><body><h1>About</h1><p>JEduca Version 1.0</p><p>\xA9 2004-2007 Chrsitian Hujer. All rights reserved.</p></body></html>
+about=<html><head><meta http-equiv='Content-Type' content='text/html'></meta><title>About</title></head><body><h1>About</h1><p>JEduca Version 1.0</p><p>\xA9 2004-2008 Chrsitian Hujer. All rights reserved.</p></body></html>
application.name=JEduca
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/action_de.properties
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/action_de.properties 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/gui/action_de.properties 2008-11-30 18:04:35 UTC (rev 728)
@@ -181,5 +181,5 @@
delete.mnemonic=L
#selectFile.icon=
-about=<html><head><meta http-equiv='Content-Type' content='text/html'></meta><title>\xDCber</title></head><body><h1>\xDCber</h1><p>JEduca Version 1.0</p><p>\xA9 2004-2007 Chrsitian Hujer. Alle Rechte vorbehalten.</p></body></html>
+about=<html><head><meta http-equiv='Content-Type' content='text/html'></meta><title>\xDCber</title></head><body><h1>\xDCber</h1><p>JEduca Version 1.0</p><p>\xA9 2004-2008 Chrsitian Hujer. Alle Rechte vorbehalten.</p></body></html>
application.name=JEduca
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/io/AbstractJTestImport.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/io/AbstractJTestImport.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/io/AbstractJTestImport.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -20,14 +20,12 @@
package net.sf.japi.progs.jeduca.jtest.io;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
import java.util.Map;
import java.util.WeakHashMap;
import net.sf.japi.progs.jeduca.swing.io.Importer;
+import net.sf.japi.progs.jeduca.swing.io.IOUtilities;
-/** Base implementation of JTestImport supplying an intelligent cache about wether a certain file can or cannot be loaded.
+/** Base implementation of JTestImport supplying an intelligent cache about whether or not a certain file can or cannot be loaded.
* Subclasses should implement {@link #canLoadImpl(String)} rather than implement {@link #canLoad(String)} directly because the interface method decorates
* the implementation with an intelligent caching mechanism.
* Subclasses cannot rely on {@link #canLoadImpl(String)} being invoked always, since if the stored information still is uptodate, calling the method
@@ -45,7 +43,7 @@
*/
private static class Uptodate {
- /** Wether the file can be loaded. */
+ /** Whether the file can be loaded. */
private boolean canLoad;
/** Timestamp of file. */
@@ -57,40 +55,22 @@
private Map<String, Uptodate> acceptable = new WeakHashMap<String, Uptodate>();
/** {@inheritDoc} */
- public final boolean canLoad(final String url) {
- Uptodate v = acceptable.get(url);
- if (v == null) { acceptable.put(url, v = new Uptodate()); }
- final long lastModified = lastMod(url);
+ public final boolean canLoad(final String uri) {
+ Uptodate v = acceptable.get(uri);
+ if (v == null) { acceptable.put(uri, v = new Uptodate()); }
+ final long lastModified = IOUtilities.lastMod(uri);
if (lastModified != v.lastModified) {
v.lastModified = lastModified;
- v.canLoad = canLoadImpl(url);
+ v.canLoad = canLoadImpl(uri);
}
return v.canLoad;
}
- /** Check wether a file can be loaded.
+ /** Check whether a file can be loaded.
* Subclasses must implement this method instead of {@link #canLoad(String)}
- * @param url URL to check wether it is loadable
+ * @param url URL to check whether it is loadable
* @return <code>true</code> if this import module supports loading a QuestionCollection from the supplied file, otherwise <code>false</code>
*/
protected abstract boolean canLoadImpl(final String url);
- /** Get the last modified value for a URL.
- * This method is a utility method provided for subclasses.
- * @param uri URL to get last modified value from
- * @return last modified value for <var>uri</var> or 0 if not found
- */
- protected static long lastMod(final String uri) {
- try {
- final URL url = new URL(uri);
- final URLConnection con = url.openConnection();
- if (con instanceof HttpURLConnection) {
- ((HttpURLConnection)con).setRequestMethod("HEAD");
- }
- return con.getLastModified();
- } catch (final Exception e) {
- return 0L;
- }
- }
-
} // class AbstractJTestImport
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/io/JTestV1.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/io/JTestV1.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/jtest/io/JTestV1.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -315,7 +315,7 @@
*/
private static class ErrorCapture implements ErrorHandler {
- /** Wether there were errors. */
+ /** Whether there were errors. */
private boolean errors;
/** Create a new ErrorCapture. */
@@ -335,7 +335,7 @@
errors = true;
}
- /** Get wether there were errors.
+ /** Get whether there were errors.
* @return errors
*/
public boolean hadErrors() {
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/AbstractManager.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/AbstractManager.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/AbstractManager.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -20,14 +20,14 @@
package net.sf.japi.progs.jeduca.swing;
-import java.awt.Component;
+import java.awt.Component;import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
-import java.util.List;
+import java.util.List;import java.util.Collection;
import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
import javax.swing.Action;
@@ -80,7 +80,7 @@
protected List<SubAction<?>> actions = new ArrayList<SubAction<?>>();
/** The Menus created. */
- protected List<JMenu> cMenus = new ArrayList<JMenu>();
+ protected Collection<JMenu> cMenus = new ArrayList<JMenu>();
/** Action Builder. */
private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.japi.progs.jeduca.swing");
@@ -139,7 +139,7 @@
final Action action = findActionFor(comp);
final int index = actions.indexOf(action);
actions.remove(index);
- for (final JMenu mMenu : cMenus) {
+ for (final Container mMenu : cMenus) {
mMenu.remove(index);
}
}
@@ -148,7 +148,7 @@
* @param comp component to find Action for
* @return SubAction for the specified comp.
*/
- private SubAction<?> findActionFor(final T comp) {
+ private Action findActionFor(final T comp) {
for (final SubAction<?> action : actions) {
if (action.getComponent() == comp) {
return action;
@@ -292,7 +292,7 @@
/** Create a JCheckBoxMenuItem for this Action.
* @return JCheckBoxMenuItem for this Action.
*/
- JCheckBoxMenuItem createCheckBoxMenuItem() {
+ JMenuItem createCheckBoxMenuItem() {
final JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(this);
buttons.add(new WeakReference<AbstractButton>(menuItem));
menuItem.setSelected(comp.isVisible());
Deleted: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/ISwingUtilities.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/ISwingUtilities.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/ISwingUtilities.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -1,54 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package net.sf.japi.progs.jeduca.swing;
-
-import java.awt.Component;
-import java.awt.Dialog;
-import java.awt.Frame;
-import java.awt.Window;
-import javax.swing.Action;
-import javax.swing.JButton;
-import javax.swing.JToolBar;
-
-/** JAPI Swing Utilities.
- */
-public class ISwingUtilities {
-
- /** Find the Window for a Component.
- * Searches for a Frame or a Dialog which is the parent component of the supplied argument.
- * Windows are treated like normal Components since in Java Windows can't stand for themselves but must have another Window as a parent.
- * So a real root ancestor can only be a Frame or a Dialog.
- * @param c Component to get Window for
- * @return Window for c, which is a Frame or a Dialog
- */
- public static Window getWindowForComponent(final Component c) {
- if (c == null) {
- return null;
- // TODO: implement handling of null
- // return getRootFrame();
- }
- if (c instanceof Frame || c instanceof Dialog) {
- return (Window) c;
- }
- return getWindowForComponent(c.getParent());
- }
-
-} // class ISwingUtilities
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -206,7 +206,7 @@
/** Get the root frame to use if there is no owner frame.
* @return frame
*/
- private static Frame getRootFrame() {
+ private static synchronized Window getRootFrame() {
if (rootFrame == null) {
rootFrame = new JFrame();
}
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/AbstractCachingImporter.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/AbstractCachingImporter.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/AbstractCachingImporter.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -20,13 +20,10 @@
package net.sf.japi.progs.jeduca.swing.io;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
import java.util.Map;
import java.util.WeakHashMap;
-/** Base implementation of {@link Importer} supplying an intelligent cache about the information wether a certain file can or cannot be loaded.
+/** Base implementation of {@link Importer} supplying an intelligent cache about the information whether or not a certain file can be loaded.
* If you want to write your own implementation of {@link Importer}, this is a potential base class.
* Subclasses should implement {@link #canLoadImpl(String)} rather than implement {@link #canLoad(String)} directly because the interface method
* decorates the implementation with that intelligent caching mechanism.
@@ -43,7 +40,7 @@
*/
private static class Uptodate {
- /** Wether the file can be loaded. */
+ /** Whether the file can be loaded. */
boolean canLoad;
/** Timestamp of file. */
@@ -58,7 +55,7 @@
public final boolean canLoad(final String uri) {
Uptodate v = acceptable.get(uri);
if (v == null) { acceptable.put(uri, v = new Uptodate()); }
- final long lastModified = lastMod(uri);
+ final long lastModified = IOUtilities.lastMod(uri);
if (lastModified != v.lastModified) {
v.lastModified = lastModified;
v.canLoad = canLoadImpl(uri);
@@ -66,29 +63,11 @@
return v.canLoad;
}
- /** Check wether a file can be loaded.
+ /** Check whether a file can be loaded.
* Subclasses must implement this method instead of {@link #canLoad(String)}
- * @param url URL to check wether it is loadable
+ * @param url URL to check whether or not it is loadable
* @return <code>true</code> if this import module supports loading a QuestionCollection from the supplied file, otherwise <code>false</code>
*/
protected abstract boolean canLoadImpl(final String url);
- /** Get the last modified value for a URL.
- * This method is a utility method provided for subclasses.
- * @param uri URL to get last modified value from
- * @return last modified value for <var>uri</var> or 0 if not found
- */
- protected static long lastMod(final String uri) {
- try {
- final URL url = new URL(uri);
- final URLConnection con = url.openConnection();
- if (con instanceof HttpURLConnection) {
- ((HttpURLConnection)con).setRequestMethod("HEAD");
- }
- return con.getLastModified();
- } catch (final Exception e) {
- return 0L;
- }
- }
-
} // class AbstractCachingImport
Deleted: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/EndingFileFilter.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/EndingFileFilter.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/EndingFileFilter.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -1,95 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-
-package net.sf.japi.progs.jeduca.swing.io;
-
-import java.io.File;
-import javax.swing.filechooser.FileFilter;
-
-/** Swing FileFilter implementation that filters files with specified endings.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- * @todo find a convenient way for i18n/l10n of this class
- */
-public class EndingFileFilter extends FileFilter {
-
- /** Wether to accept directories. */
- private final boolean acceptDirectories;
-
- /** Wether to negate the endings. */
- private final boolean negate;
-
- /** The description text. */
- private String description;
-
- /** The fileendings to accept. */
- private final String[] endings;
-
- /** Create a DFileFilter.
- * <code>negate</code> is set to false on this file filter.
- * @param acceptDirectories pass <code>true</code> if this FileFilter should accept directories as well, <code>false</code> to deny directories
- * @param description The description to use for swing
- * @param endings The endings to accept
- */
- public EndingFileFilter(final boolean acceptDirectories, final String description, final String[] endings) {
- this(acceptDirectories, false, description, endings);
- }
-
- /** Create a DFileFilter.
- * @param acceptDirectories pass <code>true</code> if this FileFilter should accept directories as well, <code>false</code> to deny directories
- * @param negate pass <code>true</code> if the endings are to be negated, which means the filter will only accept files <em>not</em> ending on one
- * of the <var>endings</var>; usually you want to pass <code>false</code>
- * @param description The description to use for swing
- * @param endings The endings to accept
- */
- public EndingFileFilter(final boolean acceptDirectories, final boolean negate, final String description, final String[] endings) {
- this.acceptDirectories = acceptDirectories;
- this.negate = negate;
- this.description = description;
- this.endings = endings;
- }
-
- /** {@inheritDoc} */
- @Override
- public boolean accept(final File f) {
- final String fileName = f.getName();
- boolean ret;
- if (negate) {
- ret = true;
- for (int i = 0, l = endings.length; ret && i < l; i++) {
- ret &= !fileName.endsWith(endings[i]);
- }
- ret |= acceptDirectories && f.isDirectory();
- } else {
- ret = acceptDirectories && f.isDirectory();
- for (int i = 0, l = endings.length; !ret && i < l; i++) {
- ret |= fileName.endsWith(endings[i]);
- }
- }
- return ret;
- }
-
- /** {@inheritDoc} */
- @Override
- public String getDescription() {
- return description;
- }
-
-} // class DFileFilter
Deleted: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/FilenameFileFilter.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/FilenameFileFilter.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/FilenameFileFilter.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -1,94 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-
-package net.sf.japi.progs.jeduca.swing.io;
-
-import java.io.File;
-import javax.swing.filechooser.FileFilter;
-
-/** Swing FileFilter implementation that filters files with specified names.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- * @todo find a convenient way for i18n/l10n of this class
- */
-public class FilenameFileFilter extends FileFilter {
-
- /** Wether to accept directories. */
- private final boolean acceptDirectories;
-
- /** Wether to negate the names. */
- private final boolean negate;
-
- /** The description text. */
- private String description;
-
- /** The filenames to accept. */
- private final String[] names;
-
- /** Create a DFileFilter.
- * <code>negate</code> is set to false on this file filter.
- * @param acceptDirectories pass <code>true</code> if this FileFilter should accept directories as well, <code>false</code> to deny directories
- * @param description The description to use for swing
- * @param names The names to accept
- */
- public FilenameFileFilter(final boolean acceptDirectories, final String description, final String[] names) {
- this(acceptDirectories, false, description, names);
- }
-
- /** Create a DFileFilter.
- * @param acceptDirectories pass <code>true</code> if this FileFilter should accept directories as well, <code>false</code> to deny directories
- * @param negate pass <code>true</code> if the names are to be negated, which means the filter will only accept files <em>not</em> names on one
- * of the <var>names</var>; usually you want to pass <code>false</code>
- * @param description The description to use for swing
- * @param names The names to accept
- */
- public FilenameFileFilter(final boolean acceptDirectories, final boolean negate, final String description, final String[] names) {
- this.acceptDirectories = acceptDirectories;
- this.negate = negate;
- this.description = description;
- this.names = names;
- }
-
- /** {@inheritDoc} */
- public boolean accept(final File f) {
- final String fileName = f.getName();
- boolean ret;
- if (negate) {
- ret = true;
- for (int i = 0, l = names.length; ret && i < l; i++) {
- ret &= !fileName.equals(names[i]);
- }
- ret |= acceptDirectories && f.isDirectory();
- } else {
- ret = acceptDirectories && f.isDirectory();
- for (int i = 0, l = names.length; !ret && i < l; i++) {
- ret |= fileName.equals(names[i]);
- }
- }
- return ret;
- }
-
- /** {@inheritDoc} */
- @Override
- public String getDescription() {
- return description;
- }
-
-} // class DFileFilter
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/IOModuleProvider.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/IOModuleProvider.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/IOModuleProvider.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -151,9 +151,9 @@
}
/** {@inheritDoc} */
- public boolean canLoad(final String url) {
+ public boolean canLoad(final String uri) {
for (final Importer<T> module : importers) {
- if (module.canLoad(url)) {
+ if (module.canLoad(uri)) {
return true;
}
}
@@ -162,7 +162,7 @@
/** {@inheritDoc} */
public String getName() {
- return "Alle unterstützten Dateitypen";
+ return "Alle unterstützten Dateitypen"; // TODO i18n/l10n
}
/** {@inheritDoc} */
Added: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/IOUtilities.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/IOUtilities.java (rev 0)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/IOUtilities.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -0,0 +1,31 @@
+package net.sf.japi.progs.jeduca.swing.io;
+
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.HttpURLConnection;
+import java.io.IOException;
+
+/**
+ * TODO
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class IOUtilities {
+
+ /** Get the last modified value for a URL.
+ * This method is a utility method provided for subclasses.
+ * @param uri URL to get last modified value from
+ * @return last modified value for <var>uri</var> or 0 if not found
+ */
+ public static long lastMod(final String uri) {
+ try {
+ final URL url = new URL(uri);
+ final URLConnection con = url.openConnection();
+ if (con instanceof HttpURLConnection) {
+ ((HttpURLConnection)con).setRequestMethod("HEAD");
+ }
+ return con.getLastModified();
+ } catch (final IOException e) {
+ return 0L;
+ }
+ }
+}
Property changes on: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/IOUtilities.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/Importer.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/Importer.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/Importer.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -28,13 +28,13 @@
*/
public interface Importer<T> extends IOBase<T> {
- /** Check wether a file can be loaded.
+ /** Check whether a file can be loaded.
* It is recommended to invoke this method mainly for file:/ and other local URL schemes to keep network traffic and user response time low.
* Also it is recommended that implementations use caching mechanisms.
- * @param url URL to load
+ * @param uri URL to load
* @return <code>true</code> if this Import instance is able to load the supplied url (file type is okay), otherwise <code>false</code>
*/
- boolean canLoad(String url);
+ boolean canLoad(String uri);
/** Load a Document from a URL.
* @param url URL to load
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/MimeData.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/MimeData.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/MimeData.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -23,6 +23,7 @@
/** Interface for classes that represent MIME Information like MIME Data.
* This interface makes no assumption about the mutability of its implementations.
* Implementations may or may not be mutable.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public interface MimeData {
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/StringToTextComparatorAdapter.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/StringToTextComparatorAdapter.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/StringToTextComparatorAdapter.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -21,22 +21,25 @@
package net.sf.japi.progs.jeduca.util;
import java.util.Comparator;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/** An adapter to be able to use String comparators for Text objects.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public class StringToTextComparatorAdapter implements Comparator<Text> {
/** Mime Comparator. */
- private Comparator<String> mime;
+ @Nullable private final Comparator<String> mime;
/** String Comparator. */
- private Comparator<String> comp;
+ @NotNull private final Comparator<String> comp;
/** Create a <code>Comparator<Text></code> from a <code>Comparator<String></code>.
* @param mime <code>Comparator<String></code> to create from, used for the Mime Type (may be <code>null</code>)
* @param comp <code>Comparator<String></code> to create from, used for the text
*/
- public StringToTextComparatorAdapter(final Comparator<String> mime, final Comparator<String> comp) {
+ public StringToTextComparatorAdapter(@Nullable final Comparator<String> mime, @NotNull final Comparator<String> comp) {
this.mime = mime;
this.comp = comp;
}
@@ -45,7 +48,7 @@
* @param comp <code>Comparator<String></code> to create from, used for the text
*/
public StringToTextComparatorAdapter(final Comparator<String> comp) {
- this.comp = comp;
+ this(null, comp);
}
/** {@inheritDoc} */
@@ -61,8 +64,7 @@
}
/** {@inheritDoc} */
- @Override
- public boolean equals(final Object obj) {
+ @Override public boolean equals(final Object obj) {
if ((obj == null) || !(obj instanceof StringToTextComparatorAdapter)) {
return false;
}
@@ -71,8 +73,7 @@
}
/** {@inheritDoc} */
- @Override
- public int hashCode() {
+ @Override public int hashCode() {
int hc = 0;
if (mime != null) {
hc ^= mime.hashCode();
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/Text.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/Text.java 2008-11-30 18:00:40 UTC (rev 727)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/util/Text.java 2008-11-30 18:04:35 UTC (rev 728)
@@ -21,6 +21,8 @@
package net.sf.japi.progs.jeduca.util;
import java.io.Serializable;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/** Class for holding some text information of an arbitrary mime type.
* Mutable.
@@ -28,6 +30,7 @@
* Just a little String container.
* For convenience, this method implements some interfaces, especially <code>CharSequence</code>.
* Mutability is only possible by <code>String</code> exchange.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public class Text implements Serializable, Comparable<Text>, CharSequence, MimeData {
@@ -35,16 +38,14 @@
private static final long serialVersionUID = 1L;
/** The Text.
- * not <code>null</code>.
* @serial include
*/
- private String text;
+ @NotNull private String text;
/** The MIME Type.
- * not <code>null</code>
* @serial include
*/
- private String type;
+ @NotNull private String type;
/** Create an empty text.
* The text is the empty String, the type is <code>text/plain</code>.
@@ -59,7 +60,7 @@
* @param type MIME Type
* @throws NullPointerException in case text or type is null
*/
- public Text(final String text, final String type) {
+ public Text(@NotNull final String text, @NotNull final String type) {
setText(text);
setType(type);
}
@@ -67,26 +68,32 @@
/** Get the Text.
* @return text
*/
- public String getText() {
+ @NotNull public String getText() {
return text;
}
/** Set the Text.
* @param text new text
*/
- public void setText(final String text) {
- if (text == null) { throw new NullPointerException("text for Text may not be null"); }
+ public void setText(@NotNull final String text) {
+ //noinspection ConstantConditions
+ if (text == null) {
+ throw new NullPointerException("text for Text may not be null");
+ }
this.text = text;
}
/** {@inheritDoc} */
- public String getType() {
+ @NotNull public String getType() {
return type;
}
/** {@inheritDoc} */
- public void setType(final String type) {
- if (ty...
[truncated message content] |
|
From: <chr...@us...> - 2008-11-30 18:00:41
|
Revision: 727
http://japi.svn.sourceforge.net/japi/?rev=727&view=rev
Author: christianhujer
Date: 2008-11-30 18:00:40 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Changed NodeListIterator to be an Iterator only, not an Interable.
Modified Paths:
--------------
libs/xml/trunk/src/prj/net/sf/japi/xml/NodeListIterator.java
Modified: libs/xml/trunk/src/prj/net/sf/japi/xml/NodeListIterator.java
===================================================================
--- libs/xml/trunk/src/prj/net/sf/japi/xml/NodeListIterator.java 2008-11-30 17:59:33 UTC (rev 726)
+++ libs/xml/trunk/src/prj/net/sf/japi/xml/NodeListIterator.java 2008-11-30 18:00:40 UTC (rev 727)
@@ -35,7 +35,7 @@
* @param <T> Node type to operate on.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public class NodeListIterator<T extends Node> implements Iterable<T>, Iterator<T> {
+public class NodeListIterator<T extends Node> implements Iterator<T> {
/** The NodeList to iterate over. */
@NotNull private final NodeList nodeList;
@@ -94,11 +94,6 @@
}
/** {@inheritDoc} */
- @NotNull public Iterator<T> iterator() {
- return this;
- }
-
- /** {@inheritDoc} */
public boolean hasNext() {
return index < nodeList.getLength();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:59:36
|
Revision: 726
http://japi.svn.sourceforge.net/japi/?rev=726&view=rev
Author: christianhujer
Date: 2008-11-30 17:59:33 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Improved message format to be more compatible with vim and emacs.
Modified Paths:
--------------
libs/taglets/trunk/src/prj/net/sf/japi/taglets/HistoryTaglet.java
Modified: libs/taglets/trunk/src/prj/net/sf/japi/taglets/HistoryTaglet.java
===================================================================
--- libs/taglets/trunk/src/prj/net/sf/japi/taglets/HistoryTaglet.java 2008-11-30 17:58:02 UTC (rev 725)
+++ libs/taglets/trunk/src/prj/net/sf/japi/taglets/HistoryTaglet.java 2008-11-30 17:59:33 UTC (rev 726)
@@ -125,7 +125,7 @@
final String text = tag.text();
final Matcher matcher = PATTERN.matcher(text);
if (!matcher.matches()) {
- System.err.println(tag.position() + ": warning - @" + getName() + " not formatted correctly.");
+ System.err.println(tag.position() + ": warning: @" + getName() + " not formatted correctly.");
return;
}
final String dateText = matcher.group(1);
@@ -134,7 +134,7 @@
try {
ISO_DATE_FORMAT.parse(dateText);
} catch (final ParseException e) {
- System.err.println(tag.position() + ": warning - @" + getName() + " has a date in wrong format (not-iso).");
+ System.err.println(tag.position() + ": warning: @" + getName() + " has a date in wrong format (not-iso).");
}
sb.append("<TR><TD>");
sb.append(dateText);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:58:04
|
Revision: 725
http://japi.svn.sourceforge.net/japi/?rev=725&view=rev
Author: christianhujer
Date: 2008-11-30 17:58:02 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Suppressed warning.
Modified Paths:
--------------
libs/swing-treetable/trunk/src/prj/net/sf/japi/swing/treetable/AbstractTreeTableModel.java
Modified: libs/swing-treetable/trunk/src/prj/net/sf/japi/swing/treetable/AbstractTreeTableModel.java
===================================================================
--- libs/swing-treetable/trunk/src/prj/net/sf/japi/swing/treetable/AbstractTreeTableModel.java 2008-11-30 17:56:31 UTC (rev 724)
+++ libs/swing-treetable/trunk/src/prj/net/sf/japi/swing/treetable/AbstractTreeTableModel.java 2008-11-30 17:58:02 UTC (rev 725)
@@ -54,6 +54,7 @@
}
/** {@inheritDoc} */
+ @SuppressWarnings({"TypeMayBeWeakened"})
public int getIndexOfChild(final T parent, final T child) {
for (int i = 0; i < getChildCount(parent); i++) {
if (getChild(parent, i).equals(child)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:56:33
|
Revision: 724
http://japi.svn.sourceforge.net/japi/?rev=724&view=rev
Author: christianhujer
Date: 2008-11-30 17:56:31 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Added swing-recent source code (moved from historic).
Added Paths:
-----------
libs/swing-recent/trunk/src/prj/
libs/swing-recent/trunk/src/prj/net/
libs/swing-recent/trunk/src/prj/net/sf/
libs/swing-recent/trunk/src/prj/net/sf/japi/
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/PrefsRecentURLs.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLs.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsEvent.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsListener.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsMenu.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/package.html
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/PrefsRecentURLs.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/PrefsRecentURLs.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/PrefsRecentURLs.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/PrefsRecentURLs.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,155 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.prefs.Preferences;
+import javax.swing.event.EventListenerList;
+
+/** Class for managing recent URLs using Preferences.
+ * It also manages the list of recent URLs.
+ * Warning: The behaviour of creating two PrefsRecentURLs objects for the same class is undefined.
+ * @todo perhaps make this class manage its instances
+ */
+public class PrefsRecentURLs implements RecentURLs {
+
+ /** How many files to show in the last opened list. */
+ private int maxLastOpened;
+
+ /** List with recently opened files. */
+ private List<String> recentlyOpenedURLs = new ArrayList<String>();
+
+ /** List with listeners. */
+ private EventListenerList listeners = new EventListenerList();
+
+ /** The Preferences to manage the recent URLs in. */
+ private Preferences prefs;
+
+ /** The PrefsRecentURls. */
+ private static final Map<Class<?>,PrefsRecentURLs> instances = new WeakHashMap<Class<?>,PrefsRecentURLs>();
+
+ /** Create a new RecentURLs object for managing recent URLs.
+ * Instances created with this constructor are unmanaged.
+ * @param prefs Preferences to use
+ */
+ public PrefsRecentURLs(final Preferences prefs) {
+ this.prefs = prefs;
+ load();
+ }
+
+ /** Create a new RecentURLs object for managing recent URLs.
+ * @param c Class to get Preferences for
+ */
+ private PrefsRecentURLs(final Class<?> c) {
+ prefs = Preferences.userNodeForPackage(c);
+ load();
+ }
+
+ /** Get an instance of PrefsRecentURLs fitting to the supplied class.
+ * @param c Class to get Preferences for
+ * @return RecentURLs for Class c
+ * @see Preferences#userNodeForPackage(Class) Preferences.userNodeForPackage(Class<?>) which is invoked to get the Preferences instance.
+ */
+ public static PrefsRecentURLs getInstance(final Class<?> c) {
+ PrefsRecentURLs instance = instances.get(c);
+ if (instance == null) {
+ instances.put(c, instance = new PrefsRecentURLs(c));
+ }
+ return instance;
+ }
+
+ /** Load preferences. */
+ private void load() {
+ maxLastOpened = prefs.getInt("maxLastOpened", 4);
+ recentlyOpenedURLs.clear();
+ for (int i = 0; i < maxLastOpened; i++) {
+ final String file = prefs.get("recentlyOpenedURL[" + i + "]", null);
+ if (file == null) {
+ break;
+ }
+ recentlyOpenedURLs.add(file);
+ }
+ }
+
+ /** Save preferences. */
+ private void save() {
+ prefs.putInt("maxLastOpened", maxLastOpened);
+ for (int i = 0, size = recentlyOpenedURLs.size(); i < size; i++) {
+ prefs.put("recentlyOpenedURL[" + i + "]", recentlyOpenedURLs.get(i));
+ }
+ }
+
+ /** Get the maximum number of files to show in the last opened list.
+ * @return maximum number of files to show in the last opened list.
+ */
+ public int getMaxLastOpened() {
+ return maxLastOpened;
+ }
+
+ /** Set the maximum number of files to show in the last opened list.
+ * @param maxLastOpened maximum number of files to show in the last opened list.
+ */
+ public void setMaxLastOpened(final int maxLastOpened) {
+ this.maxLastOpened = maxLastOpened;
+ }
+
+ /** {@inheritDoc} */
+ public void addRecentlyURL(final String url) {
+ if (recentlyOpenedURLs.contains(url)) {
+ recentlyOpenedURLs.remove(url);
+ }
+ recentlyOpenedURLs.add(url);
+ if (recentlyOpenedURLs.size() > maxLastOpened) {
+ recentlyOpenedURLs.remove(0);
+ }
+ save();
+ fireREcentURlsChanged();
+ }
+
+ /** Get the recently opened files.
+ * @return recently opened files
+ */
+ public String[] getRecentlyURLs() {
+ return recentlyOpenedURLs.toArray(new String[recentlyOpenedURLs.size()]);
+ }
+
+ /** {@inheritDoc} */
+ public void addRecentURLsListener(final RecentURLsListener listener) {
+ listeners.add(RecentURLsListener.class, listener);
+ }
+
+ /** {@inheritDoc} */
+ public void removeRecentURLsListener(final RecentURLsListener listener) {
+ listeners.remove(RecentURLsListener.class, listener);
+ }
+
+ /** Inform all registered listeners that the list of recent urls changed. */
+ private void fireREcentURlsChanged() {
+ final RecentURLsEvent e = new RecentURLsEvent(this);
+ for (final RecentURLsListener listener : listeners.getListeners(RecentURLsListener.class)) {
+ listener.recentURLsChanged(e);
+ }
+ }
+
+} // class PrefsRecentURLs
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLs.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/RecentURLs.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLs.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLs.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,64 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+/** Interface for classes that manage recent URLs.
+ * @author $Author: chris $
+ * @version $Id: RecentURLs.java,v 1.1 2004/12/28 23:51:22 chris Exp $
+ * @see RecentURLsEvent
+ * @see RecentURLsListener
+ * @todo enhance this to support a title.
+ */
+public interface RecentURLs {
+
+ /** Get the maximum number of URLs shown in the list of recently opened URLs.
+ * @return maximum URL number
+ */
+ int getMaxLastOpened();
+
+ /** Set the maximum number of entries in the list of recently opened URLs.
+ * @param maxLastOpened maximum number of URL entries
+ */
+ void setMaxLastOpened(int maxLastOpened);
+
+ /** Add a URL to the list of recently opened URLs.
+ * @param url URL to add
+ */
+ void addRecentlyURL(final String url);
+
+ /** Get the recently opened URLs.
+ * @return recently opened URLs
+ */
+ String[] getRecentlyURLs();
+
+ /** Adds a <code>RecentURLs</code> listener.
+ * Objects use this method to register interest in this RecentURLs object.
+ * When the list of recent urls changes, the registered listeners are informed of the change.
+ * @param listener a <code>RecentURLsListener</code> object
+ */
+ void addRecentURLsListener(RecentURLsListener listener);
+
+ /** Remocves a <code>RecentURLs</code> listener.
+ * @param listener a <code>RecentURLsListener</code> object
+ */
+ void removeRecentURLsListener(RecentURLsListener listener);
+
+} // interface RecentURLs
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsEvent.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/RecentURLsEvent.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsEvent.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsEvent.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,42 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+import java.util.EventObject;
+
+/** A semantic event which indicates that the list of recent URLs in a RecentURLs object changed.
+ * @see RecentURLsListener
+ * @see RecentURLs
+ */
+public class RecentURLsEvent extends EventObject {
+
+ /** Serial Version. */
+ @SuppressWarnings({"AnalyzingVariableNaming"})
+ private static final long serialVersionUID = 1L;
+
+ /** Creates a new RecentURLsEvent object.
+ * @param source the object responsible for the event
+ */
+ public RecentURLsEvent(final Object source) {
+ super(source);
+ }
+
+} // class RecentURLsEvent
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsListener.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/RecentURLsListener.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsListener.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsListener.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,36 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+import java.util.EventListener;
+
+/** Interface for classes that want to be notified if a RecentURLs object changed its list of recent urls.
+ * @see RecentURLsEvent
+ * @see RecentURLs
+ */
+public interface RecentURLsListener extends EventListener {
+
+ /** Invoked when a RecentURLs changed its list of recent urls.
+ * @param e RecentURLsEvent object
+ */
+ void recentURLsChanged(RecentURLsEvent e);
+
+} // interface RecentURLsListener
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsMenu.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/RecentURLsMenu.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsMenu.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsMenu.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,121 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+import java.awt.event.ActionEvent;
+import javax.swing.AbstractAction;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import net.sf.japi.swing.ActionBuilderFactory;
+import net.sf.japi.swing.app.CanLoad;
+
+/** Class for a menu showing the recently used URLs.
+ * @todo think about serialization of recent and program
+ */
+public class RecentURLsMenu extends JMenu implements RecentURLsListener {
+
+ /** Serial Version. */
+ @SuppressWarnings({"AnalyzingVariableNaming"})
+ private static final long serialVersionUID = 1L;
+
+ /** The object providing the RecentURLs information. */
+ private transient RecentURLs recent;
+
+ /** The program opening documents. */
+ private transient CanLoad program;
+
+ /** Create a RecentURLsMenu.
+ * @param recent object with RecentURLs information.
+ * @param program program that opens documents
+ */
+ public RecentURLsMenu(final RecentURLs recent, final CanLoad program) {
+ super(ActionBuilderFactory.getInstance().getActionBuilder("net.sf.japi.swing.recent").createAction(true, "recent"));
+ this.program = program;
+ this.recent = recent;
+ recent.addRecentURLsListener(this);
+ updateMenu();
+ }
+
+ /** Create a RecentURLsMenu.
+ * The list of recent URLs is stored in the preferences for the class of <var>c</var>.
+ * @param c Class to obtain RecentURLs information for
+ * @param program program that opens documents
+ * @see PrefsRecentURLs
+ */
+ public RecentURLsMenu(final Class<?> c, final CanLoad program) {
+ this(PrefsRecentURLs.getInstance(c), program);
+ }
+
+ /** Create a RecentURLsMenu.
+ * The list of recent URLs is stored in the preferences for the class of <var>program</var>.
+ * @param program program that opens documents
+ * @see PrefsRecentURLs
+ */
+ public RecentURLsMenu(final CanLoad program) {
+ this(PrefsRecentURLs.getInstance(program.getClass()), program);
+ }
+
+ /** Update the menu. */
+ private void updateMenu() {
+ removeAll();
+ for (final String url : recent.getRecentlyURLs()) {
+ add(new JMenuItem(new URLAction(url)));
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void recentURLsChanged(final RecentURLsEvent e) {
+ assert e.getSource() == recent;
+ updateMenu();
+ }
+
+ /** Class for URL Actions.
+ */
+ private class URLAction extends AbstractAction {
+
+ /** Serial Version. */
+ @SuppressWarnings({"AnalyzingVariableNaming"})
+ private static final long serialVersionUID = 1L;
+
+ /** The URL to be opened. */
+ private String url;
+
+ /** Create a URLAction.
+ * @param url URL to use for this action.
+ */
+ URLAction(final String url) {
+ putValue(NAME, url);
+ this.url = url;
+ }
+
+ /** {@inheritDoc} */
+ public void actionPerformed(final ActionEvent e) {
+ try {
+ program.load(url);
+ } catch (final Exception e1) {
+ e1.printStackTrace();//To change body of catch statement use File | Settings | File Templates.
+ // TODO
+ }
+ }
+
+ } // class URLAction
+
+} // class RecentURLsMenu
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/action.properties)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,21 @@
+#
+# JAPI - (Yet another (hopefully) useful) Java API
+#
+# Copyright (C) 2006 Christian Hujer
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+recent.text=Recently opened
Property changes on: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/action_de.properties)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,21 @@
+#
+# JAPI - (Yet another (hopefully) useful) Java API
+#
+# Copyright (C) 2006 Christian Hujer
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+recent.text=Zuletzt ge\xF6ffnet
Property changes on: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/package.html (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/package.html)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/package.html (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/package.html 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ JAPI - (Yet another (hopefully) useful) Java API
+ ~
+ ~ Copyright (C) 2006 Christian Hujer
+ ~
+ ~ This program is free software; you can redistribute it and/or
+ ~ modify it under the terms of the GNU General Public License as
+ ~ published by the Free Software Foundation; either version 2 of the
+ ~ License, or (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful, but
+ ~ WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program; if not, write to the Free Software
+ ~ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ ~ 02111-1307, USA.
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
+ <head>
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+ <title>Manage a list of recently opened files</title>
+ </head>
+ <body>
+ <p>
+ This package contains classes and interfaces for managing a list of recently opened files.
+ </p>
+ <h3>Usage</h3>
+ <ul>
+ <li>
+ Alternatively,
+ <ul>
+ <li>Create and instanciate your desired implementation of {@link net.sf.japi.progs.jeduca.swing.recent.RecentURLs}.</li>
+ <li>Get an instance using {@link net.sf.japi.progs.jeduca.swing.recent.PrefsRecentURLs#PrefsRecentURLs(Class)}</li>
+ </ul>
+ </li>
+ <li>Somewhere implement {@link net.sf.japi.progs.jeduca.swing.io.CanLoad} so a recently loaded document can be activated.</li>
+ <li>Create a Menu for recently opened files (URLs) using {@link net.sf.japi.progs.jeduca.swing.recent.RecentURLsMenu#RecentURLsMenu(net.sf.japi.progs.jeduca.swing.recent.RecentURLs,net.sf.japi.progs.jeduca.swing.io.CanLoad)}</li>
+ </ul>
+ </body>
+</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:54:30
|
Revision: 723
http://japi.svn.sourceforge.net/japi/?rev=723&view=rev
Author: christianhujer
Date: 2008-11-30 17:54:26 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Minor improvements, mainly documentation and for better unit testing.
Modified Paths:
--------------
libs/swing-prefs/trunk/src/prj/net/sf/japi/swing/prefs/Prefs.java
libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/MockActionBuilder.java
libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/PreferencesPaneTest.java
Modified: libs/swing-prefs/trunk/src/prj/net/sf/japi/swing/prefs/Prefs.java
===================================================================
--- libs/swing-prefs/trunk/src/prj/net/sf/japi/swing/prefs/Prefs.java 2008-11-30 17:50:48 UTC (rev 722)
+++ libs/swing-prefs/trunk/src/prj/net/sf/japi/swing/prefs/Prefs.java 2008-11-30 17:54:26 UTC (rev 723)
@@ -32,16 +32,20 @@
*/
public interface Prefs {
- /** Apply the changes in the UI to get into effect / be stored. */
+ /** Applies the changes in the UI to get into effect / be stored.
+ * The implementation should read all widget states and apply the corresponding settings on the application.
+ */
void apply();
- /** Revert the preferences to the default values. */
+ /** Reverts the preferences to their default values.
+ * The implementation should reset all widgets to a default state as if neither there were preferences nor the user changed anything.
+ */
void defaults();
- /** Provide a component for editing the prefs.
+ /** Provides a component for editing the prefs.
* The edit component MUST NOT automatically change preferences itself.
* Preferences MUST only changed when the method {@link #apply()} is invoked.
- * @return component for editing the prefs
+ * @return component for editing the preferences.
*/
JComponent getEditComponent();
Modified: libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/MockActionBuilder.java
===================================================================
--- libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/MockActionBuilder.java 2008-11-30 17:50:48 UTC (rev 722)
+++ libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/MockActionBuilder.java 2008-11-30 17:54:26 UTC (rev 723)
@@ -22,9 +22,26 @@
import net.sf.japi.swing.DefaultActionBuilder;
/**
- * Created by IntelliJ IDEA.
+ * The MockActionBuilder is a replacement of {@link DefaultActionBuilder} for testing purposes.
+ * All methods of {@link DefaultActionBuilder} that would require user interaction are replaced by this Mock's robot.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public class MockActionBuilder extends DefaultActionBuilder {
+ /** Create an empty MockActionBuilder.
+ * Not recommended.
+ * @see DefaultActionBuilder#DefaultActionBuilder()
+ */
+ public MockActionBuilder() {
+ super();
+ }
+
+ /** Create a MockActionBuilder with the specified key.
+ * @param key Key for which to create a MockActionBuilder.
+ * @see DefaultActionBuilder#DefaultActionBuilder(String)
+ */
+ public MockActionBuilder(final String key) {
+ super(key);
+ }
+
} // class MockActionBuilder
Modified: libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/PreferencesPaneTest.java
===================================================================
--- libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/PreferencesPaneTest.java 2008-11-30 17:50:48 UTC (rev 722)
+++ libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/PreferencesPaneTest.java 2008-11-30 17:54:26 UTC (rev 723)
@@ -33,8 +33,8 @@
public class PreferencesPaneTest {
@BeforeClass
- public void setUpSuite() {
- ActionBuilderFactory.getInstance().putActionBuilder("net.sf.japi.swing.prefs", new MockActionBuilder());
+ public static void setUpSuite() {
+ ActionBuilderFactory.getInstance().putActionBuilder("net.sf.japi.swing.prefs", new MockActionBuilder("net.sf.japi.swing.prefs"));
}
/** Tests that when selecting another preferences for changed preferences, "no" will revert the changes.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:50:52
|
Revision: 722
http://japi.svn.sourceforge.net/japi/?rev=722&view=rev
Author: christianhujer
Date: 2008-11-30 17:50:48 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Minor improvements.
Modified Paths:
--------------
libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/CollectionsListModel.java
libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/JFileChooserButton.java
Added Paths:
-----------
libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/SwingUtilities2.java
Modified: libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/CollectionsListModel.java
===================================================================
--- libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/CollectionsListModel.java 2008-11-30 17:42:39 UTC (rev 721)
+++ libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/CollectionsListModel.java 2008-11-30 17:50:48 UTC (rev 722)
@@ -154,8 +154,8 @@
}
/** {@inheritDoc} */
- @Override public boolean equals(final Object o) {
- return list.equals(o);
+ @Override public boolean equals(final Object obj) {
+ return obj instanceof CollectionsListModel && list.equals(((CollectionsListModel) obj).list);
}
/** {@inheritDoc} */
Modified: libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/JFileChooserButton.java
===================================================================
--- libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/JFileChooserButton.java 2008-11-30 17:42:39 UTC (rev 721)
+++ libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/JFileChooserButton.java 2008-11-30 17:50:48 UTC (rev 722)
@@ -95,7 +95,7 @@
* @param fileSelectionMode see {@link JFileChooser}
*/
public JFileChooserButton(final File base, final JFileChooser chooser, final JTextField textField, final int fileSelectionMode) {
- setAction(JFileChooserButton.ACTION_BUILDER.createAction(false, "optionsChooseFile", this));
+ setAction(ACTION_BUILDER.createAction(false, "optionsChooseFile", this));
this.textField = textField;
this.fileSelectionMode = fileSelectionMode;
setMargin(new Insets(0, 0, 0, 0));
Copied: libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/SwingUtilities2.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/ISwingUtilities.java)
===================================================================
--- libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/SwingUtilities2.java (rev 0)
+++ libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/SwingUtilities2.java 2008-11-30 17:50:48 UTC (rev 722)
@@ -0,0 +1,52 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.misc;
+
+import java.awt.Component;
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.Window;
+
+/** JAPI Swing Utilities.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class SwingUtilities2 {
+
+ /** Find the Window for a Component.
+ * Searches for a Frame or a Dialog which is the parent component of the supplied argument.
+ * Windows are treated like normal Components since in Java Windows can't stand for themselves but must have another Window as a parent.
+ * So a real root ancestor can only be a Frame or a Dialog.
+ * @param c Component to get Window for
+ * @return Window for c, which is a Frame or a Dialog
+ */
+ public static Window getWindowForComponent(final Component c) {
+ if (c == null) {
+ return null;
+ // TODO: implement handling of null
+ // return getRootFrame();
+ }
+ if (c instanceof Frame || c instanceof Dialog) {
+ return (Window) c;
+ }
+ return getWindowForComponent(c.getParent());
+ }
+
+} // class SwingUtilities2
Property changes on: libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/SwingUtilities2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:42:44
|
Revision: 721
http://japi.svn.sourceforge.net/japi/?rev=721&view=rev
Author: christianhujer
Date: 2008-11-30 17:42:39 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Minor improvements.
Modified Paths:
--------------
libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java
Modified: libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java
===================================================================
--- libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java 2008-11-30 17:39:43 UTC (rev 720)
+++ libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java 2008-11-30 17:42:39 UTC (rev 721)
@@ -32,7 +32,7 @@
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JRadioButton;
-import javax.swing.KeyStroke;
+import javax.swing.KeyStroke;import javax.swing.AbstractButton;
import javax.swing.border.LineBorder;
import net.sf.japi.swing.ActionBuilder;
import net.sf.japi.swing.ActionBuilderFactory;
@@ -58,12 +58,12 @@
/** Create an ActionKeyDisplay. */
public ActionKeyDisplay() {
- final JButton keyboardButton = new JButton(actionKeyAction);
+ final AbstractButton keyboardButton = new JButton(actionKeyAction);
setBorder(BorderFactory.createTitledBorder(ACTION_BUILDER.getString("keystroke.border.title")));
setLayout(new FlowLayout(FlowLayout.LEADING));
final ButtonGroup bg = new ButtonGroup();
for (final Action radioAction : radioActions) {
- final JRadioButton button = new JRadioButton(radioAction);
+ final AbstractButton button = new JRadioButton(radioAction);
add(button);
bg.add(button);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:39:47
|
Revision: 720
http://japi.svn.sourceforge.net/japi/?rev=720&view=rev
Author: christianhujer
Date: 2008-11-30 17:39:43 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Minor improvements.
Modified Paths:
--------------
libs/swing-extlib/trunk/src/prj/net/sf/japi/swing/RowLayout.java
libs/swing-extlib/trunk/src/prj/net/sf/japi/swing/VerticalFlowLayout.java
Modified: libs/swing-extlib/trunk/src/prj/net/sf/japi/swing/RowLayout.java
===================================================================
--- libs/swing-extlib/trunk/src/prj/net/sf/japi/swing/RowLayout.java 2008-11-30 17:33:16 UTC (rev 719)
+++ libs/swing-extlib/trunk/src/prj/net/sf/japi/swing/RowLayout.java 2008-11-30 17:39:43 UTC (rev 720)
@@ -24,6 +24,8 @@
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.LayoutManager;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* RowLayout is a layout that layouts its container's components vertically below each other.
@@ -39,25 +41,24 @@
}
/** Create a RowLayout with defined gaps.
- * @param hgap horizontal gap
* @param vgap vertical gap
*/
- public RowLayout(final int hgap, final int vgap) {
+ public RowLayout(final int vgap) {
this.vgap = vgap;
}
/** {@inheritDoc} */
- public void addLayoutComponent(final String name, final Component comp) {
- // nothing to do
+ public void addLayoutComponent(@Nullable final String name, @Nullable final Component comp) {
+ // not needed
}
/** {@inheritDoc} */
- public void removeLayoutComponent(final Component comp) {
- // nothing to do
+ public void removeLayoutComponent(@Nullable final Component comp) {
+ // not needed
}
/** {@inheritDoc} */
- public Dimension preferredLayoutSize(final Container parent) {
+ @NotNull public Dimension preferredLayoutSize(@NotNull final Container parent) {
synchronized (parent.getTreeLock()) {
final Dimension preferredLayoutSize = new Dimension();
final int nmembers = parent.getComponentCount();
@@ -79,7 +80,7 @@
}
/** {@inheritDoc} */
- public Dimension minimumLayoutSize(final Container parent) {
+ @NotNull public Dimension minimumLayoutSize(@NotNull final Container parent) {
synchronized (parent.getTreeLock()) {
final Dimension minimumLayoutSize = new Dimension();
final int nmembers = parent.getComponentCount();
@@ -102,11 +103,10 @@
}
/** {@inheritDoc} */
- public void layoutContainer(final Container parent) {
+ public void layoutContainer(@NotNull final Container parent) {
synchronized (parent.getTreeLock()) {
final Insets insets = parent.getInsets();
final int nmembers = parent.getComponentCount();
- final int maxheight = parent.getHeight() - (insets.left + insets.right + (vgap << 1));
final int width = parent.getWidth();
int y = 0;
final int x = insets.left;
Modified: libs/swing-extlib/trunk/src/prj/net/sf/japi/swing/VerticalFlowLayout.java
===================================================================
--- libs/swing-extlib/trunk/src/prj/net/sf/japi/swing/VerticalFlowLayout.java 2008-11-30 17:33:16 UTC (rev 719)
+++ libs/swing-extlib/trunk/src/prj/net/sf/japi/swing/VerticalFlowLayout.java 2008-11-30 17:39:43 UTC (rev 720)
@@ -82,17 +82,16 @@
/** {@inheritDoc} */
public void addLayoutComponent(@Nullable final String name, @Nullable final Component comp) {
- // Superfluous
+ // not needed
}
/** {@inheritDoc} */
public void removeLayoutComponent(@Nullable final Component comp) {
- // Superfluous
+ // not needed
}
/** {@inheritDoc} */
- @NotNull
- public Dimension preferredLayoutSize(@NotNull final Container parent) {
+ @NotNull public Dimension preferredLayoutSize(@NotNull final Container parent) {
synchronized (parent.getTreeLock()) {
final Dimension preferredLayoutSize = new Dimension();
final int nmembers = parent.getComponentCount();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:33:22
|
Revision: 719
http://japi.svn.sourceforge.net/japi/?rev=719&view=rev
Author: christianhujer
Date: 2008-11-30 17:33:16 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Added ScriptEngineLister.
Added Paths:
-----------
tools/scriptEngineLister/
tools/scriptEngineLister/branches/
tools/scriptEngineLister/tags/
tools/scriptEngineLister/trunkbak/
tools/scriptEngineLister/trunkbak/scriptEngineLister.iml
tools/scriptEngineLister/trunkbak/src/
tools/scriptEngineLister/trunkbak/src/doc/
tools/scriptEngineLister/trunkbak/src/prj/
tools/scriptEngineLister/trunkbak/src/prj/net/
tools/scriptEngineLister/trunkbak/src/prj/net/sf/
tools/scriptEngineLister/trunkbak/src/prj/net/sf/japi/
tools/scriptEngineLister/trunkbak/src/prj/net/sf/japi/tools/
tools/scriptEngineLister/trunkbak/src/prj/net/sf/japi/tools/sel/
tools/scriptEngineLister/trunkbak/src/prj/net/sf/japi/tools/sel/ScriptEngineLister.java
tools/scriptEngineLister/trunkbak/src/tst/
Added: tools/scriptEngineLister/trunkbak/scriptEngineLister.iml
===================================================================
--- tools/scriptEngineLister/trunkbak/scriptEngineLister.iml (rev 0)
+++ tools/scriptEngineLister/trunkbak/scriptEngineLister.iml 2008-11-30 17:33:16 UTC (rev 719)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/doc" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/prj" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/tst" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="annotations" level="project" />
+ <orderEntry type="library" name="junit" level="project" />
+ <orderEntry type="module" module-name="libs-argparser" />
+ <orderEntryProperties />
+ </component>
+</module>
+
Property changes on: tools/scriptEngineLister/trunkbak/scriptEngineLister.iml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
Added: tools/scriptEngineLister/trunkbak/src/prj/net/sf/japi/tools/sel/ScriptEngineLister.java
===================================================================
--- tools/scriptEngineLister/trunkbak/src/prj/net/sf/japi/tools/sel/ScriptEngineLister.java (rev 0)
+++ tools/scriptEngineLister/trunkbak/src/prj/net/sf/japi/tools/sel/ScriptEngineLister.java 2008-11-30 17:33:16 UTC (rev 719)
@@ -0,0 +1,71 @@
+package net.sf.japi.tools.sel;
+
+import java.util.List;
+import javax.script.Bindings;
+import javax.script.ScriptContext;
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineFactory;
+import javax.script.ScriptEngineManager;
+import net.sf.japi.io.args.ArgParser;
+import net.sf.japi.io.args.BasicCommand;
+import org.jetbrains.annotations.NotNull;
+
+/** Program for listing available script engines.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class ScriptEngineLister extends BasicCommand {
+
+ /** Main program.
+ * @param args Command line arguments (try --help).
+ */
+ public static void main(final String... args) {
+ ArgParser.simpleParseAndRun(new ScriptEngineLister(), args);
+ }
+
+ /** {@inheritDoc} */
+ @SuppressWarnings({"InstanceMethodNamingConvention"})
+ public int run(@NotNull final List<String> args) throws Exception {
+ final ScriptEngineManager sem = new ScriptEngineManager();
+ for (final ScriptEngineFactory factory : sem.getEngineFactories()) {
+ System.out.println("Name: " + factory.getEngineName());
+ System.out.println("Version: " + factory.getEngineVersion());
+ System.out.println("Extensions: " + factory.getExtensions());
+ System.out.println("Language Name: " + factory.getLanguageName());
+ System.out.println("Language Version: " + factory.getLanguageVersion());
+ System.out.println("Mime Types: " + factory.getMimeTypes());
+ System.out.println("Names: " + factory.getNames());
+ printBindings(factory);
+ System.out.println();
+ }
+ return 0;//To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ private void printBindings(final ScriptEngineFactory factory) {
+ final ScriptEngine se = factory.getScriptEngine();
+ printBindings(se, ScriptContext.GLOBAL_SCOPE);
+ printBindings(se, ScriptContext.ENGINE_SCOPE);
+ }
+
+ private void printBindings(final ScriptEngine engine, final int scope) {
+ System.out.print("Scope: ");
+ switch (scope) {
+ case ScriptContext.GLOBAL_SCOPE:
+ System.out.print("GLOBAL_SCOPE");
+ break;
+ case ScriptContext.ENGINE_SCOPE:
+ System.out.print("ENGINE_SCOPE");
+ break;
+ default:
+ System.out.print(scope);
+ }
+ System.out.println();
+ final Bindings bindings = engine.getBindings(scope);
+ if (bindings == null) {
+ System.out.println("null");
+ } else {
+ for (final Object entry : bindings.entrySet()) {
+ System.out.println(entry);
+ }
+ }
+ }
+}
Property changes on: tools/scriptEngineLister/trunkbak/src/prj/net/sf/japi/tools/sel/ScriptEngineLister.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:30:41
|
Revision: 718
http://japi.svn.sourceforge.net/japi/?rev=718&view=rev
Author: christianhujer
Date: 2008-11-30 17:30:37 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Added MidiMonitor.
Added Paths:
-----------
tools/midiMonitor/
tools/midiMonitor/branches/
tools/midiMonitor/tags/
tools/midiMonitor/trunk/
tools/midiMonitor/trunk/midiMonitor.iml
tools/midiMonitor/trunk/src/
tools/midiMonitor/trunk/src/doc/
tools/midiMonitor/trunk/src/prj/
tools/midiMonitor/trunk/src/prj/net/
tools/midiMonitor/trunk/src/prj/net/sf/
tools/midiMonitor/trunk/src/prj/net/sf/japi/
tools/midiMonitor/trunk/src/prj/net/sf/japi/tools/
tools/midiMonitor/trunk/src/prj/net/sf/japi/tools/midiMonitor/
tools/midiMonitor/trunk/src/prj/net/sf/japi/tools/midiMonitor/MidiMonitor.java
tools/midiMonitor/trunk/src/tst/
Added: tools/midiMonitor/trunk/midiMonitor.iml
===================================================================
--- tools/midiMonitor/trunk/midiMonitor.iml (rev 0)
+++ tools/midiMonitor/trunk/midiMonitor.iml 2008-11-30 17:30:37 UTC (rev 718)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/doc" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/prj" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/tst" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="libs-argparser" />
+ <orderEntry type="library" name="annotations" level="project" />
+ <orderEntry type="library" name="junit" level="project" />
+ <orderEntry type="module" module-name="midi" />
+ <orderEntryProperties />
+ </component>
+</module>
+
Property changes on: tools/midiMonitor/trunk/midiMonitor.iml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
Added: tools/midiMonitor/trunk/src/prj/net/sf/japi/tools/midiMonitor/MidiMonitor.java
===================================================================
--- tools/midiMonitor/trunk/src/prj/net/sf/japi/tools/midiMonitor/MidiMonitor.java (rev 0)
+++ tools/midiMonitor/trunk/src/prj/net/sf/japi/tools/midiMonitor/MidiMonitor.java 2008-11-30 17:30:37 UTC (rev 718)
@@ -0,0 +1,65 @@
+package net.sf.japi.tools.midiMonitor;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.sound.midi.MidiDevice;
+import javax.sound.midi.MidiSystem;
+import javax.sound.midi.MidiUnavailableException;
+import javax.sound.midi.Transmitter;
+import net.sf.japi.io.args.ArgParser;
+import net.sf.japi.io.args.CommandWithHelp;
+import net.sf.japi.io.args.Option;
+import net.sf.japi.io.args.OptionType;
+import net.sf.japi.midi.MonitorReceiver;
+import org.jetbrains.annotations.NotNull;
+
+/** MidiMonitor is a command line program for monitoring MIDI transmitters.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class MidiMonitor extends CommandWithHelp {
+
+ /** The transmitters that shall be monitored. */
+ private final Map<String, Transmitter> transmitters = new HashMap<String,Transmitter>();
+
+ /** Main program.
+ * @param args Command line arguments (try --help).
+ */
+ public static void main(final String... args) {
+ ArgParser.simpleParseAndRun(new MidiMonitor(), args);
+ }
+
+ /** Adds a transmitter to the list of transmitters to monitor.
+ * @param transmitterName Name of the transmitterName to add.
+ * @throws MidiUnavailableException If MIDI is unavailable.
+ */
+ @Option(type = OptionType.REQUIRED, value = {"t", "transmitter"})
+ public void addTransmitter(@NotNull final String transmitterName) throws MidiUnavailableException {
+ for (final MidiDevice.Info deviceInfo : MidiSystem.getMidiDeviceInfo()) {
+ if (transmitterName.equals(deviceInfo.getName())) {
+ final MidiDevice device = MidiSystem.getMidiDevice(deviceInfo);
+ if (device.getMaxTransmitters() != 0) {
+ device.open();
+ transmitters.put(transmitterName, device.getTransmitter());
+ return;
+ }
+ }
+ }
+ }
+
+ /** {@inheritDoc} */
+ @SuppressWarnings({"InstanceMethodNamingConvention"})
+ public int run(@NotNull final List<String> args) throws Exception {
+ for (final Map.Entry<String,Transmitter> entry : transmitters.entrySet()) {
+ entry.getValue().setReceiver(new MonitorReceiver(entry.getKey()));
+ }
+ try {
+ synchronized (this) {
+ wait();
+ }
+ } catch (final InterruptedException e) {
+ /* ignore. */
+ }
+ return 0;
+ }
+}
Property changes on: tools/midiMonitor/trunk/src/prj/net/sf/japi/tools/midiMonitor/MidiMonitor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:27:56
|
Revision: 717
http://japi.svn.sourceforge.net/japi/?rev=717&view=rev
Author: christianhujer
Date: 2008-11-30 17:27:47 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Added ScriptInterpreter.
Added Paths:
-----------
tools/scriptInterpreter/
tools/scriptInterpreter/branches/
tools/scriptInterpreter/tags/
tools/scriptInterpreter/trunk/
tools/scriptInterpreter/trunk/ScriptInterpreter-0.1-app.jar
tools/scriptInterpreter/trunk/action.js
tools/scriptInterpreter/trunk/build.xml
tools/scriptInterpreter/trunk/lib/
tools/scriptInterpreter/trunk/lib/LICENSE-annotations.jar
tools/scriptInterpreter/trunk/lib/LICENSE-jlfgr-1_0.jar
tools/scriptInterpreter/trunk/lib/LICENSE-junit.jar
tools/scriptInterpreter/trunk/lib/annotations.jar
tools/scriptInterpreter/trunk/lib/japi-lib-argparser-trunk.jar
tools/scriptInterpreter/trunk/lib/jlfgr-1_0.jar
tools/scriptInterpreter/trunk/lib/junit.jar
tools/scriptInterpreter/trunk/scriptInterpreter.iml
tools/scriptInterpreter/trunk/src/
tools/scriptInterpreter/trunk/src/doc/
tools/scriptInterpreter/trunk/src/prj/
tools/scriptInterpreter/trunk/src/prj/net/
tools/scriptInterpreter/trunk/src/prj/net/sf/
tools/scriptInterpreter/trunk/src/prj/net/sf/japi/
tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/
tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/
tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.java
tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.properties
tools/scriptInterpreter/trunk/src/tst/
tools/scriptInterpreter/trunk/test.js
Added: tools/scriptInterpreter/trunk/ScriptInterpreter-0.1-app.jar
===================================================================
(Binary files differ)
Property changes on: tools/scriptInterpreter/trunk/ScriptInterpreter-0.1-app.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: tools/scriptInterpreter/trunk/action.js
===================================================================
--- tools/scriptInterpreter/trunk/action.js (rev 0)
+++ tools/scriptInterpreter/trunk/action.js 2008-11-30 17:27:47 UTC (rev 717)
@@ -0,0 +1,15 @@
+function aa(e) {
+ print("Test.\n");
+}
+function wl1(e) {
+ if (e.ID == java.awt.event.WindowEvent.WINDOW_CLOSING) {
+ e.source.dispose();
+ }
+}
+frame = new javax.swing.JFrame("Test");
+button = new javax.swing.JButton("Click");
+button.addActionListener(aa);
+frame.add(button);
+frame.addWindowListener(wl1);
+frame.pack();
+frame.setVisible(true);
Property changes on: tools/scriptInterpreter/trunk/action.js
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: tools/scriptInterpreter/trunk/build.xml
===================================================================
--- tools/scriptInterpreter/trunk/build.xml (rev 0)
+++ tools/scriptInterpreter/trunk/build.xml 2008-11-30 17:27:47 UTC (rev 717)
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ ScriptInterpreter is a program for interpreting scripts using Java.
+ ~ Copyright (C) 2007 Christian Hujer
+ ~
+ ~ This program is free software; you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation; either version 2 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License along
+ ~ with this program; if not, write to the Free Software Foundation, Inc.,
+ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ -->
+
+<project name="ScriptInterpreter" default="compile">
+
+ <property name="module.version" value="0.1" />
+ <property name="module.name" value="ScriptInterpreter" />
+ <property name="module.shortname" value="ScriptInterpreter" />
+ <property name="module.title" value="ScriptInterpreter" />
+ <property name="main.class" value="net.sf.japi.tools.si.ScriptInterpreter" />
+
+ <taskdef name="pack200" classpath="common/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" />
+
+ <target
+ name = "clean"
+ description = "Cleans Sandbox"
+ >
+ <delete dir="classes" />
+ <delete dir="docs" />
+ </target>
+
+ <target
+ name = "compile"
+ description = "Compiles production classes"
+ >
+ <mkdir dir="classes/production/${module.shortname}" />
+ <mkdir dir="classes/test/${module.shortname}" />
+ <javac
+ srcdir="src/prj"
+ destdir="classes/production/${module.shortname}"
+ encoding="utf-8"
+ source="1.5"
+ target="1.5"
+ >
+ <classpath>
+ <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <fileset dir="common/lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ </classpath>
+ <exclude name="test/**/*.java" />
+ </javac>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="src/prj" includes="**/*.properties" excludes="test/**/*.properties" />
+ <fileset dir="src/prj" includes="META-INF/services/**" />
+ </copy>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="lib" includes="LICENSE-*" />
+ <fileset dir="." includes="COPYING" />
+ </copy>
+ </target>
+
+ <target
+ name = "dist"
+ description = "Packs distribution archives."
+ depends = "clean, compile"
+ >
+ <!--depends = "clean, compile, doc"
+ -->
+ <delete dir="dist" />
+ <mkdir dir="dist" />
+ <property name="distName" value="dist/${module.name}-${module.version}" />
+ <parallel>
+ <tar tarfile="${distName}.src.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.src.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.src.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </jar>
+ <jar destfile="${distName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" />
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ <tar tarfile="${distName}.doc.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.doc.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.doc.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ </zipfileset>
+ </jar>
+ </parallel>
+ <parallel>
+ <gzip src="${distName}.src.tar" destfile="${distName}.src.tar.gz" />
+ <bzip2 src="${distName}.src.tar" destfile="${distName}.src.tar.bz2" />
+ <gzip src="${distName}.doc.tar" destfile="${distName}.doc.tar.gz" />
+ <bzip2 src="${distName}.doc.tar" destfile="${distName}.doc.tar.bz2" />
+ <pack200
+ src="${distName}.jar"
+ destfile="${distName}.pack.gz"
+ gzipoutput="true"
+ stripdebug="true"
+ effort="9"
+ keepfileorder="false"
+ modificationtime="latest"
+ deflatehint="false"
+ />
+ </parallel>
+ <delete file="${distName}.src.tar" />
+ <delete file="${distName}.doc.tar" />
+ </target>
+
+ <target
+ name = "doc"
+ description = "Creates public javadoc documentation."
+ >
+ <mkdir dir="docs/api" />
+ <!--copy todir="docs/api" file="src/doc/api/public/copyright.html" />
+ <copy todir="docs/api" file="src/doc/api/public/.htaccess" /-->
+ <javadoc
+ destdir = "docs/api"
+ access = "protected"
+ author = "yes"
+ version = "yes"
+ locale = "en_US"
+ use = "yes"
+ splitindex = "yes"
+ windowtitle = "JAPI Library ${module.title} ${module.version} API documentation"
+ doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ header = "JAPI Library ${module.title} ${module.version}<br />API Documentation"
+ footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ bottom = "<div style=" text-align:center;">© 2005-2006 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>"
+ serialwarn = "yes"
+ charset = "utf-8"
+ docencoding = "utf-8"
+ encoding = "utf-8"
+ source = "1.5"
+ linksource = "yes"
+ link = "${user.javadoc.link}"
+ >
+ <!--
+ overview = "src/overview.html"
+ -->
+ <classpath>
+ <fileset dir="lib" includes="annotations.jar" />
+ </classpath>
+ <sourcepath>
+ <pathelement path="${user.javadoc.javasrc}" />
+ <pathelement path="src/prj" />
+ </sourcepath>
+ <packageset
+ dir="src/prj"
+ defaultexcludes="yes"
+ >
+ <include name="net/**" />
+ </packageset>
+ <tag enabled="true" name="retval" description="Return Values:" scope="methods" />
+ <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" />
+ <tag enabled="true" name="post" description="Postconditions:" scope="methods" />
+ <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" />
+ <tag enabled="true" name="note" description="Notes:" />
+ <tag enabled="true" name="warning" description="Warnings:" />
+ <!--tag enabled="true" name="todo" description="Todo:" /-->
+ <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" />
+ <tag enabled="true" name="fixme" description="Fixme:" />
+ <tag enabled="true" name="xxx" description="XXX:" />
+ </javadoc>
+ </target>
+
+ <target
+ name = "buildapp"
+ description = "Creates executable jar"
+ >
+ <property name="appName" value="${module.name}-${module.version}-app" />
+ <jar destfile="${appName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <zipgroupfileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <!--attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" /-->
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ </target>
+
+</project>
Property changes on: tools/scriptInterpreter/trunk/build.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
Added: tools/scriptInterpreter/trunk/lib/LICENSE-annotations.jar
===================================================================
--- tools/scriptInterpreter/trunk/lib/LICENSE-annotations.jar (rev 0)
+++ tools/scriptInterpreter/trunk/lib/LICENSE-annotations.jar 2008-11-30 17:27:47 UTC (rev 717)
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
Property changes on: tools/scriptInterpreter/trunk/lib/LICENSE-annotations.jar
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: tools/scriptInterpreter/trunk/lib/LICENSE-jlfgr-1_0.jar
===================================================================
--- tools/scriptInterpreter/trunk/lib/LICENSE-jlfgr-1_0.jar (rev 0)
+++ tools/scriptInterpreter/trunk/lib/LICENSE-jlfgr-1_0.jar 2008-11-30 17:27:47 UTC (rev 717)
@@ -0,0 +1,10 @@
+Copyright 2000 by Sun Microsystems, Inc. All Rights Reserved.
+
+Sun grants you ("Licensee") a non-exclusive, royalty free, license to use, and redistribute this software graphics artwork, as individual graphics or as a collection, as part of software code or programs that you develop, provided that i) this copyright notice and license accompany the software graphics artwork; and ii) you do not utilize the software graphics artwork in a manner which is disparaging to Sun. Unless enforcement is prohibited by applicable law, you may not modify the graphics, and must use them true to color and unmodified in every way.
+
+This software graphics artwork is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE GRAPHICS ARTWORK.
+
+IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE GRAPHICS ARTWORK, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+If any of the above provisions are held to be in violation of applicable law, void, or unenforceable in any jurisdiction, then such provisions are waived to the extent necessary for this Disclaimer to be otherwise enforceable in such jurisdiction.
+
Property changes on: tools/scriptInterpreter/trunk/lib/LICENSE-jlfgr-1_0.jar
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: tools/scriptInterpreter/trunk/lib/LICENSE-junit.jar
===================================================================
--- tools/scriptInterpreter/trunk/lib/LICENSE-junit.jar (rev 0)
+++ tools/scriptInterpreter/trunk/lib/LICENSE-junit.jar 2008-11-30 17:27:47 UTC (rev 717)
@@ -0,0 +1,213 @@
+Common Public License Version 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+ a) in the case of the initial Contributor, the initial code and
+documentation distributed under this Agreement, and
+
+ b) in the case of each subsequent Contributor:
+
+ i) changes to the Program, and
+
+ ii) additions to the Program;
+
+ where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the licenses
+to its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright license set
+forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+ a) it complies with the terms and conditions of this Agreement; and
+
+ b) its license agreement:
+
+ i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+ iii) states that any provisions which differ from this Agreement are offered
+by that Contributor alone and not by any other party; and
+
+ iv) states that source code for the Program is available from such
+Contributor, and informs licensees how to obtain it in a reasonable manner on or
+through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+ a) it must be made available under this Agreement; and
+
+ b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to
+control, and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may participate in
+any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement, including but not limited to the risks and costs of
+program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such Recipient
+under this Agreement shall terminate as of the date such litigation is filed. In
+addition, if Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
+as the Agreement Steward to a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the Agreement
+under which it was received. In addition, after a new version of the Agreement
+is published, Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated in Sections
+2(a) and 2(b) above, Recipient receives no rights or licenses to the
+intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
Property changes on: tools/scriptInterpreter/trunk/lib/LICENSE-junit.jar
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: tools/scriptInterpreter/trunk/lib/annotations.jar
===================================================================
(Binary files differ)
Property changes on: tools/scriptInterpreter/trunk/lib/annotations.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: tools/scriptInterpreter/trunk/lib/japi-lib-argparser-trunk.jar
===================================================================
(Binary files differ)
Property changes on: tools/scriptInterpreter/trunk/lib/japi-lib-argparser-trunk.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: tools/scriptInterpreter/trunk/lib/jlfgr-1_0.jar
===================================================================
(Binary files differ)
Property changes on: tools/scriptInterpreter/trunk/lib/jlfgr-1_0.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: tools/scriptInterpreter/trunk/lib/junit.jar
===================================================================
(Binary files differ)
Property changes on: tools/scriptInterpreter/trunk/lib/junit.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: tools/scriptInterpreter/trunk/scriptInterpreter.iml
===================================================================
--- tools/scriptInterpreter/trunk/scriptInterpreter.iml (rev 0)
+++ tools/scriptInterpreter/trunk/scriptInterpreter.iml 2008-11-30 17:27:47 UTC (rev 717)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/doc" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/prj" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/tst" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="annotations" level="project" />
+ <orderEntry type="library" name="junit" level="project" />
+ <orderEntry type="module" module-name="libs-argparser" />
+ <orderEntryProperties />
+ </component>
+</module>
+
Property changes on: tools/scriptInterpreter/trunk/scriptInterpreter.iml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
Added: tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.java
===================================================================
--- tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.java (rev 0)
+++ tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.java 2008-11-30 17:27:47 UTC (rev 717)
@@ -0,0 +1,63 @@
+package net.sf.japi.tools.si;
+
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.TreeSet;
+import java.util.Collection;
+import javax.script.ScriptContext;
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineFactory;
+import javax.script.ScriptEngineManager;
+import net.sf.japi.io.args.ArgParser;
+import net.sf.japi.io.args.BasicCommand;
+import net.sf.japi.io.args.Option;
+import net.sf.japi.io.args.OptionType;
+import org.jetbrains.annotations.NotNull;
+
+/** Interpreter for Scripts.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class ScriptInterpreter extends BasicCommand {
+
+ /** The mime type of the script language to execute. */
+ @SuppressWarnings({"InstanceVariableMayNotBeInitialized"})
+ @NotNull private String mimeType;
+
+ /** Main program.
+ * @param args Command line arguments (try --help).
+ */
+ public static void main(final String... args) {
+ ArgParser.simpleParseAndRun(new ScriptInterpreter(), args);
+ }
+
+ /** Sets the mime type of the scripting language.
+ * @param mimeType Mime type of the scripting language.
+ */
+ @Option(type = OptionType.REQUIRED, value = {"m"})
+ public void setMimeType(@NotNull final String mimeType) {
+ this.mimeType = mimeType;
+ }
+
+ /** {@inheritDoc} */
+ @SuppressWarnings({"InstanceMethodNamingConvention"})
+ public int run(@NotNull final List<String> args) throws Exception {
+ final ScriptEngineManager sem = new ScriptEngineManager();
+ final ScriptEngine se = sem.getEngineByMimeType(mimeType);
+ se.getBindings(ScriptContext.ENGINE_SCOPE).put("cmd", this);
+ se.eval(new InputStreamReader(System.in));
+ return 0;
+ }
+
+ /** Lists the available mime types. */
+ @Option(type = OptionType.TERMINAL, value = {"l", "list"})
+ public void list() {
+ final Collection<String> mimeTypes = new TreeSet<String>();
+ final ScriptEngineManager sem = new ScriptEngineManager();
+ for (final ScriptEngineFactory factory : sem.getEngineFactories()) {
+ mimeTypes.addAll(factory.getMimeTypes());
+ }
+ for (final String mimeType : mimeTypes) {
+ System.out.println(mimeType);
+ }
+ }
+}
Property changes on: tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.properties
===================================================================
--- tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.properties (rev 0)
+++ tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.properties 2008-11-30 17:27:47 UTC (rev 717)
@@ -0,0 +1,2 @@
+setMimeType=Specifies the mime type.
+list=Lists the mime types of the available scripting languages.
Property changes on: tools/scriptInterpreter/trunk/src/prj/net/sf/japi/tools/si/ScriptInterpreter.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: tools/scriptInterpreter/trunk/test.js
===================================================================
--- tools/scriptInterpreter/trunk/test.js (rev 0)
+++ tools/scriptInterpreter/trunk/test.js 2008-11-30 17:27:47 UTC (rev 717)
@@ -0,0 +1,6 @@
+function foo(i) {
+ print("hello, world " + i + "\n");
+}
+for (i = 0; i < 10; i++) {
+ foo(i);
+}
Property changes on: tools/scriptInterpreter/trunk/test.js
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 17:23:36
|
Revision: 716
http://japi.svn.sourceforge.net/japi/?rev=716&view=rev
Author: christianhujer
Date: 2008-11-30 17:23:31 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Added JGrep tool.
Added Paths:
-----------
tools/jgrep/
tools/jgrep/branches/
tools/jgrep/tags/
tools/jgrep/trunk/
tools/jgrep/trunk/COPYING
tools/jgrep/trunk/build.xml
tools/jgrep/trunk/jgrep.iml
tools/jgrep/trunk/lib/
tools/jgrep/trunk/lib/annotations.jar
tools/jgrep/trunk/lib/japi-lib-argparser-trunk.jar
tools/jgrep/trunk/src/
tools/jgrep/trunk/src/doc/
tools/jgrep/trunk/src/prj/
tools/jgrep/trunk/src/prj/net/
tools/jgrep/trunk/src/prj/net/sf/
tools/jgrep/trunk/src/prj/net/sf/japi/
tools/jgrep/trunk/src/prj/net/sf/japi/tools/
tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/
tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.java
tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.properties
tools/jgrep/trunk/src/tst/
Added: tools/jgrep/trunk/COPYING
===================================================================
--- tools/jgrep/trunk/COPYING (rev 0)
+++ tools/jgrep/trunk/COPYING 2008-11-30 17:23:31 UTC (rev 716)
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
Property changes on: tools/jgrep/trunk/COPYING
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: tools/jgrep/trunk/build.xml
===================================================================
--- tools/jgrep/trunk/build.xml (rev 0)
+++ tools/jgrep/trunk/build.xml 2008-11-30 17:23:31 UTC (rev 716)
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Replacer is a program for performing an in-place search and replace
+ ~ based on regular expressions.
+ ~ Copyright (C) 2007 Christian Hujer
+ ~
+ ~ This program is free software; you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation; either version 2 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License along
+ ~ with this program; if not, write to the Free Software Foundation, Inc.,
+ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ -->
+
+<project name="Replacer" default="compile">
+
+ <property name="module.version" value="0.1" />
+ <property name="module.name" value="Replacer" />
+ <property name="module.shortname" value="Replacer" />
+ <property name="module.title" value="Replacer" />
+ <property name="main.class" value="net.sf.japi.tools.replacer.Replacer" />
+
+ <taskdef name="pack200" classpath="common/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" />
+
+ <target
+ name = "clean"
+ description = "Cleans Sandbox"
+ >
+ <delete dir="classes" />
+ <delete dir="docs" />
+ </target>
+
+ <target
+ name = "compile"
+ description = "Compiles production classes"
+ >
+ <mkdir dir="classes/production/${module.shortname}" />
+ <mkdir dir="classes/test/${module.shortname}" />
+ <javac
+ srcdir="src/prj"
+ destdir="classes/production/${module.shortname}"
+ encoding="utf-8"
+ source="1.5"
+ target="1.5"
+ >
+ <classpath>
+ <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <fileset dir="common/lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ </classpath>
+ <exclude name="test/**/*.java" />
+ </javac>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="src/prj" includes="**/*.properties" excludes="test/**/*.properties" />
+ <fileset dir="src/prj" includes="META-INF/services/**" />
+ </copy>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="lib" includes="LICENSE-*" />
+ <fileset dir="." includes="COPYING" />
+ </copy>
+ </target>
+
+ <target
+ name = "dist"
+ description = "Packs distribution archives."
+ depends = "clean, compile"
+ >
+ <!--depends = "clean, compile, doc"
+ -->
+ <delete dir="dist" />
+ <mkdir dir="dist" />
+ <property name="distName" value="dist/${module.name}-${module.version}" />
+ <parallel>
+ <tar tarfile="${distName}.src.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.src.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.src.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </jar>
+ <jar destfile="${distName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" />
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ <tar tarfile="${distName}.doc.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.doc.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.doc.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ </zipfileset>
+ </jar>
+ </parallel>
+ <parallel>
+ <gzip src="${distName}.src.tar" destfile="${distName}.src.tar.gz" />
+ <bzip2 src="${distName}.src.tar" destfile="${distName}.src.tar.bz2" />
+ <gzip src="${distName}.doc.tar" destfile="${distName}.doc.tar.gz" />
+ <bzip2 src="${distName}.doc.tar" destfile="${distName}.doc.tar.bz2" />
+ <pack200
+ src="${distName}.jar"
+ destfile="${distName}.pack.gz"
+ gzipoutput="true"
+ stripdebug="true"
+ effort="9"
+ keepfileorder="false"
+ modificationtime="latest"
+ deflatehint="false"
+ />
+ </parallel>
+ <delete file="${distName}.src.tar" />
+ <delete file="${distName}.doc.tar" />
+ </target>
+
+ <target
+ name = "doc"
+ description = "Creates public javadoc documentation."
+ >
+ <mkdir dir="docs/api" />
+ <!--copy todir="docs/api" file="src/doc/api/public/copyright.html" />
+ <copy todir="docs/api" file="src/doc/api/public/.htaccess" /-->
+ <javadoc
+ destdir = "docs/api"
+ access = "protected"
+ author = "yes"
+ version = "yes"
+ locale = "en_US"
+ use = "yes"
+ splitindex = "yes"
+ windowtitle = "JAPI Library ${module.title} ${module.version} API documentation"
+ doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ header = "JAPI Library ${module.title} ${module.version}<br />API Documentation"
+ footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ bottom = "<div style=" text-align:center;">© 2005-2006 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>"
+ serialwarn = "yes"
+ charset = "utf-8"
+ docencoding = "utf-8"
+ encoding = "utf-8"
+ source = "1.5"
+ linksource = "yes"
+ link = "${user.javadoc.link}"
+ >
+ <!--
+ overview = "src/overview.html"
+ -->
+ <classpath>
+ <fileset dir="lib" includes="annotations.jar" />
+ </classpath>
+ <sourcepath>
+ <pathelement path="${user.javadoc.javasrc}" />
+ <pathelement path="src/prj" />
+ </sourcepath>
+ <packageset
+ dir="src/prj"
+ defaultexcludes="yes"
+ >
+ <include name="net/**" />
+ </packageset>
+ <tag enabled="true" name="retval" description="Return Values:" scope="methods" />
+ <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" />
+ <tag enabled="true" name="post" description="Postconditions:" scope="methods" />
+ <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" />
+ <tag enabled="true" name="note" description="Notes:" />
+ <tag enabled="true" name="warning" description="Warnings:" />
+ <!--tag enabled="true" name="todo" description="Todo:" /-->
+ <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" />
+ <tag enabled="true" name="fixme" description="Fixme:" />
+ <tag enabled="true" name="xxx" description="XXX:" />
+ </javadoc>
+ </target>
+
+ <target
+ name = "buildapp"
+ description = "Creates executable jar"
+ >
+ <property name="appName" value="${module.name}-${module.version}-app" />
+ <jar destfile="${appName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <zipgroupfileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <!--attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" /-->
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ </target>
+
+</project>
Property changes on: tools/jgrep/trunk/build.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
Added: tools/jgrep/trunk/jgrep.iml
===================================================================
--- tools/jgrep/trunk/jgrep.iml (rev 0)
+++ tools/jgrep/trunk/jgrep.iml 2008-11-30 17:23:31 UTC (rev 716)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$/../trunk">
+ <sourceFolder url="file://$MODULE_DIR$/../trunk/src/doc" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/../trunk/src/prj" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/../trunk/src/tst" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="annotations" level="project" />
+ <orderEntry type="library" name="junit" level="project" />
+ <orderEntry type="module" module-name="libs-argparser" />
+ <orderEntryProperties />
+ </component>
+</module>
+
Property changes on: tools/jgrep/trunk/jgrep.iml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
Added: tools/jgrep/trunk/lib/annotations.jar
===================================================================
(Binary files differ)
Property changes on: tools/jgrep/trunk/lib/annotations.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: tools/jgrep/trunk/lib/japi-lib-argparser-trunk.jar
===================================================================
(Binary files differ)
Property changes on: tools/jgrep/trunk/lib/japi-lib-argparser-trunk.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.java
===================================================================
--- tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.java (rev 0)
+++ tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.java 2008-11-30 17:23:31 UTC (rev 716)
@@ -0,0 +1,336 @@
+package net.sf.japi.tools.jgrep;
+
+import net.sf.japi.io.args.BasicCommand;
+import net.sf.japi.io.args.Option;
+import net.sf.japi.io.args.CharsetDisplaynameComparator;
+import net.sf.japi.io.args.OptionType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import java.util.List;
+import java.util.Formatter;
+import java.util.Map;
+import java.util.TreeSet;
+import java.util.HashMap;
+import java.util.Collections;
+import java.util.Collection;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.BufferedReader;
+import java.nio.charset.Charset;
+
+/** JGrep is a Java reincarnation of the famous UNIX command grep.
+ * <h3>Differences to UNIX grep</h3>
+ * This comparison was done against GNU grep 2.4.2.
+ * <h4>Supported Features</h4>
+ * <ul>
+ * <li>-R, -r, --recursive for recursing into subdirectories.</li>
+ * <li>-n, --line-number for printing the number of the line of each match.</li>
+ * <li>-Z, --null for printing a null byte after each file name.</li>
+ * <li>--label</li>
+ * </ul>
+ * <h4>Features found in JGrep but not grep</h4>
+ * <ul>
+ * <li>
+ * The extended regular expression of JGrep is more powerful than that of any variant and option known in GNU grep 2.4.2.
+ * </li>
+ * <li>
+ * -e, --encoding for supporting different encodings.
+ * </li>
+ * </p>
+ * <h4>Unsupported Features (no support planned)</h4>
+ * <ul>
+ * <li>
+ * The options -E, -F, -G and -P are not supported.
+ * JGrep always uses Java regular expressions which are very similar to but more powerful than -P.
+ * </li>
+ * <li>JGrep cannot distinguish between text files and binary files.</li>
+ * <li>-b, --byte-offset for printing the byte offset with output lines.</li>
+ * </ul>
+ * <h4>Unsupported Features (todo)</h4>
+ * <ul>
+ * <li>-z, --null-data option to indicate a data line ends with a 0 byte, not newline.</li>
+ * <li>-w, --word-regexp option to force the pattern to match only whole words.</li>
+ * <li>-x, --line-regexp option to force the pattern to match only whole lines.</li>
+ * <li>-s, --no-messages for suppressing error messages.</li>
+ * <li>-v, --revert-match for showing only non-matching lines.</li>
+ * <li>-m, --max-count=NUM stop after NUM matches.</li>
+ * </ul>
+ */
+public class JGrep extends BasicCommand {
+
+ /** The unmodifiable map with the flags.
+ * Key: Flag character.
+ * Value: integer flag value for {@link Pattern#compile(String, int)} resp. returned by {@link Pattern#flags()}.
+ */
+ private static final Map<Character, Integer> flagMap = createFlagMap();
+
+ /** Whether or not to recurse into subdirectories or not.
+ * If <code>true</code>, directories will be opened recursively and substitution performed on all files found.
+ * If <code>false</code> (default), directories will simply be ignored.
+ */
+ private boolean recursive;
+
+ /** The number of errors that occurred.
+ * Errors are only cases where actual exceptions were thrown, i.e. {@link FileNotFoundException} or {@link IOException}.
+ * If 0 (zero) no errors occurred.
+ * This variable will somehow be used for the exit code.
+ */
+ private int errors;
+
+ /** The file encoding that is used for reading and writing files as weil es parsing substitutions from {@link System#in}. */
+ private Charset encoding = Charset.defaultCharset();
+
+ /** Whether or not to display line numbers. */
+ private boolean number;
+
+ /** The Matcher to use for matching. */
+ private Matcher matcher;
+
+ /** The flags to use for matching. */
+ private int flags;
+
+ /** Whether or not to match whole lines. */
+ private boolean matchWholeLines;
+
+ /** Whether or not to print a null byte after each file. */
+ private boolean printNullByte;
+
+ /** The label to print as filename for stdin. */
+ private String label;
+
+ /** Whether or not to print only the matching part of a line. */
+ private boolean onlyMatching;
+
+ /** Creates an unmodifiable map with the flags.
+ * @return Unmodifiable map with the flags.
+ */
+ private static Map<Character, Integer> createFlagMap() {
+ final Map<Character, Integer> flagMap = new HashMap<Character, Integer>();
+ flagMap.put('d', Pattern.UNIX_LINES);
+ flagMap.put('i', Pattern.CASE_INSENSITIVE);
+ flagMap.put('x', Pattern.COMMENTS);
+ flagMap.put('m', Pattern.MULTILINE);
+ flagMap.put('l', Pattern.LITERAL);
+ flagMap.put('s', Pattern.DOTALL);
+ flagMap.put('u', Pattern.UNICODE_CASE);
+ flagMap.put('c', Pattern.CANON_EQ);
+ return Collections.unmodifiableMap(flagMap);
+ }
+
+ /** Converts a flag string into a flag value.
+ * @param flagString String that specifies substitution flags.
+ * @return Integer value with the flags.
+ * @throws IllegalArgumentException in case an invalid flag was specified.
+ */
+ public static int parseFlags(@Nullable final String flagString) {
+ int flags = 0;
+ if (flagString != null) {
+ StringBuilder bogusFlags = null;
+ for (final char c : flagString.toCharArray()) {
+ final Integer flag = flagMap.get(c);
+ if (flag == null) {
+ if (bogusFlags == null) {
+ bogusFlags = new StringBuilder();
+ }
+ bogusFlags.append(c);
+ } else {
+ flags |= flag;
+ }
+ }
+ if (bogusFlags != null) {
+ throw new IllegalArgumentException("Unsupported flags: " + bogusFlags);
+ }
+ }
+ return flags;
+ }
+
+ /** {@inheritDoc} */
+ @SuppressWarnings({"InstanceMethodNamingConvention"})
+ public int run(@NotNull final List<String> args) throws Exception {
+ matcher = Pattern.compile(args.remove(0), flags).matcher("");
+ if (args.size() == 0) {
+ grep(System.in, label);
+ }
+ for (final String arg : args) {
+ grep(arg);
+ }
+ return errors;
+ }
+
+ /** Grep the specified file.
+ * @param filename Name of the file to grep.
+ */
+ public void grep(@NotNull final String filename) {
+ grep(new File(filename));
+ }
+
+ /** Grep the specified file.
+ * @param file File to grep.
+ */
+ public void grep(@NotNull final File file) {
+ if (recursive && file.isDirectory()) {
+ for (final File f : file.listFiles()) {
+ grep(f);
+ }
+ }
+ if (file.isFile()) {
+ try {
+ final InputStream in = new FileInputStream(file);
+ try {
+ grep(in, file.toString());
+ } finally {
+ in.close();
+ }
+ } catch (final IOException e) {
+ System.err.println(e);
+ errors++;
+ }
+ }
+ }
+
+ /** Grep the specified stream.
+ * @param in Stream to grep.
+ * @param currentFile File to grep or <code>null</code> if unknown
+ * @throws IOException in case of I/O problems.
+ */
+ public void grep(@NotNull final InputStream in, @Nullable final String currentFile) throws IOException {
+ grep(new InputStreamReader(in, encoding), currentFile);
+ }
+
+ /** Grep the specified reader.
+ * @param reader Reader to grep.
+ * @param currentFile File to grep or <code>null</code> if unknown
+ * @throws IOException in case of I/O problems.
+ */
+ public void grep(@NotNull final Reader reader, @Nullable final String currentFile) throws IOException {
+ final BufferedReader in = reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader);
+ int lineNumber = 0;
+ for (String line; (line = in.readLine()) != null; ) {
+ ++lineNumber;
+ matcher.reset(line);
+ final boolean found = matchWholeLines ? matcher.matches() : matcher.find();
+ if (found) {
+ if (currentFile != null) {
+ System.out.print(currentFile + (printNullByte ? '\0' : ':'));
+ }
+ if (number) {
+ System.out.print(lineNumber + ":");
+ }
+ System.out.print(onlyMatching ? matcher.group() : line);
+ }
+ }
+ }
+
+ /** Sets the recurse option. */
+ @Option({"r", "R", "recursive"})
+ public void recursive() {
+ recursive = true;
+ }
+
+ /** Sets the option how to handle directories.
+ * @param action Action to use for handling directories, possible values are "read", "recurse" and "skip".
+ */
+ @Option({"d", "directories"})
+ public void setDirectories(@NotNull final String action) {
+ if ("recurse".equals(action)) {
+ recursive = true;
+ } else if ("read".equals(action) || "skip".equals(action)) {
+ recursive = false;
+ } else {
+ throw new IllegalArgumentException("Unsupported value " + action + " for option directories.");
+ }
+ }
+
+ /** Returns whether or not the recurse option is set.
+ * @return <code>true</code> if the recurse option is set, otherwise <code>false</code>.
+ */
+ public boolean isRecursive() {
+ return recursive;
+ }
+
+ /** Sets the encoding to use for reading and writing files.
+ * @param charsetName Name of the charset to use as encoding for reading and writing files.
+ */
+ @Option({"e", "encoding"})
+ public void setEncoding(@NotNull final String charsetName) {
+ encoding = Charset.forName(charsetName);
+ }
+
+ /** Returns the currently set encoding for reading and writing files.
+ * @return The currently set encoding for reading and writing files.
+ */
+ @NotNull public String getEncoding() {
+ return encoding.name();
+ }
+
+ /** Lists available encodings for reading and writing files. */
+ @Option(type = OptionType.TERMINAL, value = {"listEncodings"})
+ public void listEncodings() {
+ final Formatter format = new Formatter(System.err);
+ final Map<String, Charset> availableCharsets = Charset.availableCharsets();
+ final Collection<Charset> charsetsByDisplayname = new TreeSet<Charset>(new CharsetDisplaynameComparator());
+ charsetsByDisplayname.addAll(availableCharsets.values());
+ for (final Charset charset : charsetsByDisplayname) {
+ format.format("%s (Aliases:", charset.name());
+ for (final String alias : charset.aliases()) {
+ format.format(" %s", alias);
+ }
+ format.format(")%n");
+ }
+ format.flush();
+ }
+
+ /** Sets the linenumber option. */
+ @Option({"n", "line-number"})
+ public void lineNumber() {
+ number = true;
+ }
+
+ /** Sets the ignore case option. */
+ @Option({"i", "ignore-case"})
+ public void ignoreCase() {
+ flags |= Pattern.CASE_INSENSITIVE;
+ }
+
+ /** Sets the flags.
+ * @param flags Flags to set.
+ */
+ @Option({"flags"})
+ public void setFlags(@NotNull final String flags) {
+ this.flags = parseFlags(flags);
+ }
+
+ /** Sets the match whole lines option. */
+ @Option({"x", "line-regexp"})
+ public void matchWholeLines() {
+ matchWholeLines = true;
+ }
+
+ /** Sets the null option. */
+ @Option({"Z", "null"})
+ public void printNullByte() {
+ printNullByte = true;
+ }
+
+ /** Sets the label option.
+ * @param label Label.
+ */
+ @Option({"label"})
+ public void setLabel(@Nullable final String label) {
+ this.label = label;
+ }
+
+ /** Sets the only matching option. */
+ @Option({"o", "only-matching"})
+ public void onlyMatching() {
+ onlyMatching = true;
+ }
+
+}
Property changes on: tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.properties
===================================================================
--- tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.properties (rev 0)
+++ tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.properties 2008-11-30 17:23:31 UTC (rev 716)
@@ -0,0 +1,2 @@
+recursive=Scan subdirectories recursively. (same as --directories=recurse)
+setDirectories=Sets how to handle subdirectories. Possible values are: recurse (recursive handling), read, skip.
\ No newline at end of file
Property changes on: tools/jgrep/trunk/src/prj/net/sf/japi/tools/jgrep/JGrep.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 16:55:38
|
Revision: 715
http://japi.svn.sourceforge.net/japi/?rev=715&view=rev
Author: christianhujer
Date: 2008-11-30 16:55:33 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Added build.xml.
Added Paths:
-----------
tools/prefsbrowser/trunk/build.xml
Added: tools/prefsbrowser/trunk/build.xml
===================================================================
--- tools/prefsbrowser/trunk/build.xml (rev 0)
+++ tools/prefsbrowser/trunk/build.xml 2008-11-30 16:55:33 UTC (rev 715)
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ DirCount is a program for converting Strings into byte arrays.
+ ~ Copyright (C) 2007 Christian Hujer
+ ~
+ ~ This program is free software; you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation; either version 2 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License along
+ ~ with this program; if not, write to the Free Software Foundation, Inc.,
+ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ -->
+
+<project name="dircount" default="compile">
+
+ <property name="module.version" value="0.1" />
+ <property name="module.name" value="dircount" />
+ <property name="module.shortname" value="dircount" />
+ <property name="module.title" value="DirCount" />
+ <property name="main.class" value="net.sf.japi.dircount.DirCount" />
+
+ <taskdef name="pack200" classpath="common/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" />
+
+ <target
+ name = "clean"
+ description = "Cleans Sandbox"
+ >
+ <delete dir="classes" />
+ <delete dir="docs" />
+ </target>
+
+ <target
+ name = "compile"
+ description = "Compiles production classes"
+ >
+ <mkdir dir="classes/production/${module.shortname}" />
+ <mkdir dir="classes/test/${module.shortname}" />
+ <javac
+ srcdir="src/prj"
+ destdir="classes/production/${module.shortname}"
+ encoding="utf-8"
+ source="1.5"
+ target="1.5"
+ >
+ <classpath>
+ <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <fileset dir="common/lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ </classpath>
+ <exclude name="test/**/*.java" />
+ </javac>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="src/prj" includes="**/*.properties" excludes="test/**/*.properties" />
+ <fileset dir="src/prj" includes="META-INF/services/**" />
+ </copy>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="lib" includes="LICENSE-*" />
+ <fileset dir="." includes="COPYING" />
+ </copy>
+ </target>
+
+ <target
+ name = "dist"
+ description = "Packs distribution archives."
+ depends = "clean, compile"
+ >
+ <!--depends = "clean, compile, doc"
+ -->
+ <delete dir="dist" />
+ <mkdir dir="dist" />
+ <property name="distName" value="dist/${module.name}-${module.version}" />
+ <parallel>
+ <tar tarfile="${distName}.src.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.src.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.src.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </jar>
+ <jar destfile="${distName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" />
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ <tar tarfile="${distName}.doc.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.doc.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.doc.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ </zipfileset>
+ </jar>
+ </parallel>
+ <parallel>
+ <gzip src="${distName}.src.tar" destfile="${distName}.src.tar.gz" />
+ <bzip2 src="${distName}.src.tar" destfile="${distName}.src.tar.bz2" />
+ <gzip src="${distName}.doc.tar" destfile="${distName}.doc.tar.gz" />
+ <bzip2 src="${distName}.doc.tar" destfile="${distName}.doc.tar.bz2" />
+ <pack200
+ src="${distName}.jar"
+ destfile="${distName}.pack.gz"
+ gzipoutput="true"
+ stripdebug="true"
+ effort="9"
+ keepfileorder="false"
+ modificationtime="latest"
+ deflatehint="false"
+ />
+ </parallel>
+ <delete file="${distName}.src.tar" />
+ <delete file="${distName}.doc.tar" />
+ </target>
+
+ <target
+ name = "doc"
+ description = "Creates public javadoc documentation."
+ >
+ <mkdir dir="docs/api" />
+ <!--copy todir="docs/api" file="src/doc/api/public/copyright.html" />
+ <copy todir="docs/api" file="src/doc/api/public/.htaccess" /-->
+ <javadoc
+ destdir = "docs/api"
+ access = "protected"
+ author = "yes"
+ version = "yes"
+ locale = "en_US"
+ use = "yes"
+ splitindex = "yes"
+ windowtitle = "JAPI Library ${module.title} ${module.version} API documentation"
+ doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ header = "JAPI Library ${module.title} ${module.version}<br />API Documentation"
+ footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ bottom = "<div style=" text-align:center;">© 2005-2006 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>"
+ serialwarn = "yes"
+ charset = "utf-8"
+ docencoding = "utf-8"
+ encoding = "utf-8"
+ source = "1.5"
+ linksource = "yes"
+ link = "${user.javadoc.link}"
+ >
+ <!--
+ overview = "src/overview.html"
+ -->
+ <classpath>
+ <fileset dir="lib" includes="annotations.jar" />
+ </classpath>
+ <sourcepath>
+ <pathelement path="${user.javadoc.javasrc}" />
+ <pathelement path="src/prj" />
+ </sourcepath>
+ <packageset
+ dir="src/prj"
+ defaultexcludes="yes"
+ >
+ <include name="net/**" />
+ </packageset>
+ <tag enabled="true" name="retval" description="Return Values:" scope="methods" />
+ <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" />
+ <tag enabled="true" name="post" description="Postconditions:" scope="methods" />
+ <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" />
+ <tag enabled="true" name="note" description="Notes:" />
+ <tag enabled="true" name="warning" description="Warnings:" />
+ <!--tag enabled="true" name="todo" description="Todo:" /-->
+ <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" />
+ <tag enabled="true" name="fixme" description="Fixme:" />
+ <tag enabled="true" name="xxx" description="XXX:" />
+ </javadoc>
+ </target>
+
+ <target
+ name = "buildapp"
+ description = "Creates executable jar"
+ >
+ <property name="appName" value="${module.name}-${module.version}-app" />
+ <jar destfile="${appName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <zipgroupfileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <!--attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" /-->
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ </target>
+
+</project>
Property changes on: tools/prefsbrowser/trunk/build.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 16:50:10
|
Revision: 714
http://japi.svn.sourceforge.net/japi/?rev=714&view=rev
Author: christianhujer
Date: 2008-11-30 16:50:06 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Updated cstyle, added build.xml.
Modified Paths:
--------------
tools/cstyle/trunk/src/prj/net/sf/japi/cstyle/CStyle.java
Added Paths:
-----------
tools/cstyle/trunk/build.xml
Added: tools/cstyle/trunk/build.xml
===================================================================
--- tools/cstyle/trunk/build.xml (rev 0)
+++ tools/cstyle/trunk/build.xml 2008-11-30 16:50:06 UTC (rev 714)
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ CStyle is a program for checking the style of a C program.
+ ~ Copyright (C) 2007 Christian Hujer
+ ~
+ ~ This program is free software; you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation; either version 2 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License along
+ ~ with this program; if not, write to the Free Software Foundation, Inc.,
+ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ -->
+
+<project name="cstyle" default="compile">
+
+ <property name="module.version" value="0.1" />
+ <property name="module.name" value="cstyle" />
+ <property name="module.shortname" value="cstyle" />
+ <property name="module.title" value="CStyle" />
+ <property name="main.class" value="net.sf.japi.cstyle.CStyle" />
+
+ <taskdef name="pack200" classpath="common/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" />
+
+ <target
+ name = "clean"
+ description = "Cleans Sandbox"
+ >
+ <delete dir="classes" />
+ <delete dir="docs" />
+ </target>
+
+ <target
+ name = "compile"
+ description = "Compiles production classes"
+ >
+ <mkdir dir="classes/production/${module.shortname}" />
+ <mkdir dir="classes/test/${module.shortname}" />
+ <javac
+ srcdir="src/prj"
+ destdir="classes/production/${module.shortname}"
+ encoding="utf-8"
+ source="1.5"
+ target="1.5"
+ >
+ <classpath>
+ <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <fileset dir="common/lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ </classpath>
+ <exclude name="test/**/*.java" />
+ </javac>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="src/prj" includes="**/*.properties" excludes="test/**/*.properties" />
+ <fileset dir="src/prj" includes="META-INF/services/**" />
+ </copy>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="lib" includes="LICENSE-*" />
+ <fileset dir="." includes="COPYING" />
+ </copy>
+ </target>
+
+ <target
+ name = "dist"
+ description = "Packs distribution archives."
+ depends = "clean, compile"
+ >
+ <!--depends = "clean, compile, doc"
+ -->
+ <delete dir="dist" />
+ <mkdir dir="dist" />
+ <property name="distName" value="dist/${module.name}-${module.version}" />
+ <parallel>
+ <tar tarfile="${distName}.src.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.src.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.src.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </jar>
+ <jar destfile="${distName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" />
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ <tar tarfile="${distName}.doc.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.doc.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.doc.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ </zipfileset>
+ </jar>
+ </parallel>
+ <parallel>
+ <gzip src="${distName}.src.tar" destfile="${distName}.src.tar.gz" />
+ <bzip2 src="${distName}.src.tar" destfile="${distName}.src.tar.bz2" />
+ <gzip src="${distName}.doc.tar" destfile="${distName}.doc.tar.gz" />
+ <bzip2 src="${distName}.doc.tar" destfile="${distName}.doc.tar.bz2" />
+ <pack200
+ src="${distName}.jar"
+ destfile="${distName}.pack.gz"
+ gzipoutput="true"
+ stripdebug="true"
+ effort="9"
+ keepfileorder="false"
+ modificationtime="latest"
+ deflatehint="false"
+ />
+ </parallel>
+ <delete file="${distName}.src.tar" />
+ <delete file="${distName}.doc.tar" />
+ </target>
+
+ <target
+ name = "doc"
+ description = "Creates public javadoc documentation."
+ >
+ <mkdir dir="docs/api" />
+ <!--copy todir="docs/api" file="src/doc/api/public/copyright.html" />
+ <copy todir="docs/api" file="src/doc/api/public/.htaccess" /-->
+ <javadoc
+ destdir = "docs/api"
+ access = "protected"
+ author = "yes"
+ version = "yes"
+ locale = "en_US"
+ use = "yes"
+ splitindex = "yes"
+ windowtitle = "JAPI Library ${module.title} ${module.version} API documentation"
+ doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ header = "JAPI Library ${module.title} ${module.version}<br />API Documentation"
+ footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ bottom = "<div style=" text-align:center;">© 2005-2006 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>"
+ serialwarn = "yes"
+ charset = "utf-8"
+ docencoding = "utf-8"
+ encoding = "utf-8"
+ source = "1.5"
+ linksource = "yes"
+ link = "${user.javadoc.link}"
+ >
+ <!--
+ overview = "src/overview.html"
+ -->
+ <classpath>
+ <fileset dir="lib" includes="annotations.jar" />
+ </classpath>
+ <sourcepath>
+ <pathelement path="${user.javadoc.javasrc}" />
+ <pathelement path="src/prj" />
+ </sourcepath>
+ <packageset
+ dir="src/prj"
+ defaultexcludes="yes"
+ >
+ <include name="net/**" />
+ </packageset>
+ <tag enabled="true" name="retval" description="Return Values:" scope="methods" />
+ <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" />
+ <tag enabled="true" name="post" description="Postconditions:" scope="methods" />
+ <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" />
+ <tag enabled="true" name="note" description="Notes:" />
+ <tag enabled="true" name="warning" description="Warnings:" />
+ <!--tag enabled="true" name="todo" description="Todo:" /-->
+ <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" />
+ <tag enabled="true" name="fixme" description="Fixme:" />
+ <tag enabled="true" name="xxx" description="XXX:" />
+ </javadoc>
+ </target>
+
+ <target
+ name = "buildapp"
+ description = "Creates executable jar"
+ >
+ <property name="appName" value="${module.name}-${module.version}-app" />
+ <jar destfile="${appName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <zipgroupfileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <!--attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" /-->
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ </target>
+
+</project>
Property changes on: tools/cstyle/trunk/build.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
Modified: tools/cstyle/trunk/src/prj/net/sf/japi/cstyle/CStyle.java
===================================================================
--- tools/cstyle/trunk/src/prj/net/sf/japi/cstyle/CStyle.java 2008-11-30 16:49:00 UTC (rev 713)
+++ tools/cstyle/trunk/src/prj/net/sf/japi/cstyle/CStyle.java 2008-11-30 16:50:06 UTC (rev 714)
@@ -108,7 +108,7 @@
* @throws IOException In case of I/O problems.
*/
public void check(@NotNull final InputStream stream) throws IOException {
- final BufferedReader in = new BufferedReader(new InputStreamReader(stream, encoding));
+ final Reader in = new BufferedReader(new InputStreamReader(stream, encoding));
check(in);
}
@@ -137,61 +137,61 @@
previousPhysicalMode = physicalMode;
// Step 1: Parse the character and determine the new mode.
switch (previousPhysicalMode) {
- case NORMAL:
- switch (c) {
- case '\\': physicalMode = PhysicalMode.ESCAPE; break;
- case '/': physicalMode = PhysicalMode.SLASH; break;
- case '"': physicalMode = PhysicalMode.STRING; break;
- case '\'': physicalMode = PhysicalMode.CHAR; break;
- }
- break;
- case ESCAPE:
- physicalMode = PhysicalMode.NORMAL;
- break;
- case SLASH:
- switch (c) {
- case '/': physicalMode = PhysicalMode.EOL_COMMENT; break;
- case '*': physicalMode = PhysicalMode.ML_COMMENT; break;
- default: physicalMode = PhysicalMode.NORMAL; break;
- }
- break;
- case EOL_COMMENT:
- switch (c) {
- case '\n': physicalMode = PhysicalMode.NORMAL; break;
- }
- break;
- case ML_COMMENT:
- switch (c) {
- case '*': physicalMode = PhysicalMode.ML_COMMENT_STAR; break;
- }
- break;
- case ML_COMMENT_STAR:
- switch (c) {
- case '/': physicalMode = PhysicalMode.NORMAL; break;
- case '*': physicalMode = PhysicalMode.ML_COMMENT_STAR; break;
- default: physicalMode = PhysicalMode.ML_COMMENT; break;
- }
- break;
- case STRING:
- switch (c) {
- case '"': physicalMode = PhysicalMode.NORMAL; break;
- case '\\': physicalMode = PhysicalMode.STRING_ESCAPE; break;
- }
- break;
- case STRING_ESCAPE:
- physicalMode = PhysicalMode.STRING;
- break;
- case CHAR:
- switch (c) {
- case '\'': physicalMode = PhysicalMode.NORMAL; break;
- case '\\': physicalMode = PhysicalMode.CHAR_ESCAPE; break;
- }
- break;
- case CHAR_ESCAPE:
- physicalMode = PhysicalMode.CHAR;
- break;
- default:
- assert false;
+ case NORMAL:
+ switch (c) {
+ case '\\': physicalMode = PhysicalMode.ESCAPE; break;
+ case '/': physicalMode = PhysicalMode.SLASH; break;
+ case '"': physicalMode = PhysicalMode.STRING; break;
+ case '\'': physicalMode = PhysicalMode.CHAR; break;
+ }
+ break;
+ case ESCAPE:
+ physicalMode = PhysicalMode.NORMAL;
+ break;
+ case SLASH:
+ switch (c) {
+ case '/': physicalMode = PhysicalMode.EOL_COMMENT; break;
+ case '*': physicalMode = PhysicalMode.ML_COMMENT; break;
+ default: physicalMode = PhysicalMode.NORMAL; break;
+ }
+ break;
+ case EOL_COMMENT:
+ switch (c) {
+ case '\n': physicalMode = PhysicalMode.NORMAL; break;
+ }
+ break;
+ case ML_COMMENT:
+ switch (c) {
+ case '*': physicalMode = PhysicalMode.ML_COMMENT_STAR; break;
+ }
+ break;
+ case ML_COMMENT_STAR:
+ switch (c) {
+ case '/': physicalMode = PhysicalMode.NORMAL; break;
+ case '*': physicalMode = PhysicalMode.ML_COMMENT_STAR; break;
+ default: physicalMode = PhysicalMode.ML_COMMENT; break;
+ }
+ break;
+ case STRING:
+ switch (c) {
+ case '"': physicalMode = PhysicalMode.NORMAL; break;
+ case '\\': physicalMode = PhysicalMode.STRING_ESCAPE; break;
+ }
+ break;
+ case STRING_ESCAPE:
+ physicalMode = PhysicalMode.STRING;
+ break;
+ case CHAR:
+ switch (c) {
+ case '\'': physicalMode = PhysicalMode.NORMAL; break;
+ case '\\': physicalMode = PhysicalMode.CHAR_ESCAPE; break;
+ }
+ break;
+ case CHAR_ESCAPE:
+ physicalMode = PhysicalMode.CHAR;
+ break;
+ default:
+ assert false;
}
// Step 2: Tokenize
if (physicalMode == PhysicalMode.NORMAL && previousPhysicalMode == PhysicalMode.NORMAL) {
@@ -202,6 +202,9 @@
// operator
// literal
// separator
+ // whitespace
+ // eol-comment
+ // multiline-comment
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 16:49:03
|
Revision: 713
http://japi.svn.sourceforge.net/japi/?rev=713&view=rev
Author: christianhujer
Date: 2008-11-30 16:49:00 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Updated keystrokes, added build.xml.
Modified Paths:
--------------
tools/keystrokes/trunk/src/prj/net/sf/japi/tools/keystrokes/KeyStrokes.java
Added Paths:
-----------
tools/keystrokes/trunk/build.xml
Added: tools/keystrokes/trunk/build.xml
===================================================================
--- tools/keystrokes/trunk/build.xml (rev 0)
+++ tools/keystrokes/trunk/build.xml 2008-11-30 16:49:00 UTC (rev 713)
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ DirCount is a program for converting Strings into byte arrays.
+ ~ Copyright (C) 2007 Christian Hujer
+ ~
+ ~ This program is free software; you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation; either version 2 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License along
+ ~ with this program; if not, write to the Free Software Foundation, Inc.,
+ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ -->
+
+<project name="dircount" default="compile">
+
+ <property name="module.version" value="0.1" />
+ <property name="module.name" value="dircount" />
+ <property name="module.shortname" value="dircount" />
+ <property name="module.title" value="DirCount" />
+ <property name="main.class" value="net.sf.japi.dircount.DirCount" />
+
+ <taskdef name="pack200" classpath="common/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" />
+
+ <target
+ name = "clean"
+ description = "Cleans Sandbox"
+ >
+ <delete dir="classes" />
+ <delete dir="docs" />
+ </target>
+
+ <target
+ name = "compile"
+ description = "Compiles production classes"
+ >
+ <mkdir dir="classes/production/${module.shortname}" />
+ <mkdir dir="classes/test/${module.shortname}" />
+ <javac
+ srcdir="src/prj"
+ destdir="classes/production/${module.shortname}"
+ encoding="utf-8"
+ source="1.5"
+ target="1.5"
+ >
+ <classpath>
+ <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <fileset dir="common/lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ </classpath>
+ <exclude name="test/**/*.java" />
+ </javac>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="src/prj" includes="**/*.properties" excludes="test/**/*.properties" />
+ <fileset dir="src/prj" includes="META-INF/services/**" />
+ </copy>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="lib" includes="LICENSE-*" />
+ <fileset dir="." includes="COPYING" />
+ </copy>
+ </target>
+
+ <target
+ name = "dist"
+ description = "Packs distribution archives."
+ depends = "clean, compile"
+ >
+ <!--depends = "clean, compile, doc"
+ -->
+ <delete dir="dist" />
+ <mkdir dir="dist" />
+ <property name="distName" value="dist/${module.name}-${module.version}" />
+ <parallel>
+ <tar tarfile="${distName}.src.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.src.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.src.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </jar>
+ <jar destfile="${distName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" />
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ <tar tarfile="${distName}.doc.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.doc.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.doc.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ </zipfileset>
+ </jar>
+ </parallel>
+ <parallel>
+ <gzip src="${distName}.src.tar" destfile="${distName}.src.tar.gz" />
+ <bzip2 src="${distName}.src.tar" destfile="${distName}.src.tar.bz2" />
+ <gzip src="${distName}.doc.tar" destfile="${distName}.doc.tar.gz" />
+ <bzip2 src="${distName}.doc.tar" destfile="${distName}.doc.tar.bz2" />
+ <pack200
+ src="${distName}.jar"
+ destfile="${distName}.pack.gz"
+ gzipoutput="true"
+ stripdebug="true"
+ effort="9"
+ keepfileorder="false"
+ modificationtime="latest"
+ deflatehint="false"
+ />
+ </parallel>
+ <delete file="${distName}.src.tar" />
+ <delete file="${distName}.doc.tar" />
+ </target>
+
+ <target
+ name = "doc"
+ description = "Creates public javadoc documentation."
+ >
+ <mkdir dir="docs/api" />
+ <!--copy todir="docs/api" file="src/doc/api/public/copyright.html" />
+ <copy todir="docs/api" file="src/doc/api/public/.htaccess" /-->
+ <javadoc
+ destdir = "docs/api"
+ access = "protected"
+ author = "yes"
+ version = "yes"
+ locale = "en_US"
+ use = "yes"
+ splitindex = "yes"
+ windowtitle = "JAPI Library ${module.title} ${module.version} API documentation"
+ doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ header = "JAPI Library ${module.title} ${module.version}<br />API Documentation"
+ footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ bottom = "<div style=" text-align:center;">© 2005-2006 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>"
+ serialwarn = "yes"
+ charset = "utf-8"
+ docencoding = "utf-8"
+ encoding = "utf-8"
+ source = "1.5"
+ linksource = "yes"
+ link = "${user.javadoc.link}"
+ >
+ <!--
+ overview = "src/overview.html"
+ -->
+ <classpath>
+ <fileset dir="lib" includes="annotations.jar" />
+ </classpath>
+ <sourcepath>
+ <pathelement path="${user.javadoc.javasrc}" />
+ <pathelement path="src/prj" />
+ </sourcepath>
+ <packageset
+ dir="src/prj"
+ defaultexcludes="yes"
+ >
+ <include name="net/**" />
+ </packageset>
+ <tag enabled="true" name="retval" description="Return Values:" scope="methods" />
+ <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" />
+ <tag enabled="true" name="post" description="Postconditions:" scope="methods" />
+ <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" />
+ <tag enabled="true" name="note" description="Notes:" />
+ <tag enabled="true" name="warning" description="Warnings:" />
+ <!--tag enabled="true" name="todo" description="Todo:" /-->
+ <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" />
+ <tag enabled="true" name="fixme" description="Fixme:" />
+ <tag enabled="true" name="xxx" description="XXX:" />
+ </javadoc>
+ </target>
+
+ <target
+ name = "buildapp"
+ description = "Creates executable jar"
+ >
+ <property name="appName" value="${module.name}-${module.version}-app" />
+ <jar destfile="${appName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <zipgroupfileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <!--attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" /-->
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ </target>
+
+</project>
Property changes on: tools/keystrokes/trunk/build.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
Modified: tools/keystrokes/trunk/src/prj/net/sf/japi/tools/keystrokes/KeyStrokes.java
===================================================================
--- tools/keystrokes/trunk/src/prj/net/sf/japi/tools/keystrokes/KeyStrokes.java 2008-11-30 16:46:46 UTC (rev 712)
+++ tools/keystrokes/trunk/src/prj/net/sf/japi/tools/keystrokes/KeyStrokes.java 2008-11-30 16:49:00 UTC (rev 713)
@@ -20,18 +20,19 @@
package net.sf.japi.tools.keystrokes;
import java.awt.Component;
+import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
+import java.awt.event.InputMethodEvent;
+import java.awt.event.InputMethodListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
-import static java.lang.System.out;
import java.text.DateFormat;
import static java.text.DateFormat.getTimeInstance;
import static java.util.Arrays.asList;
import java.util.Date;
import javax.swing.JButton;
-import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
@@ -45,8 +46,11 @@
import net.sf.japi.swing.ActionMethod;
import org.jetbrains.annotations.NotNull;
-/** A small tool that displays the keystrokes while typing. */
-public class KeyStrokes implements KeyListener {
+// TODO Finish InputMethod support.
+/** A small tool that displays the keystrokes while typing.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class KeyStrokes implements InputMethodListener, KeyListener {
/** Action Builder. */
private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.japi.tools.keystrokes");
@@ -83,6 +87,9 @@
final JFrame frame = new JFrame(ACTION_BUILDER.getString("frame.title"));
//noinspection ThisEscapedInObjectConstruction
frame.addKeyListener(this);
+ //noinspection ThisEscapedInObjectConstruction
+ frame.addInputMethodListener(this);
+ frame.enableInputMethods(true);
frame.add(createContentPane());
frame.pack();
frame.setVisible(true);
@@ -93,7 +100,7 @@
* @return The newly created content pane.
*/
@NotNull private Component createContentPane() {
- final JPanel contentPane = new JPanel(new GridBagLayout());
+ final Container contentPane = new JPanel(new GridBagLayout());
final Insets insets = new Insets(2, 2, 2, 2);
final GridBagConstraints labelGbc = new GridBagConstraints();
final GridBagConstraints fieldGbc = new GridBagConstraints();
@@ -115,7 +122,7 @@
for (final JTextComponent c : asList(fieldPressed, fieldReleased, fieldTyped, history)) {
c.setEditable(false);
}
- for (final JComponent c : asList(fieldPressed, fieldReleased, fieldTyped, history, clear)) {
+ for (final Component c : asList(fieldPressed, fieldReleased, fieldTyped, history, clear)) {
c.setFocusable(false);
}
contentPane.add(ACTION_BUILDER.createLabel(fieldPressed, "fieldPressed.label"), labelGbc);
@@ -126,6 +133,8 @@
contentPane.add(fieldTyped, fieldGbc);
contentPane.add(clear, labelGbc);
contentPane.add(new JScrollPane(history), areaGbc);
+ contentPane.addInputMethodListener(this);
+ contentPane.enableInputMethods(true);
return contentPane;
}
@@ -148,7 +157,7 @@
* @param field Field to record at
* @param event KeyEvent to record
*/
- private void recordEvent(@NotNull final JTextField field, @NotNull final KeyEvent event) {
+ private void recordEvent(@NotNull final JTextComponent field, @NotNull final KeyEvent event) {
final String keyStrokeText = KeyStroke.getKeyStrokeForEvent(event).toString();
field.setEditable(true);
field.setText(keyStrokeText);
@@ -157,15 +166,27 @@
history.append(format.format(new Date(event.getWhen())));
history.append(": ");
history.append(keyStrokeText);
+ history.append("(" + ((int) event.getKeyChar()) + " " + event.getKeyCode() + " " + event.getKeyLocation() + ")");
history.append("\n");
history.setEditable(false);
- //noinspection UseOfSystemOutOrSystemErr
- out.println(keyStrokeText);
}
/** Clears the history. */
@ActionMethod public void clear() {
history.setText("");
+ fieldPressed.setText("");
+ fieldReleased.setText("");
+ fieldTyped.setText("");
}
+ /** {@inheritDoc} */
+ public void inputMethodTextChanged(final InputMethodEvent event) {
+ System.err.println(event);
+ }
+
+ /** {@inheritDoc} */
+ public void caretPositionChanged(final InputMethodEvent event) {
+ System.err.println(event);
+ }
+
} // class KeyStrokes
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 16:46:50
|
Revision: 712
http://japi.svn.sourceforge.net/japi/?rev=712&view=rev
Author: christianhujer
Date: 2008-11-30 16:46:46 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Updated build.xml, documented the decision of using a deprecated method.
Modified Paths:
--------------
tools/string2bytes/trunk/build.xml
tools/string2bytes/trunk/src/prj/net/sf/japi/string2bytes/URLEncodeCodec.java
Modified: tools/string2bytes/trunk/build.xml
===================================================================
--- tools/string2bytes/trunk/build.xml 2008-11-30 16:41:32 UTC (rev 711)
+++ tools/string2bytes/trunk/build.xml 2008-11-30 16:46:46 UTC (rev 712)
@@ -26,7 +26,7 @@
<property name="module.title" value="String2Bytes" />
<property name="main.class" value="net.sf.japi.string2bytes.String2Bytes" />
- <taskdef name="pack200" classpath="lib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" />
+ <taskdef name="pack200" classpath="common/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" />
<target
name = "clean"
@@ -43,7 +43,7 @@
<mkdir dir="classes/production/${module.shortname}" />
<mkdir dir="classes/test/${module.shortname}" />
<javac
- srcdir="src"
+ srcdir="src/prj"
destdir="classes/production/${module.shortname}"
encoding="utf-8"
source="1.5"
@@ -51,14 +51,15 @@
>
<classpath>
<fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <fileset dir="common/lib" includes="*.jar" excludes="LICENSE-*.jar" />
</classpath>
<exclude name="test/**/*.java" />
</javac>
<copy
todir="classes/production/${module.shortname}"
>
- <fileset dir="src" includes="**/*.properties" excludes="test/**/*.properties" />
- <fileset dir="src" includes="META-INF/services/**" />
+ <fileset dir="src/prj" includes="**/*.properties" excludes="test/**/*.properties" />
+ <fileset dir="src/prj" includes="META-INF/services/**" />
</copy>
<copy
todir="classes/production/${module.shortname}"
@@ -182,10 +183,10 @@
</classpath>
<sourcepath>
<pathelement path="${user.javadoc.javasrc}" />
- <pathelement path="src" />
+ <pathelement path="src/prj" />
</sourcepath>
<packageset
- dir="src"
+ dir="src/prj"
defaultexcludes="yes"
>
<include name="net/**" />
@@ -205,6 +206,7 @@
<target
name = "buildapp"
+ description = "Creates executable jar"
>
<property name="appName" value="${module.name}-${module.version}-app" />
<jar destfile="${appName}.jar">
Modified: tools/string2bytes/trunk/src/prj/net/sf/japi/string2bytes/URLEncodeCodec.java
===================================================================
--- tools/string2bytes/trunk/src/prj/net/sf/japi/string2bytes/URLEncodeCodec.java 2008-11-30 16:41:32 UTC (rev 711)
+++ tools/string2bytes/trunk/src/prj/net/sf/japi/string2bytes/URLEncodeCodec.java 2008-11-30 16:46:46 UTC (rev 712)
@@ -33,6 +33,9 @@
/** {@inheritDoc} */
@NotNull public String code(@NotNull final String input, @Nullable final String charsetName) throws UnsupportedEncodingException {
+ // The invocation of the deprecated method is intentional in case no charset is specified.
+ // TODO: Review whether or not this decision was good.
+ //noinspection deprecation
return charsetName == null ? URLEncoder.encode(input) : URLEncoder.encode(input, charsetName);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 16:41:39
|
Revision: 711
http://japi.svn.sourceforge.net/japi/?rev=711&view=rev
Author: christianhujer
Date: 2008-11-30 16:41:32 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Improved FindLongestPath.
Modified Paths:
--------------
tools/findLongestPath/trunk/src/prj/net/sf/japi/findLongestPath/FindLongestPath.java
Added Paths:
-----------
tools/findLongestPath/trunk/build.xml
Added: tools/findLongestPath/trunk/build.xml
===================================================================
--- tools/findLongestPath/trunk/build.xml (rev 0)
+++ tools/findLongestPath/trunk/build.xml 2008-11-30 16:41:32 UTC (rev 711)
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ FindLongestPath is a program for finding the longest pathname(s) in
+ ~ a given directory tree.
+ ~ Copyright (C) 2007 Christian Hujer
+ ~
+ ~ This program is free software; you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation; either version 2 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License along
+ ~ with this program; if not, write to the Free Software Foundation, Inc.,
+ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ -->
+
+<project name="FindLongestPath" default="compile">
+
+ <property name="module.version" value="0.1" />
+ <property name="module.name" value="findLongestPath" />
+ <property name="module.shortname" value="findLongestPath" />
+ <property name="module.title" value="FindLongestPath" />
+ <property name="main.class" value="net.sf.japi.tools.findLongestPath.FindLongestPath" />
+
+ <taskdef name="pack200" classpath="common/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" />
+
+ <target
+ name = "clean"
+ description = "Cleans Sandbox"
+ >
+ <delete dir="classes" />
+ <delete dir="docs" />
+ </target>
+
+ <target
+ name = "compile"
+ description = "Compiles production classes"
+ >
+ <mkdir dir="classes/production/${module.shortname}" />
+ <mkdir dir="classes/test/${module.shortname}" />
+ <javac
+ srcdir="src/prj"
+ destdir="classes/production/${module.shortname}"
+ encoding="utf-8"
+ source="1.5"
+ target="1.5"
+ >
+ <classpath>
+ <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <fileset dir="common/lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ </classpath>
+ <exclude name="test/**/*.java" />
+ </javac>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="src/prj" includes="**/*.properties" excludes="test/**/*.properties" />
+ <fileset dir="src/prj" includes="META-INF/services/**" />
+ </copy>
+ <copy
+ todir="classes/production/${module.shortname}"
+ >
+ <fileset dir="lib" includes="LICENSE-*" />
+ <fileset dir="." includes="COPYING" />
+ </copy>
+ </target>
+
+ <target
+ name = "dist"
+ description = "Packs distribution archives."
+ depends = "clean, compile"
+ >
+ <!--depends = "clean, compile, doc"
+ -->
+ <delete dir="dist" />
+ <mkdir dir="dist" />
+ <property name="distName" value="dist/${module.name}-${module.version}" />
+ <parallel>
+ <tar tarfile="${distName}.src.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.src.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.src.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </jar>
+ <jar destfile="${distName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" />
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ <tar tarfile="${distName}.doc.tar">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distName}.doc.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ <include name="build.xml" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distName}.doc.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ </zipfileset>
+ </jar>
+ </parallel>
+ <parallel>
+ <gzip src="${distName}.src.tar" destfile="${distName}.src.tar.gz" />
+ <bzip2 src="${distName}.src.tar" destfile="${distName}.src.tar.bz2" />
+ <gzip src="${distName}.doc.tar" destfile="${distName}.doc.tar.gz" />
+ <bzip2 src="${distName}.doc.tar" destfile="${distName}.doc.tar.bz2" />
+ <pack200
+ src="${distName}.jar"
+ destfile="${distName}.pack.gz"
+ gzipoutput="true"
+ stripdebug="true"
+ effort="9"
+ keepfileorder="false"
+ modificationtime="latest"
+ deflatehint="false"
+ />
+ </parallel>
+ <delete file="${distName}.src.tar" />
+ <delete file="${distName}.doc.tar" />
+ </target>
+
+ <target
+ name = "doc"
+ description = "Creates public javadoc documentation."
+ >
+ <mkdir dir="docs/api" />
+ <!--copy todir="docs/api" file="src/doc/api/public/copyright.html" />
+ <copy todir="docs/api" file="src/doc/api/public/.htaccess" /-->
+ <javadoc
+ destdir = "docs/api"
+ access = "protected"
+ author = "yes"
+ version = "yes"
+ locale = "en_US"
+ use = "yes"
+ splitindex = "yes"
+ windowtitle = "JAPI Library ${module.title} ${module.version} API documentation"
+ doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ header = "JAPI Library ${module.title} ${module.version}<br />API Documentation"
+ footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation"
+ bottom = "<div style=" text-align:center;">© 2005-2006 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>"
+ serialwarn = "yes"
+ charset = "utf-8"
+ docencoding = "utf-8"
+ encoding = "utf-8"
+ source = "1.5"
+ linksource = "yes"
+ link = "${user.javadoc.link}"
+ >
+ <!--
+ overview = "src/overview.html"
+ -->
+ <classpath>
+ <fileset dir="lib" includes="annotations.jar" />
+ </classpath>
+ <sourcepath>
+ <pathelement path="${user.javadoc.javasrc}" />
+ <pathelement path="src/prj" />
+ </sourcepath>
+ <packageset
+ dir="src/prj"
+ defaultexcludes="yes"
+ >
+ <include name="net/**" />
+ </packageset>
+ <tag enabled="true" name="retval" description="Return Values:" scope="methods" />
+ <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" />
+ <tag enabled="true" name="post" description="Postconditions:" scope="methods" />
+ <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" />
+ <tag enabled="true" name="note" description="Notes:" />
+ <tag enabled="true" name="warning" description="Warnings:" />
+ <!--tag enabled="true" name="todo" description="Todo:" /-->
+ <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" />
+ <tag enabled="true" name="fixme" description="Fixme:" />
+ <tag enabled="true" name="xxx" description="XXX:" />
+ </javadoc>
+ </target>
+
+ <target
+ name = "buildapp"
+ description = "Creates executable jar"
+ >
+ <property name="appName" value="${module.name}-${module.version}-app" />
+ <jar destfile="${appName}.jar">
+ <zipfileset dir="classes/production/${module.shortname}"/>
+ <zipgroupfileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" />
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}" />
+ <!--attribute name="Class-Path" value="lib/annotations.jar lib/japi-lib-lang-0.1.jar lib/japi-lib-swing-about-0.1.jar lib/japi-lib-swing-action-0.1.jar" /-->
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ </target>
+
+</project>
Property changes on: tools/findLongestPath/trunk/build.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:eol-style
+ LF
Modified: tools/findLongestPath/trunk/src/prj/net/sf/japi/findLongestPath/FindLongestPath.java
===================================================================
--- tools/findLongestPath/trunk/src/prj/net/sf/japi/findLongestPath/FindLongestPath.java 2008-11-30 16:21:35 UTC (rev 710)
+++ tools/findLongestPath/trunk/src/prj/net/sf/japi/findLongestPath/FindLongestPath.java 2008-11-30 16:41:32 UTC (rev 711)
@@ -40,10 +40,10 @@
}
/** The longest path name found so far. */
- @NotNull private String maxPathname;
+ @NotNull private String maxPathname = "";
/** The length of the longest path name found so far. */
- private int maxLength;
+ private int maxLength = 0;
/** Whether to operate with absolute paths.
* <code>true</code> means paths are converted to absolute paths, even if they are relative.
@@ -53,7 +53,6 @@
/** Create a FindLongestPath. */
public FindLongestPath() {
- reset();
}
/** Reset this FindLongestPath to its initial state. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|