2

I need to programmatically generate a call graph as part of an Eclipse plugin. I know Eclipse has the built-in Open Call Hierarchy function available, but I haven't been able to find a way to access it as part of plugin development. Does anybody know how to do this using Eclipse's call hierarchy or with another similar tool?

Thanks

Tas
  • 285
  • 1
  • 15

1 Answers1

3

You may be able to use org.eclipse.jdt.internal.corext.callhierarchy.CallHierarchy and other types in the same package.

Deepak Azad
  • 7,903
  • 2
  • 34
  • 49
  • Is there somewhere where I can get sample code/documentation for that package? I'm fairly sure it's the right class, but I'm not sure how to use it. – Tas Apr 04 '12 at 08:06
  • I think you will have to look for its usage in o.e.jdt.ui and figure out things for yourself. (Non-internal types are generally well documented, but this one is an internal type) – Deepak Azad Apr 04 '12 at 08:12
  • The compiler warns me that there is access restriction on those classes. Is there some public way to access this functionality? Or this is the kind of warning that can be ignored? – allprog Jan 30 '14 at 22:16
  • I had those warnings too back then – they can be ignored, you just risk your code being broken on subsequent versions/patches for Eclipse. – Tas Feb 11 '14 at 19:32