Skip to content

Bash Call Hierarchy

Albert Tregnaghi edited this page Aug 3, 2020 · 4 revisions

About

Bash Call Hierarchy was introduced with version V2.4.0. Initial issue was #60

Screenshot

image

Usage

Show call hierarchy

You can use - context menu of * editor: either on a function or at script level * outline: of editor (only at function items) * project: explorer, navigator etc. - source menu when your active editor is bash editor - Just press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>G</kbd> inside bash editor at function name or when just search for script usage, click inside editor (without selection)

Open part shown in call hiararchy view

Just doubleclick on a tree item inside Bash Call Hierarchy view and location will be opened in Bash Editor

What is searched?

  • scripts (source, exec)

  • functions (usage)

Which directions are supported?

Bottom-up : "Who calls this function/script ?"

This is supported. E.g. when selecting function "foo" inside "example1.sh" file and example2.sh is using foo inside its code, you will see example2.sh inside call hierarchy.

"Top-Down: What is function/script calling?"

At the moment this is not implemented/available.

False positives

When you are using function names inside comments or strings, those parts will also be recognized inside call hierarchy. Please be gentle and just ignore those entries/noise. Maybe in future this will be improved.

Project/Workspace level

Inside Bash Call Hierarchy View there is a blue bullet icon available. This shows that your call hierarchy search does only search inside same project. When you click on the icon it will switch to a 3 bullet variant which scans complete workspace. Clicking again to the icon switches back to project only mode.

Clone this wiki locally