Package cuchaz.enigma.analysis

Examples of cuchaz.enigma.analysis.ClassInheritanceTreeNode


  }
 
  @Test
  public void classInheritance( )
  {
    ClassInheritanceTreeNode node = m_index.getClassInheritance( new Translator(), newClass( "none/a" ) );
    assertThat( node, is( not( nullValue() ) ) );
    assertThat( node.getObfClassName(), is( "none/a" ) );
    assertThat( node.getChildCount(), is( 0 ) );
  }
View Full Code Here


          }
         
          Object node = path.getLastPathComponent();
          if( node instanceof ClassInheritanceTreeNode )
          {
            ClassInheritanceTreeNode classNode = (ClassInheritanceTreeNode)node;
            navigateTo( new ClassEntry( classNode.getObfClassName() ) );
          }
          else if( node instanceof MethodInheritanceTreeNode )
          {
            MethodInheritanceTreeNode methodNode = (MethodInheritanceTreeNode)node;
            if( methodNode.isImplemented() )
            {
              navigateTo( methodNode.getMethodEntry() );
            }
          }
        }
      }
    } );
    JPanel inheritancePanel = new JPanel();
    inheritancePanel.setLayout( new BorderLayout() );
    inheritancePanel.add( new JScrollPane( m_inheritanceTree ) );
   
    // init implementations panel
    m_implementationsTree = new JTree();
    m_implementationsTree.setModel( null );
    m_implementationsTree.addMouseListener( new MouseAdapter( )
    {
      @Override
      public void mouseClicked( MouseEvent event )
      {
        if( event.getClickCount() == 2 )
        {
          // get the selected node
          TreePath path = m_implementationsTree.getSelectionPath();
          if( path == null )
          {
            return;
          }
         
          Object node = path.getLastPathComponent();
          if( node instanceof ClassImplementationsTreeNode )
          {
            ClassImplementationsTreeNode classNode = (ClassImplementationsTreeNode)node;
            navigateTo( classNode.getClassEntry() );
          }
          else if( node instanceof MethodImplementationsTreeNode )
          {
            MethodImplementationsTreeNode methodNode = (MethodImplementationsTreeNode)node;
            navigateTo( methodNode.getMethodEntry() );
View Full Code Here

    m_inheritanceTree.setModel( null );
   
    if( m_reference.entry instanceof ClassEntry )
    {
      // get the class inheritance
      ClassInheritanceTreeNode classNode = m_controller.getClassInheritance( (ClassEntry)m_reference.entry );
     
      // show the tree at the root
      TreePath path = getPathToRoot( classNode );
      m_inheritanceTree.setModel( new DefaultTreeModel( (TreeNode)path.getPathComponent( 0 ) ) );
      m_inheritanceTree.expandPath( path );
View Full Code Here

  }
 
  public ClassInheritanceTreeNode getClassInheritance( ClassEntry deobfClassEntry )
  {
    ClassEntry obfClassEntry = m_deobfuscator.obfuscateEntry( deobfClassEntry );
    ClassInheritanceTreeNode rootNode = m_deobfuscator.getJarIndex().getClassInheritance(
      m_deobfuscator.getTranslator( TranslationDirection.Deobfuscating ),
      obfClassEntry
    );
    return ClassInheritanceTreeNode.findNode( rootNode, obfClassEntry );
  }
View Full Code Here

TOP

Related Classes of cuchaz.enigma.analysis.ClassInheritanceTreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.