Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] astview for AJDT?

Hi Raffi:

As far as I see, It may be pretty difficult to find a satisfactory AST View Eclipse plugin-in for AJDT. 
But you may write one in a simple way.

Define a new class as wrapper for ASTNode:

public class MyASTNode extends javax.swing.tree.DefaultMutableTreeNode{
   .....
    public ASTNode actualNode;
  ...
    remember to override the clone() method
}

Then, add the MyASTNode one by one according to the hierarchy defined in the AST node,
show the AST tree like:

        DefaultMutableTreeNode root = new DefaultMutableTreeNode();
        .....//Add the node
       
        JTree jt = new JTree(root);
        JFrame frame = new JFrame();
        JScrollPane jsp = new JScrollPane(jt);
        frame.add(jsp);
        frame.setVisible(true);
        frame.setSize(800,600);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

That would be OK.

Hope it would be helpful.

Thanks

-
>Sai Zhang (saizhang@xxxxxxxxxxx)
>http://cse.sjtu.edu.cn/~zhang


On Fri, Mar 21, 2008 at 5:07 AM, Raffi Khatchadourian <khatchad@xxxxxxxxxxxxxxxxxx> wrote:
Apologies for multiple posts ...

Does anyone have any idea if there is an ASTView Eclipse plug-in
(http://www.eclipse.org/jdt/ui/astview/index.php) for the AJDT? I find
it an indispensable resource when I'm developing plug-ins for Eclipse on
normal Java.  Anything comparable would also be appreciated. Thanks!
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top