eclipse-wildwebdeveloper / wildwebdeveloper

Simple and productive Web Development Tools in the Eclipse IDE
https://projects.eclipse.org/projects/tools.wildwebdeveloper
Eclipse Public License 2.0
189 stars 70 forks source link

call hierarchy not available in TypeScript file #1590

Open mkq opened 3 months ago

mkq commented 3 months ago

(Moved from (https://bugs.eclipse.org/bugs/show_bug.cgi?id=583302):)

In a TypeScript file (opened with Generic Text Editor by default) in the context menu on a function declaration, "Open Call Hierarchy" is disabled. Could you please make it work?

(The required information seems to be available: Ctrl+Shift+G "Find References" finds callers; and F3 "Open Declaration" on a caller navigates to the called function.)

I love the call hierarchy (in Java). It's so much simpler than emulating it with consecutive "Find References" where I get lost quickly.

I used a new workspace and a fresh installation of eclipse-jee-2024-03-R-win32-x86_64.zip AKA: Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components) Version: 2024-03 (4.31.0) Build id: 20240307-1437

Thanks!

mickaelistria commented 3 months ago

I'm not much familiar with "Call hierarchy" to be honest. But if you think it can be implemented with a combination of standard LSP features (find-references + open declaration), then it could be a good addition to LSP4E project directly so that would work for all languages that are supported by a language server. What do you think?

mkq commented 3 months ago

Sorry. I didn't want to claim that I know how to implement that. I don't know anything about Eclipse development.

I just meant - purely from the user's perspective - it looks like the callers information is available, so it shouldn't be too much effort to display it as a call hierarchy tree.

mickaelistria commented 3 months ago

it shouldn't be too much effort to display it as a call hierarchy tree.

Probably not. But at the moment, I don't think this can become a priority of the maintainers. However, if you're willing to contribute it, most of us would be happy to assist you in doing so and to review and merge good code.

mkq commented 3 months ago

That's a pity.

I consider call hierarchy a basic IDE feature. I always find it baffling when I see a colleague use multiple "find references" and mental backtracking, while in a call hierarchy, you can immediately see where to continue your search (i. e. expand not yet expanded nodes). I will probably continue to use VSCode for TypeScript (which is another pity, because I hate IDEs / code editors with such a limited view / perspective management).