Tutti-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
March 2013
- 5 participants
- 242 discussions
r605 - in trunk/tutti-ui-swing/src/main: java/fr/ifremer/tutti/ui/swing/content/operation java/fr/ifremer/tutti/ui/swing/content/operation/catches/species java/fr/ifremer/tutti/ui/swing/util java/fr/ifremer/tutti/ui/swing/util/editor resources/i18n
by kmorin@users.forge.codelutin.com 13 Mar '13
by kmorin@users.forge.codelutin.com 13 Mar '13
13 Mar '13
Author: kmorin
Date: 2013-03-13 11:22:34 +0100 (Wed, 13 Mar 2013)
New Revision: 605
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/605
Log:
- weight format
- java 6 compatibility
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryComponent.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/TuttiComputedOrNotDataEditorHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/TuttiComputedOrNotDataTableCell.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/VesselTableCell.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java 2013-03-13 10:07:29 UTC (rev 604)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java 2013-03-13 10:22:34 UTC (rev 605)
@@ -36,24 +36,24 @@
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.ui.swing.content.operation.catches.ComputeWeightsAction;
import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUI;
+import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIHandler;
import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIModel;
import fr.ifremer.tutti.ui.swing.content.operation.catches.SaveCatchBatchAction;
import fr.ifremer.tutti.ui.swing.content.operation.fishing.GearUseFeatureTabUI;
import fr.ifremer.tutti.ui.swing.content.operation.fishing.VesselUseFeatureTabUI;
import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.util.decorator.Decorator;
-
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JTabbedPane;
import java.awt.BorderLayout;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.Collections;
import java.util.List;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JTabbedPane;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.util.decorator.Decorator;
import static org.nuiton.i18n.I18n._;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryComponent.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryComponent.java 2013-03-13 10:07:29 UTC (rev 604)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryComponent.java 2013-03-13 10:22:34 UTC (rev 605)
@@ -24,7 +24,7 @@
* #L%
*/
-import jaxx.runtime.JAXXUtil;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
import jaxx.runtime.swing.editor.NumberEditor;
import org.nuiton.util.decorator.Decorator;
@@ -44,6 +44,7 @@
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.io.Serializable;
+import jaxx.runtime.JAXXUtil;
/**
* To render and edit a {@link SampleCategory}.
@@ -241,12 +242,12 @@
} else if (computedNumber != null) {
if (sampleCategory.hasOnlyOneFrequency()) {
- text += String.format("%.3f", computedNumber);
+ text += TuttiUIUtil.getWeightStringValue(computedNumber);
} else {
String color = Integer.toHexString(computedWeightColor.getRGB()).substring(2);
text += "<em style='color: #" + color + "'>" +
- String.format("%.3f", computedNumber) + "</em>";
+ TuttiUIUtil.getWeightStringValue(computedNumber) + "</em>";
}
} else {
text += "-";
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java 2013-03-13 10:07:29 UTC (rev 604)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java 2013-03-13 10:22:34 UTC (rev 605)
@@ -50,6 +50,8 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
import java.util.Date;
import static org.nuiton.i18n.I18n._;
@@ -200,10 +202,12 @@
return distanceText;
}
+ protected static DecimalFormat weightDecimalFormat = new DecimalFormat("0.0##");
+
public static String getWeightStringValue(Float weight) {
String textValue;
if (weight != null) {
- textValue = String.format("%.3f", weight);
+ textValue = weightDecimalFormat.format(weight);
} else {
textValue = JAXXUtil.getStringValue(weight);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/TuttiComputedOrNotDataEditorHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/TuttiComputedOrNotDataEditorHandler.java 2013-03-13 10:07:29 UTC (rev 604)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/TuttiComputedOrNotDataEditorHandler.java 2013-03-13 10:22:34 UTC (rev 605)
@@ -124,7 +124,7 @@
Number computedData = bean.getComputedData();
if (editor.isUseFloat()
&& decimalNumber != null && computedData != null) {
- String format = "#." + StringUtils.repeat("#", decimalNumber);
+ String format = "0.0" + StringUtils.repeat("#", decimalNumber - 1);
modelText = new DecimalFormat(format).format(computedData);
} else {
modelText = JAXXUtil.getStringValue(computedData);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/TuttiComputedOrNotDataTableCell.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/TuttiComputedOrNotDataTableCell.java 2013-03-13 10:07:29 UTC (rev 604)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/TuttiComputedOrNotDataTableCell.java 2013-03-13 10:22:34 UTC (rev 605)
@@ -220,7 +220,7 @@
foreground = computedDataColor;
if (useFloat && decimalNumber != null && dataValue != null) {
- String format = "#." + StringUtils.repeat("#", decimalNumber);
+ String format = "0.0" + StringUtils.repeat("#", decimalNumber - 1);
text = JAXXUtil.getStringValue(
new DecimalFormat(format).format(dataValue));
} else {
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/VesselTableCell.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/VesselTableCell.java 2013-03-13 10:07:29 UTC (rev 604)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/VesselTableCell.java 2013-03-13 10:22:34 UTC (rev 605)
@@ -147,7 +147,7 @@
private static final long serialVersionUID = 1L;
@Override
- public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
return super.getListCellRendererComponent(list, decorator.toString(value), index, isSelected, cellHasFocus);
}
}
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-13 10:07:29 UTC (rev 604)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-13 10:22:34 UTC (rev 605)
@@ -135,6 +135,7 @@
tutti.dialog.askSaveBeforeLeaving.saveProgram=
tutti.dialog.askSaveBeforeLeaving.saveProtocol=
tutti.dialog.askSaveBeforeLeaving.title=
+tutti.dialog.catches.species.split.weightNotNull.help=
tutti.dialog.catches.species.split.weightNotNull.message=
tutti.dialog.catches.species.split.weightNotNull.title=
tutti.dialog.computeWeights.replaceTotalSortedWeight.help=
1
0
See <http://ci.nuiton.org/jenkins/job/tutti/492/changes>
Changes:
[Tony Chemit] fixes #2129: [ERGO] Normalisation des commentaires dans les cellules
refs #2075: [TECH] Action longue (problème de cinématique) (toujours fermer le loading quand l'action est terminée)
------------------------------------------
[...truncated 342 lines...]
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ tutti-service ---
[INFO] Copying 1 resource
mojoSucceeded org.apache.maven.plugins:maven-resources-plugin:2.6(default-testResources)
mojoStarted org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-testCompile)[INFO] Compiling 2 source files to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/test-c…>
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ tutti-service ---
mojoSucceeded org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-testCompile)
mojoStarted org.apache.maven.plugins:maven-surefire-plugin:2.14(default-test)
[INFO]
[INFO] --- maven-surefire-plugin:2.14:test (default-test) @ tutti-service ---
[INFO] Surefire report directory: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportServiceTest
2013-03-13 10:33:02,685 0 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will export species to file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-13 10:33:02,709 24 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.protocol.SpeciesProtocol - fr.ifremer.tutti.service.protocol.SpeciesRow > [null] , will create a new default one.
2013-03-13 10:33:03,018 333 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will export all caracteristics to file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-13 10:33:03,035 350 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will import protocol [null] species from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-13 10:33:03,044 359 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.service.protocol.SpeciesRow - fr.ifremer.tutti.persistence.entities.protocol.SpeciesProtocol > [null] , will create a new default one.
2013-03-13 10:33:03,114 429 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will export all caracteristics to file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-13 10:33:03,118 433 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will import protocol caracteristic from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.74 sec
Running fr.ifremer.tutti.service.referential.TuttiReferentialImportExportServiceTest
2013-03-13 10:33:03,169 484 [main] INFO org.nuiton.util.converter.ConverterUtil - register converter org.nuiton.util.converter.URLConverter@190af581
2013-03-13 10:33:03,170 485 [main] INFO org.nuiton.util.converter.ConverterUtil - register converter org.nuiton.util.converter.URIConverter@1babb4d7
2013-03-13 10:33:03,173 488 [main] INFO org.nuiton.util.converter.ConverterUtil - register converter org.nuiton.util.converter.VersionConverter@37ba658a
2013-03-13 10:33:03,176 491 [main] INFO org.nuiton.util.converter.ConverterUtil - register converter org.nuiton.util.converter.LocaleConverter@2f79b905
2013-03-13 10:33:03,275 590 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-13 10:33:03,281 596 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-13 10:33:03,293 608 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-13 10:33:03,297 612 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-13 10:33:03,298 613 [main] INFO fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService - Will import persons from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-13 10:33:03,299 614 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.referential.Person - fr.ifremer.tutti.persistence.entities.referential.Person > [null] , will create a new default one.
2013-03-13 10:33:03,306 621 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-13 10:33:03,309 624 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-13 10:33:03,310 625 [main] INFO fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService - Will import vessels from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-13 10:33:03,333 648 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.referential.Vessel - fr.ifremer.tutti.persistence.entities.referential.Vessel > [null] , will create a new default one.
2013-03-13 10:33:03,338 653 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-13 10:33:03,342 657 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-13 10:33:03,350 665 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-13 10:33:03,353 668 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-13 10:33:03,359 674 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-13 10:33:03,362 677 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-13 10:33:03,370 685 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-13 10:33:03,373 688 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-13 10:33:03,374 689 [main] INFO fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService - Will import species from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-13 10:33:03,376 691 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.referential.Species - fr.ifremer.tutti.persistence.entities.referential.Species > [null] , will create a new default one.
2013-03-13 10:33:03,382 697 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-13 10:33:03,385 700 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-13 10:33:03,386 701 [main] INFO fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService - Will import gears from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-13 10:33:03,388 703 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.referential.Gear - fr.ifremer.tutti.persistence.entities.referential.Gear > [null] , will create a new default one.
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.247 sec
Results :
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0
mojoSucceeded org.apache.maven.plugins:maven-surefire-plugin:2.14(default-test)
[JENKINS] Recording test results
mojoStarted org.apache.maven.plugins:maven-jar-plugin:2.4(default-jar)
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ tutti-service ---
[INFO] Building jar: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/tutti-…>
mojoSucceeded org.apache.maven.plugins:maven-jar-plugin:2.4(default-jar)
mojoStarted org.apache.maven.plugins:maven-site-plugin:3.2(attach-descriptor)
[INFO]
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ tutti-service ---
mojoSucceeded org.apache.maven.plugins:maven-site-plugin:3.2(attach-descriptor)
mojoStarted org.apache.maven.plugins:maven-install-plugin:2.4(default-install)
[INFO]
[INFO] Installing <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/tutti-…> to /var/local/maven/data/repository/fr/ifremer/tutti/tutti-service/1.1-SNAPSHOT/tutti-service-1.1-SNAPSHOT.jar
[INFO] --- maven-install-plugin:2.4:install (default-install) @ tutti-service ---
[INFO] Installing <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/pom.xml> to /var/local/maven/data/repository/fr/ifremer/tutti/tutti-service/1.1-SNAPSHOT/tutti-service-1.1-SNAPSHOT.pom
mojoSucceeded org.apache.maven.plugins:maven-install-plugin:2.4(default-install)
projectSucceeded fr.ifremer.tutti:tutti-service:1.1-SNAPSHOT
projectStarted fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tutti :: UI 1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 50.3 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma… (2 KB at 40.2 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/2.5.14-…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/2.…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/2.5.14-… (808 B at 23.9 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/2.… (808 B at 24.7 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/nuiton-valid…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/nuiton-…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/nuiton-… (2 KB at 67.6 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/nuiton-valid… (2 KB at 57.0 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ru…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 45.2 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ru… (2 KB at 26.5 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 46.7 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co… (2 KB at 40.0 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 45.2 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi… (2 KB at 41.2 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 59.7 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va… (2 KB at 52.0 KB/sec)
mojoStarted org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)
[INFO] Deleting <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target>
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tutti-ui-swing ---
mojoSucceeded org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)
mojoStarted org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (check-project-files) @ tutti-ui-swing ---
mojoSucceeded org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
mojoStarted org.nuiton.jaxx:jaxx-maven-plugin:2.5.14-SNAPSHOT(default)
[INFO]
[INFO] --- jaxx-maven-plugin:2.5.14-SNAPSHOT:generate (default) @ tutti-ui-swing ---
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 43.9 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co… (2 KB at 39.0 KB/sec)
[INFO] use project compile scope class-path
[INFO] Detects 27 modified jaxx file(s).
ERROR [pool-1-thread-1] (TagManager.java:481) getTagHandler - java.lang.ClassNotFoundException: fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI
ERROR [pool-1-thread-1] (TagManager.java:481) getTagHandler - java.lang.ClassNotFoundException: fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI
ERROR [pool-1-thread-1] (JAXXEngine.java:366) run - unable to find CompiledObject associated with tag <JPopupMenu>; should have been registered before second pass
java.lang.IllegalStateException: unable to find CompiledObject associated with tag <JPopupMenu>; should have been registered before second pass
at jaxx.compiler.tags.DefaultObjectHandler.compileSecondPass(DefaultObjectHandler.java:475)
at jaxx.compiler.tags.DefaultComponentHandler.compileSecondPass(DefaultComponentHandler.java:150)
at jaxx.compiler.JAXXCompiler.compileSecondPass(JAXXCompiler.java:644)
at jaxx.compiler.tags.DefaultObjectHandler.compileChildTagSecondPass(DefaultObjectHandler.java:1320)
at jaxx.compiler.tags.DefaultObjectHandler.compileChildrenSecondPass(DefaultObjectHandler.java:1285)
at jaxx.compiler.tags.DefaultObjectHandler.compileSecondPass(DefaultObjectHandler.java:498)
at jaxx.compiler.tags.DefaultComponentHandler.compileSecondPass(DefaultComponentHandler.java:150)
at jaxx.compiler.JAXXCompiler.compileSecondPass(JAXXCompiler.java:644)
at jaxx.compiler.JAXXCompiler.compileSecondPass(JAXXCompiler.java:675)
at jaxx.compiler.tasks.CompileSecondPassTask.perform(CompileSecondPassTask.java:81)
at jaxx.compiler.JAXXEngine.run(JAXXEngine.java:352)
at org.nuiton.jaxx.plugin.GenerateMojo.doAction(GenerateMojo.java:511)
at org.nuiton.plugin.AbstractPlugin.execute(AbstractPlugin.java:132)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
[ERROR] JAXX detects 2 errors :
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:1
: Internal error: missing TagHandler for 'fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI'
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:80
: Could not find a Java class corresponding to: <LongTextEditorUI>
mojoFailed org.nuiton.jaxx:jaxx-maven-plugin:2.5.14-SNAPSHOT(default)
projectFailed fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT
sessionEnded
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Tutti ............................................. SUCCESS [14.806s]
[INFO] Tutti :: Persistence .............................. SUCCESS [28.002s]
[INFO] Tutti :: Service .................................. SUCCESS [3.891s]
[INFO] Tutti :: UI ....................................... FAILURE [16.534s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:06.140s
[INFO] Finished at: Wed Mar 13 10:33:20 CET 2013
[INFO] Final Memory: 43M/146M
[INFO] ------------------------------------------------------------------------
Projects to build: [MavenProject: fr.ifremer:tutti:1.1-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/pom.xml,> MavenProject: fr.ifremer.tutti:tutti-persistence:1.1-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/pom.xml,> MavenProject: fr.ifremer.tutti:tutti-service:1.1-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/pom.xml,> MavenProject: fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/pom.xml]>
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-service/builds/2013-03-13_10-32-08/archive/fr.ifremer.tutti/tutti-service/1.1-SNAPSHOT/tutti-service-1.1-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/tutti-…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-service/builds/2013-03-13_10-32-08/archive/fr.ifremer.tutti/tutti-service/1.1-SNAPSHOT/tutti-service-1.1-SNAPSHOT.jar
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-ui-swing/builds/2013-03-13_10-32-08/archive/fr.ifremer.tutti/tutti-ui-swing/1.1-SNAPSHOT/tutti-ui-swing-1.1-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer$tutti/builds/2013-03-13_10-32-08/archive/fr.ifremer/tutti/1.1-SNAPSHOT/tutti-1.1-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/target/tutti-1.1-SNAPSHOT-s…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer$tutti/builds/2013-03-13_10-32-08/archive/fr.ifremer/tutti/1.1-SNAPSHOT/tutti-1.1-SNAPSHOT-site_fr.xml
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-persistence/builds/2013-03-13_10-32-08/archive/fr.ifremer.tutti/tutti-persistence/1.1-SNAPSHOT/tutti-persistence-1.1-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/target/tu…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-persistence/builds/2013-03-13_10-32-08/archive/fr.ifremer.tutti/tutti-persistence/1.1-SNAPSHOT/tutti-persistence-1.1-SNAPSHOT.jar
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.nuiton.jaxx:jaxx-maven-plugin:2.5.14-SNAPSHOT:generate (default) on project tutti-ui-swing: Aborting due to errors reported by jaxxc
cause : Aborting due to errors reported by jaxxc
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.nuiton.jaxx:jaxx-maven-plugin:2.5.14-SNAPSHOT:generate (default) on project tutti-ui-swing: Aborting due to errors reported by jaxxc
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.maven.plugin.MojoExecutionException: Aborting due to errors reported by jaxxc
at org.nuiton.jaxx.plugin.GenerateMojo.doAction(GenerateMojo.java:517)
at org.nuiton.plugin.AbstractPlugin.execute(AbstractPlugin.java:132)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 27 more
Sending e-mails to: tutti-commits(a)list.forge.codelutin.com chemit(a)codelutin.com
channel stopped
1
2
13 Mar '13
See <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/492/…>
Changes:
[Tony Chemit] fixes #2129: [ERGO] Normalisation des commentaires dans les cellules
refs #2075: [TECH] Action longue (problème de cinématique) (toujours fermer le loading quand l'action est terminée)
------------------------------------------
projectStarted fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tutti :: UI 1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 50.3 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma… (2 KB at 40.2 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/2.5.14-…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/2.…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/2.5.14-… (808 B at 23.9 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/2.… (808 B at 24.7 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/nuiton-valid…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/nuiton-…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/nuiton-… (2 KB at 67.6 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/nuiton-valid… (2 KB at 57.0 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ru…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 45.2 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ru… (2 KB at 26.5 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 46.7 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co… (2 KB at 40.0 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 45.2 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi… (2 KB at 41.2 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 59.7 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va… (2 KB at 52.0 KB/sec)
mojoStarted org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)
[INFO] Deleting <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tutti-ui-swing ---
mojoSucceeded org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)
mojoStarted org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (check-project-files) @ tutti-ui-swing ---
mojoSucceeded org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
mojoStarted org.nuiton.jaxx:jaxx-maven-plugin:2.5.14-SNAPSHOT(default)
[INFO]
[INFO] --- jaxx-maven-plugin:2.5.14-SNAPSHOT:generate (default) @ tutti-ui-swing ---
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 43.9 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co… (2 KB at 39.0 KB/sec)
[INFO] use project compile scope class-path
[INFO] Detects 27 modified jaxx file(s).
ERROR [pool-1-thread-1] (TagManager.java:481) getTagHandler - java.lang.ClassNotFoundException: fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI
ERROR [pool-1-thread-1] (TagManager.java:481) getTagHandler - java.lang.ClassNotFoundException: fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI
ERROR [pool-1-thread-1] (JAXXEngine.java:366) run - unable to find CompiledObject associated with tag <JPopupMenu>; should have been registered before second pass
java.lang.IllegalStateException: unable to find CompiledObject associated with tag <JPopupMenu>; should have been registered before second pass
at jaxx.compiler.tags.DefaultObjectHandler.compileSecondPass(DefaultObjectHandler.java:475)
at jaxx.compiler.tags.DefaultComponentHandler.compileSecondPass(DefaultComponentHandler.java:150)
at jaxx.compiler.JAXXCompiler.compileSecondPass(JAXXCompiler.java:644)
at jaxx.compiler.tags.DefaultObjectHandler.compileChildTagSecondPass(DefaultObjectHandler.java:1320)
at jaxx.compiler.tags.DefaultObjectHandler.compileChildrenSecondPass(DefaultObjectHandler.java:1285)
at jaxx.compiler.tags.DefaultObjectHandler.compileSecondPass(DefaultObjectHandler.java:498)
at jaxx.compiler.tags.DefaultComponentHandler.compileSecondPass(DefaultComponentHandler.java:150)
at jaxx.compiler.JAXXCompiler.compileSecondPass(JAXXCompiler.java:644)
at jaxx.compiler.JAXXCompiler.compileSecondPass(JAXXCompiler.java:675)
at jaxx.compiler.tasks.CompileSecondPassTask.perform(CompileSecondPassTask.java:81)
at jaxx.compiler.JAXXEngine.run(JAXXEngine.java:352)
at org.nuiton.jaxx.plugin.GenerateMojo.doAction(GenerateMojo.java:511)
at org.nuiton.plugin.AbstractPlugin.execute(AbstractPlugin.java:132)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
[ERROR] JAXX detects 2 errors :
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:1
: Internal error: missing TagHandler for 'fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI'
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:80
: Could not find a Java class corresponding to: <LongTextEditorUI>
mojoFailed org.nuiton.jaxx:jaxx-maven-plugin:2.5.14-SNAPSHOT(default)
projectFailed fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT
1
2
13 Mar '13
Author: tchemit
Date: 2013-03-13 11:07:29 +0100 (Wed, 13 Mar 2013)
New Revision: 604
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/604
Log:
fixes #2129: [ERGO] Normalisation des commentaires dans les cellules (fix build)
Modified:
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/FishingOperationPersistenceServiceImpl.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/FishingOperationPersistenceServiceImpl.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/FishingOperationPersistenceServiceImpl.java 2013-03-13 09:47:39 UTC (rev 603)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/FishingOperationPersistenceServiceImpl.java 2013-03-13 10:07:29 UTC (rev 604)
@@ -997,7 +997,7 @@
* @return null the latitude to store in database (could not be null)
*/
protected Float convertUI2DatabaseMandatoryLatitude(Float databaseValue) {
- return (databaseValue != null) ? databaseValue : DEFAULT_EMPTY_LATITUDE;
+ return databaseValue != null ? databaseValue : DEFAULT_EMPTY_LATITUDE;
}
/**
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.jaxx 2013-03-13 09:47:39 UTC (rev 603)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.jaxx 2013-03-13 10:07:29 UTC (rev 604)
@@ -30,8 +30,6 @@
fr.ifremer.tutti.ui.swing.TuttiUIContext
fr.ifremer.tutti.ui.swing.util.TuttiUI
- fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI
-
jaxx.runtime.swing.editor.NumberEditor
org.jdesktop.swingx.JXTable
@@ -64,8 +62,6 @@
<TuttiHelpBroker id='broker'
constructorParams='"tuttihelp.editAccidentalBatch.help"'/>
- <LongTextEditorUI id='longTextEditor'/>
-
<JScrollPane id='tableScrollPane' constraints='BorderLayout.CENTER'>
<JXTable id='table' onFocusLost='handler.saveSelectedRowIfRequired(event)'/>
</JScrollPane>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUI.jaxx 2013-03-13 09:47:39 UTC (rev 603)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUI.jaxx 2013-03-13 10:07:29 UTC (rev 604)
@@ -29,8 +29,6 @@
fr.ifremer.tutti.ui.swing.TuttiHelpBroker
fr.ifremer.tutti.ui.swing.util.TuttiUI
- fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI
-
jaxx.runtime.swing.editor.NumberEditor
org.jdesktop.swingx.JXTable
@@ -75,10 +73,6 @@
<TuttiHelpBroker id='broker'
constructorParams='"tuttihelp.editBenthosBatch.help"'/>
- <LongTextEditorUI id='longTextEditor'/>
-
- <!--<AttachmentEditorUI id='attachmentEditor'/>-->
-
<Table id='form' fill='both' constraints='BorderLayout.NORTH'>
<!-- Poids total / Poids total vrac -->
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchUI.jaxx 2013-03-13 09:47:39 UTC (rev 603)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchUI.jaxx 2013-03-13 10:07:29 UTC (rev 604)
@@ -30,8 +30,6 @@
fr.ifremer.tutti.ui.swing.TuttiUIContext
fr.ifremer.tutti.ui.swing.util.TuttiUI
- fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI
-
jaxx.runtime.swing.editor.NumberEditor
org.jdesktop.swingx.JXTable
@@ -69,8 +67,6 @@
<TuttiHelpBroker id='broker'
constructorParams='"tuttihelp.editMacroWasteBatch.help"'/>
- <LongTextEditorUI id='longTextEditor'/>
-
<Table id='form' fill='both' constraints='BorderLayout.NORTH'>
<!-- Poids total -->
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchUI.jaxx 2013-03-13 09:47:39 UTC (rev 603)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchUI.jaxx 2013-03-13 10:07:29 UTC (rev 604)
@@ -29,7 +29,6 @@
fr.ifremer.tutti.ui.swing.TuttiHelpBroker
fr.ifremer.tutti.ui.swing.TuttiUIContext
fr.ifremer.tutti.ui.swing.util.TuttiUI
- fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI
jaxx.runtime.swing.editor.NumberEditor
@@ -70,8 +69,6 @@
<TuttiHelpBroker id='broker'
constructorParams='"tuttihelp.editPlanktonBatch.help"'/>
- <LongTextEditorUI id='longTextEditor'/>
-
<Table id='form' fill='both' constraints='BorderLayout.NORTH'>
<!-- Poids total -->
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2013-03-13 09:47:39 UTC (rev 603)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2013-03-13 10:07:29 UTC (rev 604)
@@ -29,7 +29,6 @@
fr.ifremer.tutti.ui.swing.TuttiHelpBroker
fr.ifremer.tutti.ui.swing.util.TuttiUI
fr.ifremer.tutti.ui.swing.util.attachment.ButtonAttachment
- fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI
fr.ifremer.tutti.ui.swing.util.editor.TuttiComputedOrNotDataEditor
org.jdesktop.swingx.JXTable
@@ -77,8 +76,6 @@
constructorParams='getHandler().getContext(), getModel()'/>
</JToolBar>
- <LongTextEditorUI id='longTextEditor'/>
-
<JPopupMenu id='tablePopup'>
<!--onPopupMenuWillBecomeVisible='handler.updateTablePopup()'>-->
<JMenuItem id='splitSpeciesBatchMenu'
1
0
r603 - in trunk/tutti-ui-swing/src/main: java/fr/ifremer/tutti/ui/swing/content/operation/catches java/fr/ifremer/tutti/ui/swing/content/operation/catches/species resources/i18n
by kmorin@users.forge.codelutin.com 13 Mar '13
by kmorin@users.forge.codelutin.com 13 Mar '13
13 Mar '13
Author: kmorin
Date: 2013-03-13 10:47:39 +0100 (Wed, 13 Mar 2013)
New Revision: 603
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/603
Log:
dialog format
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java 2013-03-13 09:20:00 UTC (rev 602)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java 2013-03-13 09:47:39 UTC (rev 603)
@@ -25,12 +25,14 @@
* #L%
*/
+import com.sun.org.apache.bcel.internal.generic.GETSTATIC;
import fr.ifremer.tutti.TuttiBusinessException;
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SampleCategory;
import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchRowModel;
import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchUI;
import fr.ifremer.tutti.ui.swing.content.operation.catches.species.frequency.SpeciesFrequencyRowModel;
+import fr.ifremer.tutti.ui.swing.util.AbstractTuttiUIHandler;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
import org.apache.commons.collections.CollectionUtils;
@@ -165,12 +167,17 @@
// du "Poids total Vrac trié", demander confirmation que
// le "Poids total VRAC" est bien une valeur observée
// sinon la remplacer par le "Poids total Vrac trié"
+ String htmlMessage = String.format(
+ AbstractTuttiUIHandler.CONFIRMATION_FORMAT,
+ _("tutti.action.computeWeights.replaceTotalSortedWeight.message", rate),
+ _("tutti.action.computeWeights.replaceTotalSortedWeight.help"));
+
int answer = JOptionPane.showConfirmDialog(getContext().getActionUI(),
- _("tutti.action.computeWeights.replaceTotalSortedWeight.message", rate),
+ htmlMessage,
_("tutti.action.computeWeights.replaceTotalSortedWeight.title"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
-
+
if (answer == JOptionPane.NO_OPTION) {
model.setSpeciesTotalSortedWeight(null);
speciesTotalSortedWeight = totalSortedWeight;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-03-13 09:20:00 UTC (rev 602)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-03-13 09:47:39 UTC (rev 603)
@@ -766,9 +766,13 @@
boolean split = true;
if (parentBatch.getWeight() != null) {
+ String htmlMessage = String.format(
+ CONFIRMATION_FORMAT,
+ _("tutti.dialog.catches.species.split.weightNotNull.message"),
+ _("tutti.dialog.catches.species.split.weightNotNull.help"));
int i = JOptionPane.showConfirmDialog(
- ui,
- _("tutti.dialog.catches.species.split.weightNotNull.message"),
+ getTopestUI(),
+ htmlMessage,
_("tutti.dialog.catches.species.split.weightNotNull.title"),
JOptionPane.OK_CANCEL_OPTION);
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-13 09:20:00 UTC (rev 602)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-13 09:47:39 UTC (rev 603)
@@ -37,6 +37,7 @@
tutti.action.computeWeights.error.incoherentSpeciesTotalSorted=
tutti.action.computeWeights.error.incoherentTotal=
tutti.action.computeWeights.error.noWeight=
+tutti.action.computeWeights.replaceTotalSortedWeight.help=
tutti.action.computeWeights.replaceTotalSortedWeight.message=
tutti.action.computeWeights.replaceTotalSortedWeight.title=
tutti.action.configuration=
@@ -136,6 +137,9 @@
tutti.dialog.askSaveBeforeLeaving.title=
tutti.dialog.catches.species.split.weightNotNull.message=
tutti.dialog.catches.species.split.weightNotNull.title=
+tutti.dialog.computeWeights.replaceTotalSortedWeight.help=
+tutti.dialog.computeWeights.replaceTotalSortedWeight.message=
+tutti.dialog.computeWeights.replaceTotalSortedWeight.title=
tutti.dialog.createMelag.error.message=
tutti.dialog.createMelag.error.title=
tutti.dialog.createMelag.message=
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-13 09:20:00 UTC (rev 602)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-13 09:47:39 UTC (rev 603)
@@ -43,7 +43,8 @@
tutti.action.computeWeights.error.incoherentTotal=Le poids total de la capture ne correspond pas à la somme des poids totaux Vrac, Hors Vrac et non triés
tutti.action.computeWeights.error.incoherentTotal.title=Incohérence
tutti.action.computeWeights.error.noWeight=Un lot n'a pas de poids
-tutti.action.computeWeights.replaceTotalSortedWeight.message=Le Poids total VRAC saisi est supérieur de moins de %s%% au Poids total Vrac trié.%nEst-ce bien une valeur observée ? Si non, la valeur sera remplacée par le poids calculé.
+tutti.action.computeWeights.replaceTotalSortedWeight.help=Est-ce bien une valeur observée ?<ul><li><strong>Non</strong> pour remplacer la valeur saisie par le poids calculé</li><li><strong>Oui</strong> pour garder la valeur saisie</li></ul>.
+tutti.action.computeWeights.replaceTotalSortedWeight.message=Le Poids total VRAC saisi est supérieur de moins de %s%% au Poids total Vrac trié.
tutti.action.computeWeights.replaceTotalSortedWeight.title=Poids total VRAC peu différent du Poids total Vrac trié
tutti.action.configuration=Configuration
tutti.action.createMelag=Èspèces d'un MELAG
@@ -129,13 +130,13 @@
tutti.dialog.askCancelEditBeforeLeaving.cancelSaveCruise=La campagne n'est pas valide et ne peut pas être enregistrée.
tutti.dialog.askCancelEditBeforeLeaving.cancelSaveProgram=La série de campagne n'est pas valide et ne peut pas être enregistrée.
tutti.dialog.askCancelEditBeforeLeaving.cancelSaveProtocol=Le protocole n'est pas valide et ne peut pas être enregistré.
-tutti.dialog.askCancelEditBeforeLeaving.help=Que voulez-vous faire ?<ul><li><strong>Annuler</strong> pour rester sur cet écran<li><strong>OK</strong> pour quitter l'écran en abandonnant les modifications</ul>
+tutti.dialog.askCancelEditBeforeLeaving.help=Que voulez-vous faire ?<ul><li><strong>Annuler</strong> pour rester sur cet écran</li><li><strong>OK</strong> pour quitter l'écran en abandonnant les modifications</li></ul>
tutti.dialog.askCancelEditBeforeLeaving.title=Modifications non enregistrées mais invalides
-tutti.dialog.askOverwriteFile.help=Que voulez-vous faire ?<ul><li><strong>Annuler</strong> pour ne pas écraser le fichier et annuler l'opération<li><strong>Oui</strong> pour écraser le fichier et continuer l'opération</ul>
+tutti.dialog.askOverwriteFile.help=Que voulez-vous faire ?<ul><li><strong>Annuler</strong> pour ne pas écraser le fichier et annuler l'opération</li><li><strong>Oui</strong> pour écraser le fichier et continuer l'opération</li></ul>
tutti.dialog.askOverwriteFile.message=Le fichier %s existe déjà, confirmer pour l'écraser.
tutti.dialog.askOverwriteFile.title=Confirmer l'écrasement d'un fichier...
tutti.dialog.askSaveBeforeLeaving.createFishingOperation=Le trait n'a pas été créé.
-tutti.dialog.askSaveBeforeLeaving.help=Que voulez-vous faire?<ul><li><strong>Annuler</strong> pour rester sur cet écran<li><strong>Non</strong> pour quitter l'écran en abandonnant les modifications en cours<li><strong>Oui</strong> pour quitter l'écran après enregistrement des modifications</ul>
+tutti.dialog.askSaveBeforeLeaving.help=Que voulez-vous faire?<ul><li><strong>Annuler</strong> pour rester sur cet écran</li><li><strong>Non</strong> pour quitter l'écran en abandonnant les modifications en cours</li><li><strong>Oui</strong> pour quitter l'écran après enregistrement des modifications</li></ul>
tutti.dialog.askSaveBeforeLeaving.saveCatchBatch=Des modifications sur la capture n'ont pas été enregistrées.
tutti.dialog.askSaveBeforeLeaving.saveCruise=Des modifications sur la campagne n'ont pas été enregistrées.
tutti.dialog.askSaveBeforeLeaving.saveFishingOperation=Des modifications sur le trait n'ont pas été enregistrées.
@@ -144,7 +145,8 @@
tutti.dialog.askSaveBeforeLeaving.title=Modifications non enregistrées
tutti.dialog.catches.species.computeWeight.error.message=Erreur lors de l'élévation des poids
tutti.dialog.catches.species.computeWeight.error.title=Erreur
-tutti.dialog.catches.species.split.weightNotNull.message=Pour catégoriser un lot, il ne doit pas avoir de poids sous-échantillonné. Catégoriser le lot mettra le poids sous-échantillonné à nul.
+tutti.dialog.catches.species.split.weightNotNull.help=Que voulez-vous faire ? <ul><li><strong>Annuler</strong> pour ne pas catégoriser le lot et garder le poids sous-échantilloné</li><li><strong>OK</strong> pour catégoriser le lot et supprimer le poids sous-échantillonné</li></ul>.
+tutti.dialog.catches.species.split.weightNotNull.message=Pour catégoriser un lot, il ne doit pas avoir de poids sous-échantillonné.
tutti.dialog.catches.species.split.weightNotNull.title=Poids sous-échantillonné non nul
tutti.dialog.createMelag.error.message=Erreur à la ligne %s
tutti.dialog.createMelag.error.title=Erreur
1
0
13 Mar '13
Author: tchemit
Date: 2013-03-13 10:20:00 +0100 (Wed, 13 Mar 2013)
New Revision: 602
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/602
Log:
fixes #2129: [ERGO] Normalisation des commentaires dans les cellules
refs #2075: [TECH] Action longue (probl?\195?\168me de cin?\195?\169matique) (toujours fermer le loading quand l'action est termin?\195?\169e)
Added:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/ButtonComment.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellEditor.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellRenderer.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentModelAware.java
Removed:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextCellComponent.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUIHandler.java
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchRowModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchTableModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchRowModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchRowModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchTableModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchRowModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchTableModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/AbstractTuttiAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/TuttiActionSwingWorker.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/TuttiUIAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/ButtonAttachment.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchRowModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchRowModel.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchRowModel.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -24,13 +24,18 @@
* #L%
*/
+import com.google.common.collect.Lists;
import fr.ifremer.tutti.persistence.entities.data.AccidentalBatch;
+import fr.ifremer.tutti.persistence.entities.data.AttachementObjectTypeEnum;
import fr.ifremer.tutti.persistence.entities.data.Attachment;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel;
+import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentModelAware;
import org.nuiton.util.beans.Binder;
import org.nuiton.util.beans.BinderFactory;
+import java.util.Collection;
import java.util.List;
/**
@@ -39,7 +44,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
*/
-public class AccidentalBatchRowModel extends AbstractTuttiBeanUIModel<AccidentalBatch, AccidentalBatchRowModel> {
+public class AccidentalBatchRowModel extends AbstractTuttiBeanUIModel<AccidentalBatch, AccidentalBatchRowModel> implements AttachmentModelAware, CommentModelAware {
private static final long serialVersionUID = 1L;
@@ -47,10 +52,6 @@
public static final String PROPERTY_WEIGHT = "weight";
- public static final String PROPERTY_COMMENT = "comment";
-
- public static final String PROPERTY_ATTACHMENTS = "attachments";
-
/**
* Species observed.
*
@@ -66,18 +67,18 @@
protected Float weight;
/**
- * Comment on this catches.
+ * Comment.
*
* @since 0.2
*/
protected String comment;
/**
- * Attachments
+ * Attachments.
*
* @since 0.2
*/
- protected List<Attachment> attachments;
+ protected List<Attachment> attachment = Lists.newArrayList();
protected static final Binder<AccidentalBatch, AccidentalBatchRowModel> fromBeanBinder =
BinderFactory.newBinder(AccidentalBatch.class,
@@ -116,23 +117,62 @@
firePropertyChange(PROPERTY_WEIGHT, oldValue, weight);
}
+ //------------------------------------------------------------------------//
+ //-- CommentModelAware --//
+ //------------------------------------------------------------------------//
+
+ @Override
public String getComment() {
return comment;
}
+ @Override
public void setComment(String comment) {
Object oldValue = getComment();
this.comment = comment;
firePropertyChange(PROPERTY_COMMENT, oldValue, comment);
}
- public List<Attachment> getAttachments() {
- return attachments;
+ //------------------------------------------------------------------------//
+ //-- AttachmentModelAware --//
+ //------------------------------------------------------------------------//
+
+ @Override
+ public AttachementObjectTypeEnum getObjectType() {
+ return AttachementObjectTypeEnum.SAMPLE;
}
- public void setAttachments(List<Attachment> attachments) {
- Object oldValue = getAttachments();
- this.attachments = attachments;
- firePropertyChange(PROPERTY_ATTACHMENTS, oldValue, attachments);
+ @Override
+ public String getObjectId() {
+ return getId();
}
+
+ @Override
+ public List<Attachment> getAttachment() {
+ return attachment;
+ }
+
+ @Override
+ public void addAllAttachment(Collection<Attachment> attachments) {
+ this.attachment.addAll(attachments);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
+
+ @Override
+ public void addAttachment(Attachment attachment) {
+ this.attachment.add(attachment);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
+
+ @Override
+ public void removeAllAttachment(Collection<Attachment> attachments) {
+ this.attachment.removeAll(attachments);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
+
+ @Override
+ public void removeAttachment(Attachment attachment) {
+ this.attachment.remove(attachment);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchTableModel.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchTableModel.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -59,8 +59,8 @@
n_("tutti.table.accidental.batch.header.comment"),
n_("tutti.table.accidental.batch.header.comment"));
- public static final ColumnIdentifier<AccidentalBatchRowModel> ATTACHMENTS = ColumnIdentifier.newId(
- AccidentalBatchRowModel.PROPERTY_ATTACHMENTS,
+ public static final ColumnIdentifier<AccidentalBatchRowModel> ATTACHMENT = ColumnIdentifier.newId(
+ AccidentalBatchRowModel.PROPERTY_ATTACHMENT,
n_("tutti.table.accidental.batch.header.file"),
n_("tutti.table.accidental.batch.header.file"));
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIHandler.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIHandler.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -36,7 +36,8 @@
import fr.ifremer.tutti.ui.swing.util.TuttiUI;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellEditor;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellRenderer;
-import fr.ifremer.tutti.ui.swing.util.editor.LongTextCellComponent;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellEditor;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellRenderer;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -46,8 +47,6 @@
import java.util.List;
-import static org.nuiton.i18n.I18n.n_;
-
/**
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
@@ -237,8 +236,8 @@
{ // Comment column
addColumnToModel(columnModel,
- LongTextCellComponent.newEditor(ui.getLongTextEditor()),
- LongTextCellComponent.newRender(n_("tutti.tooltip.comment.none")),
+ CommentCellEditor.newEditor(ui),
+ CommentCellRenderer.newRender(),
AccidentalBatchTableModel.COMMENT);
}
@@ -246,11 +245,9 @@
Decorator<Attachment> decorator = getDecorator(Attachment.class, null);
addColumnToModel(columnModel,
- AttachmentCellEditor.newEditor(
- ui
- ),
+ AttachmentCellEditor.newEditor(ui),
AttachmentCellRenderer.newRender(decorator),
- AccidentalBatchTableModel.ATTACHMENTS);
+ AccidentalBatchTableModel.ATTACHMENT);
}
// create table model
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchRowModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchRowModel.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchRowModel.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -31,6 +31,7 @@
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentModelAware;
import org.apache.commons.collections.CollectionUtils;
import org.nuiton.util.beans.Binder;
import org.nuiton.util.beans.BinderFactory;
@@ -44,7 +45,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
*/
-public class BenthosBatchRowModel extends AbstractTuttiBeanUIModel<SpeciesBatch, BenthosBatchRowModel> implements AttachmentModelAware {
+public class BenthosBatchRowModel extends AbstractTuttiBeanUIModel<SpeciesBatch, BenthosBatchRowModel> implements AttachmentModelAware, CommentModelAware {
private static final long serialVersionUID = 1L;
@@ -58,10 +59,8 @@
public static final String PROPERTY_SAMPLE_WEIGHT = "sampleWeight";
- public static final String PROPERTY_COMMENT = "comment";
+// public static final String PROPERTY_ATTACHMENTS = "attachments";
- public static final String PROPERTY_ATTACHMENTS = "attachments";
-
public static final String PROPERTY_PARENT_BATCH = "parentBatch";
public static final String PROPERTY_CHILD_BATCH = "childBatch";
@@ -108,7 +107,7 @@
/**
- * Comment on this catches.
+ * Comment.
*
* @since 0.2
*/
@@ -238,10 +237,16 @@
firePropertyChange(PROPERTY_NUMBER, oldValue, number);
}
+ //------------------------------------------------------------------------//
+ //-- CommentModelAware --//
+ //------------------------------------------------------------------------//
+
+ @Override
public String getComment() {
return comment;
}
+ @Override
public void setComment(String comment) {
Object oldValue = getComment();
this.comment = comment;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -36,7 +36,8 @@
import fr.ifremer.tutti.ui.swing.util.TuttiUI;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellEditor;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellRenderer;
-import fr.ifremer.tutti.ui.swing.util.editor.LongTextCellComponent;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellEditor;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellRenderer;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -46,8 +47,6 @@
import java.util.List;
-import static org.nuiton.i18n.I18n.n_;
-
/**
* @author tchemit <chemit(a)codelutin.com>
* @since 0.1
@@ -255,16 +254,15 @@
{ // Comment column
addColumnToModel(columnModel,
- LongTextCellComponent.newEditor(ui.getLongTextEditor()),
- LongTextCellComponent.newRender(n_("tutti.tooltip.comment.none")),
+ CommentCellEditor.newEditor(ui),
+ CommentCellRenderer.newRender(),
BenthosBatchTableModel.COMMENT);
}
{ // File column
addColumnToModel(columnModel,
- AttachmentCellEditor.newEditor(ui
- ),
+ AttachmentCellEditor.newEditor(ui),
AttachmentCellRenderer.newRender(getDecorator(Attachment.class, null)),
BenthosBatchTableModel.ATTACHMENT);
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchRowModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchRowModel.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchRowModel.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -24,13 +24,18 @@
* #L%
*/
+import com.google.common.collect.Lists;
+import fr.ifremer.tutti.persistence.entities.data.AttachementObjectTypeEnum;
import fr.ifremer.tutti.persistence.entities.data.Attachment;
import fr.ifremer.tutti.persistence.entities.data.MacroWasteBatch;
import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue;
import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel;
+import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentModelAware;
import org.nuiton.util.beans.Binder;
import org.nuiton.util.beans.BinderFactory;
+import java.util.Collection;
import java.util.List;
/**
@@ -39,7 +44,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
*/
-public class MacroWasteBatchRowModel extends AbstractTuttiBeanUIModel<MacroWasteBatch, MacroWasteBatchRowModel> {
+public class MacroWasteBatchRowModel extends AbstractTuttiBeanUIModel<MacroWasteBatch, MacroWasteBatchRowModel> implements AttachmentModelAware, CommentModelAware {
private static final long serialVersionUID = 1L;
@@ -51,10 +56,6 @@
public static final String PROPERTY_NUMBER = "number";
- public static final String PROPERTY_COMMENT = "comment";
-
- public static final String PROPERTY_ATTACHMENTS = "attachments";
-
/**
* MacroWaste category.
*
@@ -91,11 +92,11 @@
protected String comment;
/**
- * Attachments.
+ * Attachments (should never be null).
*
* @since 0.2
*/
- protected List<Attachment> attachments;
+ protected final List<Attachment> attachment = Lists.newArrayList();
protected static final Binder<MacroWasteBatch, MacroWasteBatchRowModel> fromBeanBinder =
BinderFactory.newBinder(MacroWasteBatch.class,
@@ -154,23 +155,62 @@
firePropertyChange(PROPERTY_NUMBER, oldValue, number);
}
+ //------------------------------------------------------------------------//
+ //-- CommentModelAware --//
+ //------------------------------------------------------------------------//
+
+ @Override
public String getComment() {
return comment;
}
+ @Override
public void setComment(String comment) {
Object oldValue = getComment();
this.comment = comment;
firePropertyChange(PROPERTY_COMMENT, oldValue, comment);
}
- public List<Attachment> getAttachments() {
- return attachments;
+ //------------------------------------------------------------------------//
+ //-- AttachmentModelAware --//
+ //------------------------------------------------------------------------//
+
+ @Override
+ public AttachementObjectTypeEnum getObjectType() {
+ return AttachementObjectTypeEnum.SAMPLE;
}
- public void setAttachments(List<Attachment> attachments) {
- Object oldValue = getAttachments();
- this.attachments = attachments;
- firePropertyChange(PROPERTY_ATTACHMENTS, oldValue, attachments);
+ @Override
+ public String getObjectId() {
+ return getId();
}
+
+ @Override
+ public List<Attachment> getAttachment() {
+ return attachment;
+ }
+
+ @Override
+ public void addAllAttachment(Collection<Attachment> attachments) {
+ this.attachment.addAll(attachments);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
+
+ @Override
+ public void addAttachment(Attachment attachment) {
+ this.attachment.add(attachment);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
+
+ @Override
+ public void removeAllAttachment(Collection<Attachment> attachments) {
+ this.attachment.removeAll(attachments);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
+
+ @Override
+ public void removeAttachment(Attachment attachment) {
+ this.attachment.remove(attachment);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchTableModel.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchTableModel.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -63,8 +63,8 @@
n_("tutti.table.macrowaste.batch.header.comment"),
n_("tutti.table.macrowaste.batch.header.comment"));
- public static final ColumnIdentifier<MacroWasteBatchRowModel> ATTACHMENTS = ColumnIdentifier.newId(
- MacroWasteBatchRowModel.PROPERTY_ATTACHMENTS,
+ public static final ColumnIdentifier<MacroWasteBatchRowModel> ATTACHMENT = ColumnIdentifier.newId(
+ MacroWasteBatchRowModel.PROPERTY_ATTACHMENT,
n_("tutti.table.macrowaste.batch.header.file"),
n_("tutti.table.macrowaste.batch.header.file"));
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchUIHandler.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/macrowaste/MacroWasteBatchUIHandler.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -36,7 +36,8 @@
import fr.ifremer.tutti.ui.swing.util.TuttiUI;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellEditor;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellRenderer;
-import fr.ifremer.tutti.ui.swing.util.editor.LongTextCellComponent;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellEditor;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellRenderer;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -46,8 +47,6 @@
import java.util.List;
-import static org.nuiton.i18n.I18n.n_;
-
/**
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
@@ -247,18 +246,17 @@
{ // Comment column
addColumnToModel(columnModel,
- LongTextCellComponent.newEditor(ui.getLongTextEditor()),
- LongTextCellComponent.newRender(n_("tutti.tooltip.comment.none")),
+ CommentCellEditor.newEditor(ui),
+ CommentCellRenderer.newRender(),
MacroWasteBatchTableModel.COMMENT);
}
{ // File column
addColumnToModel(columnModel,
- AttachmentCellEditor.newEditor(ui
- ),
+ AttachmentCellEditor.newEditor(ui),
AttachmentCellRenderer.newRender(getDecorator(Attachment.class, null)),
- MacroWasteBatchTableModel.ATTACHMENTS);
+ MacroWasteBatchTableModel.ATTACHMENT);
}
// create table model
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchRowModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchRowModel.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchRowModel.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -24,13 +24,18 @@
* #L%
*/
+import com.google.common.collect.Lists;
+import fr.ifremer.tutti.persistence.entities.data.AttachementObjectTypeEnum;
import fr.ifremer.tutti.persistence.entities.data.Attachment;
import fr.ifremer.tutti.persistence.entities.data.PlanktonBatch;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel;
+import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentModelAware;
import org.nuiton.util.beans.Binder;
import org.nuiton.util.beans.BinderFactory;
+import java.util.Collection;
import java.util.List;
/**
@@ -39,7 +44,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
*/
-public class PlanktonBatchRowModel extends AbstractTuttiBeanUIModel<PlanktonBatch, PlanktonBatchRowModel> {
+public class PlanktonBatchRowModel extends AbstractTuttiBeanUIModel<PlanktonBatch, PlanktonBatchRowModel> implements AttachmentModelAware, CommentModelAware {
private static final long serialVersionUID = 1L;
@@ -51,10 +56,6 @@
public static final String PROPERTY_SAMPLE_WEIGHT = "sampleWeight";
- public static final String PROPERTY_COMMENT = "comment";
-
- public static final String PROPERTY_ATTACHMENTS = "attachments";
-
/**
* Species observed.
*
@@ -84,18 +85,18 @@
protected Float sampleWeight;
/**
- * Comment on this catches.
+ * Comment.
*
* @since 0.2
*/
protected String comment;
/**
- * Attachments
+ * Attachments (should never be null).
*
* @since 0.2
*/
- protected List<Attachment> attachments;
+ protected final List<Attachment> attachment = Lists.newArrayList();
protected static final Binder<PlanktonBatch, PlanktonBatchRowModel> fromBeanBinder =
BinderFactory.newBinder(PlanktonBatch.class,
@@ -154,23 +155,62 @@
firePropertyChange(PROPERTY_SAMPLE_WEIGHT, oldValue, sampleWeight);
}
+ //------------------------------------------------------------------------//
+ //-- CommentModelAware --//
+ //------------------------------------------------------------------------//
+
+ @Override
public String getComment() {
return comment;
}
+ @Override
public void setComment(String comment) {
Object oldValue = getComment();
this.comment = comment;
firePropertyChange(PROPERTY_COMMENT, oldValue, comment);
}
- public List<Attachment> getAttachments() {
- return attachments;
+ //------------------------------------------------------------------------//
+ //-- AttachmentModelAware --//
+ //------------------------------------------------------------------------//
+
+ @Override
+ public AttachementObjectTypeEnum getObjectType() {
+ return AttachementObjectTypeEnum.SAMPLE;
}
- public void setAttachments(List<Attachment> attachments) {
- Object oldValue = getAttachments();
- this.attachments = attachments;
- firePropertyChange(PROPERTY_ATTACHMENTS, oldValue, attachments);
+ @Override
+ public String getObjectId() {
+ return getId();
}
+
+ @Override
+ public List<Attachment> getAttachment() {
+ return attachment;
+ }
+
+ @Override
+ public void addAllAttachment(Collection<Attachment> attachments) {
+ this.attachment.addAll(attachments);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
+
+ @Override
+ public void addAttachment(Attachment attachment) {
+ this.attachment.add(attachment);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
+
+ @Override
+ public void removeAllAttachment(Collection<Attachment> attachments) {
+ this.attachment.removeAll(attachments);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
+
+ @Override
+ public void removeAttachment(Attachment attachment) {
+ this.attachment.remove(attachment);
+ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment());
+ }
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchTableModel.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchTableModel.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -68,8 +68,8 @@
n_("tutti.table.plankton.batch.header.comment"),
n_("tutti.table.plankton.batch.header.comment"));
- public static final ColumnIdentifier<PlanktonBatchRowModel> ATTACHMENTS = ColumnIdentifier.newId(
- PlanktonBatchRowModel.PROPERTY_ATTACHMENTS,
+ public static final ColumnIdentifier<PlanktonBatchRowModel> ATTACHMENT = ColumnIdentifier.newId(
+ PlanktonBatchRowModel.PROPERTY_ATTACHMENT,
n_("tutti.table.plankton.batch.header.file"),
n_("tutti.table.plankton.batch.header.file"));
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchUIHandler.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchUIHandler.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -36,7 +36,8 @@
import fr.ifremer.tutti.ui.swing.util.TuttiUI;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellEditor;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellRenderer;
-import fr.ifremer.tutti.ui.swing.util.editor.LongTextCellComponent;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellEditor;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellRenderer;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -46,8 +47,6 @@
import java.util.List;
-import static org.nuiton.i18n.I18n.n_;
-
/**
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
@@ -240,18 +239,17 @@
{ // Comment column
addColumnToModel(columnModel,
- LongTextCellComponent.newEditor(ui.getLongTextEditor()),
- LongTextCellComponent.newRender(n_("tutti.tooltip.comment.none")),
+ CommentCellEditor.newEditor(ui),
+ CommentCellRenderer.newRender(),
PlanktonBatchTableModel.COMMENT);
}
{ // File column
addColumnToModel(columnModel,
- AttachmentCellEditor.newEditor(ui
- ),
+ AttachmentCellEditor.newEditor(ui),
AttachmentCellRenderer.newRender(getDecorator(Attachment.class, null)),
- PlanktonBatchTableModel.ATTACHMENTS);
+ PlanktonBatchTableModel.ATTACHMENT);
}
{ // Species to confirm column
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -36,6 +36,7 @@
import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel;
import fr.ifremer.tutti.ui.swing.util.TuttiComputedOrNotData;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentModelAware;
import org.apache.commons.collections.CollectionUtils;
import org.nuiton.util.beans.Binder;
import org.nuiton.util.beans.BinderFactory;
@@ -52,7 +53,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
*/
-public class SpeciesBatchRowModel extends AbstractTuttiBeanUIModel<SpeciesBatch, SpeciesBatchRowModel> implements AttachmentModelAware {
+public class SpeciesBatchRowModel extends AbstractTuttiBeanUIModel<SpeciesBatch, SpeciesBatchRowModel> implements AttachmentModelAware, CommentModelAware {
private static final long serialVersionUID = 1L;
@@ -96,8 +97,6 @@
public static final String PROPERTY_NUMBER = "number";
- public static final String PROPERTY_COMMENT = "comment";
-
public static final String PROPERTY_FREQUENCY = "frequency";
public static final String PROPERTY_COMPUTED_NUMBER = "computedOrNotNumber";
@@ -190,7 +189,7 @@
new TuttiComputedOrNotData<Integer>();
/**
- * Comment on this catches.
+ * Comment.
*
* @since 0.2
*/
@@ -555,6 +554,22 @@
}
//------------------------------------------------------------------------//
+ //-- CommentModelAware --//
+ //------------------------------------------------------------------------//
+
+ @Override
+ public String getComment() {
+ return comment;
+ }
+
+ @Override
+ public void setComment(String comment) {
+ Object oldValue = getComment();
+ this.comment = comment;
+ firePropertyChange(PROPERTY_COMMENT, oldValue, comment);
+ }
+
+ //------------------------------------------------------------------------//
//-- AttachmentModelAware --//
//------------------------------------------------------------------------//
@@ -627,20 +642,6 @@
computedOrNotNumber.setData(number);
}
- public String getComment() {
- return comment;
- }
-
- public void setComment(String comment) {
- Object oldValue = getComment();
- this.comment = comment;
- firePropertyChange(PROPERTY_COMMENT, oldValue, comment);
- }
-
- public List<Attachment> getAttachments() {
- return attachment;
- }
-
public List<SpeciesFrequencyRowModel> getFrequency() {
return frequency;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -57,7 +57,8 @@
import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellEditor;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellRenderer;
-import fr.ifremer.tutti.ui.swing.util.editor.LongTextCellComponent;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellEditor;
+import fr.ifremer.tutti.ui.swing.util.comment.CommentCellRenderer;
import fr.ifremer.tutti.ui.swing.util.editor.TuttiComputedOrNotDataTableCell;
import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
import fr.ifremer.tutti.ui.swing.util.table.ColumnIdentifier;
@@ -92,7 +93,6 @@
import java.util.Set;
import static org.nuiton.i18n.I18n._;
-import static org.nuiton.i18n.I18n.n_;
/**
* @author tchemit <chemit(a)codelutin.com>
@@ -618,16 +618,15 @@
{ // Comment column
addColumnToModel(columnModel,
- LongTextCellComponent.newEditor(ui.getLongTextEditor()),
- LongTextCellComponent.newRender(n_("tutti.tooltip.comment.none")),
+ CommentCellEditor.newEditor(ui),
+ CommentCellRenderer.newRender(),
SpeciesBatchTableModel.COMMENT);
}
{ // File column
addColumnToModel(columnModel,
- AttachmentCellEditor.newEditor(ui
- ),
+ AttachmentCellEditor.newEditor(ui),
AttachmentCellRenderer.newRender(getDecorator(Attachment.class, null)),
SpeciesBatchTableModel.ATTACHMENT);
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/AbstractTuttiAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/AbstractTuttiAction.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/AbstractTuttiAction.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -48,6 +48,8 @@
private static final Log log = LogFactory.getLog(AbstractTuttiAction.class);
+ public static final String PROPERTY_DONE = "done";
+
protected final H handler;
protected String actionDescription;
@@ -70,6 +72,7 @@
protected void releaseAction() {
// by default nothing to clean
+ firePropertyChange(PROPERTY_DONE, null, true);
}
public void postSuccessAction() {
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/TuttiActionSwingWorker.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/TuttiActionSwingWorker.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/TuttiActionSwingWorker.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -28,7 +28,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
import java.util.Timer;
import java.util.TimerTask;
@@ -78,26 +81,8 @@
if (!isCancelled()) {
- timer = new TimerTask() {
+ timer = new TuttiActionTimerTask();
- @Override
- public void run() {
- if (isCancelled() || isDone()) {
-
- if (log.isDebugEnabled()) {
- log.debug("Task [" + action + "] was already canceled or done, do nothing");
- }
- } else {
-
- if (log.isDebugEnabled()) {
- log.debug("Task [" + action + "] is started, show waiting dialog");
- }
-
- actionUI.open(action);
- }
- }
- };
-
t.schedule(timer, 1000);
try {
@@ -136,7 +121,6 @@
// fail hook
action.postFailedAction(error);
-
}
if (timer != null) {
@@ -160,6 +144,47 @@
if (hideBody) {
mainUI.getBody().setVisible(!busy);
}
+ }
+ protected class TuttiActionTimerTask extends TimerTask {
+
+ public TuttiActionTimerTask() {
+ action.addPropertyChangeListener(AbstractTuttiAction.PROPERTY_DONE, new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+
+ if (actionUI.isVisible()) {
+ actionUI.close();
+ }
+
+ // we do NOt want the timer to wake up then the actionUI dialog
+ cancel();
+
+
+ }
+ });
+ }
+
+ @Override
+ public void run() {
+ if (isCancelled() || isDone()) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Task [" + action + "] was already canceled or done, do nothing");
+ }
+ } else {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Task [" + action + "] is started, show waiting dialog");
+ }
+
+ SwingUtilities.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ actionUI.open(action);
+ }
+ });
+ }
+ }
}
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/TuttiUIAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/TuttiUIAction.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/TuttiUIAction.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -170,7 +170,7 @@
}
public A getLogicAction() {
- return (A) getValue("logicAction");
+ return (A) getValue(LOGIC_ACTION);
}
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUI.jaxx 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUI.jaxx 2013-03-13 09:20:00 UTC (rev 602)
@@ -54,15 +54,6 @@
}
]]></script>
- <!-- bean property where to find the objectId to attach to Attachment (see Attachment#objectId) -->
- <!--<String id='objectIdProperty' javaBean='""'/>-->
-
- <!-- object type of attachments (see Attachment#objectType) -->
- <!--<AttachementObjectTypeEnum id='objectType' javaBean='null'/>-->
-
- <!-- bean property linked state -->
- <!--<String id='property' javaBean='""'/>-->
-
<!-- if true, display the form to add attachments
and the button to remove existing attachments -->
<Boolean id='editable' javaBean='true'/>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -83,17 +83,6 @@
this.context = context;
this.ui = ui;
this.persistenceService = context.getPersistenceService();
-
-// this.ui.addPropertyChangeListener(new PropertyChangeListener() {
-//
-// @Override
-// public void propertyChange(PropertyChangeEvent evt) {
-// if (log.isInfoEnabled()) {
-// log.info("Init (property " + evt.getPropertyName() + " changed).");
-// }
-// init();
-// }
-// });
}
protected void beforeInitUI() {
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/ButtonAttachment.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/ButtonAttachment.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/ButtonAttachment.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -69,21 +69,6 @@
popup = new AttachmentEditorUI(context);
-// popup.addComponentListener(new ComponentAdapter() {
-//
-// @Override
-// public void componentMoved(ComponentEvent e) {
-// Component component = e.getComponent();
-// if (component.isShowing() && !popupMoving) {
-// popupPosition = component.getLocationOnScreen();
-//
-// if (log.isInfoEnabled()) {
-// log.info("Popup has moved by user, keeping his position: " + popupPosition);
-// }
-// }
-// }
-// });
-
popup.addWindowListener(new WindowAdapter() {
@Override
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/ButtonComment.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/ButtonComment.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/ButtonComment.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -0,0 +1,138 @@
+package fr.ifremer.tutti.ui.swing.util.comment;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * 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 3 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, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.ui.swing.TuttiUIContext;
+import jaxx.runtime.SwingUtil;
+
+import javax.swing.JToggleButton;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import java.awt.Point;
+import java.awt.event.HierarchyBoundsAdapter;
+import java.awt.event.HierarchyEvent;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * A toggleButton to show (or hide) comment editor.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.1
+ */
+public class ButtonComment extends JToggleButton {
+
+ private static final long serialVersionUID = 1L;
+
+ protected final CommentEditorUI popup;
+
+ protected Point popupPosition = null;
+
+ protected boolean popupMoving;
+
+ public ButtonComment(TuttiUIContext context,
+ CommentModelAware model) {
+
+ setIcon(SwingUtil.createActionIcon("edit-comment"));
+ setToolTipText(_("tutti.action.comment.tip"));
+
+ popup = new CommentEditorUI(context);
+
+ popup.addWindowListener(new WindowAdapter() {
+
+ @Override
+ public void windowOpened(WindowEvent e) {
+ setSelected(true);
+ }
+
+ @Override
+ public void windowClosing(WindowEvent e) {
+ setSelected(false);
+ }
+
+ @Override
+ public void windowClosed(WindowEvent e) {
+ setSelected(false);
+ }
+ });
+
+ addChangeListener(new ChangeListener() {
+ @Override
+ public void stateChanged(ChangeEvent e) {
+ if (isSelected()) {
+ popup.openEditor(ButtonComment.this);
+ } else {
+ popup.closeEditor();
+ }
+ }
+ });
+
+ addHierarchyBoundsListener(new HierarchyBoundsAdapter() {
+
+ @Override
+ public void ancestorMoved(HierarchyEvent e) {
+ if (popup.isShowing()) {
+
+ // place dialog just under the button
+ Point point = new Point(getLocationOnScreen());
+ point.translate(-popup.getWidth() + getWidth(), getHeight());
+ popupMoving = true;
+ try {
+ popup.setLocation(point);
+ } finally {
+ popupMoving = false;
+ }
+ }
+ }
+ });
+ setBean(model);
+ }
+
+ public void init() {
+ popup.getHandler().init();
+ }
+
+ public void init(CommentModelAware model) {
+ setBean(model);
+ init();
+ }
+
+ public void onCloseUI() {
+ setSelected(false);
+ }
+
+ public CommentModelAware getBean() {
+ return popup.getBean();
+ }
+
+ protected void setBean(CommentModelAware model) {
+ popup.setBean(model);
+ init();
+
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/ButtonComment.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellEditor.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellEditor.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellEditor.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -0,0 +1,142 @@
+package fr.ifremer.tutti.ui.swing.util.comment;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * 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 3 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, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.tutti.ui.swing.TuttiUIContext;
+import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel;
+import fr.ifremer.tutti.ui.swing.util.TuttiUI;
+import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableModel;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.swing.AbstractCellEditor;
+import javax.swing.JTable;
+import javax.swing.border.LineBorder;
+import javax.swing.event.CellEditorListener;
+import javax.swing.event.ChangeEvent;
+import javax.swing.table.TableCellEditor;
+import java.awt.Color;
+import java.awt.Component;
+import java.util.EventObject;
+
+/**
+ * To edit a comment in a table cell using a nice dialog for this.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.1
+ */
+public class CommentCellEditor extends AbstractCellEditor implements TableCellEditor {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(CommentCellEditor.class);
+
+ public static TableCellEditor newEditor(TuttiUI ui) {
+
+ return new CommentCellEditor(ui.getHandler().getContext());
+ }
+
+ protected JTable table;
+
+ protected AbstractTuttiTableModel<AbstractTuttiBeanUIModel> tableModel;
+
+ protected Integer rowIndex;
+
+ protected Integer columnIndex;
+
+ protected final ButtonComment editorButton;
+
+ public CommentCellEditor(TuttiUIContext context) {
+
+ this.editorButton = new ButtonComment(context, null);
+ this.editorButton.setBorder(new LineBorder(Color.BLACK));
+ addCellEditorListener(new CellEditorListener() {
+ @Override
+ public void editingStopped(ChangeEvent e) {
+ editorButton.setSelected(false);
+ }
+
+ @Override
+ public void editingCanceled(ChangeEvent e) {
+ editorButton.setSelected(false);
+ }
+ });
+ }
+
+ @Override
+ public Component getTableCellEditorComponent(JTable table,
+ Object value,
+ boolean isSelected,
+ int row,
+ int column) {
+ this.table = table;
+ this.tableModel = (AbstractTuttiTableModel<AbstractTuttiBeanUIModel>) table.getModel();
+
+ rowIndex = row;
+ columnIndex = column;
+
+ CommentModelAware model = (CommentModelAware) tableModel.getEntry(row);
+
+ editorButton.init(model);
+
+ return editorButton;
+ }
+
+ @Override
+ public boolean shouldSelectCell(EventObject anEvent) {
+ return false;
+ }
+
+ @Override
+ public Object getCellEditorValue() {
+
+ CommentModelAware model = editorButton.getBean();
+ Preconditions.checkNotNull(model, "No model found in editor.");
+
+ Object result = model.getComment();
+ if (log.isInfoEnabled()) {
+ log.info("editor value: " + result);
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean stopCellEditing() {
+ boolean b = super.stopCellEditing();
+ if (b) {
+ editorButton.setBean(null);
+ }
+ return b;
+ }
+
+ @Override
+ public void cancelCellEditing() {
+ editorButton.setBean(null);
+ super.cancelCellEditing();
+ }
+}
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellEditor.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellRenderer.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellRenderer.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellRenderer.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -0,0 +1,97 @@
+package fr.ifremer.tutti.ui.swing.util.comment;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * 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 3 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, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import jaxx.runtime.SwingUtil;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.swing.JComponent;
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableCellRenderer;
+
+import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.n_;
+
+/**
+ * To render a comment in a table cell.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.1
+ */
+public class CommentCellRenderer extends DefaultTableCellRenderer {
+
+ public static final String TEXT_PATTERN = "<html><body>%s</body></html>";
+
+ private static final long serialVersionUID = 1L;
+
+ private final String noneText;
+
+ public static CommentCellRenderer newRender() {
+ return new CommentCellRenderer();
+ }
+
+ protected CommentCellRenderer() {
+ setHorizontalAlignment(CENTER);
+ setIcon(SwingUtil.createActionIcon("edit-comment"));
+ this.noneText = n_("tutti.tooltip.comment.none");
+ }
+
+ @Override
+ protected void setValue(Object value) {
+ // do nothing
+ }
+
+ @Override
+ public JComponent getTableCellRendererComponent(JTable table,
+ Object value,
+ boolean isSelected,
+ boolean hasFocus,
+ int row,
+ int column) {
+
+ String comment = (String) value;
+
+ String toolTipTextValue;
+
+ if (StringUtils.isEmpty(comment)) {
+
+ // use HTML to show the tooltip in italic
+ toolTipTextValue = "<i>" + _(noneText) + "</i>";
+
+
+ } else {
+
+ // use html to display the tooltip on several lines
+ toolTipTextValue = String.valueOf(value).replace("\n", "<br/>");
+
+ }
+ boolean editable = table.isCellEditable(row, column);
+ toolTipTextValue = String.format(TEXT_PATTERN, toolTipTextValue);
+ setEnabled(editable);
+ setToolTipText(toolTipTextValue);
+
+ return this;
+ }
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellRenderer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.css (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.css 2013-03-13 09:20:00 UTC (rev 602)
@@ -0,0 +1,38 @@
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * 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 3 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, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+#commentDialog {
+ undecorated: true;
+ alwaysOnTop: true;
+}
+
+#commentEditorTopPanel {
+ title: "tutti.title.comment";
+}
+
+#closeButton {
+ actionIcon: close;
+ text: "tutti.action.close";
+ mnemonic: F;
+}
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.jaxx (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.jaxx 2013-03-13 09:20:00 UTC (rev 602)
@@ -0,0 +1,70 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ 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 3 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, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
+<JDialog id='commentDialog' layout='{new BorderLayout()}'>
+
+ <import>
+ fr.ifremer.tutti.ui.swing.TuttiUIContext
+
+ org.jdesktop.swingx.JXTitledPanel
+ javax.swing.JComponent
+ </import>
+
+ <script><![CDATA[
+
+public CommentEditorUI(TuttiUIContext context) {
+ super(context.getMainUI());
+ setContextValue(context);
+ CommentEditorUIHandler handler = new CommentEditorUIHandler(context, this);
+ setContextValue(handler);
+ handler.beforeInitUI();
+}
+
+protected void $afterCompleteSetup() {
+ getHandler().afterInitUI();
+}
+
+public void openEditor(JComponent component) {
+ handler.openEditor(component);
+}
+
+public void closeEditor() {
+ handler.closeEditor();
+}
+ ]]></script>
+
+ <!-- bean property -->
+ <CommentModelAware id='bean' javaBean='null'/>
+
+ <CommentEditorUIHandler id='handler'
+ initializer='getContextValue(CommentEditorUIHandler.class)'/>
+
+ <JXTitledPanel id='commentEditorTopPanel' constraints='BorderLayout.CENTER'>
+
+ <JScrollPane>
+ <JTextArea id='textContent'
+ onKeyReleased='handler.setText(((JTextArea)event.getSource()).getText())'/>
+ </JScrollPane>
+
+ </JXTitledPanel>
+</JDialog>
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUIHandler.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUIHandler.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -0,0 +1,188 @@
+package fr.ifremer.tutti.ui.swing.util.comment;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * 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 3 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, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.ui.swing.TuttiUIContext;
+import jaxx.runtime.SwingUtil;
+import jaxx.runtime.swing.ComponentMover;
+import jaxx.runtime.swing.ComponentResizer;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JRootPane;
+import javax.swing.JToolBar;
+import javax.swing.KeyStroke;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.1
+ */
+public class CommentEditorUIHandler {
+
+ private static final int DEFAULT_EDITOR_WIDTH = 400;
+
+ private static final int DEFAULT_EDITOR_HEIGHT = 200;
+
+ public static final String CLOSE_DIALOG_ACTION = "closeDialog";
+
+ public static final String SHOW_DIALOG_ACTION = "showDialog";
+
+ protected final TuttiUIContext context;
+
+ private final CommentEditorUI ui;
+
+ public CommentEditorUIHandler(TuttiUIContext context, CommentEditorUI ui) {
+ this.context = context;
+ this.ui = ui;
+ }
+
+ protected void beforeInitUI() {
+ }
+
+ protected void afterInitUI() {
+
+ ui.pack();
+ ui.setResizable(true);
+// ui.setSize(800, 300);
+
+ ui.setSize(DEFAULT_EDITOR_WIDTH, DEFAULT_EDITOR_HEIGHT);
+
+ ComponentResizer cr = new ComponentResizer();
+ cr.registerComponent(ui);
+ ComponentMover cm = new ComponentMover();
+ cm.setDragInsets(cr.getDragInsets());
+ cm.registerComponent(ui);
+
+ JRootPane rootPane = ui.getRootPane();
+
+ KeyStroke shortcutClosePopup =
+ KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
+
+ rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
+ shortcutClosePopup, CLOSE_DIALOG_ACTION);
+
+ closeAction = new AbstractAction() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ui.dispose();
+ ui.setVisible(false);
+ }
+ };
+
+ openAction = new AbstractAction() {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ui.setVisible(true);
+ }
+ };
+
+ ImageIcon actionIcon = SwingUtil.createActionIcon("close-dialog");
+ closeAction.putValue(Action.SMALL_ICON, actionIcon);
+ closeAction.putValue(Action.LARGE_ICON_KEY, actionIcon);
+ closeAction.putValue(Action.ACTION_COMMAND_KEY, "close");
+ closeAction.putValue(Action.NAME, "close");
+ closeAction.putValue(Action.SHORT_DESCRIPTION, _("tutti.action.closeCommentEditor.tip"));
+
+ rootPane.getActionMap().put(CLOSE_DIALOG_ACTION, closeAction);
+ rootPane.getActionMap().put(SHOW_DIALOG_ACTION, openAction);
+
+ JButton closeButton = new JButton(closeAction);
+ closeButton.setText(null);
+ closeButton.setFocusPainted(false);
+ closeButton.setRequestFocusEnabled(false);
+ closeButton.setFocusable(false);
+
+ JToolBar jToolBar = new JToolBar();
+ jToolBar.setOpaque(false);
+ jToolBar.add(closeAction);
+ jToolBar.setBorderPainted(false);
+ jToolBar.setFloatable(false);
+ ui.getCommentEditorTopPanel().setRightDecoration(jToolBar);
+ }
+
+ protected Action closeAction;
+
+ protected Action openAction;
+
+ public void closeEditor() {
+
+ closeAction.actionPerformed(null);
+ }
+
+ public void openEditor(JComponent component) {
+
+ if (component != null) {
+ place(component);
+ }
+ openAction.actionPerformed(null);
+ }
+
+ public void init() {
+
+ CommentModelAware bean = ui.getBean();
+ String content = bean == null ? null : bean.getComment();
+ ui.getTextContent().setText(content);
+ }
+
+ public void place(JComponent component) {
+ // Computes the location of bottom left corner of the cell
+ Component comp = component;
+ int x = 0;
+ int y = component.getHeight();
+ while (comp != null) {
+ x += comp.getX();
+ y += comp.getY();
+ comp = comp.getParent();
+ }
+
+// ui.pack();
+ // if the editor is too big on the right,
+ // then align its right side to the right side of the cell
+ if (x + ui.getWidth() > ui.getOwner().getX() + ui.getOwner().getWidth()) {
+ x = x - ui.getWidth() + component.getWidth();
+ }
+ ui.setLocation(x, y);
+ }
+
+ /** pushes the typed text in the property of the bean */
+ public void setText(String value) {
+ CommentModelAware bean = ui.getBean();
+ bean.setComment(value);
+ }
+
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUIHandler.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentModelAware.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentModelAware.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentModelAware.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -0,0 +1,40 @@
+package fr.ifremer.tutti.ui.swing.util.comment;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * 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 3 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, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+/**
+ * To place on model wich supports comment.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.1
+ */
+public interface CommentModelAware {
+
+ String PROPERTY_COMMENT= "comment";
+
+ String getComment();
+
+ void setComment(String comment);
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentModelAware.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextCellComponent.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextCellComponent.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextCellComponent.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -1,312 +0,0 @@
-package fr.ifremer.tutti.ui.swing.util.editor;
-
-/*
- * #%L
- * Tutti :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2012 Ifremer
- * %%
- * 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 3 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, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import com.google.common.base.Preconditions;
-import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel;
-import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
-import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
-import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableModel;
-import fr.ifremer.tutti.ui.swing.util.table.ColumnIdentifier;
-import jaxx.runtime.JAXXUtil;
-import jaxx.runtime.SwingUtil;
-import jaxx.runtime.swing.ComponentMover;
-import jaxx.runtime.swing.ComponentResizer;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.swing.AbstractCellEditor;
-import javax.swing.BorderFactory;
-import javax.swing.JDialog;
-import javax.swing.JTable;
-import javax.swing.border.LineBorder;
-import javax.swing.table.DefaultTableCellRenderer;
-import javax.swing.table.TableCellEditor;
-import javax.swing.table.TableCellRenderer;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Frame;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-
-import static org.nuiton.i18n.I18n._;
-
-/**
- * Component to edit a cell in a popup with a text area
- *
- * @author kmorin
- * @since 0.2
- */
-public class LongTextCellComponent extends DefaultTableCellRenderer {
-
- /** Logger. */
- private static final Log log = LogFactory.getLog(LongTextCellComponent.class);
-
- private static final long serialVersionUID = 1L;
-
- public LongTextCellComponent() {
- setHorizontalAlignment(CENTER);
- setIcon(SwingUtil.createActionIcon("edit-comment"));
- }
-
- @Override
- protected void setValue(Object value) {
- // do nothing
- }
-
- public static TableCellRenderer newRender(String noneText) {
- return new LongTextCellRenderer(noneText);
- }
-
- public static TableCellEditor newEditor(LongTextEditorUI ui) {
- return new LongTextCellEditor(ui);
- }
-
-
- public static class LongTextCellEditor extends AbstractCellEditor implements TableCellEditor {
-
- public static final int DEFAULT_EDITOR_WIDTH = 400;
-
- public static final int DEFAULT_EDITOR_HEIGHT = 200;
-
- private static final long serialVersionUID = 1L;
-
- protected final LongTextCellComponent component;
-
- protected final LongTextEditorUI ui;
-
- protected Frame frame;
-
- protected JTable table;
-
- protected AbstractTuttiTableModel<AbstractTuttiBeanUIModel> tableModel;
-
- protected ColumnIdentifier<AbstractTuttiBeanUIModel> columnIdentifier;
-
- protected AbstractTuttiBeanUIModel editRow;
-
- protected Integer rowIndex;
-
- protected Integer columnIndex;
-
- public LongTextCellEditor(LongTextEditorUI ui) {
- this.ui = ui;
-
- component = new LongTextCellComponent();
- component.setBorder(new LineBorder(Color.BLACK));
- component.addKeyListener(new KeyAdapter() {
- @Override
- public void keyReleased(KeyEvent e) {
- if (e.getKeyCode() == KeyEvent.VK_ENTER ||
- e.getKeyCode() == KeyEvent.VK_SPACE) {
- e.consume();
- startEdit();
- }
- }
- });
-
- component.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent e) {
- e.consume();
- startEdit();
- }
- });
- }
-
- protected void startEdit() {
- if (frame == null) {
- frame = SwingUtil.getParentContainer(ui, Frame.class);
- }
-
- ui.setBorder(BorderFactory.createTitledBorder(_(columnIdentifier.getHeaderI18nKey())));
- ui.setBean(editRow);
- ui.setProperty(columnIdentifier.getPropertyName());
-
- JDialog editor = new JDialog(frame, true);
- editor.setUndecorated(true);
- editor.add(ui);
- editor.setSize(DEFAULT_EDITOR_WIDTH, DEFAULT_EDITOR_HEIGHT);
- editor.setResizable(true);
- ComponentResizer cr = new ComponentResizer();
- cr.registerComponent(editor);
- ComponentMover cm = new ComponentMover();
- cm.setDragInsets(cr.getDragInsets());
- cm.registerComponent(editor);
-
- editor.addWindowListener(new WindowAdapter() {
-
- @Override
- public void windowClosed(WindowEvent e) {
- Component ui = (Component) e.getSource();
- if (log.isInfoEnabled()) {
- log.info("Destroy ui " + ui);
- }
- JAXXUtil.destroy(ui);
- }
- });
-
- // Computes the location of bottom left corner of the cell
- Component comp = component;
- int x = 0;
- int y = component.getHeight();
- while (comp != null) {
- x += comp.getX();
- y += comp.getY();
- comp = comp.getParent();
- }
- // if the editor is too big on the right,
- // then align its right side to the right side of the cell
- if (x + editor.getWidth() > frame.getX() + frame.getWidth()) {
- x = x - editor.getWidth() + component.getWidth();
- }
- editor.setLocation(x, y);
- editor.setVisible(true);
-
- int r = rowIndex;
- int c = columnIndex;
-
- // stop edition
- stopCellEditing();
-
- // reselect this cell
- AbstractSelectTableAction.doSelectCell(table, r, c);
- table.requestFocus();
- }
-
- @Override
- public Component getTableCellEditorComponent(JTable table,
- Object value,
- boolean isSelected,
- int row,
- int column) {
- if (tableModel == null) {
- tableModel = (AbstractTuttiTableModel<AbstractTuttiBeanUIModel>) table.getModel();
- this.table = table;
- columnIdentifier = tableModel.getPropertyName(column);
- }
-
- rowIndex = row;
- columnIndex = column;
-
- editRow = tableModel.getEntry(row);
-
- return component;
- }
-
- @Override
- public Object getCellEditorValue() {
-
- Preconditions.checkNotNull(editRow, "No editRow found in editor.");
-
- String propertyName = columnIdentifier.getPropertyName();
- Object result = TuttiUIUtil.getProperty(editRow, propertyName);
- if (log.isInfoEnabled()) {
- log.info("editor value (" + propertyName + "): " + result);
- }
-
- return result;
- }
-
- @Override
- public boolean stopCellEditing() {
- boolean b = super.stopCellEditing();
- if (b) {
- rowIndex = null;
- editRow = null;
- columnIndex = null;
- }
- return b;
- }
-
- @Override
- public void cancelCellEditing() {
- super.cancelCellEditing();
- rowIndex = null;
- columnIndex = null;
- editRow = null;
- }
- }
-
- public static class LongTextCellRenderer implements TableCellRenderer {
-
- protected final LongTextCellComponent component;
-
- protected String propertyName;
-
- public static final String TEXT_PATTERN = "<html><body>%s</body></html>";
-
- private final String noneText;
-
- public LongTextCellRenderer(String noneText) {
- component = new LongTextCellComponent();
- this.noneText = noneText;
- }
-
- @Override
- public Component getTableCellRendererComponent(JTable table,
- Object value,
- boolean isSelected,
- boolean hasFocus,
- int row,
- int column) {
-
- LongTextCellComponent result =
- (LongTextCellComponent) component.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
-
- if (table != null) {
- String textValue;
- if (StringUtils.isBlank((String) value)) {
- if (propertyName == null) {
- AbstractTuttiTableModel tableModel =
- (AbstractTuttiTableModel) table.getModel();
- ColumnIdentifier columnIdentifier =
- tableModel.getPropertyName(column);
- propertyName = columnIdentifier.getPropertyName();
- }
- // use HTML to show the tooltip in italic
- textValue = "<i>" + _(noneText) + "</i>";
-
- } else {
- // use html to display the tooltip on several lines
- textValue = String.valueOf(value).replace("\n", "<br/>");
- }
-
- String text = String.format(TEXT_PATTERN, textValue);
-
- boolean editable = table.isCellEditable(row, column);
- result.setEnabled(editable);
- result.setToolTipText(text);
- }
-
- return result;
- }
- }
-}
Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUI.css 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUI.css 2013-03-13 09:20:00 UTC (rev 602)
@@ -1,28 +0,0 @@
-/*
- * #%L
- * Tutti :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2012 Ifremer
- * %%
- * 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 3 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, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-#closeButton {
- actionIcon: close;
- text: "tutti.action.close";
- mnemonic: F;
-}
Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUI.jaxx 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUI.jaxx 2013-03-13 09:20:00 UTC (rev 602)
@@ -1,48 +0,0 @@
-<!--
- #%L
- Tutti :: UI
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2012 Ifremer
- %%
- 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 3 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, see
- <http://www.gnu.org/licenses/gpl-3.0.html>.
- #L%
- -->
-<Table id='mainPanel'>
-
- <!-- bean property linked state -->
- <String id='property' javaBean='""'/>
-
- <!-- bean property -->
- <Object id='bean' javaBean='null'/>
-
- <LongTextEditorUIHandler id='handler' constructorParams='this'/>
-
- <row weighty='1' fill='both'>
- <cell fill='both' weightx='1'>
- <JScrollPane>
- <JTextArea id='textContent'
- onKeyReleased='handler.setText(((JTextArea)event.getSource()).getText())'/>
- </JScrollPane>
- </cell>
- </row>
- <row fill='both'>
- <!-- actions -->
- <cell fill='both' weightx='1'>
- <JButton id='closeButton' onActionPerformed='handler.close()'/>
- </cell>
- </row>
-</Table>
\ No newline at end of file
Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUIHandler.java 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/LongTextEditorUIHandler.java 2013-03-13 09:20:00 UTC (rev 602)
@@ -1,81 +0,0 @@
-package fr.ifremer.tutti.ui.swing.util.editor;
-
-/*
- * #%L
- * Tutti :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2012 Ifremer
- * %%
- * 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 3 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, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
-import jaxx.runtime.SwingUtil;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.awt.Window;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-/**
- * Handler of the LongTextEditorUI
- *
- * @author kmorin
- * @since 0.2
- */
-public class LongTextEditorUIHandler {
-
- private static final Log log =
- LogFactory.getLog(LongTextEditorUIHandler.class);
-
- private final LongTextEditorUI ui;
-
- public LongTextEditorUIHandler(LongTextEditorUI longTextEditorUI) {
- ui = longTextEditorUI;
-
- ui.addPropertyChangeListener(new PropertyChangeListener() {
-
- public void propertyChange(PropertyChangeEvent evt) {
- Object bean = ui.getBean();
- String property = ui.getProperty();
- if (bean != null && !StringUtils.isEmpty(property)) {
- Object value = TuttiUIUtil.getProperty(bean, property);
- ui.getTextContent().setText(SwingUtil.getStringValue(value));
- }
- }
- });
- }
-
- /** pushes the typed text in the property of the bean */
- public void setText(String value) {
- Object bean = ui.getBean();
- String property = ui.getProperty();
- TuttiUIUtil.setProperty(bean, property, value);
- }
-
- /** closes the editor */
- public void close() {
- if (log.isInfoEnabled()) {
- log.info("Will close UI " + ui);
- }
- SwingUtil.getParentContainer(ui, Window.class).dispose();
- }
-
-}
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-13 09:20:00 UTC (rev 602)
@@ -26,7 +26,9 @@
tutti.action.cloneProtocol=
tutti.action.close=
tutti.action.closeAttachment.tip=
+tutti.action.closeCommentEditor.tip=
tutti.action.closeDb=
+tutti.action.comment.tip=
tutti.action.computeWeights=
tutti.action.computeWeights.error.incoherentCategoryWeight=
tutti.action.computeWeights.error.incoherentParentCategoryWeight=
@@ -436,6 +438,7 @@
tutti.title.choose.protocolImportFile=
tutti.title.choose.protocolSpeciesExportFile=
tutti.title.choose.protocolSpeciesImportFile=
+tutti.title.comment=
tutti.title.create.cruise=
tutti.title.create.program=
tutti.title.create.protocol=
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-13 07:33:30 UTC (rev 601)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-13 09:20:00 UTC (rev 602)
@@ -26,7 +26,9 @@
tutti.action.cloneProtocol=Cloner
tutti.action.close=Fermer
tutti.action.closeAttachment.tip=Fermer la fenêtre des picèes-jointes
+tutti.action.closeCommentEditor.tip=Fermer la fenêtre des commentaires
tutti.action.closeDb=Fermer
+tutti.action.comment.tip=Commentaire
tutti.action.computeWeights=Elever les poids
tutti.action.computeWeights.error.incoherentCategoryWeight=Le poids total des mensurations est supérieur au poids de la catégorie
tutti.action.computeWeights.error.incoherentCategoryWeight.title=Incohérence
@@ -459,6 +461,7 @@
tutti.title.choose.protocolImportFile=Importer le protocole
tutti.title.choose.protocolSpeciesExportFile=Exporter les espèces
tutti.title.choose.protocolSpeciesImportFile=Importer les espèces
+tutti.title.comment=Commentaire
tutti.title.create.cruise=Créer une nouvelle campagne
tutti.title.create.program=Créer une nouvelle série de campagne
tutti.title.create.protocol=Créer un nouveau protocol de saisie
1
0
13 Mar '13
Author: tchemit
Date: 2013-03-13 08:33:30 +0100 (Wed, 13 Mar 2013)
New Revision: 601
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/601
Log:
fixes #2067: [CAPTURE] - Rendre configurable la modification de l'arbre d'?\195?\169chantillonage
Removed:
trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/batch/
Modified:
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceImpl.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BatchPersistenceService.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceImpl.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/batch/ScientificCruiseCatchBatchValidator.java
trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceReadTest.java
trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceWriteTest.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/NewFishingOperationAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/AbstractTuttiUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiExceptionHandler.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -389,17 +389,15 @@
/**
* Get the catchBatch from the fishing Operation id.
* <p/>
- * If batch model is not compatible with Tutti and {@code canRepair} flag
- * is on, then it will try to repair it.
+ * If batch model is not compatible with Tutti then a
+ * {@link InvalidBatchModelException} will be thrown.
*
- * @param id id of the fihsing operation
- * @param canRepair flag to try to repair the batch model in not in Tutti-awre format.
+ * @param id id of the fihsing operation
* @return found catchbatch
- * @throws InvalidBatchModelException if batch model is not compatible with Tutti and could be repaired (in cause of canRepair is on).
+ * @throws InvalidBatchModelException if batch model is not compatible
+ * with Tutti.
*/
- @Transactional(readOnly = false)
- CatchBatch getCatchBatchFromFishingOperation(String id,
- boolean canRepair) throws InvalidBatchModelException;
+ CatchBatch getCatchBatchFromFishingOperation(String id) throws InvalidBatchModelException;
/**
* Create the given CatchBatch and return it.
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceImpl.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceImpl.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceImpl.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -491,12 +491,12 @@
//------------------------------------------------------------------------//
@Override
- public CatchBatch getCatchBatchFromFishingOperation(String id,
- boolean canRepair) throws InvalidBatchModelException {
+ public CatchBatch getCatchBatchFromFishingOperation(String id) throws InvalidBatchModelException {
try {
- return batchService.getCatchBatchFromFishingOperation(id, canRepair);
+ return batchService.getCatchBatchFromFishingOperation(id);
} catch (CatchBatchValidationException e) {
- throw new InvalidBatchModelException("L'arbre d'échantillonage n'est pas compatible avec celui de Tutti.", e);
+ throw new InvalidBatchModelException(
+ "L'arbre d'échantillonage n'est pas compatible avec celui de Tutti.", e);
}
}
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -320,7 +320,7 @@
}
@Override
- public CatchBatch getCatchBatchFromFishingOperation(String id, boolean canRepair) {
+ public CatchBatch getCatchBatchFromFishingOperation(String id) {
throw new RuntimeException("method not implemented");
}
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BatchPersistenceService.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BatchPersistenceService.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BatchPersistenceService.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -25,7 +25,6 @@
*/
-import fr.ifremer.adagio.core.dao.data.batch.CatchBatchExtendDao;
import fr.ifremer.adagio.core.dao.data.batch.validator.CatchBatchValidationException;
import fr.ifremer.tutti.persistence.TuttiPersistenceServiceImplementor;
import fr.ifremer.tutti.persistence.entities.data.BatchContainer;
@@ -38,39 +37,20 @@
import java.util.List;
@Transactional(readOnly = true)
-public interface
- BatchPersistenceService extends TuttiPersistenceServiceImplementor {
+public interface BatchPersistenceService extends TuttiPersistenceServiceImplementor {
//------------------------------------------------------------------------//
//-- CatchBatch methods --//
//------------------------------------------------------------------------//
/**
- * Used to initialize a catch when fixing it.
- *
- * @param catchBatch (original batch to fix)
- * @param keepTotalWeight flag to keep weight assigned on catch batch
- */
- void cleanEntity(fr.ifremer.adagio.core.dao.data.batch.CatchBatch catchBatch,
- boolean keepTotalWeight);
-
- /**
- * Used to mock dao in unit tests.
- *
- * @param dao dao to use
- */
- void setCatchBatchDao(CatchBatchExtendDao dao);
-
- /**
* Get the catchBatch from the fishing Operation id.
*
* @param fishingOperationId id of the fihsing operation
- * @return found catchbatch
+ * @return found catchBatch
* @throws CatchBatchValidationException
*/
- @Transactional(readOnly = false)
- CatchBatch getCatchBatchFromFishingOperation(String fishingOperationId,
- boolean tryToRepair) throws CatchBatchValidationException;
+ CatchBatch getCatchBatchFromFishingOperation(String fishingOperationId) throws CatchBatchValidationException;
/**
* Create the given CatchBatch and return it.
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceImpl.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceImpl.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceImpl.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -44,7 +44,6 @@
import fr.ifremer.adagio.core.dao.technical.synchronization.SynchronizationStatus;
import fr.ifremer.tutti.persistence.entities.data.BatchContainer;
import fr.ifremer.tutti.persistence.entities.data.CatchBatch;
-import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
import fr.ifremer.tutti.persistence.entities.data.SampleCategoryEnum;
import fr.ifremer.tutti.persistence.entities.data.SpeciesBatch;
import fr.ifremer.tutti.persistence.entities.data.SpeciesBatchFrequency;
@@ -105,14 +104,14 @@
//------------------------------------------------------------------------//
@Override
- public CatchBatch getCatchBatchFromFishingOperation(String fishingOperationId,
- boolean tryToRepair) throws CatchBatchValidationException {
+ public CatchBatch getCatchBatchFromFishingOperation(String fishingOperationId) throws CatchBatchValidationException {
Preconditions.checkNotNull(fishingOperationId);
Integer catchBatchId = catchBatchDao.getIdByFishingOperationId(Integer.valueOf(fishingOperationId));
fr.ifremer.adagio.core.dao.data.batch.CatchBatch source;
- source = catchBatchDao.loadFullTree(catchBatchId, true, tryToRepair);
+ // wenever want to repair anything from Tutti
+ source = catchBatchDao.loadFullTree(catchBatchId, true, false);
CatchBatch result = new CatchBatch();
result.setId(source.getId().toString());
@@ -192,41 +191,6 @@
}
@Override
- public void cleanEntity(fr.ifremer.adagio.core.dao.data.batch.CatchBatch catchBatch,
- boolean keepTotalWeight) {
-
- Preconditions.checkNotNull(catchBatch);
- Preconditions.checkNotNull(catchBatch.getChildBatchs());
-
- for (Batch batch : catchBatch.getChildBatchs()) {
- catchBatchDao.removeWithChildren(batch.getId(), catchBatch);
- }
- catchBatch.getChildBatchs().clear();
-
- // Create a new tutti bean CatchBatch, need for method beanToEntity()
- fr.ifremer.tutti.persistence.entities.data.CatchBatch bean = new fr.ifremer.tutti.persistence.entities.data.CatchBatch();
- bean.setId(catchBatch.getId().toString());
-
- // Link the bean to a fake fishingOperation, need in the preconditions for method beanToEntity()
- FishingOperation fishingOperation = new FishingOperation();
- fishingOperation.setId(catchBatch.getFishingOperation().getId().toString());
- bean.setFishingOperation(fishingOperation);
-
- // If need, copy the total weight, to be sure beanToEntity() will restore it
- if (keepTotalWeight) {
- bean.setCatchTotalWeight(catchBatch.getWeight());
- }
-
- beanToEntity(bean, catchBatch, true);
- }
-
- @Override
- public void setCatchBatchDao(CatchBatchExtendDao catchBatchDao) {
- this.catchBatchDao = catchBatchDao;
- }
-
-
- @Override
public CatchBatch createCatchBatch(CatchBatch bean) {
Preconditions.checkNotNull(bean);
Preconditions.checkArgument(bean.getId() == null);
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/batch/ScientificCruiseCatchBatchValidator.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/batch/ScientificCruiseCatchBatchValidator.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/batch/ScientificCruiseCatchBatchValidator.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -25,11 +25,8 @@
*/
-import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
import fr.ifremer.adagio.core.dao.data.batch.Batch;
-import fr.ifremer.adagio.core.dao.data.batch.CatchBatch;
import fr.ifremer.adagio.core.dao.data.batch.CatchBatchExtendDao;
import fr.ifremer.adagio.core.dao.data.batch.SortingBatch;
import fr.ifremer.adagio.core.dao.data.batch.validator.CatchBatchQuickFix;
@@ -41,11 +38,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.stereotype.Component;
import java.util.Collection;
-import java.util.HashSet;
import java.util.List;
import static org.nuiton.i18n.I18n._;
@@ -161,8 +156,6 @@
addWarning(errors, n_("tutti.persistence.batch.validation.horsVracSpeciesNotFound"));
}
- //FIXME - make this work with data to repair :(
- // Hors Vrac > Benthos
SortingBatch benthosBatch = catchBatchDao.getSortingBatch(horsVracBatch.getChildBatchs(),
"pmfmId", enumeration.PMFM_ID_SORTING_TYPE,
enumeration.QUALITATIVE_ID_SORTING_TYPE_BENTHOS);
@@ -208,86 +201,81 @@
}
if (allBatchHasSpecies && !someBatchHasSortingMeasurement) {
errors.clear();
- addError(errors, n_("tutti.persistence.batch.validation.onlySpeciesBatchStructure"), new CatchBatchQuickFix() {
- @Override
- public CatchBatch repair(CatchBatch catchBatch) {
- return ScientificCruiseCatchBatchValidator.this.repairHistoricalData(catchBatch, false);
- }
- });
+ addError(errors,
+ n_("tutti.persistence.batch.validation.onlySpeciesBatchStructure"),
+ null);
+
} else if (allBatchHasSpecies && allBatchHasVrac) {
errors.clear();
- addError(errors, n_("tutti.persistence.batch.validation.onlySpeciesBatchStructure"), new CatchBatchQuickFix() {
- @Override
- public CatchBatch repair(CatchBatch catchBatch) {
- return ScientificCruiseCatchBatchValidator.this.repairHistoricalData(catchBatch, true);
- }
- });
+ addError(errors,
+ n_("tutti.persistence.batch.validation.onlySpeciesBatchStructure"),
+ null);
}
}
}
- /**
- * Repair tree batch, when only species have been found under the cacth batch.
- * This append typically with CGFS cruise.
- *
- * @param catchBatch
- * @return
- */
- protected CatchBatch repairHistoricalData(CatchBatch catchBatch,
- boolean batchHasVracSortingMeasurement) {
- Preconditions.checkNotNull(catchBatch);
- Preconditions.checkNotNull(catchBatch.getId());
- Preconditions.checkNotNull(catchBatch.getFishingOperation());
- Preconditions.checkNotNull(catchBatch.getFishingOperation().getId());
+// /**
+// * Repair tree batch, when only species have been found under the cacth batch.
+// * This append typically with CGFS cruise.
+// *
+// * @param catchBatch
+// * @return
+// */
+// protected CatchBatch repairHistoricalData(CatchBatch catchBatch,
+// boolean batchHasVracSortingMeasurement) {
+// Preconditions.checkNotNull(catchBatch);
+// Preconditions.checkNotNull(catchBatch.getId());
+// Preconditions.checkNotNull(catchBatch.getFishingOperation());
+// Preconditions.checkNotNull(catchBatch.getFishingOperation().getId());
+//
+// // Copy catch batch children
+// Collection<Batch> speciesBatchChilds = Sets.newHashSet();
+// speciesBatchChilds.addAll(catchBatch.getChildBatchs());
+// catchBatch.setChildBatchs(new HashSet<Batch>());
+//
+// // Clean catch batch
+// batchService.cleanEntity(catchBatch, true);
+//
+// SortingBatch speciesBatch = catchBatchDao.getSortingBatch(catchBatch.getChildBatchs(),
+// "pmfmId", enumeration.PMFM_ID_SORTED_UNSORTED, enumeration.QUALITATIVE_VRAC_ID,
+// "pmfmId", enumeration.PMFM_ID_SORTING_TYPE, enumeration.QUALITATIVE_ID_SORTING_TYPE_SPECIES);
+// if (speciesBatch == null) {
+// throw new DataIntegrityViolationException("Invalid batch tree format. Could not retrieve 'Vrac>Species' batch.");
+// }
+//
+// // For all species batch : set the batch 'Vrac>Species' as new parent
+// for (Batch speciesBatchChild : speciesBatchChilds) {
+// SortingBatch batch = (SortingBatch) speciesBatchChild;
+// batch.setParentBatch(speciesBatch);
+//
+// if (batchHasVracSortingMeasurement) {
+// // Remove redundant 'Vrac' sorting measurement
+// SortingMeasurement sm = catchBatchDao.getSortingMeasurement(batch, enumeration.PMFM_ID_SORTED_UNSORTED, null, false);
+// batch.getSortingMeasurements().remove(sm);
+// }
+//
+// batch.setExhaustiveInventory(Boolean.TRUE);
+//
+// // Add an offset into the rank order, because of special batchs 'Biota' (=live) and 'Inert'
+// short rankOrder = (short) (batch.getRankOrder() + 2);
+// batch.setRankOrder(rankOrder);
+//
+// //FIXME-TC We should do nothing with this: this is not our problem...
+// //TODO What to do with weird comments! categorie_individu
+// // Reset comments if set to "taxon"
+// if (batch.getComments() != null && "taxon".equals(batch.getComments())) {
+// batch.setComments(null);
+// }
+//
+// speciesBatch.getChildBatchs().add(batch);
+// }
+//
+// // Save mofidifications :
+// catchBatchDao.update(catchBatch);
+//
+// return catchBatch;
+// }
- // Copy catch batch children
- Collection<Batch> speciesBatchChilds = Sets.newHashSet();
- speciesBatchChilds.addAll(catchBatch.getChildBatchs());
- catchBatch.setChildBatchs(new HashSet<Batch>());
-
- // Clean catch batch
- batchService.cleanEntity(catchBatch, true);
-
- SortingBatch speciesBatch = catchBatchDao.getSortingBatch(catchBatch.getChildBatchs(),
- "pmfmId", enumeration.PMFM_ID_SORTED_UNSORTED, enumeration.QUALITATIVE_VRAC_ID,
- "pmfmId", enumeration.PMFM_ID_SORTING_TYPE, enumeration.QUALITATIVE_ID_SORTING_TYPE_SPECIES);
- if (speciesBatch == null) {
- throw new DataIntegrityViolationException("Invalid batch tree format. Could not retrieve 'Vrac>Species' batch.");
- }
-
- // For all species batch : set the batch 'Vrac>Species' as new parent
- for (Batch speciesBatchChild : speciesBatchChilds) {
- SortingBatch batch = (SortingBatch) speciesBatchChild;
- batch.setParentBatch(speciesBatch);
-
- if (batchHasVracSortingMeasurement) {
- // Remove redundant 'Vrac' sorting measurement
- SortingMeasurement sm = catchBatchDao.getSortingMeasurement(batch, enumeration.PMFM_ID_SORTED_UNSORTED, null, false);
- batch.getSortingMeasurements().remove(sm);
- }
-
- batch.setExhaustiveInventory(Boolean.TRUE);
-
- // Add an offset into the rank order, because of special batchs 'Biota' (=live) and 'Inert'
- short rankOrder = (short) (batch.getRankOrder() + 2);
- batch.setRankOrder(rankOrder);
-
- //FIXME-TC We should do nothing with this: this is not our problem...
- //TODO What to do with weird comments! categorie_individu
- // Reset comments if set to "taxon"
- if (batch.getComments() != null && "taxon".equals(batch.getComments())) {
- batch.setComments(null);
- }
-
- speciesBatch.getChildBatchs().add(batch);
- }
-
- // Save mofidifications :
- catchBatchDao.update(catchBatch);
-
- return catchBatch;
- }
-
protected void addError(List<CatchBatchValidationError> errors,
String messageKey,
CatchBatchQuickFix quickFix) {
Modified: trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceReadTest.java
===================================================================
--- trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceReadTest.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceReadTest.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -28,13 +28,11 @@
import fr.ifremer.adagio.core.dao.data.batch.validator.CatchBatchValidationException;
import fr.ifremer.tutti.persistence.DatabaseResource;
import fr.ifremer.tutti.persistence.entities.data.BatchContainer;
-import fr.ifremer.tutti.persistence.entities.data.CatchBatch;
import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
import fr.ifremer.tutti.persistence.entities.data.SampleCategoryEnum;
import fr.ifremer.tutti.persistence.entities.data.SpeciesBatch;
import fr.ifremer.tutti.persistence.entities.data.SpeciesBatchFrequency;
import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Ignore;
@@ -81,18 +79,11 @@
@Test(expected = CatchBatchValidationException.class)
public void getCatchBatchFromFishingOperation() throws Exception {
+ //TODO-TC Change test when data will be Tutti-aware
// old CGFS tree structure is still not valid
- service.getCatchBatchFromFishingOperation(fishingOperation.getId(), false);
+ service.getCatchBatchFromFishingOperation(fishingOperation.getId());
}
- @Test
- public void getCatchBatchFromFishingOperationAndRepair() throws Exception {
-
- // old CGFS tree structure is still not valid, but can be repair
- CatchBatch catchBatch = service.getCatchBatchFromFishingOperation(fishingOperation.getId(), true);
- Assert.assertNotNull(catchBatch);
- }
-
@Ignore
@Test
public void getRootSpeciesBatch(/*String fishingOperationId*/) {
@@ -113,7 +104,9 @@
}
- public static void assertSpeciesBatch(SpeciesBatch expectedBatch, SpeciesBatch actualBatch, boolean assertIdEquals) {
+ public static void assertSpeciesBatch(SpeciesBatch expectedBatch,
+ SpeciesBatch actualBatch,
+ boolean assertIdEquals) {
assertNotNull(actualBatch);
assertNotNull(actualBatch.getId());
if (assertIdEquals && expectedBatch.getId() != null) {
Modified: trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceWriteTest.java
===================================================================
--- trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceWriteTest.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/BatchPersistenceServiceWriteTest.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -723,7 +723,7 @@
CatchBatch reloadedCatchBatch = null;
try {
- reloadedCatchBatch = service.getCatchBatchFromFishingOperation(fishingOperationId, false);
+ reloadedCatchBatch = service.getCatchBatchFromFishingOperation(fishingOperationId);
} catch (CatchBatchValidationException e) {
Assert.fail(e.getMessage());
}
@@ -740,7 +740,7 @@
CatchBatch reloadedCatchBatch = null;
try {
- reloadedCatchBatch = service.getCatchBatchFromFishingOperation(fishingOperationId, false);
+ reloadedCatchBatch = service.getCatchBatchFromFishingOperation(fishingOperationId);
} catch (CatchBatchValidationException e) {
Assert.fail(e.getMessage());
}
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -534,11 +534,9 @@
//------------------------------------------------------------------------//
@Override
- public CatchBatch getCatchBatchFromFishingOperation(String id,
- boolean canRepair) throws InvalidBatchModelException {
+ public CatchBatch getCatchBatchFromFishingOperation(String id) throws InvalidBatchModelException {
+ return driver.getCatchBatchFromFishingOperation(id);
- return driver.getCatchBatchFromFishingOperation(id, canRepair);
-
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -25,6 +25,7 @@
*/
import com.google.common.collect.Lists;
+import fr.ifremer.tutti.persistence.InvalidBatchModelException;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
import fr.ifremer.tutti.persistence.entities.data.Attachment;
import fr.ifremer.tutti.persistence.entities.data.CatchBatch;
@@ -516,6 +517,8 @@
attachments = Collections.emptyList();
+ getModel().setCatchEnabled(true);
+
} else {
String operationId = bean.getId();
@@ -528,14 +531,23 @@
PersistenceService persistenceService =
getContext().getPersistenceService();
- batch = persistenceService.getCatchBatchFromFishingOperation(
- operationId, true);
- batch.setFishingOperation(bean);
+ try {
+ batch = persistenceService.getCatchBatchFromFishingOperation(operationId);
+ batch.setFishingOperation(bean);
+ Integer objectId = Integer.valueOf(batch.getId());
+ attachments = persistenceService.getAllAttachments(objectId);
+ getModel().setCatchEnabled(true);
+ } catch (InvalidBatchModelException e) {
- Integer objectId = Integer.valueOf(batch.getId());
+ // batch is not compatible with Tutti
+ if (log.isDebugEnabled()) {
+ log.debug("Invalid batch model");
+ }
+ batch = null;
+ attachments = Collections.emptyList();
-
- attachments = persistenceService.getAllAttachments(objectId);
+ getModel().setCatchEnabled(false);
+ }
}
catchesUIModel.setCatchBatch(batch);
@@ -560,7 +572,7 @@
// 4) Propagate new selected fishingoperation to others tabs
- ui.getSpeciesTabContent().getHandler().selectFishingOperation(bean);
+ ui.getSpeciesTabContent().getHandler().selectFishingOperation(batch == null ? null : bean);
// ui.getBenthosTabContent().getHandler().selectFishingOperation(bean);
// ui.getPlanktonTabContent().getHandler().selectFishingOperation(bean);
// ui.getMacroWasteTabContent().getHandler().selectFishingOperation(bean);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUI.css 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUI.css 2013-03-13 07:33:30 UTC (rev 601)
@@ -52,8 +52,19 @@
_help: {"tuttihelp.fishingOperations.field.fishingOperation.help"};
}
+#warningContainer {
+ background: {new java.awt.Color(245, 218, 88)};
+ visible: {!model.isCatchEnabled()};
+}
+
+#warningLabel {
+ actionIcon: warning;
+ border: {new javax.swing.border.EmptyBorder(5, 10, 5, 10)};
+ text: "tutti.warn.invalid.batch.model";
+}
+
#catchesTab {
- enabled: {model.getSelectedFishingOperation() != null};
+ enabled: {model.getSelectedFishingOperation() != null && model.isCatchEnabled()};
}
#noTraitPane {
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUI.jaxx 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUI.jaxx 2013-03-13 07:33:30 UTC (rev 601)
@@ -74,6 +74,13 @@
<JButton id='newFishingOperationButton'/>
</cell>
</row>
+ <row>
+ <cell columns='2'>
+ <JPanel id='warningContainer' layout='{new BorderLayout(10, 10)}'>
+ <JLabel id='warningLabel' constraints='BorderLayout.CENTER'/>
+ </JPanel>
+ </cell>
+ </row>
</Table>
<!-- Current selected fishingOperation -->
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIModel.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIModel.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -53,6 +53,7 @@
public static final String PROPERTY_SELECTED_FISHING_OPERATION = "selectedFishingOperation";
public static final String PROPERTY_EDITED_FISHING_OPERATION = "editedFishingOperation";
+ public static final String PROPERTY_CATCH_ENABLED = "catchEnabled";
/**
* List of existing fishing operation for the selected cruise.
@@ -106,6 +107,12 @@
*/
protected boolean editionAdjusting;
+ /**
+ * Flag to use or not catch tab.
+ * @since 1.1
+ */
+ protected boolean catchEnabled;
+
public List<FishingOperation> getFishingOperation() {
return fishingOperation;
}
@@ -195,4 +202,14 @@
TuttiEntities.findById(fishingOperation, id);
return result;
}
+
+ public boolean isCatchEnabled() {
+ return catchEnabled;
+ }
+
+ public void setCatchEnabled(boolean catchEnabled) {
+ boolean oldValue = isCatchEnabled();
+ this.catchEnabled = catchEnabled;
+ firePropertyChange(PROPERTY_CATCH_ENABLED, oldValue, catchEnabled);
+ }
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/NewFishingOperationAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/NewFishingOperationAction.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/NewFishingOperationAction.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -51,6 +51,8 @@
// deselect selected fishingOperation
// Will remove the selection fishing operation from the comboBox
+ model.setCatchEnabled(true);
+
model.setEditionAdjusting(true);
try {
model.setSelectedFishingOperation(null);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/AbstractTuttiUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/AbstractTuttiUIHandler.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/AbstractTuttiUIHandler.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -264,6 +264,8 @@
public static final String CONFIRMATION_FORMAT = "<html>%s<hr/><br/>%s</html>";
+ public static final String WARNING_FORMAT = "<html>%s<hr/></html>";
+
public int askSaveBeforeLeaving(String message) {
String htmlMessage = String.format(
CONFIRMATION_FORMAT,
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiExceptionHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiExceptionHandler.java 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiExceptionHandler.java 2013-03-13 07:33:30 UTC (rev 601)
@@ -66,28 +66,6 @@
Throwable cause = ex;
-// if (cause instanceof NullPointerException) {
-//
-// // See http://forge.codelutin.com/issues/2055
-// if (ex.getStackTrace().length > 0 &&
-// ex.getStackTrace()[0].getClassName().contains("swing.")) {
-// if (log.isWarnEnabled()) {
-// log.warn("AWT bad error (See http://forge.codelutin.com/issues/2055)", ex);
-// }
-// return;
-// }
-// }
-//
-// if (cause instanceof IndexOutOfBoundsException) {
-// // See http://forge.codelutin.com/issues/2055
-// if (ex.getStackTrace().length > 0 &&
-// "convertRowIndexToModel".equals(ex.getStackTrace()[0].getMethodName())) {
-// if (log.isWarnEnabled()) {
-// log.warn("AWT bad error (See http://forge.codelutin.com/issues/2055)", ex);
-// }
-// return;
-// }
-// }
if (cause instanceof TuttiTechnicalException) {
cause = cause.getCause();
}
@@ -101,18 +79,14 @@
TuttiActionException actionException = (TuttiActionException) cause;
cause = cause.getCause();
- // close action ui
-
-
action = actionException.getAction();
if (action instanceof AbstractChangeScreenAction) {
backToScreen = true;
}
-// TuttiUIContext.getApplicationContext().getActionUI().getModel().clear();
}
- TuttiUIContext.getErrorHelper().showErrorDialog(cause.getMessage(), ex);
+ TuttiUIContext.getErrorHelper().showErrorDialog(cause.getMessage(), cause);
if (backToScreen) {
action.getContext().setScreen(TuttiScreen.SELECT_CRUISE);
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-13 07:33:30 UTC (rev 601)
@@ -138,6 +138,7 @@
tutti.dialog.createMelag.error.title=
tutti.dialog.createMelag.message=
tutti.dialog.createMelag.title=
+tutti.dialog.warnUser.title=
tutti.duration.format=
tutti.error.errorpane.htmlmessage=
tutti.file.csv=
@@ -150,6 +151,7 @@
tutti.flash.information.cruiseSaved=
tutti.flash.information.db.closed=
tutti.flash.information.db.exported=
+tutti.flash.information.db.installed=
tutti.flash.information.db.installed.=
tutti.flash.information.db.opened=
tutti.flash.information.programCreated=
@@ -159,6 +161,8 @@
tutti.flash.information.species.add.to.protocol=
tutti.flash.information.species.exported.from.protocol=
tutti.flash.information.species.imported.in.protocol=
+tutti.flash.information.species.imported.in.protocol.oneReplaced=
+tutti.flash.information.species.imported.in.protocol.severalReplaced=
tutti.flash.information.species.remove.from.protocol=
tutti.flash.information.species.replaced=
tutti.information.db.loaded=
@@ -519,6 +523,7 @@
tutti.validator.warning.longitude.minute.outOfBounds=
tutti.validator.warning.longitude.outOfBounds=
tutti.validator.warning.longitude.second.outOfBounds=
+tutti.warn.invalid.batch.model=
tutti.weights.rate.difference.totalAndSorted.description=
tuttihelp.createSpeciesBatch.action.addSpecies.tip=
tuttihelp.createSpeciesBatch.action.cancel.tip=
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-12 23:08:47 UTC (rev 600)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-13 07:33:30 UTC (rev 601)
@@ -148,6 +148,7 @@
tutti.dialog.createMelag.error.title=Erreur
tutti.dialog.createMelag.message=Combien pesait le MELAG (kg) ?
tutti.dialog.createMelag.title=Poids du MELAG (kg)
+tutti.dialog.warnUser.title=Avertissement\!
tutti.duration.format=dj Hh m'm'
tutti.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
tutti.file.csv=Extension d'un fichier csv
@@ -545,6 +546,7 @@
tutti.validator.warning.longitude.minute.outOfBounds=La minute de la latitude doit être comprise entre 0 et 60
tutti.validator.warning.longitude.outOfBounds=La Latitude doit être comprise entre -180.0 et 180.0
tutti.validator.warning.longitude.second.outOfBounds=La seconde de la longitude doit être comprise entre 0 et 60
+tutti.warn.invalid.batch.model=L'arbre d'échantillonage n'est pas compatible. Les captures ne seront pas visibles.
tuttihelp.createSpeciesBatch.action.addSpecies.tip=Sélectionner une autre espèce
tuttihelp.createSpeciesBatch.action.cancel.tip=
tuttihelp.createSpeciesBatch.action.save.tip=
1
0
12 Mar '13
Author: tchemit
Date: 2013-03-13 00:08:47 +0100 (Wed, 13 Mar 2013)
New Revision: 600
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/600
Log:
fixes #2006: [TECH] - Am?\195?\169liorer la progression lors des mises ?\195?\160 jour
Modified:
trunk/pom.xml
trunk/tutti-persistence/pom.xml
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/ProgressionModel.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/entities/protocol/TuttiProtocols.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/protocol/TuttiProtocolImportExportService.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/referential/TuttiReferentialImportExportService.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/UpdateApplicationAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/UpdateReferentialAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/pom.xml 2013-03-12 23:08:47 UTC (rev 600)
@@ -120,7 +120,7 @@
<!-- libraries version -->
- <nuitonUtilsVersion>2.6.10</nuitonUtilsVersion>
+ <nuitonUtilsVersion>2.6.11-SNAPSHOT</nuitonUtilsVersion>
<nuitonI18nVersion>2.5</nuitonI18nVersion>
<eugenePluginVersion>2.6.1</eugenePluginVersion>
Modified: trunk/tutti-persistence/pom.xml
===================================================================
--- trunk/tutti-persistence/pom.xml 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/tutti-persistence/pom.xml 2013-03-12 23:08:47 UTC (rev 600)
@@ -57,6 +57,11 @@
</dependency>
<dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-updater</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.nuiton.i18n</groupId>
<artifactId>nuiton-i18n</artifactId>
</dependency>
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/ProgressionModel.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/ProgressionModel.java 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/ProgressionModel.java 2013-03-12 23:08:47 UTC (rev 600)
@@ -25,6 +25,7 @@
*/
import org.jdesktop.beans.AbstractSerializableBean;
+import org.nuiton.util.updater.DownloadMonitor;
/**
* Simple model for a progression long task.
@@ -32,7 +33,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 1.0
*/
-public class ProgressionModel extends AbstractSerializableBean {
+public class ProgressionModel extends AbstractSerializableBean implements DownloadMonitor {
private static final long serialVersionUID = 1L;
@@ -86,7 +87,6 @@
Object oldValue = getRate();
this.rate = rate;
firePropertyChange(PROPERTY_RATE, oldValue, rate);
-
}
public String getMessage() {
@@ -98,4 +98,14 @@
this.message = message;
firePropertyChange(PROPERTY_MESSAGE, oldValue, message);
}
+
+ @Override
+ public void setSize(long size) {
+ setTotal((int)size);
+ }
+
+ @Override
+ public void setCurrent(long current) {
+ setCurrent((int)current);
+ }
}
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/entities/protocol/TuttiProtocols.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/entities/protocol/TuttiProtocols.java 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/entities/protocol/TuttiProtocols.java 2013-03-12 23:08:47 UTC (rev 600)
@@ -28,9 +28,9 @@
import com.esotericsoftware.yamlbeans.YamlReader;
import com.esotericsoftware.yamlbeans.YamlWriter;
import com.google.common.base.Charsets;
-import com.google.common.io.Closeables;
import com.google.common.io.Files;
import fr.ifremer.tutti.TuttiTechnicalException;
+import org.apache.commons.io.IOUtils;
import java.io.BufferedWriter;
import java.io.File;
@@ -58,7 +58,7 @@
} catch (Exception e) {
throw new TuttiTechnicalException("Could not transform protocol " + id + " to file " + file, e);
} finally {
- Closeables.closeQuietly(fileWriter);
+ IOUtils.closeQuietly(fileWriter);
}
}
@@ -75,7 +75,7 @@
} catch (Exception e) {
throw new TuttiTechnicalException("Could not import protocol from file " + file, e);
} finally {
- Closeables.closeQuietly(fileReader);
+ IOUtils.closeQuietly(fileReader);
}
}
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/protocol/TuttiProtocolImportExportService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/protocol/TuttiProtocolImportExportService.java 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/protocol/TuttiProtocolImportExportService.java 2013-03-12 23:08:47 UTC (rev 600)
@@ -31,7 +31,6 @@
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.google.common.collect.TreeMultimap;
-import com.google.common.io.Closeables;
import com.google.common.io.Files;
import fr.ifremer.tutti.TuttiTechnicalException;
import fr.ifremer.tutti.persistence.entities.protocol.SpeciesProtocol;
@@ -41,6 +40,7 @@
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.service.AbstractTuttiService;
import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.util.beans.Binder;
@@ -107,14 +107,14 @@
}
importer.close();
} finally {
- Closeables.closeQuietly(importer);
+ IOUtils.closeQuietly(importer);
}
reader.close();
} catch (Exception e) {
throw new IOException("Could not import protocol [" + protocol.getName() + "] caracteristic from file " + file, e);
} finally {
- Closeables.closeQuietly(reader);
+ IOUtils.closeQuietly(reader);
}
protocol.setLengthClassesPmfmId(
@@ -157,7 +157,7 @@
} catch (Exception e) {
throw new TuttiTechnicalException("Could not export all caracteristics to file " + file, e);
} finally {
- Closeables.closeQuietly(writer);
+ IOUtils.closeQuietly(writer);
}
}
@@ -201,7 +201,7 @@
} catch (Exception e) {
throw new TuttiTechnicalException("Could not export protocol [" + protocol.getName() + "] caracteristic to file " + file, e);
} finally {
- Closeables.closeQuietly(writer);
+ IOUtils.closeQuietly(writer);
}
}
@@ -259,13 +259,13 @@
}
importer.close();
} finally {
- Closeables.closeQuietly(importer);
+ IOUtils.closeQuietly(importer);
}
reader.close();
} catch (Exception e) {
throw new TuttiTechnicalException("Could not import protocol [" + protocol.getName() + "] caracteristic from file " + file, e);
} finally {
- Closeables.closeQuietly(reader);
+ IOUtils.closeQuietly(reader);
}
List<SpeciesProtocol> values = Lists.newArrayList(ids.values());
@@ -302,7 +302,7 @@
} catch (Exception e) {
throw new TuttiTechnicalException("Could not export species protocol to file " + file, e);
} finally {
- Closeables.closeQuietly(writer);
+ IOUtils.closeQuietly(writer);
}
}
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/referential/TuttiReferentialImportExportService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/referential/TuttiReferentialImportExportService.java 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/referential/TuttiReferentialImportExportService.java 2013-03-12 23:08:47 UTC (rev 600)
@@ -29,7 +29,6 @@
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
-import com.google.common.io.Closeables;
import com.google.common.io.Files;
import fr.ifremer.tutti.TuttiTechnicalException;
import fr.ifremer.tutti.persistence.entities.referential.Gear;
@@ -39,6 +38,7 @@
import fr.ifremer.tutti.service.AbstractTuttiService;
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.service.TuttiServiceContext;
+import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.util.csv.Export;
@@ -99,14 +99,14 @@
}
importer.close();
} finally {
- Closeables.closeQuietly(importer);
+ IOUtils.closeQuietly(importer);
}
reader.close();
} catch (Exception e) {
throw new IOException("Could not import species from file " + file, e);
} finally {
- Closeables.closeQuietly(reader);
+ IOUtils.closeQuietly(reader);
}
List<Species> result =
@@ -148,14 +148,14 @@
}
importer.close();
} finally {
- Closeables.closeQuietly(importer);
+ IOUtils.closeQuietly(importer);
}
reader.close();
} catch (Exception e) {
throw new IOException("Could not import vessels from file " + file, e);
} finally {
- Closeables.closeQuietly(reader);
+ IOUtils.closeQuietly(reader);
}
List<Vessel> result =
persistenceService.importTemporaryVessel(toImport);
@@ -181,14 +181,14 @@
}
importer.close();
} finally {
- Closeables.closeQuietly(importer);
+ IOUtils.closeQuietly(importer);
}
reader.close();
} catch (Exception e) {
throw new IOException("Could not import persons from file " + file, e);
} finally {
- Closeables.closeQuietly(reader);
+ IOUtils.closeQuietly(reader);
}
List<Person> result =
persistenceService.importTemporaryPerson(toImport);
@@ -229,14 +229,14 @@
}
importer.close();
} finally {
- Closeables.closeQuietly(importer);
+ IOUtils.closeQuietly(importer);
}
reader.close();
} catch (Exception e) {
throw new IOException("Could not import gears from file " + file, e);
} finally {
- Closeables.closeQuietly(reader);
+ IOUtils.closeQuietly(reader);
}
List<Gear> result = persistenceService.importTemporaryGear(toImport);
return result;
@@ -272,7 +272,7 @@
} catch (Exception e) {
throw new TuttiTechnicalException("Could not export species to file: " + file, e);
} finally {
- Closeables.closeQuietly(writer);
+ IOUtils.closeQuietly(writer);
}
}
@@ -318,7 +318,7 @@
} catch (Exception e) {
throw new TuttiTechnicalException("Could not export species to file: " + file, e);
} finally {
- Closeables.closeQuietly(writer);
+ IOUtils.closeQuietly(writer);
}
}
@@ -355,7 +355,7 @@
} catch (Exception e) {
throw new TuttiTechnicalException("Could not export species to file: " + file, e);
} finally {
- Closeables.closeQuietly(writer);
+ IOUtils.closeQuietly(writer);
}
}
@@ -398,7 +398,7 @@
} catch (Exception e) {
throw new TuttiTechnicalException("Could not export species to file: " + file, e);
} finally {
- Closeables.closeQuietly(writer);
+ IOUtils.closeQuietly(writer);
}
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/UpdateApplicationAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/UpdateApplicationAction.java 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/UpdateApplicationAction.java 2013-03-12 23:08:47 UTC (rev 600)
@@ -71,13 +71,12 @@
File dest = new File(config.getTuttiBasedir(), "NEW");
if (log.isInfoEnabled()) {
- log.info(String.format("Try to update jre, i18N or tutti (current application location: %s), using update url: %s", current, url));
+ log.info(String.format("Try to update jre, i18N, help or tutti (current application location: %s), using update url: %s", current, url));
}
- ApplicationUpdater up = new ApplicationUpdater();
ProgressionModel progressionModel = new ProgressionModel();
context.getActionUI().getModel().setProgressionModel(progressionModel);
- progressionModel.setMessage("Recherche de mises à jour de JRE / Tutti / I18N");
+ progressionModel.setMessage("Recherche de mises à jour de JRE / Tutti / I18N / Help");
TuttiApplicationUpdaterCallBack callback =
new TuttiApplicationUpdaterCallBack(this, progressionModel);
@@ -86,6 +85,8 @@
TuttiApplicationUpdaterCallBack.UpdateType.I18N,
TuttiApplicationUpdaterCallBack.UpdateType.TUTTI,
TuttiApplicationUpdaterCallBack.UpdateType.HELP);
+ ApplicationUpdater up = new ApplicationUpdater();
+ up.setDownloadMonitor(progressionModel);
up.update(url,
current,
dest,
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/UpdateReferentialAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/UpdateReferentialAction.java 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/UpdateReferentialAction.java 2013-03-12 23:08:47 UTC (rev 600)
@@ -61,7 +61,6 @@
if (log.isInfoEnabled()) {
log.info(String.format("Try to update db (current data location: %s), using update url: %s", current, url));
}
- ApplicationUpdater up = new ApplicationUpdater();
File dest = new File(config.getTuttiBasedir(), "NEW");
ProgressionModel progressionModel = new ProgressionModel();
@@ -70,6 +69,8 @@
TuttiApplicationUpdaterCallBack callback =
new TuttiApplicationUpdaterCallBack(this, progressionModel);
callback.setTypes(TuttiApplicationUpdaterCallBack.UpdateType.DB);
+ ApplicationUpdater up = new ApplicationUpdater();
+ up.setDownloadMonitor(progressionModel);
up.update(url,
current,
dest,
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java 2013-03-12 23:08:47 UTC (rev 600)
@@ -68,6 +68,7 @@
File dest = new File(config.getTuttiBasedir(), "NEW");
ProgressionModel progressionModel = new ProgressionModel();
+ up.setDownloadMonitor(progressionModel);
getContext().getActionUI().getModel().setProgressionModel(progressionModel);
progressionModel.setMessage("Recherche de mises à jour de base");
@@ -90,6 +91,6 @@
super.postSuccessAction();
String jdbcUrl = TuttiPersistenceConfig.getInstance().getJdbcUrl();
- sendMessage(_("tutti.flash.information.db.installed.", jdbcUrl));
+ sendMessage(_("tutti.flash.information.db.installed", jdbcUrl));
}
}
\ No newline at end of file
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-12 18:50:50 UTC (rev 599)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-12 23:08:47 UTC (rev 600)
@@ -161,7 +161,6 @@
tutti.flash.information.db.closed=La base de données <strong>%s</strong> est fermée.
tutti.flash.information.db.exported=Base exportée dans l'archive <strong>%s</strong>.
tutti.flash.information.db.installed=La base de données <strong>%s</strong> est installée.
-tutti.flash.information.db.installed.=
tutti.flash.information.db.opened=La base de données <strong>%s</strong> est ouverte.
tutti.flash.information.programCreated=La série de campagne <strong>%s</strong> a été créée.
tutti.flash.information.programSaved=La série de campagne <strong>%s</strong> a été enregistrée.
1
0
See <http://ci.nuiton.org/jenkins/job/tutti/488/changes>
Changes:
[Kevin Morin] fixes #2128 [especes] élévation de spoids impossible alors que tout semble ok
[Kevin Morin] use last jaxx snapshot
------------------------------------------
[...truncated 242 lines...]
[INFO] Installing <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/pom.xml> to /var/local/maven/data/repository/fr/ifremer/tutti/tutti-persistence/1.1-SNAPSHOT/tutti-persistence-1.1-SNAPSHOT.pom
mojoSucceeded org.apache.maven.plugins:maven-install-plugin:2.4(default-install)
projectSucceeded fr.ifremer.tutti:tutti-persistence:1.1-SNAPSHOT
projectStarted fr.ifremer.tutti:tutti-service:1.1-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tutti :: Service 1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
mojoStarted org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)[INFO] Deleting <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target>
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tutti-service ---
mojoSucceeded org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)
mojoStarted org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (check-project-files) @ tutti-service ---
mojoSucceeded org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:parserJava (scan-sources) @ tutti-service ---
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
forkedProjectStarted fr.ifremer.tutti:tutti-service:1.1-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(get)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:get (get) @ tutti-service ---
[INFO] Copying tutti-service.properties to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/genera…>
[INFO] Copying tutti-service.properties to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/genera…>
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(get)
forkedProjectSucceeded fr.ifremer.tutti:tutti-service:1.1-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)[WARNING] bundle en_GB contains 48/48 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:gen (scan-sources) @ tutti-service ---
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
mojoStarted org.apache.maven.plugins:maven-resources-plugin:2.6(default-resources)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tutti-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
mojoSucceeded org.apache.maven.plugins:maven-resources-plugin:2.6(default-resources)
mojoStarted org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-compile)
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ tutti-service ---
[INFO] Compiling 23 source files to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/classes>
mojoSucceeded org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-compile)[WARNING] bootstrap class path not set in conjunction with -source 1.6
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[102,26] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[109,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[151,26] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[158,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[184,26] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[191,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[232,26] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[239,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[275,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[321,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[358,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[401,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[110,26] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[117,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[160,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[204,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[262,26] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[268,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/src/main/java…>:[305,22] [deprecation] closeQuietly(Closeable) in Closeables has been deprecated
mojoStarted org.apache.maven.plugins:maven-antrun-plugin:1.7(generate-surefire-workdir)
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ tutti-service ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
[INFO] Executed tasks
mojoSucceeded org.apache.maven.plugins:maven-antrun-plugin:1.7(generate-surefire-workdir)
mojoStarted org.apache.maven.plugins:maven-resources-plugin:2.6(default-testResources)
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ tutti-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
mojoSucceeded org.apache.maven.plugins:maven-resources-plugin:2.6(default-testResources)
mojoStarted org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-testCompile)
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ tutti-service ---
[INFO] Compiling 2 source files to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/test-c…>
mojoSucceeded org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-testCompile)
mojoStarted org.apache.maven.plugins:maven-surefire-plugin:2.14(default-test)
[INFO]
[INFO] --- maven-surefire-plugin:2.14:test (default-test) @ tutti-service ---
[INFO] Surefire report directory: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportServiceTest
2013-03-12 19:32:40,752 0 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will export species to file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-12 19:32:40,800 48 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.protocol.SpeciesProtocol - fr.ifremer.tutti.service.protocol.SpeciesRow > [null] , will create a new default one.
2013-03-12 19:32:41,129 377 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will export all caracteristics to file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-12 19:32:41,149 397 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will import protocol [null] species from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-12 19:32:41,160 408 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.service.protocol.SpeciesRow - fr.ifremer.tutti.persistence.entities.protocol.SpeciesProtocol > [null] , will create a new default one.
2013-03-12 19:32:41,230 478 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will export all caracteristics to file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-12 19:32:41,234 482 [main] INFO fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService - Will import protocol caracteristic from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.794 sec
Running fr.ifremer.tutti.service.referential.TuttiReferentialImportExportServiceTest
2013-03-12 19:32:41,287 535 [main] INFO org.nuiton.util.converter.ConverterUtil - register converter org.nuiton.util.converter.URLConverter@14356844
2013-03-12 19:32:41,288 536 [main] INFO org.nuiton.util.converter.ConverterUtil - register converter org.nuiton.util.converter.URIConverter@4d9ab59a
2013-03-12 19:32:41,291 539 [main] INFO org.nuiton.util.converter.ConverterUtil - register converter org.nuiton.util.converter.VersionConverter@1cd42fe0
2013-03-12 19:32:41,294 542 [main] INFO org.nuiton.util.converter.ConverterUtil - register converter org.nuiton.util.converter.LocaleConverter@747df593
2013-03-12 19:32:41,387 635 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-12 19:32:41,392 640 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-12 19:32:41,403 651 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-12 19:32:41,407 655 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-12 19:32:41,407 655 [main] INFO fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService - Will import persons from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-12 19:32:41,408 656 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.referential.Person - fr.ifremer.tutti.persistence.entities.referential.Person > [null] , will create a new default one.
2013-03-12 19:32:41,416 664 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-12 19:32:41,419 667 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-12 19:32:41,420 668 [main] INFO fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService - Will import vessels from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-12 19:32:41,442 690 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.referential.Vessel - fr.ifremer.tutti.persistence.entities.referential.Vessel > [null] , will create a new default one.
2013-03-12 19:32:41,447 695 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-12 19:32:41,450 698 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-12 19:32:41,459 707 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-12 19:32:41,462 710 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-12 19:32:41,468 716 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-12 19:32:41,471 719 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-12 19:32:41,480 728 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-12 19:32:41,483 731 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-12 19:32:41,484 732 [main] INFO fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService - Will import species from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-12 19:32:41,485 733 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.referential.Species - fr.ifremer.tutti.persistence.entities.referential.Species > [null] , will create a new default one.
2013-03-12 19:32:41,492 740 [main] INFO fr.ifremer.tutti.service.PersistenceService - Open persistence service
2013-03-12 19:32:41,495 743 [main] INFO fr.ifremer.tutti.service.PersistenceService - Persistence driver *Mock persistence service implementation* opened.
2013-03-12 19:32:41,495 743 [main] INFO fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService - Will import gears from file: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/surefi…>
2013-03-12 19:32:41,498 746 [main] INFO org.nuiton.util.beans.BinderFactory - No binder model found for <fr.ifremer.tutti.persistence.entities.referential.Gear - fr.ifremer.tutti.persistence.entities.referential.Gear > [null] , will create a new default one.
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.237 sec
Results :
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0
mojoSucceeded org.apache.maven.plugins:maven-surefire-plugin:2.14(default-test)
[JENKINS] Recording test results
mojoStarted org.apache.maven.plugins:maven-jar-plugin:2.4(default-jar)
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ tutti-service ---
[INFO] Building jar: <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/tutti-…>
mojoSucceeded org.apache.maven.plugins:maven-jar-plugin:2.4(default-jar)
mojoStarted org.apache.maven.plugins:maven-site-plugin:3.2(attach-descriptor)
[INFO]
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ tutti-service ---
mojoSucceeded org.apache.maven.plugins:maven-site-plugin:3.2(attach-descriptor)
mojoStarted org.apache.maven.plugins:maven-install-plugin:2.4(default-install)
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ tutti-service ---
[INFO] Installing <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/tutti-…> to /var/local/maven/data/repository/fr/ifremer/tutti/tutti-service/1.1-SNAPSHOT/tutti-service-1.1-SNAPSHOT.jar
[INFO] Installing <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/pom.xml> to /var/local/maven/data/repository/fr/ifremer/tutti/tutti-service/1.1-SNAPSHOT/tutti-service-1.1-SNAPSHOT.pom
mojoSucceeded org.apache.maven.plugins:maven-install-plugin:2.4(default-install)
projectSucceeded fr.ifremer.tutti:tutti-service:1.1-SNAPSHOT
projectStarted fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tutti :: UI 1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
[WARNING] The POM for org.nuiton.jaxx:jaxx-maven-plugin:jar:2.5.14-SNAPSHOT is missing, no dependency information available
projectFailed fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT
sessionEnded
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Tutti ............................................. SUCCESS [6.527s]
[INFO] Tutti :: Persistence .............................. SUCCESS [18.710s]
[INFO] Tutti :: Service .................................. SUCCESS [3.352s]
[INFO] Tutti :: UI ....................................... FAILURE [0.495s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.617s
[INFO] Finished at: Tue Mar 12 19:32:42 CET 2013
[INFO] Final Memory: 35M/122M
[INFO] ------------------------------------------------------------------------
Projects to build: [MavenProject: fr.ifremer:tutti:1.1-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/pom.xml,> MavenProject: fr.ifremer.tutti:tutti-persistence:1.1-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/pom.xml,> MavenProject: fr.ifremer.tutti:tutti-service:1.1-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/pom.xml,> MavenProject: fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/pom.xml]>
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-service/builds/2013-03-12_19-32-06/archive/fr.ifremer.tutti/tutti-service/1.1-SNAPSHOT/tutti-service-1.1-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/tutti-…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-service/builds/2013-03-12_19-32-06/archive/fr.ifremer.tutti/tutti-service/1.1-SNAPSHOT/tutti-service-1.1-SNAPSHOT.jar
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-ui-swing/builds/2013-03-12_19-32-06/archive/fr.ifremer.tutti/tutti-ui-swing/1.1-SNAPSHOT/tutti-ui-swing-1.1-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer$tutti/builds/2013-03-12_19-32-06/archive/fr.ifremer/tutti/1.1-SNAPSHOT/tutti-1.1-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/target/tutti-1.1-SNAPSHOT-s…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer$tutti/builds/2013-03-12_19-32-06/archive/fr.ifremer/tutti/1.1-SNAPSHOT/tutti-1.1-SNAPSHOT-site_fr.xml
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-persistence/builds/2013-03-12_19-32-06/archive/fr.ifremer.tutti/tutti-persistence/1.1-SNAPSHOT/tutti-persistence-1.1-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/target/tu…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-persistence/builds/2013-03-12_19-32-06/archive/fr.ifremer.tutti/tutti-persistence/1.1-SNAPSHOT/tutti-persistence-1.1-SNAPSHOT.jar
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Plugin org.nuiton.jaxx:jaxx-maven-plugin:2.5.14-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.nuiton.jaxx:jaxx-maven-plugin:jar:2.5.14-SNAPSHOT
cause : Failed to read artifact descriptor for org.nuiton.jaxx:jaxx-maven-plugin:jar:2.5.14-SNAPSHOT
Stack trace :
org.apache.maven.plugin.PluginResolutionException: Plugin org.nuiton.jaxx:jaxx-maven-plugin:2.5.14-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.nuiton.jaxx:jaxx-maven-plugin:jar:2.5.14-SNAPSHOT
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateLifecycleMappings(DefaultLifecycleExecutionPlanCalculator.java:280)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:193)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:112)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:129)
at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(BuilderCommon.java:92)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.nuiton.jaxx:jaxx-maven-plugin:jar:2.5.14-SNAPSHOT
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:279)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:115)
... 33 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact org.nuiton.jaxx:jaxx-maven-plugin:pom:2.5.14-SNAPSHOT in central (http://nexus.nuiton.org/nexus/content/groups/public)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
... 36 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.nuiton.jaxx:jaxx-maven-plugin:pom:2.5.14-SNAPSHOT in central (http://nexus.nuiton.org/nexus/content/groups/public)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:947)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
... 3 more
Sending e-mails to: tutti-commits(a)list.forge.codelutin.com kmorin(a)codelutin.com
channel stopped
1
1
12 Mar '13
See <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/488/…>
Changes:
[Kevin Morin] fixes #2128 [especes] élévation de spoids impossible alors que tout semble ok
------------------------------------------
projectStarted fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tutti :: UI 1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
[WARNING] The POM for org.nuiton.jaxx:jaxx-maven-plugin:jar:2.5.14-SNAPSHOT is missing, no dependency information available
projectFailed fr.ifremer.tutti:tutti-ui-swing:1.1-SNAPSHOT
1
1