Skip to content
Snippets Groups Projects
Commit a9492e15 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

- some code refactoring

- respect java standards
- No more use of DbData.splitDbData: directly return the expected data array at extraction (TANGOARCH-715)
parent 11e4af58
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
......@@ -72,6 +71,10 @@
<groupId>fr.soleil.lib</groupId>
<artifactId>snapArchivingApi</artifactId>
</dependency>
<dependency>
<groupId>fr.soleil.gui</groupId>
<artifactId>commonArchivingGUI</artifactId>
</dependency>
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>swingx</artifactId>
......@@ -112,10 +115,6 @@
<groupId>fr.soleil.lib</groupId>
<artifactId>ApplicationUtilities</artifactId>
</dependency>
<dependency>
<groupId>fr.soleil.gui</groupId>
<artifactId>commonArchivingGUI</artifactId>
</dependency>
<dependency>
<groupId>net.sf.transmorph</groupId>
<artifactId>transmorph</artifactId>
......
......@@ -35,7 +35,6 @@
package fr.soleil.bensikin.models;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
......@@ -122,8 +121,7 @@ public class AttributesTreeModel extends DefaultTreeModel {
((DefaultMutableTreeNode) getRoot()).add(domainNode);
final List<Family> familiesToSort = new ArrayList<Family>();
familiesToSort.addAll(domain.getFamilies().values());
final List<Family> familiesToSort = domain.getFamilies();
Collections.sort(familiesToSort, new EntitiesComparator());
for (Family family : familiesToSort) {
......@@ -131,8 +129,7 @@ public class AttributesTreeModel extends DefaultTreeModel {
final DefaultMutableTreeNode familyNode = new DefaultMutableTreeNode(family.getName());
domainNode.add(familyNode);
final List<Member> membersToSort = new ArrayList<Member>();
membersToSort.addAll(family.getMembers().values());
final List<Member> membersToSort = family.getMembers();
Collections.sort(membersToSort, new EntitiesComparator());
for (Member member : membersToSort) {
......@@ -140,9 +137,7 @@ public class AttributesTreeModel extends DefaultTreeModel {
final DefaultMutableTreeNode memberNode = new DefaultMutableTreeNode(member.getName());
familyNode.add(memberNode);
final Collection<Attribute> coll = member.getAttributes().values();
final List<Attribute> attributesToSort = new ArrayList<Attribute>();
attributesToSort.addAll(coll);
final List<Attribute> attributesToSort = member.getAttributes();
Collections.sort(attributesToSort, new EntitiesComparator());
for (Attribute attribute : attributesToSort) {
......@@ -164,10 +159,13 @@ public class AttributesTreeModel extends DefaultTreeModel {
}
// END CURRENT ATTRIBUTE
}
attributesToSort.clear();
// END CURRENT MEMBER
}
membersToSort.clear();
// END CURRENT FAMILY
}
familiesToSort.clear();
// END CURRENT DOMAIN
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment