From bba7c6a19c15bc82946176c79a4eba3612b25f17 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 11 Aug 2014 00:02:00 -0400 Subject: added method inheritance browsing also finally fixed method renamer to rename all method implementations in the inheritance hierarchy. --- .../enigma/gui/ClassInheritanceTreeNode.java | 79 ---------------------- 1 file changed, 79 deletions(-) delete mode 100644 src/cuchaz/enigma/gui/ClassInheritanceTreeNode.java (limited to 'src/cuchaz/enigma/gui/ClassInheritanceTreeNode.java') diff --git a/src/cuchaz/enigma/gui/ClassInheritanceTreeNode.java b/src/cuchaz/enigma/gui/ClassInheritanceTreeNode.java deleted file mode 100644 index 295bebe..0000000 --- a/src/cuchaz/enigma/gui/ClassInheritanceTreeNode.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Jeff Martin. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * Jeff Martin - initial API and implementation - ******************************************************************************/ -package cuchaz.enigma.gui; - -import java.util.List; - -import javax.swing.tree.DefaultMutableTreeNode; - -import com.google.common.collect.Lists; - -import cuchaz.enigma.mapping.Ancestries; -import cuchaz.enigma.mapping.Translator; - -public class ClassInheritanceTreeNode extends DefaultMutableTreeNode -{ - private static final long serialVersionUID = 4432367405826178490L; - - private Translator m_deobfuscatingTranslator; - private String m_obfClassName; - - public ClassInheritanceTreeNode( Translator deobfuscatingTranslator, String obfClassName ) - { - m_deobfuscatingTranslator = deobfuscatingTranslator; - m_obfClassName = obfClassName; - } - - public String getObfClassName( ) - { - return m_obfClassName; - } - - public String getDeobfClassName( ) - { - return m_deobfuscatingTranslator.translateClass( m_obfClassName ); - } - - @Override - public String toString( ) - { - String deobfClassName = getDeobfClassName(); - if( deobfClassName != null ) - { - return deobfClassName; - } - return m_obfClassName; - } - - public void load( Ancestries ancestries, boolean recurse ) - { - // get all the child nodes - List nodes = Lists.newArrayList(); - for( String subclassName : ancestries.getSubclasses( m_obfClassName ) ) - { - nodes.add( new ClassInheritanceTreeNode( m_deobfuscatingTranslator, subclassName ) ); - } - - // add them to this node - for( ClassInheritanceTreeNode node : nodes ) - { - this.add( node ); - } - - if( recurse ) - { - for( ClassInheritanceTreeNode node : nodes ) - { - node.load( ancestries, true ); - } - } - } -} -- cgit v1.2.3