Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
009322bb
by Tony Chemit at 2023-07-13T17:26:48+02:00
-
c7b2088e
by Tony Chemit at 2023-07-13T17:27:44+02:00
4 changed files:
- client/configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/actions/Apply.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/task/SwingReferentialSynchronizeTask.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/RunObserveListener.java
Changes:
| ... | ... | @@ -320,11 +320,8 @@ public class ClientConfig extends GeneratedClientConfig implements TripMapConfig |
| 320 | 320 | }
|
| 321 | 321 | }
|
| 322 | 322 | |
| 323 | - public File initLog() throws IOException {
|
|
| 323 | + public File initLog() {
|
|
| 324 | 324 | File logFile = getLogConfigurationFile();
|
| 325 | - if (isVersionSnapshot()) {
|
|
| 326 | - Files.deleteIfExists(logFile.toPath());
|
|
| 327 | - }
|
|
| 328 | 325 | log.info(String.format("Loading user log file at %s", logFile));
|
| 329 | 326 | |
| 330 | 327 | ObserveUtil.loadLogConfiguration(ClientResources.LOG_CONFIGURATION_FILE, null, logFile.toPath(), this);
|
| ... | ... | @@ -87,7 +87,7 @@ public class Apply extends ReferentialSynchroUIActionSupport { |
| 87 | 87 | Iterator<SwingReferentialSynchronizeTask> iterator = tasksForOneReferential.iterator();
|
| 88 | 88 | while (iterator.hasNext()) {
|
| 89 | 89 | SwingReferentialSynchronizeTask task = iterator.next();
|
| 90 | - if (task.isLeft()) {
|
|
| 90 | + if (task.isLeftModified()) {
|
|
| 91 | 91 | leftModified = true;
|
| 92 | 92 | } else {
|
| 93 | 93 | rightModified = true;
|
| ... | ... | @@ -75,6 +75,13 @@ public class SwingReferentialSynchronizeTask implements WithClientUIContextApi { |
| 75 | 75 | return left;
|
| 76 | 76 | }
|
| 77 | 77 | |
| 78 | + public final boolean isLeftModified() {
|
|
| 79 | + if (left) {
|
|
| 80 | + return !taskType.toOtherSide();
|
|
| 81 | + }
|
|
| 82 | + return taskType.toOtherSide();
|
|
| 83 | + }
|
|
| 84 | + |
|
| 78 | 85 | public final SynchronizeTaskType getTaskType() {
|
| 79 | 86 | return taskType;
|
| 80 | 87 | }
|
| ... | ... | @@ -60,7 +60,6 @@ import javax.script.ScriptException; |
| 60 | 60 | import javax.swing.JOptionPane;
|
| 61 | 61 | import javax.swing.UIManager;
|
| 62 | 62 | import java.io.File;
|
| 63 | -import java.io.IOException;
|
|
| 64 | 63 | import java.lang.reflect.InvocationTargetException;
|
| 65 | 64 | import java.util.Arrays;
|
| 66 | 65 | import java.util.Date;
|
| ... | ... | @@ -313,7 +312,7 @@ public class RunObserveListener implements ApplicationRunnerListener, WithClient |
| 313 | 312 | UIHelper.handlingError(event.getException());
|
| 314 | 313 | }
|
| 315 | 314 | |
| 316 | - public void initLog(ClientConfig config) throws IOException {
|
|
| 315 | + public void initLog(ClientConfig config) {
|
|
| 317 | 316 | |
| 318 | 317 | File logFile = config.initLog();
|
| 319 | 318 |