Examples of MethodInheritanceTreeNode


Examples of cuchaz.enigma.analysis.MethodInheritanceTreeNode

  @Test
  public void methodInheritance( )
  {
    MethodEntry source = newMethod( "none/a", "a", "()Ljava/lang/String;" );
    MethodInheritanceTreeNode node = m_index.getMethodInheritance( new Translator(), source );
    assertThat( node, is( not( nullValue() ) ) );
    assertThat( node.getMethodEntry(), is( source ) );
    assertThat( node.getChildCount(), is( 0 ) );
  }
View Full Code Here

Examples of cuchaz.enigma.analysis.MethodInheritanceTreeNode

            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() );
          }
        }
      }
    } );
    JPanel implementationsPanel = new JPanel();
View Full Code Here

Examples of cuchaz.enigma.analysis.MethodInheritanceTreeNode

      m_inheritanceTree.setSelectionRow( m_inheritanceTree.getRowForPath( path ) );
    }
    else if( m_reference.entry instanceof MethodEntry )
    {
      // get the method inheritance
      MethodInheritanceTreeNode classNode = m_controller.getMethodInheritance( (MethodEntry)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

Examples of cuchaz.enigma.analysis.MethodInheritanceTreeNode

  }
 
  public MethodInheritanceTreeNode getMethodInheritance( MethodEntry deobfMethodEntry )
  {
    MethodEntry obfMethodEntry = m_deobfuscator.obfuscateEntry( deobfMethodEntry );
    MethodInheritanceTreeNode rootNode = m_deobfuscator.getJarIndex().getMethodInheritance(
      m_deobfuscator.getTranslator( TranslationDirection.Deobfuscating ),
      obfMethodEntry
    );
    return MethodInheritanceTreeNode.findNode( rootNode, obfMethodEntry );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.