Jaxx-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
April 2008
- 1 participants
- 373 discussions
[Buix-commits] r463 - in trunk/lutinvcs: . provider
by tchemit@users.labs.libre-entreprise.org 13 Apr '08
by tchemit@users.labs.libre-entreprise.org 13 Apr '08
13 Apr '08
Author: tchemit
Date: 2008-04-13 09:04:17 +0000 (Sun, 13 Apr 2008)
New Revision: 463
Added:
trunk/lutinvcs/provider/lutinvcs-provider-cvs/
Removed:
trunk/lutinvcs/lutinvcs-provider-cvs/
Log:
creation module provider
Copied: trunk/lutinvcs/provider/lutinvcs-provider-cvs (from rev 462, trunk/lutinvcs/lutinvcs-provider-cvs)
1
0
[Buix-commits] r462 - trunk/lutinvcs/provider/lutinvcs-provider-all
by tchemit@users.labs.libre-entreprise.org 13 Apr '08
by tchemit@users.labs.libre-entreprise.org 13 Apr '08
13 Apr '08
Author: tchemit
Date: 2008-04-13 09:02:01 +0000 (Sun, 13 Apr 2008)
New Revision: 462
Modified:
trunk/lutinvcs/provider/lutinvcs-provider-all/
Log:
creation module provider
Property changes on: trunk/lutinvcs/provider/lutinvcs-provider-all
___________________________________________________________________
Name: svn:ignore
+ target
1
0
13 Apr '08
Author: tchemit
Date: 2008-04-13 09:01:30 +0000 (Sun, 13 Apr 2008)
New Revision: 461
Added:
trunk/lutinvcs/provider/
trunk/lutinvcs/provider/lutinvcs-provider-all/
trunk/lutinvcs/provider/lutinvcs-provider-all/LICENSE.txt
trunk/lutinvcs/provider/lutinvcs-provider-all/changelog
trunk/lutinvcs/provider/lutinvcs-provider-all/pom.xml
trunk/lutinvcs/provider/lutinvcs-provider-all/src/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/main/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/main/java/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/main/resources/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/devel/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/devel/index.rst
trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/index.rst
trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/todo.rst
trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/site_fr.xml
trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/java/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/java/org/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/java/org/codelutin/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/java/org/codelutin/vcs/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/java/org/codelutin/vcs/ui/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/resources/
trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/resources/log4j.properties
trunk/lutinvcs/provider/pom.xml
Modified:
trunk/lutinvcs/lutinvcs-all/pom.xml
trunk/lutinvcs/pom.xml
Log:
creation module provider
Modified: trunk/lutinvcs/lutinvcs-all/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-13 09:00:21 UTC (rev 460)
+++ trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-13 09:01:30 UTC (rev 461)
@@ -24,8 +24,8 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.codelutin.vcs</groupId>
- <artifactId>lutinvcs-all-providers</artifactId>
+ <groupId>org.codelutin.vcs.provider</groupId>
+ <artifactId>lutinvcs-provider-all</artifactId>
<scope>compile</scope>
</dependency>
<!--dependency>
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-13 09:00:21 UTC (rev 460)
+++ trunk/lutinvcs/pom.xml 2008-04-13 09:01:30 UTC (rev 461)
@@ -20,12 +20,13 @@
<modules>
<module>lutinvcs-core</module>
+ <module>provider</module>
<module>lutinvcs-provider-mock</module>
<module>lutinvcs-provider-cvs</module>
<module>lutinvcs-provider-svn</module>
<module>lutinvcs-ui-common</module>
<module>lutinvcs-ui-jaxx</module>
- <module>lutinvcs-all-providers</module>
+ <!--module>lutinvcs-provider-all</module-->
<module>lutinvcs-all</module>
</modules>
@@ -63,6 +64,7 @@
<current.version>0.1-SNAPSHOT</current.version>
<common.groupId>org.codelutin.vcs</common.groupId>
+ <provider.groupId>org.codelutin.vcs.provider</provider.groupId>
<common.artifactId>pom</common.artifactId>
<!-- par defaut, mode non verbeux -->
@@ -247,29 +249,32 @@
<artifactId>lutinvcs-ui-jaxx</artifactId>
<version>${current.version}</version>
</dependency>
- <!--dependency>
- <groupId>${common.groupId}</groupId>
- <artifactId>lutinvcs-ui</artifactId>
+ <dependency>
+ <groupId>${provider.groupId}</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
- </dependency-->
+ </dependency>
<dependency>
+ <!--groupId>${provider.groupId}</groupId-->
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-provider-mock</artifactId>
<version>${current.version}</version>
</dependency>
<dependency>
+ <!--groupId>${provider.groupId}</groupId-->
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-provider-cvs</artifactId>
<version>${current.version}</version>
</dependency>
<dependency>
+ <!--groupId>${provider.groupId}</groupId-->
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-provider-svn</artifactId>
<version>${current.version}</version>
</dependency>
<dependency>
- <groupId>${common.groupId}</groupId>
- <artifactId>lutinvcs-all-providers</artifactId>
+ <groupId>${provider.groupId}</groupId>
+ <artifactId>lutinvcs-provider-all</artifactId>
<version>${current.version}</version>
</dependency>
<dependency>
Added: trunk/lutinvcs/provider/lutinvcs-provider-all/LICENSE.txt
===================================================================
--- trunk/lutinvcs/provider/lutinvcs-provider-all/LICENSE.txt (rev 0)
+++ trunk/lutinvcs/provider/lutinvcs-provider-all/LICENSE.txt 2008-04-13 09:01:30 UTC (rev 461)
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library 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
Added: trunk/lutinvcs/provider/lutinvcs-provider-all/changelog
===================================================================
--- trunk/lutinvcs/provider/lutinvcs-provider-all/changelog (rev 0)
+++ trunk/lutinvcs/provider/lutinvcs-provider-all/changelog 2008-04-13 09:01:30 UTC (rev 461)
@@ -0,0 +1,57 @@
+ver-0-26 poussin 2007????
+ * bug in concat(Object [] ...), better array type now work
+ * add unaccent in StringUtil
+
+ver-0-25 poussin 20070425
+ * add StringUtil.toArrayXXX(String ... s) methodes
+ * use generic
+
+ver-0-24 poussin
+ * ArgumentsParser have 1 as repetitionMax by default
+ * ArgumentsParser use jdk 1.5 syntaxe (..., <>)
+
+ver-0-23 poussin 20061004
+ * move i18n in lutinutil
+ * add method Resource.getConfigProperties(String, Properties) to chains
+ properties
+
+ver-0-22 poussin 20060913
+ * use Generics in CategorisedListenerSet
+ * add org.codelutin.log package (LutinLog, ...)
+ * remove org.codelutin.util.Log
+
+ver-0-21 poussin 20060907
+
+ * Add TransformedList
+ * Add FileUtil.getTempFile(String):File
+ * add FileUtil.getFile():File that prompt user
+ * add FileUtil.getDirectory(): String that prompt user
+ * add FileUtil.copyRecursively(File, File, String ... patternFilter)
+ * add ZipUtil class to compress/uncompress zip file
+ * Transparente*Reference accept null object
+
+ver-0-17 thimel 20050610
+
+ * Ajout de BoundedList et BoundedListOutOfBoundsException
+
+ver-0-16 poussin 20050526
+
+ * Ajout de la methode getConfigProperties dans Resource
+
+ver-0-9 poussin 20040728
+
+ * Ajout de methode isJar, isZip, dans Resource
+
+ver-0-3 poussin 20040405
+
+ * utilisation de maven pour la gestion du projet
+ * Ajout de ExceptionUtil
+
+ver-0-2 poussin 20031021
+
+ * ajout du parser d'argument, ArgumentsParser
+ * ajout de StringUtil
+
+ver-0-1
+
+ * premier version contient seulement Resource
Added: trunk/lutinvcs/provider/lutinvcs-provider-all/pom.xml
===================================================================
--- trunk/lutinvcs/provider/lutinvcs-provider-all/pom.xml (rev 0)
+++ trunk/lutinvcs/provider/lutinvcs-provider-all/pom.xml 2008-04-13 09:01:30 UTC (rev 461)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.codelutin.vcs.provider</groupId>
+ <artifactId>pom</artifactId>
+ <version>${current.version}</version>
+ </parent>
+
+ <artifactId>lutinvcs-provider-all</artifactId>
+ <name>Lutinvcs all providers</name>
+
+ <packaging>jar</packaging>
+ <version>${current.version}</version>
+ <description>Lutinvcs all providers module</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>lutinvcs-provider-mock</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>lutinvcs-provider-svn</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>lutinvcs-provider-cvs</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/devel/index.rst
===================================================================
--- trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/devel/index.rst (rev 0)
+++ trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/devel/index.rst 2008-04-13 09:01:30 UTC (rev 461)
@@ -0,0 +1,5 @@
+================
+Lutin vcs ui dev
+================
+
+TODO
Added: trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/index.rst
===================================================================
--- trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/index.rst (rev 0)
+++ trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/index.rst 2008-04-13 09:01:30 UTC (rev 461)
@@ -0,0 +1,5 @@
+============
+Lutin vcs ui
+============
+
+TODO
\ No newline at end of file
Added: trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/todo.rst
===================================================================
--- trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/todo.rst (rev 0)
+++ trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/fr/rst/todo.rst 2008-04-13 09:01:30 UTC (rev 461)
@@ -0,0 +1,4 @@
+====================
+Lutinvcs - ui - TODO
+====================
+
Added: trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/site_fr.xml
===================================================================
--- trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/site_fr.xml (rev 0)
+++ trunk/lutinvcs/provider/lutinvcs-provider-all/src/site/site_fr.xml 2008-04-13 09:01:30 UTC (rev 461)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="simexplorer-si">
+
+ <skin>
+ <groupId>lutinlib</groupId>
+ <artifactId>lutin-site-skin</artifactId>
+ <version>0.1</version>
+ </skin>
+
+ <bannerLeft>
+ <name>Système d'information - SimExplorer</name>
+ </bannerLeft>
+
+ <bannerRight>
+ <src>
+ http://www.codelutin.com/images/lutinorange-codelutin.png
+ </src>
+ <href>http://www.codelutin.com</href>
+ </bannerRight>
+
+ <poweredBy>
+ <logo href="http://docutils.sourceforge.net/rst.html"
+ img="/images/restructuredtext-logo.png" name="reStructuredText"/>
+ </poweredBy>
+
+ <body>
+ <menu name="Common Links" inherit="top"/>
+ <menu ref="parent"/>
+ <menu ref="reports"/>
+
+ <menu name="Liens">
+ <item href="http://java.sun.com/j2se"
+ name="Le site Java de Sun">
+ </item>
+ </menu>
+ </body>
+</project>
Added: trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/resources/log4j.properties
===================================================================
--- trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/resources/log4j.properties (rev 0)
+++ trunk/lutinvcs/provider/lutinvcs-provider-all/src/test/resources/log4j.properties 2008-04-13 09:01:30 UTC (rev 461)
@@ -0,0 +1,9 @@
+# Global logging configuration
+log4j.rootLogger=ERROR, stdout
+# Console output...
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+#log4j.appender.stdout.layout.ConversionPattern=%%c=%c %%C=%C %%d=%d %%F=%F %%l=%l %%L=%L %%m=%m %%M=%M %%p=%p %%r=%r %%t=%t %%x=%x %%X=%X
+# package level
+log4j.logger.org.codelutin=INFO
Added: trunk/lutinvcs/provider/pom.xml
===================================================================
--- trunk/lutinvcs/provider/pom.xml (rev 0)
+++ trunk/lutinvcs/provider/pom.xml 2008-04-13 09:01:30 UTC (rev 461)
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
+ <version>${current.version}</version>
+ </parent>
+
+ <groupId>org.codelutin.vcs.provider</groupId>
+ <artifactId>pom</artifactId>
+
+ <modules>
+ <!--module>lutinvcs-provider-mock</module>
+ <module>lutinvcs-provider-cvs</module>
+ <module>lutinvcs-provider-svn</module-->
+ <module>lutinvcs-provider-all</module>
+
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>lutinvcs-core</artifactId>
+ </dependency>
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>Lutinvcs provider pom</name>
+ <version>${current.version}</version>
+ <description>Versionning Concurrent System lutin library provider pom</description>
+ <inceptionYear>2008</inceptionYear>
+
+ <!-- Developpers, contributors... -->
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>pom</packaging>
+
+ <!--properties>
+
+ <labs.id>12</labs.id>
+
+ <labs.project>lutinutil</labs.project>
+
+ <current.version>0.1-SNAPSHOT</current.version>
+
+ <common.groupId>org.codelutin.vcs</common.groupId>
+ <common.artifactId>pom</common.artifactId>
+
+ <maven.compile.source>1.6</maven.compile.source>
+ <maven.compile.target>1.6</maven.compile.target>
+
+ <labs.lists>
+ http://lists.labs.libre-entreprise.org/mailman/listinfo/lutinutil
+ </labs.lists>
+
+ <maven.scm.developerConnection>scm:svn:svn+ssh://tchemit@${labs.host}/svnroot/buix/trunk
+ </maven.scm.developerConnection>
+
+ <maven.scm.connection>scm:svn:svn:anonymous@${labs.host}/svnroot/buix/trunk</maven.scm.connection>
+
+ </properties-->
+
+ <!--profiles>
+ <profile>
+ <id>project</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <maven.test.skip>true</maven.test.skip>
+ <maven.reports.generate>false</maven.reports.generate>
+ </properties>
+ </profile>
+ <profile>
+ <id>tests</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <maven.test.skip>false</maven.test.skip>
+ <maven.reports.generate>false</maven.reports.generate>
+ </properties>
+ </profile>
+ <profile>
+ <id>site</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <maven.test.skip>false</maven.test.skip>
+ <maven.reports.generate>true</maven.reports.generate>
+ </properties>
+ </profile>
+ </profiles-->
+
+ <build>
+
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${common.groupId}</groupId>
+ <artifactId>lutinvcs-core</artifactId>
+ <version>${current.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>${provider.groupId}</groupId>
+ <artifactId>pom</artifactId>
+ <version>${current.version}</version>
+ </dependency-->
+ <dependency>
+ <!--groupId>${provider.groupId}</groupId-->
+ <groupId>${common.groupId}</groupId>
+ <artifactId>lutinvcs-provider-mock</artifactId>
+ <version>${current.version}</version>
+ </dependency>
+ <dependency>
+ <!--groupId>${provider.groupId}</groupId-->
+ <groupId>${common.groupId}</groupId>
+ <artifactId>lutinvcs-provider-cvs</artifactId>
+ <version>${current.version}</version>
+ </dependency>
+ <dependency>
+ <!--groupId>${provider.groupId}</groupId-->
+ <groupId>${common.groupId}</groupId>
+ <artifactId>lutinvcs-provider-svn</artifactId>
+ <version>${current.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${provider.groupId}</groupId>
+ <artifactId>lutinvcs-provider-all</artifactId>
+ <version>${current.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>org.netbeans.lib</groupId>
+ <artifactId>cvsclient</artifactId>
+ <version>20051129</version>
+ </dependency>
+ <dependency>
+ <groupId>sshtools</groupId>
+ <artifactId>j2ssh-common</artifactId>
+ <version>0.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>sshtools</groupId>
+ <artifactId>j2ssh-core</artifactId>
+ <version>0.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.tmatesoft</groupId>
+ <artifactId>svnkit</artifactId>
+ <version>1.1.2</version>
+ </dependency-->
+ </dependencies>
+ </dependencyManagement>
+
+</project>
1
0
Author: tchemit
Date: 2008-04-13 09:00:21 +0000 (Sun, 13 Apr 2008)
New Revision: 460
Added:
tags/stable/lutinvcs/
Log:
tag before storm...
Copied: tags/stable/lutinvcs (from rev 459, trunk/lutinvcs)
1
0
Author: tchemit
Date: 2008-04-13 08:59:59 +0000 (Sun, 13 Apr 2008)
New Revision: 459
Added:
tags/stable/
Log:
tag before storm...
1
0
[Buix-commits] r458 - in trunk/lutinvcs: . lutinvcs-all lutinvcs-core lutinvcs-provider-cvs lutinvcs-provider-mock lutinvcs-provider-svn lutinvcs-ui-common lutinvcs-ui-jaxx
by tchemit@users.labs.libre-entreprise.org 13 Apr '08
by tchemit@users.labs.libre-entreprise.org 13 Apr '08
13 Apr '08
Author: tchemit
Date: 2008-04-13 08:26:38 +0000 (Sun, 13 Apr 2008)
New Revision: 458
Modified:
trunk/lutinvcs/lutinvcs-all/pom.xml
trunk/lutinvcs/lutinvcs-core/pom.xml
trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml
trunk/lutinvcs/lutinvcs-provider-mock/pom.xml
trunk/lutinvcs/lutinvcs-provider-svn/pom.xml
trunk/lutinvcs/lutinvcs-ui-common/pom.xml
trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
trunk/lutinvcs/pom.xml
Log:
utilisation groupId coh?\195?\169rent correspondant au paquetage java (org.codelutin.vcs) + domaine internet (codelutin.org)
Modified: trunk/lutinvcs/lutinvcs-all/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -19,12 +19,12 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-all-providers</artifactId>
<scope>compile</scope>
</dependency>
@@ -44,7 +44,7 @@
<scope>compile</scope>
</dependency-->
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-ui-jaxx</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-core/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-core/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-core/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
Modified: trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -37,7 +37,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-provider-mock/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-mock/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-provider-mock/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -37,7 +37,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-provider-svn/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-provider-svn/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -37,7 +37,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-ui-common/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-ui-common/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -37,7 +37,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -83,7 +83,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-ui-common</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -15,8 +15,8 @@
<version>2.3</version>
</parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<modules>
<module>lutinvcs-core</module>
@@ -62,8 +62,8 @@
<!-- current version -->
<current.version>0.1-SNAPSHOT</current.version>
- <common.groupId>lutinlib.vcs</common.groupId>
- <common.artifactId>lutinvcs</common.artifactId>
+ <common.groupId>org.codelutin.vcs</common.groupId>
+ <common.artifactId>pom</common.artifactId>
<!-- par defaut, mode non verbeux -->
<!--maven.verbose>false</maven.verbose-->
@@ -132,7 +132,7 @@
</configuration>
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-ui-common</artifactId>
<scope>compile</scope>
<version>${current.version}</version>
@@ -247,11 +247,11 @@
<artifactId>lutinvcs-ui-jaxx</artifactId>
<version>${current.version}</version>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-ui</artifactId>
<version>${current.version}</version>
- </dependency>
+ </dependency-->
<dependency>
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-provider-mock</artifactId>
1
0
13 Apr '08
Author: tchemit
Date: 2008-04-13 07:55:46 +0000 (Sun, 13 Apr 2008)
New Revision: 457
Added:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ChangeLocationAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ConfirmAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/DiffAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/HelpAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ShowMessagesAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/TabUIAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIAction.java
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-add.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-commit.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-delete.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-next.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-prev.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-help.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-refresh.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-revert.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-showmessages.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-update.png
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/add.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/commit.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/delete.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-next.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-prev.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/help.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/recent_msgs.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/revert.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/update.png
Modified:
trunk/lutinvcs/lutinvcs-all/pom.xml
trunk/lutinvcs/lutinvcs-core/pom.xml
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
trunk/lutinvcs/pom.xml
Log:
ui continues...
Modified: trunk/lutinvcs/lutinvcs-all/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
@@ -17,24 +17,6 @@
<version>${current.version}</version>
<description>Lutinvcs all modules</description>
- <build>
- <!--plugins>
- <plugin>
- <groupId>lutinplugin</groupId>
- <artifactId>maven-i18n-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals>
- <goal>parserJava</goal>
- <goal>gen</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins-->
- </build>
-
<dependencies>
<dependency>
<groupId>lutinlib.vcs</groupId>
@@ -43,6 +25,11 @@
</dependency>
<dependency>
<groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-all-providers</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <!--dependency>
+ <groupId>lutinlib.vcs</groupId>
<artifactId>lutinvcs-provider-mock</artifactId>
<scope>compile</scope>
</dependency>
@@ -55,7 +42,7 @@
<groupId>lutinlib.vcs</groupId>
<artifactId>lutinvcs-provider-cvs</artifactId>
<scope>compile</scope>
- </dependency>
+ </dependency-->
<dependency>
<groupId>lutinlib.vcs</groupId>
<artifactId>lutinvcs-ui-jaxx</artifactId>
Modified: trunk/lutinvcs/lutinvcs-core/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-core/pom.xml 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
@@ -34,12 +34,4 @@
</plugin>
</plugins>
</build>
-
- <dependencies>
- <dependency>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-api</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
</project>
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -19,6 +19,7 @@
import org.codelutin.vcs.type.VCSState;
import java.util.List;
+import java.util.EnumMap;
/**
* Contract of list of VCSEntry.
@@ -78,20 +79,22 @@
void refresh(long timestamp, List<VCSEntry> entries) throws IllegalStateException;
/**
+ * //TODO update javadoc, use efficient algo
* obtain the array of all {@link VCSAction} found in the given entries
*
* @param entries entries to scan
* @return array of {@link VCSAction} found in entires
*/
- VCSAction[] getActions(List<VCSEntry> entries);
+ EnumMap<VCSAction, Integer> countActions(List<VCSEntry> entries);
/**
+ * //TODO update javadoc,...
* obtain the array of all {@link VCSState} found in the given entries
*
* @param entries entries to scan
* @return array of {@link VCSState found in entires
*/
- VCSState[] getStates(List<VCSEntry> entries);
+ EnumMap<VCSState, Integer> countStates(List<VCSEntry> entries);
/** clear the internal list of entries. */
void clear();
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -31,35 +31,32 @@
* <li>{@link #REMOTE} : if entryis only on remote</li>
* <p/>
* </ul>
- * VCSAction represents an action that can be realized on a file in working
- * copy or on remote repository.
- * <p/>
- * Each <code>VCSAction</code> has 4 properties :
- * <ul>
- * <li>libelle : i18n to be used for this action</li>
- * <li>visible : flag to say if action should be visible in ui</li>
- * <li>backup : flag to say if this action need backup</li>
- * <li>write : flag to say if this action need write access to repository</li>
- * </ul>
*
* @author chemit
*/
@org.codelutin.i18n.I18nable
public enum VCSEntryLocation {
- ALL(n_("lutinvcs.location.all")),
- LOCAL(n_("lutinvcs.location.local")),
- REMOTE(n_("lutinvcs.location.remote")),
- UNKNOW(n_("lutinvcs.location.unknown"));
+ ALL(n_("lutinvcs.location.all.libelle"), n_("lutinvcs.location.all.tip")),
+ LOCAL(n_("lutinvcs.location.local.libelle"), n_("lutinvcs.location.local.tip")),
+ REMOTE(n_("lutinvcs.location.remote.libelle"), n_("lutinvcs.location.remote.tip")),
+ UNKNOW(n_("lutinvcs.location.unknown.libelle"), n_("lutinvcs.location.unknow.tip"));
/** libelle of location */
private final String libelle;
+ private final String tip;
+
public String getLibelle() {
return _(libelle);
}
- VCSEntryLocation(String libelle) {
+ public String getTip() {
+ return _(tip);
+ }
+
+ VCSEntryLocation(String libelle, String tip) {
this.libelle = libelle;
+ this.tip = tip;
}
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -22,10 +22,12 @@
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.type.VCSState;
+import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.EnumMap;
+import java.util.EnumSet;
import java.util.List;
-import java.io.File;
/** @author chemit */
public class VCSEntriesImpl implements VCSEntries {
@@ -145,8 +147,23 @@
}
- public VCSAction[] getActions(List<VCSEntry> entries) {
- List<VCSAction> result = new ArrayList<VCSAction>();
+ public EnumMap<VCSAction, Integer> countActions(List<VCSEntry> entries) {
+ EnumSet<VCSAction> set = EnumSet.allOf(VCSAction.class);
+ EnumMap<VCSAction, Integer> map = new EnumMap<VCSAction, Integer>(VCSAction.class);
+ int[] tmp = new int[set.size()];
+ for (VCSEntry entry : entries) {
+ if (entry.getState() != null) {
+ for (VCSAction action : entry.getState().getActions()) {
+ tmp[action.ordinal()]++;
+ }
+ }
+ }
+ for (VCSAction vcsAction : set) {
+ int index = vcsAction.ordinal();
+ map.put(vcsAction, tmp[index]);
+ }
+ return map;
+ /*List<VCSAction> result = new ArrayList<VCSAction>();
for (VCSState vcsFileState : getStates(entries)) {
List<VCSAction> action = vcsFileState.getActions();
for (VCSAction vcsAction : action) {
@@ -155,10 +172,25 @@
}
}
}
- return result.toArray(new VCSAction[result.size()]);
+ return result.toArray(new VCSAction[result.size()]);*/
}
- public VCSState[] getStates(List<VCSEntry> entries) {
+ public EnumMap<VCSState, Integer> countStates(List<VCSEntry> entries) {
+ EnumSet<VCSState> set = EnumSet.allOf(VCSState.class);
+ EnumMap<VCSState, Integer> map = new EnumMap<VCSState, Integer>(VCSState.class);
+ int[] tmp = new int[set.size()];
+ for (VCSEntry entry : entries) {
+ VCSState state = entry.getState();
+ if (state != null) {
+ tmp[state.ordinal()]++;
+ }
+ }
+ for (VCSState state : set) {
+ int index = state.ordinal();
+ map.put(state, tmp[index]);
+ }
+ return map;
+ /*
List<VCSState> result = new ArrayList<VCSState>();
for (VCSEntry entry : entries) {
VCSState state = entry.getState();
@@ -167,6 +199,7 @@
}
}
return result.toArray(new VCSState[result.size()]);
+ */
}
protected List<String> transformToLocal(List<String> relativeRemotePath) {
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,10 +14,14 @@
lutinvcs.error.provider.init.connexion=could not instanciate connexion {0}, for provider {1}, reason\: {2}
lutinvcs.error.provider.init.handler=could not instanciate handler {0}, for provider {1}, reason\: {2}
lutinvcs.error.thread.action=
-lutinvcs.location.all=All
-lutinvcs.location.local=Local
-lutinvcs.location.remote=Remote
-lutinvcs.location.unknown=Unknow
+lutinvcs.location.all.libelle=all
+lutinvcs.location.all.tip=Show both local and remote files
+lutinvcs.location.local.libelle=local
+lutinvcs.location.local.tip=Show local files
+lutinvcs.location.remote.libelle=remote
+lutinvcs.location.remote.tip=Show remote files
+lutinvcs.location.unknow.tip=Show unknown files...
+lutinvcs.location.unknown.libelle=Unknow
lutinvcs.state.missing=missing
lutinvcs.state.modified=modified
lutinvcs.state.outofdate=out of date
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,9 +1,9 @@
lutinvcs.action.add=Ajouter
-lutinvcs.action.changeLog=journal des changements
+lutinvcs.action.changeLog=Journal des changements
lutinvcs.action.checkout=R\u00E9cup\u00E9rer
-lutinvcs.action.commit=Commiter
+lutinvcs.action.commit=Publier
lutinvcs.action.delete=Supprimer
-lutinvcs.action.diff=voir les diff\u00E9rences
+lutinvcs.action.diff=Voir les diff\u00E9rences
lutinvcs.action.overwriteAndUpdate=Update
lutinvcs.action.refresh=Rafra\u00EEchir
lutinvcs.action.revert=Annuler les modifications
@@ -14,16 +14,20 @@
lutinvcs.error.provider.init.connexion=Erreur lors de l''instanciation de la connexion {0}, provider {1}, cause\: {2}
lutinvcs.error.provider.init.handler=Erreur lors de l''instanciation du handler {0}, provider {1}, cause\: {2}
lutinvcs.error.thread.action=
-lutinvcs.location.all=All
-lutinvcs.location.local=Local
-lutinvcs.location.remote=Remote
-lutinvcs.location.unknown=Unknow
+lutinvcs.location.all.libelle=Tout
+lutinvcs.location.all.tip=Voir tous les fichiers locaux et distants
+lutinvcs.location.local.libelle=Local
+lutinvcs.location.local.tip=Voir uniquement les fichiers locaux
+lutinvcs.location.remote.libelle=Distant
+lutinvcs.location.remote.tip=Voir uniquement les fichiers distants
+lutinvcs.location.unknow.tip=Voir uniquement les fichiers de type inconnu...
+lutinvcs.location.unknown.libelle=Unknow
lutinvcs.state.missing=non pr\u00E9sent
lutinvcs.state.modified=modifi\u00E9
lutinvcs.state.outofdate=obsol\u00E8te
lutinvcs.state.outofdateAndModified=modifi\u00E9 et obsol\u00E8te
lutinvcs.state.removed=supprim\u00E9
lutinvcs.state.unknown=\u00E9tat inconnu
-lutinvcs.state.unversionned=non versionn\u00E9
-lutinvcs.state.unversionnedOrMissing=non versionn\u00E9 ou non pr\u00E9sent localement
+lutinvcs.state.unversionned=non publi\u00E9
+lutinvcs.state.unversionnedOrMissing=non publi\u00E9 ou non pr\u00E9sent localement
lutinvcs.state.uptodate=fichier \u00E0 jour
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,9 +14,16 @@
*/
package org.codelutin.vcs.ui;
+import org.codelutin.vcs.ui.action.ShowMessagesAction;
+
+import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
+import javax.swing.DefaultListModel;
+import javax.swing.DefaultListSelectionModel;
import javax.swing.JLabel;
+import javax.swing.JList;
import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JToolBar;
@@ -40,8 +47,16 @@
public abstract AbstractButton getAccept();
+ public abstract JPopupMenu getPopup();
+
+ public abstract JList getMessages();
+
+ public abstract DefaultListSelectionModel getMessageSelectionModel();
+
+ public abstract DefaultListModel getMessageModel();
+
public void doAccept() {
- getHandler().doAction(getCommitMessage().getText(), getHandler().getModel().getEntriesModel());
+ getHandler().doAction(getHandler().getCurrentMessage(), getHandler().getModel().getEntriesModel());
}
@Override
@@ -52,7 +67,7 @@
super.setVisible(b);
}
- protected void showLastMessages() {
- getHandler().showLastMessages();
+ protected AbstractAction createShowMessagesAction() {
+ return ShowMessagesAction.createAction(this);
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,9 +14,9 @@
*/
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.action.DiffAction;
+import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
/** @author chemit */
@@ -40,20 +40,7 @@
super.setVisible(b);
}
- protected void doSelectFile() {
- VCSEntry entry = getHandler().getSelectedEntry();
- getHandler().getModel().setFileModel(entry);
+ protected AbstractAction createDiffAction(boolean goUp) {
+ return DiffAction.createAction(goUp, this);
}
-
- protected void doAction(VCSAction action) {
- getHandler().doAction(action, getHandler().getModel().getFileModel());
- }
-
- protected void gotoNextDiff() {
- getHandler().gotoNextDiff();
- }
-
- protected void gotoPreviousDiff() {
- getHandler().gotoPreviousDiff();
- }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,8 +14,6 @@
*/
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.type.VCSAction;
-
import javax.swing.AbstractButton;
import javax.swing.JPopupMenu;
@@ -56,7 +54,4 @@
super.setVisible(b);
}
- protected void doAction(VCSAction action, boolean useSelection) {
- getHandler().doAction(action, useSelection);
- }
}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ChangeLocationAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ChangeLocationAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ChangeLocationAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,62 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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 org.codelutin.vcs.ui.action;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.util.AbstractTabUI;
+import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.util.UIHelper;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class ChangeLocationAction extends org.codelutin.vcs.ui.util.AbstractUIAction<AbstractTabUIHandler<?, ?>> {
+
+ protected VCSEntryLocation location;
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(VCSEntryLocation location, AbstractTabUI<?> ui) {
+ ChangeLocationAction action = new ChangeLocationAction(location);
+ action.setUi(ui);
+ return action;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ if (location == null) {
+ return;
+ }
+ getHandler().getModel().setLocation(getLocation());
+ }
+
+ protected VCSEntryLocation getLocation() {
+ return location;
+ }
+
+ protected void setLocation(VCSEntryLocation location) {
+ this.location = location;
+ }
+
+ protected ChangeLocationAction(VCSEntryLocation location) {
+ super(location.getLibelle(), UIHelper.createLocationIcon(location));
+ this.location = location;
+ putValue(SHORT_DESCRIPTION, location.getTip());
+ putValue(DISPLAYED_MNEMONIC_INDEX_KEY, 0);
+ putValue(MNEMONIC_KEY, (int) ((String) getValue(NAME)).charAt(0));
+ }
+
+}
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ConfirmAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ConfirmAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ConfirmAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,78 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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 org.codelutin.vcs.ui.action;
+
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.ConfirmUI;
+import org.codelutin.vcs.ui.handler.ConfirmUIHandler;
+import org.codelutin.vcs.ui.util.UIHelper;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class ConfirmAction extends org.codelutin.vcs.ui.util.AbstractUIAction<ConfirmUIHandler> {
+
+ protected VCSAction action;
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(VCSAction action, ConfirmUI ui) {
+ ConfirmAction action1 = new ConfirmAction(action);
+ action1.setUi(ui);
+ return action1;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ if (action == null) {
+ return;
+ }
+ switch (action) {
+ case CHANGELOG:
+ case DIFF:
+ case REFRESH:
+ return;
+ case CHECKOUT:
+ case OVERWRITE_AND_UPDATE:
+ case ADD:
+ case COMMIT:
+ case DELETE:
+ case REVERT:
+ case UPDATE:
+ ConfirmUIHandler handler = getHandler();
+ handler.doAction(getHandler().getUi().getCommitMessage().getText(), handler.getModel().getEntriesModel());
+ return;
+ }
+ throw new IllegalStateException("could not perform action for action " + action + " (" + this + ')');
+ }
+
+ protected VCSAction getAction() {
+ return action;
+ }
+
+ protected void setAction(VCSAction action) {
+ this.action = action;
+ }
+
+ protected ConfirmAction(VCSAction action) {
+ super(null, UIHelper.createActionIcon(action));
+ this.action = action;
+ //putValue(SHORT_DESCRIPTION, action.getTip());
+ putValue(DISPLAYED_MNEMONIC_INDEX_KEY, 0);
+ putValue(MNEMONIC_KEY, (int) (action.getLibelle()).charAt(0));
+ }
+
+}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/DiffAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/DiffAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/DiffAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,62 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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 org.codelutin.vcs.ui.action;
+
+import org.codelutin.vcs.ui.DiffUI;
+import org.codelutin.vcs.ui.handler.DiffUIHandler;
+import static org.codelutin.vcs.ui.util.UIHelper.createActionIcon;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class DiffAction extends org.codelutin.vcs.ui.util.AbstractUIAction<DiffUIHandler> {
+
+ protected boolean goUp;
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(boolean goUp, DiffUI ui) {
+ DiffAction action1 = new DiffAction(goUp);
+ action1.setUi(ui);
+ return action1;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ if (goUp) {
+ getHandler().gotoPreviousDiff();
+ } else {
+ getHandler().gotoNextDiff();
+ }
+ }
+
+ public boolean isGoUp() {
+ return goUp;
+ }
+
+ public void setGoUp(boolean goUp) {
+ this.goUp = goUp;
+ }
+
+ protected DiffAction(boolean goUp) {
+ super(null, createActionIcon("diff-" + (goUp ? "prev" : "next")));
+ this.goUp = goUp;
+ //putValue(SHORT_DESCRIPTION, action.getTip());
+ //putValue(DISPLAYED_MNEMONIC_INDEX_KEY, 0);
+ //putValue(MNEMONIC_KEY, (int) (action.getLibelle()).charAt(0));
+ }
+
+}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/HelpAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/HelpAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/HelpAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,50 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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 org.codelutin.vcs.ui.action;
+
+import static org.codelutin.i18n.I18n._;
+import org.codelutin.vcs.ui.util.AbstractUI;
+import org.codelutin.vcs.ui.util.AbstractUIHandler;
+import static org.codelutin.vcs.ui.util.UIHelper.createActionIcon;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class HelpAction extends org.codelutin.vcs.ui.util.AbstractUIAction<AbstractUIHandler<?, ?>> {
+
+ public static <H extends AbstractUIHandler<?, ?>> AbstractAction createAction(AbstractUI<H> ui) {
+ HelpAction action = new HelpAction();
+ action.setUi(ui);
+ return action;
+ }
+
+ private static final long serialVersionUID = 1L;
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ log.info("//TODO : " + this + ", " + ui);
+ }
+
+ protected HelpAction() {
+ super(_("lutinvcs.action.help.libelle"), createActionIcon("help"));
+ String name = (String) getValue(NAME);
+ putValue(DISPLAYED_MNEMONIC_INDEX_KEY, name.length() - 1);
+ putValue(ACCELERATOR_KEY, (int) name.charAt(name.length() - 1));
+ putValue(NAME, null);
+ putValue(SHORT_DESCRIPTION, _("lutinvcs.action.help.tip"));
+ }
+
+}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ShowMessagesAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ShowMessagesAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ShowMessagesAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,63 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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 org.codelutin.vcs.ui.action;
+
+import static org.codelutin.i18n.I18n._;
+import org.codelutin.vcs.ui.ConfirmUI;
+import org.codelutin.vcs.ui.handler.ConfirmUIHandler;
+import org.codelutin.vcs.ui.util.UIHelper;
+
+import javax.swing.AbstractAction;
+import javax.swing.AbstractButton;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class ShowMessagesAction extends org.codelutin.vcs.ui.util.AbstractUIAction<ConfirmUIHandler> {
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(ConfirmUI ui) {
+ ShowMessagesAction action1 = new ShowMessagesAction();
+ action1.setUi(ui);
+ return action1;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+
+ String currentMessage = getHandler().getCurrentMessage();
+
+ if (!getHandler().getModel().containsMessage(currentMessage)) {
+ // save currentmessage in special 0 row
+ getHandler().setMessage(0, false, true, currentMessage);
+ } else {
+ // select
+ getHandler().getUi().getMessageSelectionModel().setValueIsAdjusting(true);
+ getHandler().getUi().getMessages().setSelectedValue(currentMessage, true);
+ getHandler().getUi().getMessageSelectionModel().setValueIsAdjusting(false);
+ }
+
+ getHandler().getUi().getPopup().show((AbstractButton) e.getSource(), 0, 0);
+ //log.info("//TODO:" + this + " : " + messages.size());
+
+ }
+
+ protected ShowMessagesAction() {
+ super(null, UIHelper.createActionIcon("showmessages"));
+ putValue(SHORT_DESCRIPTION, _("lutinvcs.action.showmessages.tip"));
+ setEnabled(false);
+ }
+
+}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/TabUIAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/TabUIAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/TabUIAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,98 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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 org.codelutin.vcs.ui.action;
+
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.util.AbstractTabUI;
+import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
+import org.codelutin.vcs.ui.util.UIHelper;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+import java.util.List;
+
+/** @author chemit */
+public class TabUIAction extends org.codelutin.vcs.ui.util.AbstractUIAction<AbstractTabUIHandler<?, ?>> {
+
+ protected VCSAction action;
+ protected boolean useSelection;
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(VCSAction action, boolean useSelection, AbstractTabUI<?> ui) {
+ TabUIAction action1 = new TabUIAction(action, useSelection);
+ action1.setUi(ui);
+ return action1;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ if (action == null) {
+ return;
+ }
+ AbstractTabUIHandler<?, ?> handler = getHandler();
+ AbstractVCSEntriesTableModel model = handler.getModel().getEntriesModel();
+ List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(useSelection ? handler.getSelectionModel() : null));
+ switch (action) {
+ case CHANGELOG:
+ //TODO
+ return;
+ case DIFF:
+ handler.showDiffUI(useSelection, model, entries);
+ return;
+ case REFRESH:
+ handler.doRefresh(model, entries, handler.getSelectionModel());
+ return;
+ case CHECKOUT:
+ case OVERWRITE_AND_UPDATE:
+ case ADD:
+ case COMMIT:
+ case DELETE:
+ case REVERT:
+ case UPDATE:
+ handler.showConfirmUI(action, model, entries);
+ return;
+ }
+ throw new IllegalStateException("could not perform action for action " + action + " (" + this + ')');
+ }
+
+ protected VCSAction getAction() {
+ return action;
+ }
+
+ protected boolean isUseSelection() {
+ return useSelection;
+ }
+
+ protected void setAction(VCSAction action) {
+ this.action = action;
+ }
+
+ protected void setUseSelection(boolean useSelection) {
+ this.useSelection = useSelection;
+ }
+
+ protected TabUIAction(VCSAction action, boolean useSelection) {
+ super(null, UIHelper.createActionIcon(action));
+ this.useSelection = useSelection;
+ this.action = action;
+ //putValue(SHORT_DESCRIPTION, action.getTip());
+ putValue(DISPLAYED_MNEMONIC_INDEX_KEY, 0);
+ putValue(MNEMONIC_KEY, (int) (action.getLibelle()).charAt(0));
+ }
+
+}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,14 +14,25 @@
*/
package org.codelutin.vcs.ui.handler;
+import static org.codelutin.i18n.I18n._;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.ConfirmUI;
import org.codelutin.vcs.ui.model.ConfirmUIModel;
import org.codelutin.vcs.ui.util.AbstractUIHandler;
import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
+import org.codelutin.vcs.ui.util.UIHelper;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.DefaultListModel;
+import javax.swing.JComponent;
+import javax.swing.JList;
import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.event.PopupMenuEvent;
+import javax.swing.event.PopupMenuListener;
+import java.awt.Component;
import java.beans.PropertyChangeEvent;
import java.util.List;
@@ -33,8 +44,49 @@
ui.setHandler(this);
}
- public ListSelectionModel getSelectionModel() {
- return getUi().getContentTable().getSelectionModel();
+ @Override
+ public void init() {
+ super.init();
+ getUi().getMessageModel().addElement("");
+
+ getUi().getMessageSelectionModel().addListSelectionListener(new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
+ if (!e.getValueIsAdjusting() && getUi().getPopup().isVisible()) {
+ getUi().getCommitMessage().setText((String) getUi().getMessages().getSelectedValue());
+ }
+ }
+ });
+
+ getUi().getPopup().addPopupMenuListener(new PopupMenuListener() {
+
+ public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+ }
+
+ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+ reset();
+ }
+
+ public void popupMenuCanceled(PopupMenuEvent e) {
+ reset();
+ }
+
+ void reset() {
+ // reset special row 0 (to save message different than history)
+ setMessage(0, false, false, "");
+ if (log.isDebugEnabled()) {
+ log.debug(this);
+ }
+ }
+ });
+ getUi().getMessages().setCellRenderer(new DefaultListCellRenderer() {
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+ JComponent listCellRendererComponent = (JComponent) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+ String s = value + "";
+ log.info(s);
+ listCellRendererComponent.setToolTipText(s.isEmpty() ? null : s.replaceAll("\\n", "<br>"));
+ return listCellRendererComponent;
+ }
+ });
}
public void propertyChange(PropertyChangeEvent evt) {
@@ -44,30 +96,73 @@
String action = evt.getPropertyName();
if (ConfirmUIModel.ACCEPT_PROPERTY_CHANGED.equals(action)) {
- updateUI();
+ afterActionChanged();
return;
}
-
if (ConfirmUIModel.MESSAGE_HISTORY_PROPERTY_CHANGED.equals(action)) {
- updateMessageUI();
+ afterMessagesChanged();
return;
}
-
- throw new IllegalStateException("unimplemented property changed : " + evt);
+ throw new IllegalStateException("unimplemented property changed : " + evt + " for " + this);
}
- protected void updateUI() {
+ protected void afterActionChanged() {
VCSAction action = getModel().getAction();
+ getUi().getActionLabel().setIcon(UIHelper.createActionIcon(action));
+ getUi().getToolbar().setVisible(action.isCommit());
getUi().getAccept().setText(action.getLibelle());
- getUi().getToolbar().setVisible(action.isCommit());
getUi().getHandler().getSelectionModel().setSelectionInterval(0, getModel().getEntriesModel().getRowCount() - 1);
}
- protected void updateMessageUI() {
- // update message history combo box ?
- getUi().getLastMessages().setEnabled(!getModel().getCommitMessages().isEmpty());
+ protected void afterSelectionChanged() {
+ VCSAction action = getModel().getAction();
+ int nb = UIHelper.countAction(action, getModel().getEntriesModel(), getUi().getHandler().getSelectionModel());
+ String msg;
+ String tip = null;
+ if (nb > 0) {
+ if (nb > 1) {
+ msg = _("lutinvcs.action.message", action.getLibelle(), nb);
+ tip = _("lutinvcs.action.confirm.tooltip", action.getLibelle(), nb);
+ } else {
+ msg = _("lutinvcs.action.message.one", action.getLibelle());
+ tip = _("lutinvcs.action.confirm.one.tooltip", action.getLibelle());
+ }
+ } else {
+ msg = _("lutinvcs.action.action.noselection", action.getLibelle());
+ }
+
+ getUi().getAccept().setEnabled(nb > 0);
+ getUi().getActionLabel().setText(msg);
+ getUi().getAccept().setToolTipText(tip);
}
+ protected void afterMessagesChanged() {
+ boolean empty = getModel().getCommitMessages().isEmpty();
+ getUi().getLastMessages().setEnabled(!empty);
+ if (!empty) {
+ setMessage(1, true, true, getUi().getCommitMessage().getText());
+ }
+ }
+
+ public String getCurrentMessage() {
+ return getUi().getCommitMessage().getText().trim();
+ }
+
+ public void setMessage(int pos, boolean insert, boolean select, String text) {
+ ListSelectionModel selectionModel = getUi().getMessageSelectionModel();
+ selectionModel.setValueIsAdjusting(true);
+ DefaultListModel listModel = getUi().getMessageModel();
+ if (insert) {
+ listModel.insertElementAt(text, pos);
+ } else {
+ listModel.setElementAt(text, pos);
+ }
+ if (select) {
+ selectionModel.setSelectionInterval(pos, pos);
+ }
+ selectionModel.setValueIsAdjusting(false);
+ }
+
public void doAction(String commitMessage, AbstractVCSEntriesTableModel model) {
VCSAction action = this.getModel().getAction();
@@ -75,6 +170,7 @@
List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(getSelectionModel()));
if (action.isCommit()) {
+
this.getModel().addCommitMessage(commitMessage);
} else {
@@ -91,7 +187,4 @@
getUi().dispose();
}
- public void showLastMessages() {
- log.info("//TODO: " + this);
- }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,19 +14,19 @@
*/
package org.codelutin.vcs.ui.handler;
+import static org.codelutin.i18n.I18n._;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.DiffUI;
import org.codelutin.vcs.ui.model.DiffUIModel;
import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
-import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
+import javax.swing.AbstractButton;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
import java.beans.PropertyChangeEvent;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Collections;
+import java.util.EnumMap;
/** @author chemit */
public class DiffUIHandler extends AbstractTabUIHandler<DiffUIModel, DiffUI> {
@@ -42,67 +42,79 @@
log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
}
if (DiffUIModel.FILE_PROPERTY_CHANGED.equals(evt.getPropertyName())) {
- VCSEntry model = (VCSEntry) evt.getNewValue();
- boolean hasActions = false;
- List<VCSAction> actions = null;
- if (model != null) {
- actions = model.getState().getActions();
- hasActions = !actions.isEmpty();
- }
- DiffUI ui = getUi();
- updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE);
- updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT);
- updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT);
- ui.getRefresh().setEnabled(hasActions);
- } else {
- super.propertyChange(evt);
+ afterSelectionChanged();
+ return;
}
- }
-
- public void doSelectLocation() {
- AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
- if (fileStatesModel.getRowCount() > 0) {
- getSelectionModel().addSelectionInterval(0, 0);
+ if (DiffUIModel.DIFF_PROPERTY_CHANGED.equals(evt.getPropertyName())) {
+ afterDiffAction();
+ return;
}
+ super.propertyChange(evt);
}
@Override
- public void init() {
- super.init();
- getUi().getContentTable().getSelectionModel().addListSelectionListener(new ListSelectionListener() {
- public void valueChanged(ListSelectionEvent e) {
- if (!e.getValueIsAdjusting()) {
- getModel().setFileModel(getSelectedEntry());
- }
+ public void valueChanged(ListSelectionEvent e) {
+ if (!e.getValueIsAdjusting()) {
+ // update model selected file ? TODO Is this really necessary,
+ ListSelectionModel selectionModel = (ListSelectionModel) e.getSource();
+ VCSEntry vcsEntry = null;
+ if (!selectionModel.isSelectionEmpty()) {
+ vcsEntry = getModel().getEntriesModel().getDisplayedEntry(selectionModel.getMinSelectionIndex());
}
- });
+ getModel().setFileModel(vcsEntry);
+ }
}
- public VCSEntry getSelectedEntry() {
- ListSelectionModel selectionModel = getSelectionModel();
- if (selectionModel.isSelectionEmpty()) {
- return null;
+ public void afterLocationChanged() {
+ if (getModel().getEntriesModel().getRowCount() > 0) {
+ // select first row
+ getSelectionModel().addSelectionInterval(0, 0);
}
- return getModel().getEntriesModel().getDisplayedEntry(selectionModel.getMinSelectionIndex());
}
- public void doAction(VCSAction action, VCSEntry file) {
- AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
- List<VCSEntry> entries = new ArrayList<VCSEntry>(1);
- entries.add(file);
- //log.info(action + " : " + model);
- if (action == VCSAction.REFRESH) {
- doRefresh(model, entries, getSelectionModel());
- } else {
- doConfirm(action, model, entries);
- }
+ protected void afterSelectionChanged() {
+
+ VCSEntry vcsEntry = getModel().getFileModel();
+ EnumMap<VCSAction, Integer> actions = vcsEntry == null ? null : getModel().getEntriesModel().countActions(Collections.singletonList(vcsEntry));
+ boolean hasActions = actions != null && !actions.isEmpty();
+ DiffUI ui = getUi();
+ updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE, vcsEntry);
+ updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT, vcsEntry);
+ updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT, vcsEntry);
+ updateAction(actions, hasActions, ui.getRefresh(), VCSAction.REFRESH, vcsEntry);
+ //TODO init diff handler
}
+ protected void afterDiffAction() {
+ DiffUI ui = getUi();
+ boolean hasNext = getModel().hasNext();
+ boolean hasPrevious = getModel().hasPrevious();
+ log.info("//TODO :" + this + " next:" + hasNext + ", prev:" + hasPrevious);
+ ui.getNextDiff().setEnabled(hasNext);
+ ui.getPreviousDiff().setEnabled(hasPrevious);
+ ui.getNextDiff().setToolTipText(hasNext ? _("lutinvcs.action.nextdiff.tip") : null);
+ ui.getPreviousDiff().setToolTipText(hasPrevious ? _("lutinvcs.action.previousdiff.tip") : null);
+
+ //TODO init diff handler
+ }
+
public void gotoNextDiff() {
+ getModel().setDiff(getModel().getDiff() + 1);
log.info("//TODO :" + this);
}
public void gotoPreviousDiff() {
+ getModel().setDiff(getModel().getDiff() - 1);
log.info("//TODO :" + this);
}
+
+ protected void updateAction(EnumMap<VCSAction, Integer> actions, boolean hasActions, AbstractButton ui, VCSAction action, VCSEntry vcsEntry) {
+ super.updateAction(actions, hasActions, ui, action);
+ boolean useAction = hasActions && actions.containsKey(action) && actions.get(action) > 0;
+ String tip = null;
+ if (useAction) {
+ tip = _("lutinvcs.action.single.tip", action.getLibelle(), vcsEntry.getFile().getName());
+ }
+ ui.setToolTipText(tip);
+ }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,17 +1,18 @@
package org.codelutin.vcs.ui.handler;
-import org.codelutin.vcs.VCSEntry;
+import static org.codelutin.i18n.I18n._;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.SynchUI;
import org.codelutin.vcs.ui.model.SynchUIModel;
import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
-import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
+import javax.swing.AbstractButton;
+import javax.swing.JPopupMenu;
+import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
-import java.util.Arrays;
-import java.util.List;
+import java.util.EnumMap;
/** @author chemit */
public class SynchUIHandler extends AbstractTabUIHandler<SynchUIModel, SynchUI> {
@@ -24,81 +25,94 @@
@Override
public void init() {
super.init();
- getUi().getContentTable().addMouseListener(new ListMouseListener());
- }
- protected void doSelectLocation() {
+ getUi().getContentTable().addMouseListener(new MouseAdapter() {
+ JPopupMenu popup;
+ JTable table;
- List<VCSAction> actions = Arrays.asList(getModel().getEntriesModel().getActions((ListSelectionModel) null));
+ @Override
+ public void mousePressed(MouseEvent e) {
+ super.mousePressed(e);
+ showPopup(e);
+ }
- boolean hasActions = !actions.isEmpty();
- SynchUI ui = getUi();
- updateAction(actions, hasActions, ui.getDiffAll(), VCSAction.DIFF);
- updateAction(actions, hasActions, ui.getUpdateAll(), VCSAction.UPDATE);
- updateAction(actions, hasActions, ui.getRevertAll(), VCSAction.REVERT);
- updateAction(actions, hasActions, ui.getCommitAll(), VCSAction.COMMIT);
- updateAction(actions, hasActions, ui.getAddAll(), VCSAction.ADD);
- updateAction(actions, hasActions, ui.getDeleteAll(), VCSAction.DELETE);
- ui.getRefreshAll().setEnabled(hasActions);
- }
+ @Override
+ public void mouseReleased(MouseEvent e) {
+ super.mouseReleased(e);
+ showPopup(e);
+ }
- public void doAction(VCSAction action, boolean useSelection) {
- AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
- log.info(action + " : " + model);
- ListSelectionModel selectionModel = getSelectionModel();
- List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(useSelection ? selectionModel : null));
+ void showPopup(MouseEvent e) {
+ if (e.isPopupTrigger() && !getTable().getSelectionModel().isSelectionEmpty()) {
+ getPopupMenu().show(getTable(), e.getX(), e.getY());
+ }
+ }
- if (action == VCSAction.REFRESH) {
- doRefresh(model, model.getEntries(), selectionModel);
- return;
- }
+ JPopupMenu getPopupMenu() {
+ return popup == null ? popup = getUi().getPopup() : popup;
+ }
- if (entries.isEmpty()) {
- // nothing to do
- return;
- }
- if (action == VCSAction.DIFF) {
- // show diff ui
- doDiff(useSelection, model, entries);
- return;
- }
+ JTable getTable() {
+ return table == null ? table = getUi().getContentTable() : table;
+ }
+ });
+ }
- doConfirm(action, model, entries);
+ protected void afterSelectionChanged() {
+ ListSelectionModel selectionModel = getSelectionModel();
+ EnumMap<VCSAction, Integer> actions = getModel().getEntriesModel().countActions(selectionModel);
+ boolean hasActions = !actions.isEmpty();
+ SynchUI ui = getUi();
+ int nbFiles = actions.get(VCSAction.REFRESH);
+ updateAction(actions, hasActions, ui.getDiff(), VCSAction.DIFF, false, nbFiles);
+ updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE, false, nbFiles);
+ updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT, false, nbFiles);
+ updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT, false, nbFiles);
+ updateAction(actions, hasActions, ui.getAdd(), VCSAction.ADD, false, nbFiles);
+ updateAction(actions, hasActions, ui.getDelete(), VCSAction.DELETE, false, nbFiles);
+ updateAction(actions, hasActions, ui.getRefresh(), VCSAction.REFRESH, false, nbFiles);
}
+ protected void afterLocationChanged() {
- protected class ListMouseListener extends MouseAdapter {
+ EnumMap<VCSAction, Integer> actions = getModel().getEntriesModel().countActions((ListSelectionModel) null);
+ boolean hasActions = !actions.isEmpty();
+ SynchUI ui = getUi();
+ // refresh actions is enabled on all files
+ int nbFiles = actions.get(VCSAction.REFRESH);
+ updateAction(actions, hasActions, ui.getDiffAll(), VCSAction.DIFF, true, nbFiles);
+ updateAction(actions, hasActions, ui.getUpdateAll(), VCSAction.UPDATE, true, nbFiles);
+ updateAction(actions, hasActions, ui.getRevertAll(), VCSAction.REVERT, true, nbFiles);
+ updateAction(actions, hasActions, ui.getCommitAll(), VCSAction.COMMIT, true, nbFiles);
+ updateAction(actions, hasActions, ui.getAddAll(), VCSAction.ADD, true, nbFiles);
+ updateAction(actions, hasActions, ui.getDeleteAll(), VCSAction.DELETE, true, nbFiles);
+ updateAction(actions, hasActions, ui.getRefreshAll(), VCSAction.REFRESH, true, nbFiles);
+ }
- @Override
- public void mousePressed(MouseEvent e) {
- super.mousePressed(e);
- if (e.isPopupTrigger() && !getSelectionModel().isSelectionEmpty()) {
- initPopup(e.getX(), e.getY(), getSelectionModel());
- }
- }
+ protected void updateAction(EnumMap<VCSAction, Integer> actions, boolean hasActions, AbstractButton ui, VCSAction action, boolean all, int nbFiles) {
- @Override
- public void mouseReleased(MouseEvent e) {
- super.mouseReleased(e);
- if (e.isPopupTrigger() && !getSelectionModel().isSelectionEmpty()) {
- initPopup(e.getX(), e.getY(), getSelectionModel());
+ super.updateAction(actions, hasActions, ui, action);
+ Integer nbEntries = actions.get(action);
+ boolean useAction = hasActions && actions.containsKey(action) && nbEntries > 0;
+ String tip = null;
+ if (useAction) {
+ if (all) {
+ if (nbEntries == 1) {
+ tip = _("lutinvcs.action.confirm.all.tip", action.getLibelle(), nbFiles);
+ } else {
+ tip = _("lutinvcs.action.confirm.alls.tip", action.getLibelle(), nbEntries, nbFiles);
+ }
+ } else {
+ if (nbEntries == 1) {
+ tip = _("lutinvcs.action.confirm.selected.tip", action.getLibelle(), nbFiles);
+ } else {
+ tip = _("lutinvcs.action.confirm.selecteds.tip", action.getLibelle(), nbEntries, nbFiles);
+ }
}
}
-
- protected void initPopup(int x, int y, ListSelectionModel selectionModel) {
-
- List<VCSAction> actions = Arrays.asList(getModel().getEntriesModel().getActions(selectionModel));
- boolean hasActions = !actions.isEmpty();
- SynchUI ui = getUi();
- updateAction(actions, hasActions, ui.getDiff(), VCSAction.DIFF);
- updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE);
- updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT);
- updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT);
- updateAction(actions, hasActions, ui.getAdd(), VCSAction.ADD);
- updateAction(actions, hasActions, ui.getDelete(), VCSAction.DELETE);
- ui.getRefresh().setEnabled(hasActions);
- // display popup
- ui.getPopup().show(ui.getContentTable(), x, y);
+ if (!all) {
+ ui.setText(action.getLibelle() + " (" + nbEntries + '/' + nbFiles + ')');
}
+ ui.setToolTipText(tip);
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -29,13 +29,14 @@
*/
public class ConfirmUIModel extends AbstractUIModel {
+ public static final String ACCEPT_PROPERTY_CHANGED = "action";
+ public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
+
/** history of commit messages */
protected List<String> commitMessages;
/** current action to be fired */
protected VCSAction action;
- public static final String ACCEPT_PROPERTY_CHANGED = "action";
- public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
public List<String> getCommitMessages() {
if (commitMessages == null) {
@@ -48,11 +49,11 @@
return action;
}
- public void addCommitMessage(String commitMessage) {
- if (commitMessage != null && !commitMessage.isEmpty() && !getCommitMessages().contains(commitMessage)) {
+ public void addCommitMessage(String msg) {
+ if (!(msg == null || msg.isEmpty() || containsMessage(msg))) {
// add message in history
- getCommitMessages().add(commitMessage);
- firePropertyChange(MESSAGE_HISTORY_PROPERTY_CHANGED, null, commitMessage);
+ getCommitMessages().add(msg);
+ firePropertyChange(MESSAGE_HISTORY_PROPERTY_CHANGED, null, msg);
}
}
@@ -68,4 +69,7 @@
firePropertyChange(ACCEPT_PROPERTY_CHANGED, null, action);
}
+ public boolean containsMessage(String msg) {
+ return commitMessages != null && commitMessages.contains(msg);
+ }
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -26,20 +26,57 @@
public class DiffUIModel extends AbstractTabUIModel {
public static final String FILE_PROPERTY_CHANGED = "file";
+ public static final String DIFF_PROPERTY_CHANGED = "diff";
/** current file displayed */
protected VCSEntry fileModel;
+ protected int nbDiffs;
+
+ protected Integer diff;
+
+ public VCSEntry getFileModel() {
+ return fileModel;
+ }
+
+ public int getNbDiffs() {
+ return nbDiffs;
+ }
+
+ public Integer getDiff() {
+ return diff;
+ }
+
+ public void setDiff(Integer diff) {
+ Integer oldDiff = this.diff;
+ this.diff = diff;
+ // always notify ui (so do not propagate old value
+ firePropertyChange(DIFF_PROPERTY_CHANGED, oldDiff, diff);
+ }
+
+ public void setNbDiffs(int nbDiffs) {
+ this.nbDiffs = nbDiffs;
+ // special reset of diff (to make sure, event will be propagate to ui;))
+ diff = -1;
+ setDiff(nbDiffs > 0 ? 0 : null);
+ }
+
+ public boolean hasNext() {
+ return diff != null && diff < nbDiffs;
+ }
+
+ public boolean hasPrevious() {
+ return diff != null && diff > 0;
+ }
+
public void setFileModel(VCSEntry fileModel) {
VCSEntry oldFileModel = this.fileModel;
this.fileModel = fileModel;
firePropertyChange(FILE_PROPERTY_CHANGED, oldFileModel, fileModel);
+ // TODO acquire diff and prepare DiffModel...
+ setNbDiffs(0);
}
- public VCSEntry getFileModel() {
- return fileModel;
- }
-
public void init(VCSEntryLocation location, VCSEntry[] states) {
getEntriesModel().clear();
getEntriesModel().populate(VCSEntryLocation.ALL, states);
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,25 +14,25 @@
*/
package org.codelutin.vcs.ui.util;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.action.ChangeLocationAction;
+import org.codelutin.vcs.ui.action.TabUIAction;
+import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
-import javax.swing.ImageIcon;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JToggleButton;
/** @author chemit */
public abstract class AbstractTabUI<H extends AbstractTabUIHandler<?, ?>> extends AbstractUI<H> {
public abstract ButtonGroup getTabs();
- public abstract JToggleButton getAllTab();
+ public abstract AbstractButton getAllTab();
- public abstract JToggleButton getLocalTab();
+ public abstract AbstractButton getLocalTab();
- public abstract JToggleButton getRemoteTab();
+ public abstract AbstractButton getRemoteTab();
public abstract AbstractButton getRefresh();
@@ -42,9 +42,6 @@
public abstract AbstractButton getRevert();
- public abstract AbstractButton getHelp();
-
-
public AbstractButton getButton(VCSEntryLocation modelName) {
switch (modelName) {
case ALL:
@@ -59,12 +56,12 @@
throw new IllegalStateException("no popup found for " + modelName);
}
- protected void setLocation(VCSEntryLocation location) {
- getHandler().getModel().setLocation(location);
+ protected AbstractAction createLocationAction(VCSEntryLocation location) {
+ return ChangeLocationAction.createAction(location, this);
}
- public ImageIcon createLocationIcon(VCSEntryLocation action) {
- return jaxx.runtime.UIHelper.createImageIcon("location-" + action.name().toLowerCase() + ".png");
+ protected AbstractAction createAction(VCSAction action, boolean useSelection) {
+ return TabUIAction.createAction(action, useSelection, this);
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -21,9 +21,9 @@
import org.codelutin.vcs.ui.VCSUIFactory;
import javax.swing.AbstractButton;
-import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeEvent;
+import java.util.EnumMap;
import java.util.List;
/** @author chemit */
@@ -33,39 +33,32 @@
super(ui, model);
}
- /*@Override
- public void init() {
- super.init();
- }*/
-
- public ListSelectionModel getSelectionModel() {
- return getUi().getContentTable().getSelectionModel();
- }
-
public void propertyChange(PropertyChangeEvent evt) {
if (log.isDebugEnabled()) {
log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
}
String action = evt.getPropertyName();
if (AbstractTabUIModel.LOCATION_PROPERTY_CHANGED.equals(action)) {
- doSelectLocation();
+ afterLocationChanged();
}
}
- protected abstract void doSelectLocation();
+ protected abstract void afterLocationChanged();
- protected void updateAction(List<VCSAction> actions, boolean hasActions, AbstractButton ui, VCSAction diff) {
- ui.setEnabled(hasActions && actions.contains(diff));
+
+ protected void updateAction(EnumMap<VCSAction, Integer> actions, boolean hasActions, AbstractButton ui, VCSAction action) {
+ ui.setEnabled(hasActions && actions.containsKey(action) && actions.get(action) > 0);
}
- protected void doConfirm(VCSAction action, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
+ public void showConfirmUI(VCSAction action, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
ConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
log.info("nb files:" + entries.size());
confirmUI.getHandler().getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
+ confirmUI.getContentScroll().setEnabled(entries.size() > 1);
confirmUI.setVisible(true);
}
- protected void doDiff(boolean useSelection, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
+ public void showDiffUI(boolean useSelection, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
DiffUI diffUI = VCSUIFactory.newDiffUI();
if (!useSelection) {
// take all entries
@@ -73,14 +66,17 @@
}
log.info("nb entries:" + entries.size());
diffUI.getHandler().getModel().init(model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
+ diffUI.getContentScroll().setEnabled(entries.size() > 1);
diffUI.setVisible(true);
}
- protected void doRefresh(AbstractVCSEntriesTableModel model, List<VCSEntry> entries, ListSelectionModel selectionModel) {
+ public void doRefresh(AbstractVCSEntriesTableModel model, List<VCSEntry> entries, ListSelectionModel selectionModel) {
log.info(selectionModel);
selectionModel.clearSelection();
+ log.info("nb entries:" + entries.size());
// do refresh of all states
model.refresh(System.nanoTime(), entries);
}
+
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,7 +14,10 @@
*/
package org.codelutin.vcs.ui.util;
-import javax.swing.ImageIcon;
+import org.codelutin.vcs.ui.action.HelpAction;
+
+import javax.swing.AbstractAction;
+import javax.swing.AbstractButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
@@ -25,6 +28,8 @@
public abstract JTable getContentTable();
+ public abstract AbstractButton getHelp();
+
private H handler;
protected AbstractUI() {
@@ -39,12 +44,7 @@
this.handler = handler;
}
- protected void doHelp() {
- handler.doHelp();
+ protected AbstractAction createHelpAction() {
+ return HelpAction.createAction(this);
}
-
- public ImageIcon createActionIcon(org.codelutin.vcs.type.VCSAction action) {
- return jaxx.runtime.UIHelper.createImageIcon(action.name().toLowerCase() + ".png");
- }
-
}
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,53 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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 org.codelutin.vcs.ui.util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/** @author chemit */
+public abstract class AbstractUIAction<H extends AbstractUIHandler<?, ?>> extends javax.swing.AbstractAction {
+
+ protected static Log log = LogFactory.getLog(AbstractUIAction.class);
+
+ protected transient AbstractUI<? extends H> ui;
+ protected transient H handler;
+
+ private static final long serialVersionUID = 1L;
+
+ protected AbstractUIAction(String name, javax.swing.Icon icon) {
+ super(name, icon);
+ }
+
+ protected H getHandler() {
+ checkInit();
+ if (handler == null) {
+ handler = ui.getHandler();
+ }
+ return handler;
+ }
+
+ protected void setUi(AbstractUI<? extends H> ui) {
+ this.ui = ui;
+ this.handler = null;
+ }
+
+ protected void checkInit() throws IllegalStateException {
+ if (handler == null && ui == null) {
+ throw new IllegalStateException("no handler, nor ui referenced in " + this);
+ }
+ }
+
+}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -22,10 +22,12 @@
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
import java.beans.PropertyChangeListener;
/** @author chemit */
-public abstract class AbstractUIHandler<M extends AbstractUIModel, U extends AbstractUI<? extends AbstractUIHandler>> implements PropertyChangeListener {
+public abstract class AbstractUIHandler<M extends AbstractUIModel, U extends AbstractUI<? extends AbstractUIHandler>> implements PropertyChangeListener, ListSelectionListener {
protected static Log log = LogFactory.getLog(AbstractUIHandler.class);
@@ -35,13 +37,13 @@
/** model handled */
private M model;
+ protected abstract void afterSelectionChanged();
+
protected AbstractUIHandler(U ui, M model) {
this.ui = ui;
this.model = model;
}
- public abstract ListSelectionModel getSelectionModel();
-
public final U getUi() {
return ui;
}
@@ -50,11 +52,23 @@
return model;
}
+ public final ListSelectionModel getSelectionModel() {
+ return getUi().getContentTable().getSelectionModel();
+ }
+
+ public void valueChanged(ListSelectionEvent e) {
+ if (!e.getValueIsAdjusting()) {
+ // update popup states
+ afterSelectionChanged();
+ }
+ }
+
public void init() {
if (model == null) {
throw new IllegalStateException("no model was defined for " + this);
}
model.addPropertyChangeListener(this);
+ getUi().getContentTable().getSelectionModel().addListSelectionListener(this);
JTable table = getUi().getContentTable();
table.setModel(getModel().getEntriesModel());
// init table renderer
@@ -69,8 +83,4 @@
return VCSFactory.getActionManager();
}
-
- public void doHelp() {
- log.info("TODO " + this);
- }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -35,6 +35,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.EnumMap;
/**
* Simple Table model to display list of VCSFileState
@@ -48,8 +49,6 @@
/** column names */
protected final String[] columnNames;
- protected VCSEntryLocation location = VCSEntryLocation.UNKNOW;
-
/** delegate model */
protected final transient VCSEntries delegate;
@@ -57,8 +56,10 @@
protected final transient List<VCSEntry> displayedEntries;
/** row sorter */
- protected transient TableRowSorter<TableModel> rowSorter;
+ protected final transient TableRowSorter<TableModel> rowSorter;
+ protected VCSEntryLocation location;
+
private static final long serialVersionUID = 4697917831388337369L;
@@ -69,6 +70,7 @@
this.displayedEntries = new ArrayList<VCSEntry>();
this.delegate = new VCSEntriesImpl();
this.rowSorter = new TableRowSorter<TableModel>(this);
+ this.location = VCSEntryLocation.UNKNOW;
}
public String getName() {
@@ -118,8 +120,8 @@
fireTableDataChanged();
}
- public VCSAction[] getActions(ListSelectionModel selectionModel) {
- return getActions(getDisplayedEntries(selectionModel));
+ public EnumMap<VCSAction, Integer> countActions(ListSelectionModel selectionModel) {
+ return countActions(getDisplayedEntries(selectionModel));
}
@Override
@@ -191,12 +193,12 @@
updateEntries();
}
- public VCSAction[] getActions(List<VCSEntry> entries) {
- return delegate.getActions(entries);
+ public EnumMap<VCSAction, Integer> countActions(List<VCSEntry> entries) {
+ return delegate.countActions(entries);
}
- public VCSState[] getStates(List<VCSEntry> entries) {
- return delegate.getStates(entries);
+ public EnumMap<VCSState, Integer> countStates(List<VCSEntry> entries) {
+ return delegate.countStates(entries);
}
public void clear() {
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,6 +14,11 @@
*/
package org.codelutin.vcs.ui.util;
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSState;
+import org.codelutin.vcs.type.VCSEntryLocation;
+
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JComponent;
@@ -21,8 +26,12 @@
import javax.swing.JRootPane;
import javax.swing.JTable;
import javax.swing.KeyStroke;
+import javax.swing.ListSelectionModel;
+import javax.swing.ImageIcon;
import java.awt.Color;
import java.awt.event.ActionEvent;
+import java.util.EnumMap;
+import java.util.EnumSet;
/**
* UI Helper methods
@@ -72,4 +81,64 @@
table.setRowSorter(((AbstractVCSEntriesTableModel) table.getModel()).getRowSorter());
}
+ public static int countAction(VCSAction action, AbstractVCSEntriesTableModel entries, ListSelectionModel selectionModel) {
+ EnumMap<VCSAction, Integer> map = countActions(EnumSet.of(action), entries, selectionModel);
+ if (map.isEmpty()) {
+ return 0;
+ } else {
+ return map.values().iterator().next();
+ }
+ }
+
+ public static EnumMap<VCSAction, Integer> countActions(EnumSet<VCSAction> set, AbstractVCSEntriesTableModel entries, ListSelectionModel selectionModel) {
+ if (set == null) {
+ set = EnumSet.allOf(VCSAction.class);
+ }
+ EnumMap<VCSAction, Integer> map = new EnumMap<VCSAction, Integer>(VCSAction.class);
+ int[] tmp = new int[VCSAction.values().length];
+ for (int i = 0, max = entries.getRowCount(); i < max; i++) {
+ if (selectionModel == null || selectionModel.isSelectedIndex(i)) {
+ VCSEntry entry = entries.getDisplayedEntry(i);
+ for (VCSAction action : entry.getState().getActions()) {
+ tmp[action.ordinal()]++;
+ }
+ }
+ }
+ for (VCSAction vcsAction : set) {
+ int index = vcsAction.ordinal();
+ map.put(vcsAction, tmp[index]);
+ }
+ return map;
+ }
+
+ public static EnumMap<VCSState, Integer> countStates(EnumSet<VCSState> set, AbstractVCSEntriesTableModel entries, ListSelectionModel selectionModel) {
+ if (set == null) {
+ set = EnumSet.allOf(VCSState.class);
+ }
+ EnumMap<VCSState, Integer> map = new EnumMap<VCSState, Integer>(VCSState.class);
+ int[] tmp = new int[VCSState.values().length];
+ for (int i = 0, max = entries.getRowCount(); i < max; i++) {
+ if (selectionModel == null || selectionModel.isSelectedIndex(i)) {
+ VCSEntry entry = entries.getDisplayedEntry(i);
+ tmp[entry.getState().ordinal()]++;
+ }
+ }
+ for (VCSState state : set) {
+ int index = state.ordinal();
+ map.put(state, tmp[index]);
+ }
+ return map;
+ }
+
+ public static ImageIcon createActionIcon(String name) {
+ return jaxx.runtime.UIHelper.createImageIcon("action-" + name + ".png");
+ }
+
+ public static ImageIcon createActionIcon(VCSAction location) {
+ return createActionIcon(location.name().toLowerCase());
+ }
+
+ public static ImageIcon createLocationIcon(VCSEntryLocation location) {
+ return jaxx.runtime.UIHelper.createImageIcon("location-" + location.name().toLowerCase() + ".png");
+ }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-en_GB.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-en_GB.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,3 +1,18 @@
+lutinvcs.action.action.noselection=Action ''{0}'' (empty selection)
+lutinvcs.action.confirm.all.tip=Perform action ''{0}'' on the signle matching file amoung {1} file(s)
+lutinvcs.action.confirm.alls.tip=Perform action ''{0}'' on the {1} matching files amoung {2} files
+lutinvcs.action.confirm.one.tooltip=Perform action ''{0}}'' on selected file
+lutinvcs.action.confirm.selected.tip=Perform action ''{0}'' on the signle matching file amoung the {1} selected file(s)
+lutinvcs.action.confirm.selecteds.tip=Perform action ''{0}'' on the {1} matching files amoung the {2} selected files
+lutinvcs.action.confirm.tooltip=Perform action ''{0}}'' on {1} selected files
+lutinvcs.action.help.libelle=Help
+lutinvcs.action.help.tip=Obtain help
+lutinvcs.action.message=Action ''{0}'' ({1} selected files)
+lutinvcs.action.message.one=Action ''{0}'' (1 selected file)
+lutinvcs.action.nextdiff.tip=goto next diff
+lutinvcs.action.previousdiff.tip=goto previous diff
+lutinvcs.action.showmessages.tip=show previous commit messages
+lutinvcs.action.single.tip=Launch action ''{0}'' on selected file ''{1}''
lutinvcs.file=File
lutinvcs.module=Module
lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-fr_FR.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-fr_FR.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,3 +1,18 @@
+lutinvcs.action.action.noselection=Action ''{0}'' (aucune s\u00E9lection)
+lutinvcs.action.confirm.all.tip=Ex\u00E9cuter l''action ''{0}'' sur le seul fichier correspondant (parmis les {1} fichier(s)).
+lutinvcs.action.confirm.alls.tip=Ex\u00E9cuter l''action ''{0}'' sur les {1} fichiers correspondants (parmis les {2} fichiers).
+lutinvcs.action.confirm.one.tooltip=Ex\u00E9cuter l''action ''{0}'' sur le fichier s\u00E9lectionn\u00E9.
+lutinvcs.action.confirm.selected.tip=Ex\u00E9cuter l''action ''{0}'' sur le fichier correspondant parmi les {1} fichier(s) s\u00E9lectionn\u00E9(s).
+lutinvcs.action.confirm.selecteds.tip=Ex\u00E9cuter l''action ''{0}'' sur les {1} fichiers correspondants parmi les {2} fichiers s\u00E9lectionn\u00E9s.
+lutinvcs.action.confirm.tooltip=Ex\u00E9cuter l''action ''{0}'' sur les {1} fichiers s\u00E9lectionn\u00E9s.
+lutinvcs.action.help.libelle=Aide
+lutinvcs.action.help.tip=Obtenir de l'aide
+lutinvcs.action.message=Action ''{0}'' ({1} fichiers s\u00E9lectionn\u00E9s)
+lutinvcs.action.message.one=Action ''{0}'' (1 fichier s\u00E9lectionn\u00E9)
+lutinvcs.action.nextdiff.tip=voir la prochaine diff\u00E9rence
+lutinvcs.action.previousdiff.tip=voir la diff\u00E9rence pr\u00E9c\u00E9dente
+lutinvcs.action.showmessages.tip=voir les messages de publication pr\u00E9c\u00E9dents
+lutinvcs.action.single.tip=ex\u00E9cuter l''action ''{0}'' sur le fichier s\u00E9l\u00E9ctionn\u00E9 ''{1}''
lutinvcs.file=Fichier
lutinvcs.module=Module
lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,36 +1,4 @@
-lutinvcs.action.add=Add
-lutinvcs.action.commit=commit
-lutinvcs.action.delete=delete
-lutinvcs.action.diff=show diff
-lutinvcs.action.refresh=refresh
-lutinvcs.action.revert=revert
-lutinvcs.action.tooltip.add=add selected files
-lutinvcs.action.tooltip.addAll=add all files
-lutinvcs.action.tooltip.commit=commit selected files
-lutinvcs.action.tooltip.commitAll=commit all files
-lutinvcs.action.tooltip.delete=delete
-lutinvcs.action.tooltip.deleteAll=delete all files
-lutinvcs.action.tooltip.diff=show diff of selected files
-lutinvcs.action.tooltip.diffAll=show diff of all files
-lutinvcs.action.tooltip.help=Obtain help
-lutinvcs.action.tooltip.lastMessages=
-lutinvcs.action.tooltip.nextDiff=next diff
-lutinvcs.action.tooltip.previousDiff=previous diff
-lutinvcs.action.tooltip.refresh=refresh selected files
-lutinvcs.action.tooltip.refreshAll=refrsh all files
-lutinvcs.action.tooltip.revert=revert selected files
-lutinvcs.action.tooltip.revertAll=revert all files
-lutinvcs.action.tooltip.update=update selected files
-lutinvcs.action.tooltip.updateAll=update all files
-lutinvcs.action.update=update
lutinvcs.commit.message=Please fill a message for your commit
-lutinvcs.confirm.message=Message TODO
lutinvcs.confirm.title=Confirm UI
lutinvcs.diff.title=Diff UI
-lutinvcs.synch.title=Synch
-lutinvcs.tabs.all=all
-lutinvcs.tabs.local=local
-lutinvcs.tabs.remote=remote
-lutinvcs.tabs.tooltip.all=Show all files (local and remote)
-lutinvcs.tabs.tooltip.local=Show all local files
-lutinvcs.tabs.tooltip.remote=Show all remote files
+lutinvcs.synch.title=Synch UI
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,36 +1,4 @@
-lutinvcs.action.add=Ajouter
-lutinvcs.action.commit=committer
-lutinvcs.action.delete=supprimer
-lutinvcs.action.diff=voir les diff
-lutinvcs.action.refresh=rafra\u00EEchir
-lutinvcs.action.revert=annuler les modifications
-lutinvcs.action.tooltip.add=ajouter les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.addAll=ajouter tous les fichiers
-lutinvcs.action.tooltip.commit=commiter les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.commitAll=commiter tous les fichiers
-lutinvcs.action.tooltip.delete=supprimer les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.deleteAll=supprimer tous les fichiers
-lutinvcs.action.tooltip.diff=voir tous les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.diffAll=voir les diff\u00E9rences de tous les fichiers
-lutinvcs.action.tooltip.help=Obtenir de l'aide
-lutinvcs.action.tooltip.lastMessages=
-lutinvcs.action.tooltip.nextDiff=voir la prochaine diff\u00E9rence
-lutinvcs.action.tooltip.previousDiff=voir la diff\u00E9rence pr\u00E9c\u00E9dente
-lutinvcs.action.tooltip.refresh=rafra\u00EEchir tous les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.refreshAll=rafra\u00EEchir tous les fichiers
-lutinvcs.action.tooltip.revert=annuler les modifications sur les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.revertAll=annuler les modifications sur tous les fichiers
-lutinvcs.action.tooltip.update=mettre \u00E0 jour les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.updateAll=mettre \u00E0 jour tous les fichiers
-lutinvcs.action.update=mettre \u00E0 jour
-lutinvcs.commit.message=Renseigner le message de commit
-lutinvcs.confirm.message=Message TODO
+lutinvcs.commit.message=Renseigner le message de publication
lutinvcs.confirm.title=Confirm UI
lutinvcs.diff.title=Diff UI
-lutinvcs.synch.title=Synchronisation
-lutinvcs.tabs.all=all
-lutinvcs.tabs.local=local
-lutinvcs.tabs.remote=remote
-lutinvcs.tabs.tooltip.all=voir tous les fichiers modifi\u00E9s localement ou \u00E0 distance
-lutinvcs.tabs.tooltip.local=voir tous les fichiers locaux
-lutinvcs.tabs.tooltip.remote=voir tous les fichiers \u00E0 distance
+lutinvcs.synch.title=Synch UI
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-add.png (from rev 451, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/add.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-add.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-commit.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/commit.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-commit.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-delete.png (from rev 451, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/delete.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-delete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-next.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-next.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-next.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-prev.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-prev.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-prev.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-help.png (from rev 451, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/help.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-help.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-refresh.png (from rev 452, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-refresh.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-revert.png (from rev 449, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/revert.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-revert.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-showmessages.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/recent_msgs.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-showmessages.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-update.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/update.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-update.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/add.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/commit.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/delete.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-next.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-prev.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/help.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/recent_msgs.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/revert.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/update.png
===================================================================
(Binary files differ)
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,10 +1,24 @@
<ConfirmUI title='lutinvcs.confirm.title' defaultCloseOperation='DISPOSE_ON_CLOSE' modal='true'
resizable='false' height='300' width='400'>
<style source="common.css"/>
+ <JPopupMenu id="popup">
+ <JScrollPane styleClass='confirmScroll'>
+ <JList id='messages' model='{messageModel}' selectionModel='{messageSelectionModel}'/>
+ </JScrollPane>
+ </JPopupMenu>
<Table>
<row fill='both'>
<cell fill='both'>
- <JLabel id="actionLabel" text="lutinvcs.confirm.message"/>
+ <JToolBar>
+ <JLabel id="actionLabel"/>
+ <Table fill='both' insets='0,0,0,0'>
+ <row>
+ <cell fill='both'/>
+ </row>
+ </Table>
+ <!--JSeparator orientation="vertical"/-->
+ <JButton id='help' action='{createHelpAction()}'/>
+ </JToolBar>
</cell>
</row>
<row fill='both'>
@@ -19,15 +33,13 @@
<cell fill='both'/>
</row>
</Table>
- <JSeparator orientation="vertical"/>
- <JButton id='lastMessages' onActionPerformed='showLastMessages()'/>
- <JButton id='help' onActionPerformed='doHelp()'/>
+ <JButton id='lastMessages' action='{createShowMessagesAction()}'/>
</JToolBar>
</cell>
</row>
<row fill='both'>
<cell fill='both' columns='3' weightx='1'>
- <JScrollPane id="commitScroll" height='90' verticalScrollBarPolicy="20"
+ <JScrollPane id="commitScroll" height='90' styleClass='confirmScroll'
columnHeaderView="{tool}">
<JTextArea id="commitMessage" constructorParams="4,50"/>
</JScrollPane>
@@ -49,5 +61,7 @@
</cell>
</row>
</Table>
+ <DefaultListSelectionModel id='messageSelectionModel'/>
+ <DefaultListModel id='messageModel'/>
</ConfirmUI>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-13 07:55:46 UTC (rev 457)
@@ -8,37 +8,33 @@
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
- <JToggleButton id='allTab' onActionPerformed='setLocation(ALL)'/>
- <JToggleButton id='localTab' onActionPerformed='setLocation(LOCAL)'/>
- <JToggleButton id='remoteTab' onActionPerformed='setLocation(REMOTE)'/>
+ <JToggleButton id='allTab' action='{createLocationAction(ALL)}'/>
+ <JToggleButton id='localTab' action='{createLocationAction(LOCAL)}'/>
+ <JToggleButton id='remoteTab' action='{createLocationAction(REMOTE)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='refresh' onActionPerformed='doAction(REFRESH)'/>
+ <JButton id='refresh' action='{createAction(REFRESH,true)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='nextDiff' onActionPerformed='gotoNextDiff()'/>
- <JButton id='previousDiff' onActionPerformed='gotoPreviousDiff()'/>
+ <JButton id='nextDiff' action='{createDiffAction(false)}'/>
+ <JButton id='previousDiff' action='{createDiffAction(true)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='update' onActionPerformed='doAction(UPDATE)'/>
- <JButton id='commit' onActionPerformed='doAction(COMMIT)'/>
- <JButton id='revert' onActionPerformed='doAction(REVERT)'/>
+ <JButton id='update' action='{createAction(UPDATE,true)}'/>
+ <JButton id='commit' action='{createAction(COMMIT,true)}'/>
+ <JButton id='revert' action='{createAction(REVERT,true)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='help' onActionPerformed='doHelp()'/>
+ <JButton id='help' action='{createHelpAction()}'/>
</JToolBar>
</cell>
</row>
<row fill='both'>
<cell fill='both'>
<JScrollPane id='contentScroll' styleClass='diffScroll' height='100'>
- <JTable id="contentTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
+ <JTable id="contentTable" styleClass='diffTable'/>
</JScrollPane>
</cell>
</row>
<row fill='both'>
<cell fill='both' weighty='1' weightx='1'>
- <JSplitPane id='splitPane2' orientation='horizontal' resizeWeight="0.5" dividerLocation="{0.5}">
+ <JSplitPane orientation='horizontal' resizeWeight="0.5" dividerLocation="{0.5}">
<JScrollPane id='remoteEditorScroll' styleClass='diffScroll'>
<JTextArea id="remoteEditorContent" editable='false'/>
</JScrollPane>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-13 07:55:46 UTC (rev 457)
@@ -5,42 +5,36 @@
import static org.codelutin.vcs.type.VCSEntryLocation.*;
</script>
<JPopupMenu id="popup" invoker='{contentTable}'>
- <JMenuItem id='refresh' text='lutinvcs.action.refresh' onActionPerformed='doAction(REFRESH,true)'/>
- <JMenuItem id='diff' text='lutinvcs.action.diff' onActionPerformed='doAction(DIFF,true)'/>
+ <JMenuItem id='refresh' action='{createAction(REFRESH,true)}' font-size='10'/>
+ <JMenuItem id='diff' action='{createAction(DIFF,true)}' font-size='10'/>
<JSeparator/>
- <JMenuItem id='update' text='lutinvcs.action.update' onActionPerformed='doAction(UPDATE,true)'/>
- <JMenuItem id='revert' text='lutinvcs.action.revert' onActionPerformed='doAction(REVERT,true)'/>
+ <JMenuItem id='update' action='{createAction(UPDATE,true)}' font-size='10'/>
+ <JMenuItem id='revert' action='{createAction(REVERT,true)}' font-size='10'/>
<JSeparator/>
-
- <JMenuItem id='commit' text='lutinvcs.action.commit' onActionPerformed='doAction(COMMIT,true)'/>
- <JMenuItem id='add' text='lutinvcs.action.add' onActionPerformed='doAction(ADD,true)'/>
- <JMenuItem id='delete' text='lutinvcs.action.delete' onActionPerformed='doAction(DELETE,true)'/>
+ <JMenuItem id='commit' action='{createAction(COMMIT,true)}' font-size='10'/>
+ <JMenuItem id='add' action='{createAction(ADD,true)}' font-size='10'/>
+ <JMenuItem id='delete' action='{createAction(DELETE,true)}' font-size='10'/>
</JPopupMenu>
<Table id='table'>
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
- <JToggleButton id='allTab' onActionPerformed='setLocation(ALL)'/>
- <JToggleButton id='localTab' onActionPerformed='setLocation(LOCAL)'/>
- <JToggleButton id='remoteTab' onActionPerformed='setLocation(REMOTE)'/>
-
+ <JToggleButton id='allTab' action='{createLocationAction(ALL)}'/>
+ <JToggleButton id='localTab' action='{createLocationAction(LOCAL)}'/>
+ <JToggleButton id='remoteTab' action='{createLocationAction(REMOTE)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='refreshAll' onActionPerformed='doAction(REFRESH,false)'/>
- <JButton id='diffAll' onActionPerformed='doAction(DIFF,false)'/>
+ <JButton id='refreshAll' action='{createAction(REFRESH,false)}'/>
+ <JButton id='diffAll' action='{createAction(DIFF,false)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='updateAll' onActionPerformed='doAction(UPDATE,false)'/>
- <JButton id='revertAll' onActionPerformed='doAction(REVERT,false)'/>
+ <JButton id='updateAll' action='{createAction(UPDATE,false)}'/>
+ <JButton id='revertAll' action='{createAction(REVERT,false)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='commitAll' onActionPerformed='doAction(COMMIT,false)'/>
- <JButton id='addAll' onActionPerformed='doAction(ADD,false)'/>
- <JButton id='deleteAll' onActionPerformed='doAction(DELETE,false)'/>
+ <JButton id='commitAll' action='{createAction(COMMIT,false)}'/>
+ <JButton id='addAll' action='{createAction(ADD,false)}'/>
+ <JButton id='deleteAll' action='{createAction(DELETE,false)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='help' onActionPerformed='doHelp()'/>
+ <JButton id='help' action='{createHelpAction()}'/>
</JToolBar>
</cell>
</row>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-13 07:55:46 UTC (rev 457)
@@ -10,248 +10,65 @@
opaque: false;
borderPainted: false;
enabled: false;
- margin: 0;
+ margin: 0; /*font-size:10;*/
}
JToggleButton {
opaque: false;
borderPainted: false;
margin: 0;
+ selected: false;
+ font-size: 10;
}
-JMenuItem {
+JMenuItem, JMenu {
enabled: true;
}
-JMenu {
- enabled: true;
+JSeparator {
+ border: { null
}
-.smallSize {
- font-size: 9;
-}
+;
+opaque:false
-.updateTable {
- rowSelectionAllowed: true;
- /*autoResizeMode: auto_resize_all_columns;
- autoResizeMode: auto_resize_last_column;*/
- showVerticalLines: false;
- cellSelectionEnabled: false;
- rowMargin: 0;
- selectionMode: { ListSelectionModel . MULTIPLE_INTERVAL_SELECTION
-}
-
;
}
-.updateScroll {
+.updateScroll, .diffScroll, .confirmScroll {
verticalScrollBarPolicy: 20;
horizontalScrollBarPolicy: 31;
}
-.diffScroll {
- verticalScrollBarPolicy: 20;
- horizontalScrollBarPolicy: 31;
-}
-
-.diffTable {
- rowSelectionAllowed: true;
- /*autoResizeMode: auto_resize_all_columns;
- autoResizeMode: auto_resize_last_column;*/
+.updateTable, .confirmTable, .diffTable {
showVerticalLines: false;
cellSelectionEnabled: false;
+ rowSelectionAllowed: true;
rowMargin: 0;
- selectionMode: 0;
}
-#allTab {
- buttonGroup: tabs;
- mnemonic: A;
- selected: false;
- icon: { createLocationIcon( ALL )
+.updateTable, .confirmTable {
+ selectionMode: 2;
}
-;
-text:
-
-"lutinvcs.tabs.all"
-;
-toolTipText:
-
-"lutinvcs.tabs.tooltip.all"
-;
+.diffTable {
+ selectionMode: 0;
}
-#localTab {
+#allTab, #localTab, #remoteTab {
buttonGroup: tabs;
- mnemonic: L;
- selected: false;
- icon: { createLocationIcon( LOCAL )
}
-;
-text:
-
-"lutinvcs.tabs.local"
-;
-toolTipText:
-
-"lutinvcs.tabs.tooltip.local"
-;
+.smallSize {
+ font-size: 9;
}
-#remoteTab {
- buttonGroup: tabs;
- mnemonic: R;
- selected: false;
- icon: { createLocationIcon( REMOTE )
+#actionLabel, #actionCommitLabel {
+ font-size: 10;
}
-;
-text:
-
-"lutinvcs.tabs.remote"
-;
-toolTipText:
-
-"lutinvcs.tabs.tooltip.remote"
-;
-}
-
-#refresh, #refreshAll {
- icon: { createActionIcon( REFRESH )
-}
-
-;
-}
-
-#diff, #diffAll {
- icon: { createActionIcon( DIFF )
-}
-
-;
-}
-
-#update, #updateAll {
- icon: { createActionIcon( UPDATE )
-}
-
-;
-}
-
-#revert, #revertAll {
- icon: { createActionIcon( REVERT )
-}
-
-;
-}
-
-#commit, #commitAll {
- icon: { createActionIcon( COMMIT )
-}
-
-;
-}
-
-#add, #addAll {
- icon: { createActionIcon( ADD )
-}
-
-;
-}
-
-#delete, #deleteAll {
- icon: { createActionIcon( DELETE )
-}
-
-;
-}
-
-#refresh {
- toolTipText: "lutinvcs.action.tooltip.refresh";
-}
-
-#refreshAll {
- toolTipText: "lutinvcs.action.tooltip.refreshAll";
-}
-
-#diff {
- toolTipText: "lutinvcs.action.tooltip.diff";
-}
-
-#diffAll {
- toolTipText: "lutinvcs.action.tooltip.diffAll";
-}
-
-#update {
- toolTipText: "lutinvcs.action.tooltip.update";
-}
-
-#updateAll {
- toolTipText: "lutinvcs.action.tooltip.updateAll";
-}
-
-#revert {
- toolTipText: "lutinvcs.action.tooltip.revert";
-}
-
-#revertAll {
- toolTipText: "lutinvcs.action.tooltip.revertAll";
-}
-
-#commit {
- toolTipText: "lutinvcs.action.tooltip.commit";
-}
-
-#commitAll {
- toolTipText: "lutinvcs.action.tooltip.commitAll";
-}
-
-#add {
- toolTipText: "lutinvcs.action.tooltip.add";
-}
-
-#addAll {
- toolTipText: "lutinvcs.action.tooltip.addAll";
-}
-
-#delete {
- toolTipText: "lutinvcs.action.tooltip.delete";
-}
-
-#deleteAll {
- toolTipText: "lutinvcs.action.tooltip.deleteAll";
-}
-
-#help {
- toolTipText: "lutinvcs.action.tooltip.help";
- enabled: true;
- icon: { createImageIcon( "help.png" )
-}
-
-;
-}
-
-#nextDiff {
- toolTipText: "lutinvcs.action.tooltip.nextDiff";
- icon: { createImageIcon( "diff-next.png" )
-}
-
-;
-}
-
-#previousDiff {
- toolTipText: "lutinvcs.action.tooltip.previousDiff";
- icon: { createImageIcon( "diff-prev.png" )
-}
-
-;
-}
-
-#lastMessages {
- toolTipText: "lutinvcs.action.tooltip.lastMessages";
- icon: { createImageIcon( "recent_msgs.png" )
-}
-
-;
-}
\ No newline at end of file
+#messages {
+ fixedCellWidth: 300;
+ fixedCellHeight: 12;
+ visibleRowCount: 10;
+}
\ No newline at end of file
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
@@ -25,6 +25,7 @@
<module>lutinvcs-provider-svn</module>
<module>lutinvcs-ui-common</module>
<module>lutinvcs-ui-jaxx</module>
+ <module>lutinvcs-all-providers</module>
<module>lutinvcs-all</module>
</modules>
@@ -226,11 +227,11 @@
<artifactId>lutinutil</artifactId>
<version>0.30-SNAPSHOT</version>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-api</artifactId>
<version>${current.version}</version>
- </dependency>
+ </dependency-->
<dependency>
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-core</artifactId>
@@ -268,6 +269,11 @@
</dependency>
<dependency>
<groupId>${common.groupId}</groupId>
+ <artifactId>lutinvcs-all-providers</artifactId>
+ <version>${current.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-all</artifactId>
<version>${current.version}</version>
</dependency>
1
0
[Buix-commits] r456 - in trunk/lutinvcs: lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util lutinvcs-ui-jaxx/src/main/resources/i18n lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 19:52:14 +0000 (Fri, 11 Apr 2008)
New Revision: 456
Modified:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
Log:
add rowsorter supports in table + refactor ui code
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -18,7 +18,6 @@
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
-import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JToolBar;
@@ -37,10 +36,6 @@
public abstract JTextArea getCommitMessage();
- public abstract JScrollPane getContent();
-
- public abstract JTable getContentTable();
-
public abstract AbstractButton getLastMessages();
public abstract AbstractButton getAccept();
@@ -58,6 +53,6 @@
}
protected void showLastMessages() {
- //TODO
+ getHandler().showLastMessages();
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -18,7 +18,6 @@
import org.codelutin.vcs.type.VCSAction;
import javax.swing.AbstractButton;
-import java.util.List;
/** @author chemit */
public abstract class DiffUI extends org.codelutin.vcs.ui.util.AbstractTabUI<org.codelutin.vcs.ui.handler.DiffUIHandler> {
@@ -27,12 +26,6 @@
public abstract AbstractButton getPreviousDiff();
- public void doSelectFile() {
- List<VCSEntry> entries = getHandler().getModel().getEntriesModel().getDisplayedEntries(getHandler().getSelectionModel());
- VCSEntry vcsEntry = entries.isEmpty() ? null : entries.get(0);
- getHandler().getModel().setFileModel(vcsEntry);
- }
-
@Override
public void setVisible(boolean b) {
if (b) {
@@ -41,12 +34,17 @@
button = getAllTab();
}
button.doClick();
- if (getTable(getHandler().getModel().getEntriesModel().getLocation()).getRowCount() > 0)
+ if (getContentTable().getRowCount() > 0)
getHandler().getSelectionModel().setSelectionInterval(0, 0);
}
super.setVisible(b);
}
+ protected void doSelectFile() {
+ VCSEntry entry = getHandler().getSelectedEntry();
+ getHandler().getModel().setFileModel(entry);
+ }
+
protected void doAction(VCSAction action) {
getHandler().doAction(action, getHandler().getModel().getFileModel());
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -16,11 +16,10 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.ConfirmUI;
+import org.codelutin.vcs.ui.model.ConfirmUIModel;
import org.codelutin.vcs.ui.util.AbstractUIHandler;
import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
-import org.codelutin.vcs.ui.util.UIHelper;
-import org.codelutin.vcs.ui.model.ConfirmUIModel;
-import org.codelutin.vcs.ui.ConfirmUI;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeEvent;
@@ -57,14 +56,6 @@
throw new IllegalStateException("unimplemented property changed : " + evt);
}
- @Override
- public void init() {
- super.init();
- getUi().getContentTable().setModel(getModel().getEntriesModel());
- // init table renderer
- UIHelper.installVCSTableUI(getUi().getContentTable());
- }
-
protected void updateUI() {
VCSAction action = getModel().getAction();
getUi().getAccept().setText(action.getLibelle());
@@ -98,8 +89,9 @@
// dispose ui
getUi().dispose();
-
}
-
+ public void showLastMessages() {
+ log.info("//TODO: " + this);
+ }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -16,16 +16,11 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIFactory;
import org.codelutin.vcs.ui.DiffUI;
import org.codelutin.vcs.ui.model.DiffUIModel;
-import org.codelutin.vcs.ui.ConfirmUI;
import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
-import org.codelutin.vcs.ui.util.UIHelper;
-import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
@@ -43,94 +38,71 @@
@Override
public void propertyChange(PropertyChangeEvent evt) {
- //if (log.isDebugEnabled()) {
- log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
- //}
-
- String action = evt.getPropertyName();
- if (DiffUIModel.FILE_PROPERTY_CHANGED.equals(action)) {
- doSelectFile((VCSEntry) evt.getNewValue());
+ if (log.isDebugEnabled()) {
+ log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
+ }
+ if (DiffUIModel.FILE_PROPERTY_CHANGED.equals(evt.getPropertyName())) {
+ VCSEntry model = (VCSEntry) evt.getNewValue();
+ boolean hasActions = false;
+ List<VCSAction> actions = null;
+ if (model != null) {
+ actions = model.getState().getActions();
+ hasActions = !actions.isEmpty();
+ }
+ DiffUI ui = getUi();
+ updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE);
+ updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT);
+ updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT);
+ ui.getRefresh().setEnabled(hasActions);
} else {
super.propertyChange(evt);
}
}
- @Override
- public void doSelectLocation(VCSEntryLocation location) {
-
- super.doSelectLocation(location);
-
+ public void doSelectLocation() {
AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
if (fileStatesModel.getRowCount() > 0) {
getSelectionModel().addSelectionInterval(0, 0);
- } else {
- getSelectionModel().clearSelection();
}
}
- protected void initTab(VCSEntryLocation location) {
- JTable table = getUi().getTable(location);
- final AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
- table.setModel(fileStatesModel);
- table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
+ @Override
+ public void init() {
+ super.init();
+ getUi().getContentTable().getSelectionModel().addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting()) {
- getUi().doSelectFile();
+ getModel().setFileModel(getSelectedEntry());
}
}
});
- // init table renderer
- UIHelper.installVCSTableUI(table);
}
- public void doSelectFile(VCSEntry model) {
-
- boolean hasActions = false;
- List<String> acts = new ArrayList<String>();
-
- if (model != null) {
- List<VCSAction> actions = model.getState().getActions();
- for (VCSAction action : actions) {
- acts.add(action.name().toLowerCase());
- }
- hasActions = !actions.isEmpty();
+ public VCSEntry getSelectedEntry() {
+ ListSelectionModel selectionModel = getSelectionModel();
+ if (selectionModel.isSelectionEmpty()) {
+ return null;
}
- getUi().getUpdate().setEnabled(hasActions && acts.contains("update"));
- getUi().getCommit().setEnabled(hasActions && acts.contains("commit"));
- getUi().getRevert().setEnabled(hasActions && acts.contains("revert"));
- getUi().getRefresh().setEnabled(hasActions);
+ return getModel().getEntriesModel().getDisplayedEntry(selectionModel.getMinSelectionIndex());
}
public void doAction(VCSAction action, VCSEntry file) {
AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
List<VCSEntry> entries = new ArrayList<VCSEntry>(1);
entries.add(file);
- log.info(action + " : " + model);
- ListSelectionModel selectionModel = getSelectionModel();
+ //log.info(action + " : " + model);
if (action == VCSAction.REFRESH) {
- selectionModel.clearSelection();
- // do refresh of all states
- log.info("refresh :" + model.getRowCount());
- model.refresh(System.nanoTime(), entries);
+ doRefresh(model, entries, getSelectionModel());
} else {
-
- log.info("files to treate :" + entries.size());
-
- ConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
-
- confirmUI.getHandler().getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
-
- confirmUI.setVisible(true);
- //TODO SynchModel should listener for modification on ActionManagerQueue thread
- log.info("TODO refresh states for files...");
+ doConfirm(action, model, entries);
}
}
public void gotoNextDiff() {
- //TODO
+ log.info("//TODO :" + this);
}
public void gotoPreviousDiff() {
- //TODO
+ log.info("//TODO :" + this);
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -2,21 +2,15 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIFactory;
-import org.codelutin.vcs.ui.ConfirmUI;
import org.codelutin.vcs.ui.SynchUI;
import org.codelutin.vcs.ui.model.SynchUIModel;
-import org.codelutin.vcs.ui.DiffUI;
import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
-import org.codelutin.vcs.ui.util.UIHelper;
-import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
-import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
/** @author chemit */
@@ -28,131 +22,83 @@
}
@Override
- public void doSelectLocation(VCSEntryLocation location) {
+ public void init() {
+ super.init();
+ getUi().getContentTable().addMouseListener(new ListMouseListener());
+ }
- super.doSelectLocation(location);
+ protected void doSelectLocation() {
- VCSAction[] actions = getModel().getEntriesModel().getActions((ListSelectionModel) null);
- List<String> acts = new ArrayList<String>();
- for (VCSAction action : actions) {
- acts.add(action.name().toLowerCase());
- }
- boolean hasActions = actions.length > 0;
- getUi().getDiffAll().setEnabled(hasActions && acts.contains("diff"));
- getUi().getUpdateAll().setEnabled(hasActions && acts.contains("update"));
- getUi().getCommitAll().setEnabled(hasActions && acts.contains("commit"));
- getUi().getRevertAll().setEnabled(hasActions && acts.contains("revert"));
- getUi().getAddAll().setEnabled(hasActions && acts.contains("add"));
- getUi().getDeleteAll().setEnabled(hasActions && acts.contains("delete"));
- getUi().getRefreshAll().setEnabled(hasActions);
+ List<VCSAction> actions = Arrays.asList(getModel().getEntriesModel().getActions((ListSelectionModel) null));
+
+ boolean hasActions = !actions.isEmpty();
+ SynchUI ui = getUi();
+ updateAction(actions, hasActions, ui.getDiffAll(), VCSAction.DIFF);
+ updateAction(actions, hasActions, ui.getUpdateAll(), VCSAction.UPDATE);
+ updateAction(actions, hasActions, ui.getRevertAll(), VCSAction.REVERT);
+ updateAction(actions, hasActions, ui.getCommitAll(), VCSAction.COMMIT);
+ updateAction(actions, hasActions, ui.getAddAll(), VCSAction.ADD);
+ updateAction(actions, hasActions, ui.getDeleteAll(), VCSAction.DELETE);
+ ui.getRefreshAll().setEnabled(hasActions);
}
public void doAction(VCSAction action, boolean useSelection) {
AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
log.info(action + " : " + model);
ListSelectionModel selectionModel = getSelectionModel();
+ List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(useSelection ? selectionModel : null));
+
if (action == VCSAction.REFRESH) {
- selectionModel.clearSelection();
- // do refresh of all states
- log.info("refresh :" + model.getRowCount());
- model.refresh(System.nanoTime(), model.getEntries());
- } else {
- List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(useSelection ? selectionModel : null));
- if (entries.isEmpty()) {
- // nothing to do
- return;
- }
- if (action == VCSAction.DIFF) {
- // show diff ui
- DiffUI diffUI = VCSUIFactory.newDiffUI();
- List<VCSEntry> vcsEntryList;
- if (useSelection) {
- vcsEntryList = entries;
- } else {
- // take all entries
- vcsEntryList = model.filter(action, model.getEntries());
- }
- diffUI.getHandler().getModel().init(model.getLocation(), vcsEntryList.toArray(new VCSEntry[vcsEntryList.size()]));
- diffUI.setVisible(true);
- return;
- }
- log.info("files to treate :" + entries.size());
+ doRefresh(model, model.getEntries(), selectionModel);
+ return;
+ }
- ConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
-
- confirmUI.getHandler().getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
-
- confirmUI.setVisible(true);
- //TODO SynchModel should listener for modification on ActionManagerQueue thread
- log.info("TODO refresh states for files...");
+ if (entries.isEmpty()) {
+ // nothing to do
+ return;
}
- }
+ if (action == VCSAction.DIFF) {
+ // show diff ui
+ doDiff(useSelection, model, entries);
+ return;
+ }
- protected void initTab(VCSEntryLocation location) {
- JTable table = getUi().getTable(location);
- AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
- table.setModel(fileStatesModel);
- table.addMouseListener(new ListMouseListener(getUi(), fileStatesModel, location));
- // init table renderer
- UIHelper.installVCSTableUI(table);
+ doConfirm(action, model, entries);
}
+
protected class ListMouseListener extends MouseAdapter {
- private final AbstractVCSEntriesTableModel model;
-
- private final ListSelectionModel selectionModel;
-
- private final JTable jTable;
-
-
- public ListMouseListener(SynchUI ui, AbstractVCSEntriesTableModel model, VCSEntryLocation modelName) {
- this.model = model;
- jTable = ui.getTable(modelName);
- selectionModel = jTable.getSelectionModel();
- }
-
@Override
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
- if (e.isPopupTrigger()) {
- initPopup(e.getX(), e.getY());
+ if (e.isPopupTrigger() && !getSelectionModel().isSelectionEmpty()) {
+ initPopup(e.getX(), e.getY(), getSelectionModel());
}
}
@Override
public void mouseReleased(MouseEvent e) {
super.mouseReleased(e);
- if (e.isPopupTrigger()) {
- initPopup(e.getX(), e.getY());
+ if (e.isPopupTrigger() && !getSelectionModel().isSelectionEmpty()) {
+ initPopup(e.getX(), e.getY(), getSelectionModel());
}
}
- @Override
- public void mouseClicked(MouseEvent e) {
- // nothing to do
- }
+ protected void initPopup(int x, int y, ListSelectionModel selectionModel) {
- protected void initPopup(int x, int y) {
- if (!selectionModel.isSelectionEmpty()) {
- List<String> acts = new ArrayList<String>();
- for (VCSAction action : model.getActions(selectionModel)) {
- acts.add(action.name().toLowerCase());
- }
- boolean hasActions = !acts.isEmpty();
-
- getUi().getPopup().setInvoker(jTable);
- getUi().getDiff().setEnabled(hasActions && acts.contains("diff"));
- getUi().getUpdate().setEnabled(hasActions && acts.contains("update"));
- getUi().getCommit().setEnabled(hasActions && acts.contains("commit"));
- getUi().getAdd().setEnabled(hasActions && acts.contains("add"));
- getUi().getDelete().setEnabled(hasActions && acts.contains("delete"));
- getUi().getRevert().setEnabled(hasActions && acts.contains("revert"));
- getUi().getRefresh().setEnabled(hasActions);
- getUi().getPopup().pack();
- // display popup
- getUi().getPopup().show(jTable, x, y);
- }
+ List<VCSAction> actions = Arrays.asList(getModel().getEntriesModel().getActions(selectionModel));
+ boolean hasActions = !actions.isEmpty();
+ SynchUI ui = getUi();
+ updateAction(actions, hasActions, ui.getDiff(), VCSAction.DIFF);
+ updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE);
+ updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT);
+ updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT);
+ updateAction(actions, hasActions, ui.getAdd(), VCSAction.ADD);
+ updateAction(actions, hasActions, ui.getDelete(), VCSAction.DELETE);
+ ui.getRefresh().setEnabled(hasActions);
+ // display popup
+ ui.getPopup().show(ui.getContentTable(), x, y);
}
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -17,13 +17,11 @@
import org.codelutin.vcs.type.VCSEntryLocation;
import javax.swing.AbstractButton;
-import javax.swing.JPanel;
+import javax.swing.ButtonGroup;
+import javax.swing.ImageIcon;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JToggleButton;
-import javax.swing.ButtonGroup;
-import javax.swing.ImageIcon;
-import java.awt.CardLayout;
/** @author chemit */
public abstract class AbstractTabUI<H extends AbstractTabUIHandler<?, ?>> extends AbstractUI<H> {
@@ -36,20 +34,6 @@
public abstract JToggleButton getRemoteTab();
- public abstract JScrollPane getAllContent();
-
- public abstract JScrollPane getLocalContent();
-
- public abstract JScrollPane getRemoteContent();
-
- public abstract JTable getAllTable();
-
- public abstract JTable getLocalTable();
-
- public abstract JTable getRemoteTable();
-
- public abstract JPanel getPreview();
-
public abstract AbstractButton getRefresh();
public abstract AbstractButton getUpdate();
@@ -60,22 +44,7 @@
public abstract AbstractButton getHelp();
- public abstract CardLayout getCardLayout();
- public JTable getTable(VCSEntryLocation modelName) {
- switch (modelName) {
- case ALL:
- return getAllTable();
- case LOCAL:
- return getLocalTable();
- case REMOTE:
- return getRemoteTable();
- case UNKNOW:
- break;
- }
- throw new IllegalStateException("no table found for " + modelName);
- }
-
public AbstractButton getButton(VCSEntryLocation modelName) {
switch (modelName) {
case ALL:
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -14,10 +14,17 @@
*/
package org.codelutin.vcs.ui.util;
-import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.ConfirmUI;
+import org.codelutin.vcs.ui.DiffUI;
+import org.codelutin.vcs.ui.VCSUIFactory;
+import javax.swing.AbstractButton;
+import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeEvent;
+import java.util.List;
/** @author chemit */
public abstract class AbstractTabUIHandler<M extends AbstractTabUIModel, U extends AbstractTabUI<? extends AbstractTabUIHandler>> extends AbstractUIHandler<M, U> {
@@ -26,35 +33,54 @@
super(ui, model);
}
- protected abstract void initTab(VCSEntryLocation location);
-
- @Override
+ /*@Override
public void init() {
super.init();
- getUi().getHelp().setEnabled(true);
- initTab(VCSEntryLocation.ALL);
- initTab(VCSEntryLocation.LOCAL);
- initTab(VCSEntryLocation.REMOTE);
- }
+ }*/
public ListSelectionModel getSelectionModel() {
- return getUi().getTable(getLocation()).getSelectionModel();
+ return getUi().getContentTable().getSelectionModel();
}
public void propertyChange(PropertyChangeEvent evt) {
- //if (log.isDebugEnabled()) {
- log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
- //}
+ if (log.isDebugEnabled()) {
+ log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
+ }
String action = evt.getPropertyName();
-
if (AbstractTabUIModel.LOCATION_PROPERTY_CHANGED.equals(action)) {
- doSelectLocation((VCSEntryLocation) evt.getNewValue());
+ doSelectLocation();
}
}
- public void doSelectLocation(VCSEntryLocation location) {
- log.info(location);
- getUi().getCardLayout().show(getUi().getPreview(), "tab" + location.name().toLowerCase());
+ protected abstract void doSelectLocation();
+
+ protected void updateAction(List<VCSAction> actions, boolean hasActions, AbstractButton ui, VCSAction diff) {
+ ui.setEnabled(hasActions && actions.contains(diff));
}
+ protected void doConfirm(VCSAction action, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
+ ConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
+ log.info("nb files:" + entries.size());
+ confirmUI.getHandler().getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
+ confirmUI.setVisible(true);
+ }
+
+ protected void doDiff(boolean useSelection, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
+ DiffUI diffUI = VCSUIFactory.newDiffUI();
+ if (!useSelection) {
+ // take all entries
+ entries = model.filter(VCSAction.DIFF, model.getEntries());
+ }
+ log.info("nb entries:" + entries.size());
+ diffUI.getHandler().getModel().init(model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
+ diffUI.setVisible(true);
+ }
+
+ protected void doRefresh(AbstractVCSEntriesTableModel model, List<VCSEntry> entries, ListSelectionModel selectionModel) {
+ log.info(selectionModel);
+ selectionModel.clearSelection();
+ // do refresh of all states
+ model.refresh(System.nanoTime(), entries);
+ }
+
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -15,10 +15,16 @@
package org.codelutin.vcs.ui.util;
import javax.swing.ImageIcon;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
/** @author chemit */
-public class AbstractUI<H extends AbstractUIHandler> extends javax.swing.JDialog {
+public abstract class AbstractUI<H extends AbstractUIHandler> extends javax.swing.JDialog {
+ public abstract JScrollPane getContentScroll();
+
+ public abstract JTable getContentTable();
+
private H handler;
protected AbstractUI() {
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -20,6 +20,7 @@
import org.codelutin.vcs.runner.VCSActionManager;
import org.codelutin.vcs.type.VCSEntryLocation;
+import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeListener;
@@ -28,7 +29,10 @@
protected static Log log = LogFactory.getLog(AbstractUIHandler.class);
+ /** ui handled */
private U ui;
+
+ /** model handled */
private M model;
protected AbstractUIHandler(U ui, M model) {
@@ -51,6 +55,10 @@
throw new IllegalStateException("no model was defined for " + this);
}
model.addPropertyChangeListener(this);
+ JTable table = getUi().getContentTable();
+ table.setModel(getModel().getEntriesModel());
+ // init table renderer
+ UIHelper.installVCSTableUI(table);
}
public VCSEntryLocation getLocation() {
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIModel.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIModel.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -26,13 +26,17 @@
import java.beans.PropertyChangeSupport;
import java.util.List;
-/** @author chemit */
+/**
+ * Abstract ui model, with property change support.
+ * <p/>
+ * Encapsulate an {@link AbstractVCSEntriesTableModel}.
+ *
+ * @author chemit
+ */
public abstract class AbstractUIModel {
- /** to use log facility, just put in your code: log.info(\"...\"); */
static protected final Log log = LogFactory.getLog(AbstractUIModel.class);
-
/** support for change properties support */
protected PropertyChangeSupport changeSupport;
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -30,7 +30,10 @@
import org.codelutin.vcs.util.VCSEntriesImpl;
import javax.swing.ListSelectionModel;
+import javax.swing.table.TableModel;
+import javax.swing.table.TableRowSorter;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -53,14 +56,19 @@
/** displayed entries */
protected final transient List<VCSEntry> displayedEntries;
+ /** row sorter */
+ protected transient TableRowSorter<TableModel> rowSorter;
+
private static final long serialVersionUID = 4697917831388337369L;
+
protected AbstractVCSEntriesTableModel(String name, String[] columnNames) {
super();
this.name = name;
this.columnNames = columnNames;
this.displayedEntries = new ArrayList<VCSEntry>();
this.delegate = new VCSEntriesImpl();
+ this.rowSorter = new TableRowSorter<TableModel>(this);
}
public String getName() {
@@ -71,6 +79,10 @@
return location;
}
+ public TableRowSorter<TableModel> getRowSorter() {
+ return rowSorter;
+ }
+
public List<VCSEntry> getDisplayedEntries(ListSelectionModel selectionModel) {
return selectionModel == null ? new ArrayList<VCSEntry>(displayedEntries) : filter(selectionModel, displayedEntries);
}
@@ -115,6 +127,19 @@
return super.toString() + "<name:" + name + ", size:" + (getRowCount()) + '>';
}
+ public List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries) {
+ if (entries.isEmpty() || selectionModel.isSelectionEmpty()) {
+ return Collections.emptyList();
+ }
+ List<VCSEntry> list = new ArrayList<VCSEntry>();
+ for (int i = 0, max = entries.size(); i < max; i++) {
+ if (selectionModel.isSelectedIndex(i)) {
+ list.add(entries.get(rowSorter.convertRowIndexToModel(i)));
+ }
+ }
+ return list;
+ }
+
//===================================================================================================//
// === delegate methods =============================================================================//
//===================================================================================================//
@@ -139,10 +164,6 @@
return delegate.filter(state, entries);
}
- public List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries) {
- return delegate.filter(selectionModel, entries);
- }
-
public void populate(VCSConnexion connexion, long timestamp) throws VCSException {
delegate.populate(connexion, timestamp);
updateEntries();
@@ -194,6 +215,6 @@
if (row < -1 || row > displayedEntries.size() - 1) {
throw new IllegalArgumentException("index " + row + " is out of bound [0," + (displayedEntries.size() - 1) + "]");
}
- return displayedEntries.get(row);
+ return displayedEntries.get(rowSorter.convertRowIndexToModel(row));
}
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -31,6 +31,11 @@
*/
public class UIHelper {
+ /**
+ * Attach to <code>ui</code> an abort action,accessible by <code>ESC</code> key.
+ *
+ * @param ui ui
+ */
public static void setQuitAction(final JDialog ui) {
JRootPane rootPane = ui.getRootPane();
@@ -45,7 +50,13 @@
rootPane.getActionMap().put("quit", quitAction);
}
+ /**
+ * Prepare an table of VCSEntries.
+ *
+ * @param table table
+ */
public static void installVCSTableUI(JTable table) {
+ // attach renderer properties
table.putClientProperty("vcs.color.MODIFIED", new Color(0, 50, 160));
table.putClientProperty("vcs.color.OUT_OF_DATE_AND_MODIFIED", Color.RED);
table.putClientProperty("vcs.color.OUT_OF_DATE", new Color(10, 119, 0));
@@ -55,8 +66,10 @@
table.putClientProperty("vcs.color.IGNORED", new Color(114, 114, 56));
table.putClientProperty("vcs.color.REMOVED", new Color(97, 97, 97));
table.putClientProperty("vcs.color.MISSING", new Color(119, 56, 149));
-
+ // attach renderer to table
table.setDefaultRenderer(Object.class, VCSEntriesTableRenderer.get());
+ // attach row sorter to table
+ table.setRowSorter(((AbstractVCSEntriesTableModel) table.getModel()).getRowSorter());
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 19:52:14 UTC (rev 456)
@@ -1,4 +1,3 @@
-lutinvcs.accept=Accept
lutinvcs.action.add=Add
lutinvcs.action.commit=commit
lutinvcs.action.delete=delete
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 19:52:14 UTC (rev 456)
@@ -1,4 +1,3 @@
-lutinvcs.accept=Accepter
lutinvcs.action.add=Ajouter
lutinvcs.action.commit=committer
lutinvcs.action.delete=supprimer
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
@@ -19,8 +19,8 @@
<cell fill='both'/>
</row>
</Table>
- <JButton id='lastMessages' onActionPerformed='showLastMessages()'/>
<JSeparator orientation="vertical"/>
+ <JButton id='lastMessages' onActionPerformed='showLastMessages()'/>
<JButton id='help' onActionPerformed='doHelp()'/>
</JToolBar>
</cell>
@@ -38,7 +38,7 @@
</row>
<row>
<cell fill='both' weightx='1' weighty='1'>
- <JScrollPane id='content' styleClass='confirmScroll'>
+ <JScrollPane id='contentScroll' styleClass='confirmScroll'>
<JTable id="contentTable" styleClass='confirmTable'/>
</JScrollPane>
</cell>
@@ -46,7 +46,6 @@
<row>
<cell fill='both'>
<JButton id='accept' onActionPerformed='doAccept()'/>
- <!--JButton id='accept' text='lutinvcs.accept' onActionPerformed='doAccept()'/-->
</cell>
</row>
</Table>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
@@ -4,8 +4,6 @@
import static org.codelutin.vcs.type.VCSAction.*;
import static org.codelutin.vcs.type.VCSEntryLocation.*;
</script>
- <java.awt.CardLayout id='cardLayout'/>
-
<Table>
<row fill='both'>
<cell fill='both' weightx='1'>
@@ -33,17 +31,9 @@
</row>
<row fill='both'>
<cell fill='both'>
- <JPanel id='preview' layout='{cardLayout}'>
- <JScrollPane id='allContent' styleClass='diffScroll' constraints='"taball"' height='100'>
- <JTable id="allTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
- </JScrollPane>
- <JScrollPane id='localContent' styleClass='diffScroll' constraints='"tablocal"' height='100'>
- <JTable id="localTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
- </JScrollPane>
- <JScrollPane id='remoteContent' styleClass='diffScroll' constraints='"tabremote"' height='100'>
- <JTable id="remoteTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
- </JScrollPane>
- </JPanel>
+ <JScrollPane id='contentScroll' styleClass='diffScroll' height='100'>
+ <JTable id="contentTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
+ </JScrollPane>
</cell>
</row>
<row fill='both'>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
@@ -4,8 +4,7 @@
import static org.codelutin.vcs.type.VCSAction.*;
import static org.codelutin.vcs.type.VCSEntryLocation.*;
</script>
- <java.awt.CardLayout id='cardLayout'/>
- <JPopupMenu id="popup">
+ <JPopupMenu id="popup" invoker='{contentTable}'>
<JMenuItem id='refresh' text='lutinvcs.action.refresh' onActionPerformed='doAction(REFRESH,true)'/>
<JMenuItem id='diff' text='lutinvcs.action.diff' onActionPerformed='doAction(DIFF,true)'/>
<JSeparator/>
@@ -47,17 +46,9 @@
</row>
<row fill='both'>
<cell fill='both' weighty='1' weightx='2'>
- <JPanel id='preview' layout='{cardLayout}'>
- <JScrollPane id='allContent' styleClass='updateScroll' constraints='"taball"'>
- <JTable id="allTable" styleClass='updateTable'/>
- </JScrollPane>
- <JScrollPane id='localContent' styleClass='updateScroll' constraints='"tablocal"'>
- <JTable id="localTable" styleClass='updateTable'/>
- </JScrollPane>
- <JScrollPane id='remoteContent' styleClass='updateScroll' constraints='"tabremote"'>
- <JTable id="remoteTable" styleClass='updateTable'/>
- </JScrollPane>
- </JPanel>
+ <JScrollPane id='contentScroll' styleClass='updateScroll'>
+ <JTable id="contentTable" styleClass='updateTable'/>
+ </JScrollPane>
</cell>
</row>
</Table>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-11 19:52:14 UTC (rev 456)
@@ -47,7 +47,6 @@
.updateScroll {
verticalScrollBarPolicy: 20;
horizontalScrollBarPolicy: 31;
- visible: false;
}
.diffScroll {
@@ -252,5 +251,7 @@
#lastMessages {
toolTipText: "lutinvcs.action.tooltip.lastMessages";
icon: { createImageIcon( "recent_msgs.png" )
-};
+}
+
+;
}
\ No newline at end of file
1
0
[Buix-commits] r455 - in trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs: . util
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 19:47:08 +0000 (Fri, 11 Apr 2008)
New Revision: 455
Modified:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
Log:
no selectionmodel operation in this module (since we used in table some rwoSorter, we can not do selectionModel filter operation here).
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-11 06:42:57 UTC (rev 454)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-11 19:47:08 UTC (rev 455)
@@ -18,11 +18,10 @@
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.type.VCSState;
-import javax.swing.ListSelectionModel;
import java.util.List;
/**
- * Contract of list of VCSEntry
+ * Contract of list of VCSEntry.
*
* @author chemit
*/
@@ -132,15 +131,6 @@
List<VCSEntry> filter(VCSState state, List<VCSEntry> entries);
/**
- * obtain the list of all entries for a given selection model
- *
- * @param selectionModel filter from selection model
- * @param entries entries to filter
- * @return list of all entries for a given connexion
- */
- List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries);
-
- /**
* obtain the list of all entries for a given action
*
* @param action filter state
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-11 06:42:57 UTC (rev 454)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-11 19:47:08 UTC (rev 455)
@@ -22,11 +22,10 @@
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.type.VCSState;
-import javax.swing.ListSelectionModel;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
+import java.io.File;
/** @author chemit */
public class VCSEntriesImpl implements VCSEntries {
@@ -42,22 +41,22 @@
List<String> remoteFiles;
List<String> allFiles;
+ File directory = connexion.getWorkingCopy();
switch (location) {
-
case ALL:
- localFiles = connexion.getLocalStorageNames(connexion.getWorkingCopy());
- remoteFiles = transformToLocal(connexion.getRemoteStorageNames(connexion.getWorkingCopy()));
+ localFiles = connexion.getLocalStorageNames(directory);
+ remoteFiles = transformToLocal(connexion.getRemoteStorageNames(directory));
allFiles = connexion.getAllStorageNames(localFiles, remoteFiles);
populate(connexion, timestamp, VCSEntryLocation.LOCAL, localFiles);
populate(connexion, timestamp, VCSEntryLocation.REMOTE, remoteFiles);
populate(connexion, timestamp, VCSEntryLocation.ALL, allFiles);
break;
case LOCAL:
- localFiles = connexion.getLocalStorageNames(connexion.getWorkingCopy());
+ localFiles = connexion.getLocalStorageNames(directory);
populate(connexion, timestamp, VCSEntryLocation.LOCAL, localFiles);
break;
case REMOTE:
- remoteFiles = transformToLocal(connexion.getRemoteStorageNames(connexion.getWorkingCopy()));
+ remoteFiles = transformToLocal(connexion.getRemoteStorageNames(directory));
populate(connexion, timestamp, VCSEntryLocation.REMOTE, remoteFiles);
break;
case UNKNOW:
@@ -128,19 +127,6 @@
return result;
}
- public List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries) {
- if (entries.isEmpty() || selectionModel.isSelectionEmpty()) {
- return Collections.emptyList();
- }
- List<VCSEntry> list = new ArrayList<VCSEntry>();
- for (int i = 0, max = entries.size(); i < max; i++) {
- if (selectionModel.isSelectedIndex(i)) {
- list.add(entries.get(i));
- }
- }
- return list;
- }
-
public List<VCSEntry> filter(VCSAction action, List<VCSEntry> entries) {
List<VCSEntry> result = new ArrayList<VCSEntry>();
for (VCSEntry entry : entries) {
1
0
[Buix-commits] r454 - in trunk/lutinvcs: . lutinvcs-ui-jaxx
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 06:42:57 +0000 (Fri, 11 Apr 2008)
New Revision: 454
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
trunk/lutinvcs/pom.xml
Log:
use css
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-11 06:42:06 UTC (rev 453)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-11 06:42:57 UTC (rev 454)
@@ -37,7 +37,7 @@
</goals>
</execution>
<execution>
- <id>CopyGenJavaVersSrcBuild</id>
+ <id>CopyJava</id>
<phase>validate</phase>
<configuration>
<tasks>
@@ -57,10 +57,6 @@
<plugin>
<groupId>lutinplugin</groupId>
<artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${maven.src.dir}/main/uimodel</src>
- <out>${maven.src.dir}/main/java</out>
- </configuration>
<executions>
<execution>
<goals>
@@ -68,26 +64,15 @@
</goals>
</execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-ui-common</artifactId>
- <scope>compile</scope>
- <version>${current.version}</version>
- </dependency>
- </dependencies>
</plugin>
<plugin>
<groupId>lutinplugin</groupId>
<artifactId>maven-i18n-plugin</artifactId>
- <configuration>
- <defaultBasedir>${maven.src.dir}/main/uimodel</defaultBasedir>
- </configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
- <goal>parserJaxx</goal>
+ <goal>parserJava</goal>
<goal>gen</goal>
</goals>
</execution>
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-11 06:42:06 UTC (rev 453)
+++ trunk/lutinvcs/pom.xml 2008-04-11 06:42:57 UTC (rev 454)
@@ -124,6 +124,22 @@
<plugins>
<plugin>
<groupId>lutinplugin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${maven.src.dir}/main/uimodel</src>
+ <out>${maven.src.dir}/main/java</out>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-ui-common</artifactId>
+ <scope>compile</scope>
+ <version>${current.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>lutinplugin</groupId>
<artifactId>maven-i18n-plugin</artifactId>
<configuration>
<bundles>
1
0