diff --git a/src/com/olexyn/ensync/Main.java b/src/com/olexyn/ensync/Main.java index b8b9203..1bf8a43 100644 --- a/src/com/olexyn/ensync/Main.java +++ b/src/com/olexyn/ensync/Main.java @@ -3,7 +3,6 @@ package com.olexyn.ensync; import com.olexyn.ensync.artifacts.SyncDirectory; import com.olexyn.ensync.artifacts.SyncEntity; -import java.io.File; import java.util.*; public class Main { @@ -34,53 +33,10 @@ public class Main { syncDirectory.updatePoolNew(); // - for (File createdFile : syncDirectory.getListCreated()) { - for (Map.Entry<String, SyncDirectory> otherEntry : syncEntity.syncDirectories.entrySet()) { - SyncDirectory otherSyncDirectory = otherEntry.getValue(); - - if (!syncDirectory.equals(otherSyncDirectory)){ - // Example: - // syncDirectory /foo - // otherSyncDirectory /bar - // createdFile /foo/hello/created-file.gif - // relativePath /hello/created-file.gif - String relativePath = createdFile.getPath().replace(syncDirectory.realPath, ""); - String targetPath = otherSyncDirectory.realPath + relativePath; - String targetParentPath = new File(targetPath).getParent(); - if (!new File(targetParentPath).exists()){ - String[] cmd = new String[]{"mkdir", - "-p", - targetParentPath}; - x.execute(cmd); - } - - String[] cmd = new String[]{"cp", - createdFile.getPath(), - otherSyncDirectory.realPath + relativePath}; - x.execute(cmd); - } - } - - } - // - for (File deletedFile : syncDirectory.getListDeleted()) { - - for (Map.Entry<String, SyncDirectory> otherEntry : syncEntity.syncDirectories.entrySet()) { - SyncDirectory otherSyncDirectory = otherEntry.getValue(); - - if (!syncDirectory.equals(otherSyncDirectory)){ - String relativePath = deletedFile.getPath().replace(syncDirectory.realPath, ""); - String[] cmd = new String[]{"rm", "-r", - otherSyncDirectory.realPath + relativePath}; - x.execute(cmd); - } - } - - } + syncDirectory.doSyncOps(); - // // WARNING: // Be very carefull when to update the StateFileOld @@ -88,7 +44,7 @@ public class Main { // -> create newFile -> update StateFileNew-> getListCreated contains newFile -> addToMapCreated -> create copies as needed -> updateStateFileOld -> OK // -> create newFile -> update StateFileOld -> getListDeletd contains newFile -> VERY BAD // - syncDirectory.updateStateFileBoth(); + syncDirectory.updateStateFileOld(); syncDirectory.updatePoolBoth(); diff --git a/src/com/olexyn/ensync/artifacts/StateFile.java b/src/com/olexyn/ensync/artifacts/StateFile.java new file mode 100644 index 0000000..3a0fef7 --- /dev/null +++ b/src/com/olexyn/ensync/artifacts/StateFile.java @@ -0,0 +1,29 @@ +package com.olexyn.ensync.artifacts; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; + +public class StateFile { + + private final String[] types = new String[]{ "OLD" , "NEW"}; + + public String stateFilePath; + public File stateFileOld; + private Map<String, File> poolOld = new HashMap<>(); + + + public StateFile(){ + + } + + + + + public void update(){ + + } + + + +} diff --git a/src/com/olexyn/ensync/artifacts/SyncDirectory.java b/src/com/olexyn/ensync/artifacts/SyncDirectory.java index 8967730..3bae22d 100644 --- a/src/com/olexyn/ensync/artifacts/SyncDirectory.java +++ b/src/com/olexyn/ensync/artifacts/SyncDirectory.java @@ -1,12 +1,10 @@ package com.olexyn.ensync.artifacts; +import com.olexyn.ensync.Execute; import com.olexyn.ensync.Tools; import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public class SyncDirectory { @@ -20,9 +18,15 @@ public class SyncDirectory { private Map<String, File> poolNew = new HashMap<>(); private List<File> listCreated = new ArrayList<>(); private List<File> listDeleted = new ArrayList<>(); + private SyncEntity syncEntity; + private String state = null; + +// For an explanation of what the STATES mean, see the flow.png + private final List<String> STATES = new ArrayList<>(Arrays.asList( "NEW-1", "LIST-1" , "LIST-2" , "SYNC-1" , "NEW-2", "OLD-1")); Tools tools = new Tools(); + Execute x = new Execute(); /** * Create a SyncDirectory from realPath. @@ -30,7 +34,9 @@ public class SyncDirectory { * @param realPath * @see SyncEntity */ - public SyncDirectory(String realPath) { + public SyncDirectory(String realPath, SyncEntity syncEntity) { + + this.realPath = realPath; stateFileBasePath = "/tmp/find" + this.realPath.replace("/", "-"); stateFileOldPath = stateFileBasePath + "-old"; @@ -39,6 +45,7 @@ public class SyncDirectory { stateFileNew = getStateFileNew(); poolOld = getPoolOld(); poolNew = getPoolNew(); + this.syncEntity = syncEntity; } @@ -61,9 +68,13 @@ public class SyncDirectory { * WRITE a new StateFileNew to Disk. This is IMPORTANT in order to make sure that StateFileOld is NEVER newer than StateFileNew.<p> * WRITE a new StateFileOld to Disk. */ - public void updateStateFileBoth() { + public void updateStateFileOld() { // - tools.generateStateFile(realPath, stateFileNewPath); + if (state.equals(STATES.get(4))){ + state = STATES.get(5); + } else { + return ; + } tools.generateStateFile(realPath, stateFileOldPath); } @@ -81,7 +92,19 @@ public class SyncDirectory { */ public void updateStateFileNew() { // + if (state == null || state.equals(STATES.get(5))){ + state = STATES.get(0); + }else if (state.equals(STATES.get(3))){ + state = STATES.get(4); + } else { + return; + } + + + tools.generateStateFile(realPath, stateFileNewPath); + + } @@ -118,17 +141,89 @@ public class SyncDirectory { } public List<File> getListCreated() { - - listCreated = tools.mapMinus(getPoolNew(), getPoolOld()); + if (state.equals(STATES.get(0))){ + state = STATES.get(1); + } else { + return null; + } + updateListCreated(); return listCreated; } - public List<File> getListDeleted() { + public void updateListCreated(){ + if (state.equals("")) + listCreated = tools.mapMinus(getPoolNew(), getPoolOld()); + } + public List<File> getListDeleted() { + if (state.equals(STATES.get(1))){ + state = STATES.get(2); + } else { + return null; + } listDeleted = tools.mapMinus(getPoolOld(), getPoolNew()); return listDeleted; } + public void doSyncOps(){ + + if (state.equals(STATES.get(2))){ + state = STATES.get(3); + } else { + return ; + } + + + + + + + for (File createdFile : this.getListCreated()) { + for (Map.Entry<String, SyncDirectory> otherEntry : syncEntity.syncDirectories.entrySet()) { + SyncDirectory otherSyncDirectory = otherEntry.getValue(); + + if (!this.equals(otherSyncDirectory)){ + // Example: + // syncDirectory /foo + // otherSyncDirectory /bar + // createdFile /foo/hello/created-file.gif + // relativePath /hello/created-file.gif + String relativePath = createdFile.getPath().replace(this.realPath, ""); + String targetPath = otherSyncDirectory.realPath + relativePath; + String targetParentPath = new File(targetPath).getParent(); + if (!new File(targetParentPath).exists()){ + String[] cmd = new String[]{"mkdir", + "-p", + targetParentPath}; + x.execute(cmd); + } + + String[] cmd = new String[]{"cp", + createdFile.getPath(), + otherSyncDirectory.realPath + relativePath}; + x.execute(cmd); + } + } + + } + + // + for (File deletedFile : this.getListDeleted()) { + + for (Map.Entry<String, SyncDirectory> otherEntry : syncEntity.syncDirectories.entrySet()) { + SyncDirectory otherSyncDirectory = otherEntry.getValue(); + + if (!this.equals(otherSyncDirectory)){ + String relativePath = deletedFile.getPath().replace(this.realPath, ""); + String[] cmd = new String[]{"rm", "-r", + otherSyncDirectory.realPath + relativePath}; + x.execute(cmd); + } + } + + } + } + } diff --git a/src/com/olexyn/ensync/artifacts/SyncEntity.java b/src/com/olexyn/ensync/artifacts/SyncEntity.java index d26acae..55c2dcc 100644 --- a/src/com/olexyn/ensync/artifacts/SyncEntity.java +++ b/src/com/olexyn/ensync/artifacts/SyncEntity.java @@ -25,7 +25,6 @@ public class SyncEntity { */ public SyncEntity(String name) { this.name = name; - } /** @@ -38,7 +37,7 @@ public class SyncEntity { */ public void addDirectory(String realPath) { if (new File(realPath).isDirectory()) { - syncDirectories.put(realPath, new SyncDirectory(realPath)); + syncDirectories.put(realPath, new SyncDirectory(realPath, this)); } } diff --git a/src/com/olexyn/ensync/class-diagram.uxf b/src/com/olexyn/ensync/class-diagram.uxf new file mode 100644 index 0000000..b794b23 --- /dev/null +++ b/src/com/olexyn/ensync/class-diagram.uxf @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<diagram program="umlet" version="13.3"> + <zoom_level>10</zoom_level> + <element> + <id>UMLClass</id> + <coordinates> + <x>20</x> + <y>20</y> + <w>340</w> + <h>50</h> + </coordinates> + <panel_attributes>SyncEntity +-- +Map<SyncDirectory> directories +halign=left</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>520</x> + <y>110</y> + <w>230</w> + <h>200</h> + </coordinates> + <panel_attributes>SyncDirectory + +-- +String realPath +String stateFileBasePath +File stateFileOld +File stateFileNew +Map<String,File> poolOld +Map<String,File> poolNew +List<String> listCreated +List<String> listDeleted +halign=left</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>350</x> + <y>50</y> + <w>190</w> + <h>90</h> + </coordinates> + <panel_attributes>lt=<-</panel_attributes> + <additional_attributes>170.0;70.0;10.0;10.0</additional_attributes> + </element> +</diagram> diff --git a/src/com/olexyn/ensync/flow.png b/src/com/olexyn/ensync/flow.png new file mode 100644 index 0000000..4106764 Binary files /dev/null and b/src/com/olexyn/ensync/flow.png differ diff --git a/src/com/olexyn/ensync/handle-deletes.uxf b/src/com/olexyn/ensync/flow.uxf similarity index 53% rename from src/com/olexyn/ensync/handle-deletes.uxf rename to src/com/olexyn/ensync/flow.uxf index 1382bbd..48099b8 100644 --- a/src/com/olexyn/ensync/handle-deletes.uxf +++ b/src/com/olexyn/ensync/flow.uxf @@ -4,585 +4,497 @@ <element> <id>UMLClass</id> <coordinates> - <x>250</x> - <y>120</y> - <w>140</w> - <h>40</h> + <x>1350</x> + <y>1220</y> + <w>130</w> + <h>60</h> </coordinates> - <panel_attributes>File System -halign=left</panel_attributes> + <panel_attributes>StateFileOld +bg=yellow +halign=left +group=1</panel_attributes> <additional_attributes/> </element> - <element> - <id>Relation</id> - <coordinates> - <x>310</x> - <y>150</y> - <w>160</w> - <h>280</h> - </coordinates> - <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>140.0;260.0;10.0;10.0</additional_attributes> - </element> <element> <id>UMLClass</id> <coordinates> - <x>100</x> - <y>580</y> - <w>120</w> - <h>60</h> + <x>1480</x> + <y>1220</y> + <w>130</w> + <h>30</h> </coordinates> - <panel_attributes>Collection of -Accepted -State Files -halign=left</panel_attributes> + <panel_attributes>StateFileNew +bg=green +halign=left +group=1</panel_attributes> <additional_attributes/> </element> <element> - <id>UMLState</id> + <id>UMLClass</id> <coordinates> - <x>370</x> - <y>410</y> - <w>170</w> - <h>40</h> + <x>1480</x> + <y>1250</y> + <w>130</w> + <h>30</h> </coordinates> - <panel_attributes>User initiates a -File System update. -halign=left</panel_attributes> + <panel_attributes>ListDeleted +halign=left +group=1</panel_attributes> <additional_attributes/> </element> <element> - <id>Relation</id> + <id>UMLClass</id> <coordinates> - <x>210</x> - <y>590</y> - <w>180</w> + <x>1350</x> + <y>1040</y> + <w>130</w> <h>30</h> </coordinates> - <panel_attributes>lt=.</panel_attributes> - <additional_attributes>10.0;10.0;160.0;10.0</additional_attributes> + <panel_attributes>StateFileOld +bg=yellow +halign=left +group=2</panel_attributes> + <additional_attributes/> </element> <element> - <id>UMLState</id> + <id>UMLClass</id> <coordinates> - <x>370</x> - <y>570</y> - <w>150</w> + <x>1480</x> + <y>1040</y> + <w>130</w> <h>60</h> </coordinates> - <panel_attributes>Check if a newer -State File -is available -halign=left</panel_attributes> + <panel_attributes>StateFileNew +bg=green +halign=left +group=2</panel_attributes> <additional_attributes/> </element> <element> - <id>UMLState</id> + <id>UMLClass</id> <coordinates> - <x>80</x> - <y>240</y> - <w>170</w> - <h>40</h> + <x>1350</x> + <y>1070</y> + <w>130</w> + <h>30</h> </coordinates> - <panel_attributes>Update State File -from File System -halign=left</panel_attributes> + <panel_attributes>ListCreated +halign=left +group=2</panel_attributes> <additional_attributes/> </element> <element> - <id>UMLClass</id> + <id>UMLState</id> <coordinates> - <x>100</x> - <y>500</y> - <w>130</w> + <x>1090</x> + <y>870</y> + <w>120</w> <h>40</h> </coordinates> - <panel_attributes>Last Accepted -State File -bg=green + <panel_attributes>update +StateFileNew halign=left</panel_attributes> <additional_attributes/> </element> <element> - <id>UMLClass</id> + <id>UMLState</id> <coordinates> - <x>100</x> - <y>320</y> - <w>130</w> + <x>1090</x> + <y>1060</y> + <w>120</w> <h>40</h> </coordinates> - <panel_attributes>Current -State File -bg=yellow + <panel_attributes>get +ListCreated halign=left</panel_attributes> <additional_attributes/> </element> <element> <id>UMLState</id> <coordinates> - <x>80</x> - <y>410</y> - <w>160</w> + <x>1090</x> + <y>1240</y> + <w>120</w> <h>40</h> </coordinates> - <panel_attributes>Accept State File</panel_attributes> + <panel_attributes>get +ListDeleted +halign=left</panel_attributes> <additional_attributes/> </element> <element> <id>Relation</id> <coordinates> - <x>430</x> - <y>440</y> - <w>40</w> - <h>150</h> - </coordinates> - <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;130.0;20.0;10.0</additional_attributes> - </element> - <element> - <id>Relation</id> - <coordinates> - <x>150</x> - <y>350</y> + <x>1130</x> + <y>990</y> <w>30</w> - <h>80</h> + <h>90</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;60.0;10.0;10.0</additional_attributes> + <additional_attributes>10.0;70.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>310</x> - <y>620</y> - <w>150</w> - <h>120</h> + <x>1120</x> + <y>1170</y> + <w>50</w> + <h>90</h> </coordinates> - <panel_attributes>lt=<- -[YES]</panel_attributes> - <additional_attributes>10.0;100.0;130.0;10.0</additional_attributes> + <panel_attributes>lt=<-</panel_attributes> + <additional_attributes>30.0;70.0;10.0;10.0</additional_attributes> </element> <element> <id>UMLState</id> <coordinates> - <x>240</x> - <y>720</y> - <w>170</w> - <h>60</h> + <x>1090</x> + <y>1380</y> + <w>120</w> + <h>40</h> </coordinates> - <panel_attributes>Update File System -according to newest -State File</panel_attributes> + <panel_attributes>do +SyncOps +halign=left +style=wordwrap</panel_attributes> <additional_attributes/> </element> <element> <id>Relation</id> <coordinates> - <x>150</x> - <y>440</y> - <w>30</w> + <x>1140</x> + <y>1320</y> + <w>60</w> <h>80</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;60.0;10.0;10.0</additional_attributes> - </element> - <element> - <id>Relation</id> - <coordinates> - <x>150</x> - <y>150</y> - <w>190</w> - <h>110</h> - </coordinates> - <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;90.0;170.0;10.0</additional_attributes> + <additional_attributes>40.0;60.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>150</x> - <y>270</y> - <w>30</w> - <h>70</h> + <x>1120</x> + <y>1090</y> + <w>50</w> + <h>90</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;50.0;10.0;10.0</additional_attributes> - </element> - <element> - <id>Relation</id> - <coordinates> - <x>150</x> - <y>530</y> - <w>30</w> - <h>70</h> - </coordinates> - <panel_attributes>lt=.</panel_attributes> - <additional_attributes>10.0;10.0;10.0;50.0</additional_attributes> + <additional_attributes>10.0;70.0;30.0;10.0</additional_attributes> </element> <element> <id>UMLClass</id> <coordinates> - <x>860</x> - <y>0</y> - <w>340</w> - <h>50</h> + <x>840</x> + <y>840</y> + <w>820</w> + <h>1090</h> </coordinates> - <panel_attributes>SyncEntity --- -Map<SyncDirectory> directories -halign=left</panel_attributes> + <panel_attributes>For Each SyncDirectory +halign=left +layer=-1</panel_attributes> <additional_attributes/> </element> <element> <id>UMLClass</id> <coordinates> - <x>1300</x> - <y>90</y> - <w>230</w> - <h>200</h> - </coordinates> - <panel_attributes>SyncDirectory - --- -String realPath -String stateFileBasePath -File stateFileOld -File stateFileNew -Map<String,File> poolOld -Map<String,File> poolNew -List<String> listCreated -List<String> listDeleted -halign=left</panel_attributes> + <x>1340</x> + <y>1030</y> + <w>280</w> + <h>80</h> + </coordinates> + <panel_attributes> +halign=left +layer=-1 +group=2</panel_attributes> <additional_attributes/> </element> <element> <id>Relation</id> <coordinates> - <x>1190</x> - <y>30</y> - <w>130</w> - <h>90</h> - </coordinates> - <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>110.0;70.0;10.0;10.0</additional_attributes> - </element> - <element> - <id>UMLClass</id> - <coordinates> - <x>1620</x> - <y>740</y> - <w>130</w> - <h>60</h> + <x>1200</x> + <y>1240</y> + <w>160</w> + <h>40</h> </coordinates> - <panel_attributes>StateFileOld -bg=yellow -halign=left</panel_attributes> - <additional_attributes/> + <panel_attributes>lt=.</panel_attributes> + <additional_attributes>140.0;10.0;10.0;20.0</additional_attributes> </element> <element> - <id>UMLClass</id> + <id>Relation</id> <coordinates> - <x>1750</x> - <y>740</y> - <w>130</w> - <h>30</h> + <x>1150</x> + <y>800</y> + <w>30</w> + <h>90</h> </coordinates> - <panel_attributes>StateFileNew -bg=green -halign=left</panel_attributes> - <additional_attributes/> + <panel_attributes>lt=<-</panel_attributes> + <additional_attributes>10.0;70.0;10.0;10.0</additional_attributes> </element> <element> - <id>UMLClass</id> + <id>UMLSpecialState</id> <coordinates> - <x>1750</x> - <y>770</y> - <w>130</w> - <h>30</h> + <x>1150</x> + <y>790</y> + <w>20</w> + <h>20</h> </coordinates> - <panel_attributes>ListDeleted -halign=left</panel_attributes> + <panel_attributes>type=initial</panel_attributes> <additional_attributes/> </element> <element> - <id>UMLClass</id> + <id>UMLSpecialState</id> <coordinates> - <x>1620</x> - <y>820</y> - <w>130</w> - <h>30</h> + <x>1150</x> + <y>1970</y> + <w>20</w> + <h>20</h> </coordinates> - <panel_attributes>StateFileOld -bg=yellow -halign=left</panel_attributes> + <panel_attributes>type=final</panel_attributes> <additional_attributes/> </element> <element> - <id>UMLClass</id> + <id>Relation</id> <coordinates> - <x>1750</x> - <y>820</y> - <w>130</w> - <h>60</h> + <x>1130</x> + <y>1500</y> + <w>50</w> + <h>90</h> </coordinates> - <panel_attributes>StateFileNew -bg=green -halign=left</panel_attributes> - <additional_attributes/> + <panel_attributes>lt=<-</panel_attributes> + <additional_attributes>30.0;70.0;10.0;10.0</additional_attributes> </element> <element> - <id>UMLClass</id> + <id>Relation</id> <coordinates> - <x>1620</x> - <y>850</y> - <w>130</w> - <h>30</h> + <x>1150</x> + <y>1900</y> + <w>30</w> + <h>90</h> </coordinates> - <panel_attributes>ListCreated -halign=left</panel_attributes> - <additional_attributes/> + <panel_attributes>lt=<-</panel_attributes> + <additional_attributes>10.0;70.0;10.0;10.0</additional_attributes> </element> <element> <id>UMLState</id> <coordinates> - <x>1220</x> - <y>650</y> - <w>170</w> - <h>60</h> + <x>1070</x> + <y>1720</y> + <w>120</w> + <h>50</h> </coordinates> <panel_attributes>update -StateFileNew</panel_attributes> +StateFileOld +halign=left +style=wordwrap</panel_attributes> <additional_attributes/> </element> <element> <id>UMLState</id> <coordinates> - <x>1190</x> - <y>770</y> - <w>120</w> - <h>40</h> + <x>1100</x> + <y>1160</y> + <w>150</w> + <h>20</h> </coordinates> - <panel_attributes>get -ListCreated</panel_attributes> + <panel_attributes>State 1 : LIST-1 +bg=orange</panel_attributes> <additional_attributes/> </element> <element> <id>UMLState</id> <coordinates> - <x>1310</x> - <y>770</y> + <x>1070</x> + <y>1570</y> <w>120</w> <h>40</h> </coordinates> - <panel_attributes>get -ListDeleted</panel_attributes> + <panel_attributes>update +StateFileNew +halign=left +style=wordwrap</panel_attributes> <additional_attributes/> </element> <element> - <id>Relation</id> - <coordinates> - <x>1230</x> - <y>700</y> - <w>90</w> - <h>90</h> - </coordinates> - <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;70.0;70.0;10.0</additional_attributes> - </element> - <element> - <id>Relation</id> + <id>UMLState</id> <coordinates> - <x>1310</x> - <y>700</y> - <w>80</w> - <h>90</h> + <x>1110</x> + <y>1490</y> + <w>160</w> + <h>20</h> </coordinates> - <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>60.0;70.0;10.0;10.0</additional_attributes> + <panel_attributes>State 3 : SYNC-1 +bg=orange</panel_attributes> + <additional_attributes/> </element> <element> <id>UMLState</id> <coordinates> - <x>1190</x> - <y>850</y> - <w>120</w> - <h>40</h> + <x>1110</x> + <y>1640</y> + <w>150</w> + <h>20</h> </coordinates> - <panel_attributes>add to -MapCreated</panel_attributes> + <panel_attributes>State 4 : NEW-2 +bg=orange</panel_attributes> <additional_attributes/> </element> <element> <id>UMLState</id> <coordinates> - <x>1310</x> - <y>850</y> - <w>120</w> - <h>40</h> + <x>1110</x> + <y>980</y> + <w>140</w> + <h>20</h> </coordinates> - <panel_attributes>add to -MapDeleted</panel_attributes> + <panel_attributes>State 0 : NEW-1 +bg=orange</panel_attributes> <additional_attributes/> </element> <element> - <id>Relation</id> + <id>UMLState</id> <coordinates> - <x>1360</x> - <y>800</y> - <w>30</w> - <h>70</h> + <x>1120</x> + <y>1790</y> + <w>140</w> + <h>20</h> </coordinates> - <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;50.0;10.0;10.0</additional_attributes> + <panel_attributes>State 5 : OLD-1 +bg=orange</panel_attributes> + <additional_attributes/> </element> <element> <id>Relation</id> <coordinates> - <x>1240</x> - <y>800</y> - <w>30</w> - <h>70</h> + <x>1130</x> + <y>1650</y> + <w>40</w> + <h>90</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;50.0;10.0;10.0</additional_attributes> + <additional_attributes>20.0;70.0;10.0;10.0</additional_attributes> </element> <element> - <id>UMLState</id> + <id>UMLSpecialState</id> <coordinates> - <x>1230</x> - <y>970</y> - <w>170</w> - <h>60</h> + <x>1140</x> + <y>1870</y> + <w>40</w> + <h>40</h> </coordinates> - <panel_attributes>Perform -File Operations -for Sycronization</panel_attributes> + <panel_attributes>type=decision</panel_attributes> <additional_attributes/> </element> <element> <id>Relation</id> <coordinates> - <x>1310</x> - <y>880</y> - <w>80</w> - <h>110</h> + <x>1150</x> + <y>1800</y> + <w>30</w> + <h>90</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;90.0;60.0;10.0</additional_attributes> + <additional_attributes>10.0;70.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1240</x> + <x>920</x> <y>880</y> - <w>100</w> - <h>110</h> + <w>240</w> + <h>1030</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>80.0;90.0;10.0;10.0</additional_attributes> + <additional_attributes>170.0;10.0;20.0;260.0;10.0;1010.0;220.0;1010.0</additional_attributes> </element> <element> - <id>UMLClass</id> + <id>Relation</id> <coordinates> - <x>1020</x> - <y>610</y> - <w>440</w> - <h>320</h> + <x>1130</x> + <y>900</y> + <w>40</w> + <h>100</h> </coordinates> - <panel_attributes>For Each SyncDirectory -halign=left -layer=-1</panel_attributes> - <additional_attributes/> + <panel_attributes>lt=<-</panel_attributes> + <additional_attributes>10.0;80.0;20.0;10.0</additional_attributes> </element> <element> <id>UMLClass</id> <coordinates> - <x>1600</x> - <y>720</y> - <w>300</w> - <h>180</h> + <x>1340</x> + <y>1210</y> + <w>280</w> + <h>80</h> </coordinates> <panel_attributes> halign=left -layer=-1</panel_attributes> +layer=-1 +group=1</panel_attributes> <additional_attributes/> </element> <element> <id>Relation</id> <coordinates> - <x>1420</x> - <y>780</y> - <w>200</w> - <h>50</h> + <x>1200</x> + <y>1060</y> + <w>160</w> + <h>40</h> </coordinates> <panel_attributes>lt=.</panel_attributes> - <additional_attributes>180.0;30.0;10.0;10.0</additional_attributes> + <additional_attributes>10.0;20.0;140.0;10.0</additional_attributes> </element> <element> - <id>Relation</id> - <coordinates> - <x>1280</x> - <y>580</y> - <w>40</w> - <h>90</h> - </coordinates> - <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;70.0;20.0;10.0</additional_attributes> - </element> - <element> - <id>UMLSpecialState</id> + <id>UMLState</id> <coordinates> - <x>1290</x> - <y>570</y> - <w>20</w> + <x>1120</x> + <y>1310</y> + <w>160</w> <h>20</h> </coordinates> - <panel_attributes>type=initial</panel_attributes> + <panel_attributes>State 2 : LIST-2 +bg=orange</panel_attributes> <additional_attributes/> </element> <element> - <id>UMLSpecialState</id> + <id>Relation</id> <coordinates> - <x>1300</x> - <y>1200</y> - <w>20</w> - <h>20</h> + <x>1140</x> + <y>1270</y> + <w>30</w> + <h>60</h> </coordinates> - <panel_attributes>type=final</panel_attributes> - <additional_attributes/> + <panel_attributes>lt=<-</panel_attributes> + <additional_attributes>10.0;40.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1300</x> - <y>1020</y> - <w>30</w> - <h>80</h> + <x>1140</x> + <y>1760</y> + <w>40</w> + <h>50</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>10.0;60.0;10.0;10.0</additional_attributes> + <additional_attributes>20.0;30.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1290</x> - <y>1130</y> - <w>40</w> - <h>90</h> + <x>1110</x> + <y>1600</y> + <w>50</w> + <h>60</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>20.0;70.0;10.0;10.0</additional_attributes> + <additional_attributes>30.0;40.0;10.0;10.0</additional_attributes> </element> <element> - <id>UMLState</id> + <id>Relation</id> <coordinates> - <x>1220</x> - <y>1080</y> - <w>170</w> - <h>60</h> + <x>1130</x> + <y>1410</y> + <w>60</w> + <h>100</h> </coordinates> - <panel_attributes>update -StateFileBoth</panel_attributes> - <additional_attributes/> + <panel_attributes>lt=<-</panel_attributes> + <additional_attributes>10.0;80.0;40.0;10.0</additional_attributes> </element> </diagram> diff --git a/src/com/olexyn/ensync/handle-deletes.png b/src/com/olexyn/ensync/handle-deletes.png deleted file mode 100644 index 4bc2151..0000000 Binary files a/src/com/olexyn/ensync/handle-deletes.png and /dev/null differ