Filter Eclipse Hierarchy of Open Calls only for my company / project

One of my favorite Eclipse functions is the ability to open the hierarchy of the calling / called method .

By default, the view displays calls to / from classes that are outside of my code base ... which I usually don't care about.

It is possible to filter out specific package names that I don’t want, but I need to do the opposite ... to filter out all the packages except the ones I want. What suitable regular expression is used here to "match all strings except those starting with com.mycompany. ?"

alt text

+7
language-agnostic eclipse regex call-hierarchy
source share
8 answers

Filter Calls seems to use glob syntax for filter patterns, not regular expressions. You cannot specify something that should not match glob patterns. Unfortunately.

+1
source share

Recently, I had the same problem, and exploring the call hierarchy options led me to the search option. It is activated by clicking on the triangle.

View Menu

Filtering options are quite simple and effective: Search in options

+10
source share

This is not exactly what you are looking for, but it is an alternative solution. Take a look at nWire for Java . This is a code development plugin. Among many other things, a hierarchy of challenges will be presented. However, it will only show calls that come from your own code, so it should fit your needs.

+1
source share

Another approach is to open the "Hierarchy View" menu in the "View" menu, select "Select a working set" and select an existing or new working set that includes only the project you are interested in (create it only for this purpose, if necessary, for example, it is called " TypeHierarchyFilterWorkingSet ").

I just did it using Eclipse Indigo, by the way, not sure if there is anything similar in other versions.

+1
source share

After "Hierarchy of open calls", right-click on the root of the results and select the project of interest to you in the "Links" or "Declaration" section:

enter image description here

+1
source share

One solution (albeit a little brute force) is to remove other code from Eclipse's reach. Either place them in separate workspaces, or if you sometimes need them in one workspace, close other projects when you do not want to see them.

0
source share

you can filter org., net., java. * and so on. This (in my case) significantly shortens the list

0
source share

You can try to add a parameter to the method, than all calls will be displayed as an error during recovery.

-one
source share

All Articles