JDK Fix
This commit is contained in:
parent
1a9c4c9062
commit
f45e58fb04
1 changed files with 3 additions and 2 deletions
|
@ -13,6 +13,7 @@ import the.bytecode.club.bytecodeviewer.translation.TranslatedStrings;
|
|||
import javax.swing.*;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.MutableTreeNode;
|
||||
import javax.swing.tree.TreeNode;
|
||||
import javax.swing.tree.TreePath;
|
||||
import java.util.Enumeration;
|
||||
|
||||
|
@ -143,7 +144,7 @@ public class New extends ContextMenuItem
|
|||
//TODO this needs to be rewritten to support creating parent nodes that don't exist
|
||||
public static boolean searchAndInsert(String path, DefaultMutableTreeNode treeNode, String separator)
|
||||
{
|
||||
Enumeration<DefaultMutableTreeNode> children = treeNode.children();
|
||||
Enumeration<TreeNode> children = treeNode.children();
|
||||
|
||||
String findPath = FilenameUtils.getPath(path);
|
||||
String currentPath = buildPath(0, treeNode.getPath().length, treeNode, separator);
|
||||
|
@ -158,7 +159,7 @@ public class New extends ContextMenuItem
|
|||
|
||||
while(children.hasMoreElements())
|
||||
{
|
||||
DefaultMutableTreeNode child = children.nextElement();
|
||||
DefaultMutableTreeNode child = (DefaultMutableTreeNode) children.nextElement();
|
||||
if(searchAndInsert(path, child, separator))
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue