@@ -45,7 +45,7 @@ public void setup() {
45
45
String jarName = read .getFile ().getName ();
46
46
MappingTreeNode root = new MappingTreeNode (jarName , null );
47
47
DefaultTreeModel model = new DefaultTreeModel (root );
48
- FileSelectionListener sel = new FileSelectionListener (callback );
48
+ FileSelectionListener sel = new FileSelectionListener (tree , callback );
49
49
tree .addTreeSelectionListener (sel );
50
50
tree .addMouseListener (sel );
51
51
tree .setModel (model );
@@ -58,7 +58,7 @@ public void setup() {
58
58
ClassMapping mapping = read .getMapping ().getMapping (className );
59
59
String curName = mapping .name .getValue ();
60
60
// Create directory path based on current mapping stored name.
61
- ArrayList <String > dirPath = new ArrayList <String >(Arrays .asList (curName .split ("/" )));
61
+ List <String > dirPath = new ArrayList <>(Arrays .asList (curName .split ("/" )));
62
62
// Create directory of nodes
63
63
generateTreePath (root , dirPath , mapping , model );
64
64
}
@@ -75,8 +75,8 @@ public void setup() {
75
75
public void update (JarReader read , String originalName , String newPathName ) {
76
76
ClassMapping mapping = read .getMapping ().getMapping (originalName );
77
77
String curPathName = mapping .name .getValue ();
78
- ArrayList <String > curPath = new ArrayList <String >(Arrays .asList (curPathName .split ("/" )));
79
- ArrayList <String > newPath = new ArrayList <String >(Arrays .asList (newPathName .split ("/" )));
78
+ List <String > curPath = new ArrayList <>(Arrays .asList (curPathName .split ("/" )));
79
+ List <String > newPath = new ArrayList <>(Arrays .asList (newPathName .split ("/" )));
80
80
DefaultTreeModel model = (DefaultTreeModel ) tree .getModel ();
81
81
//
82
82
MappingTreeNode root = (MappingTreeNode ) tree .getModel ().getRoot ();
@@ -93,7 +93,7 @@ public void update(JarReader read, String originalName, String newPathName) {
93
93
* @param dirPath
94
94
* @param model
95
95
*/
96
- private void removeTreePath (MappingTreeNode parent , ArrayList <String > dirPath , DefaultTreeModel model ) {
96
+ private void removeTreePath (MappingTreeNode parent , List <String > dirPath , DefaultTreeModel model ) {
97
97
while (dirPath .size () > 0 ) {
98
98
String section = dirPath .get (0 );
99
99
MappingTreeNode node = parent .getChild (section );
@@ -122,7 +122,7 @@ private void removeTreePath(MappingTreeNode parent, ArrayList<String> dirPath, D
122
122
* @param mapping
123
123
* @param model
124
124
*/
125
- private void generateTreePath (MappingTreeNode parent , ArrayList <String > dirPath , ClassMapping mapping , DefaultTreeModel model ) {
125
+ private void generateTreePath (MappingTreeNode parent , List <String > dirPath , ClassMapping mapping , DefaultTreeModel model ) {
126
126
while (dirPath .size () > 0 ) {
127
127
String section = dirPath .get (0 );
128
128
MappingTreeNode node ;
0 commit comments