ervandew / eclim

Expose eclipse features inside of vim.
http://eclim.org
GNU General Public License v3.0
1.04k stars 127 forks source link

Please add "max_depth" parameter to c_callhierarchy command #257

Open lansfy opened 11 years ago

lansfy commented 11 years ago

I use eclim as AST-server for examine source of our project. Project is big, so then I try run command

"C:\Program Files\eclipse\eclim.cmd" -command c_callhierarchy -p my_trunk -f include_file_path -o 599 -l 0 -e ascii

I got next error

  java.lang.NullPointerException

because call hierarhy is too big, I think. Can you add special parameter max_depth to c_callhierarchy command to restrict size of call hierarchy tree?

ervandew commented 11 years ago

Can you post the full stack trace? A NullPointException usually means there is a bug in the code.

I do agree that both the c and java versions of this command could use a max depth (I've triggered an OutOfMemoryError playing with the java call hierarchy command in one place), but without seeing what is causing the NullPointerException for you, I'm not sure that adding a max depth would solve your issue.

lansfy commented 11 years ago

Thank you for response.

Full error stack (with some view optimization, as it is 1027 lines long)

java.lang.NullPointerException
        at org.eclim.plugin.cdt.command.hierarchy.CallHierarchyCommand$Call.<init>(CallHierarchyCommand.java:346)
        at org.eclim.plugin.cdt.command.hierarchy.CallHierarchyCommand.findCallers(CallHierarchyCommand.java:235)
        at org.eclim.plugin.cdt.command.hierarchy.CallHierarchyCommand.findCallers(CallHierarchyCommand.java:204)
        at org.eclim.plugin.cdt.command.hierarchy.CallHierarchyCommand.formatElement(CallHierarchyCommand.java:324)
-- next fragment repeated 339 times
        at org.eclim.plugin.cdt.command.hierarchy.CallHierarchyCommand.findCallers(CallHierarchyCommand.java:244)
        at org.eclim.plugin.cdt.command.hierarchy.CallHierarchyCommand.findCallers(CallHierarchyCommand.java:182)
        at org.eclim.plugin.cdt.command.hierarchy.CallHierarchyCommand.formatElement(CallHierarchyCommand.java:324)
---