Backwards Dependency Analysis

已回答

I'm not getting any results when running the backwards dependency analysis.  The forward generates results just fine.

Any ideas why the backwards one doesn't show anything?

Thanks,

0

Did you choose the correct scopes (you could try swapping scopes)? Maybe there aren't any dependent classes in that direction?

Dirk

0
Avatar
Permanently deleted user

I have "Whole Project" selected for Scope and "Project Files" for Scope of Interest

I get results showing dependencies with the regular, forward dependency analysis, so it stands to reason there are backwards dependencies as well since those are just in the opposite direction.

I'm at a loss as to understand why they aren't reported unless I have a misunderstanding of what the backwards dependency analysis is supposed to report.

0

any updates on this ? I am also struggling to grasp how does backwards analysis work

For example, I have a dependency 'dom4j' listed in "External libraries" of the project. How do I tell which other library/POM/gradle file has brought this here into the project ?

0

Sounds like you need what this feature request describes: https://youtrack.jetbrains.com/issue/IDEA-190160. Try this Gradle View 3rd party plugin: https://plugins.jetbrains.com/plugin/7150-gradle-view.

0

So, I've installed it, and how do I use it ? cannot find any new menu items/actions, related to this plugin. Where is it in the UI ?

0

ok, I see the idea - it has a dedicated Tool Window, not integrated with Project Structure.. well.. Now I can find is a dependency is direct or transitive, but what I wanted to see is - where is it actually used in a project ? I mean, any of the classes/interfaces defined in the dependency. ideally it would list all packages in my project or in other dependencies, that consume anything from the selected one. I thought this is what "Backward dependency analysis" is for, not ?

0

Sorry I can not tell about the Gradle View plugin, please ask for clarifications the plugin vendor.

As for Backward Dependencies analisys - you should be able to find the usages of the class in project using them. E.g. Here I checking all the usages of HibernateException library class in project:



 

0

so it's basically same as "Usages".. or at least I don't see a lot of added value here ..

0

(I mean regular Find Usages operation, that you can do routinely on almost every term in the code editor)

0

Hi, I need to find transitive backward dependencies , it looks like Idea does not do it - I use version Ultimate 2018.1

Example : class CC extends BB that implements AA , class EE has a field of class DD that has a field of class AA. So potentially EE depends on CC - an implementation of AA.

Idea does not find any backward dependency on CC - same as "find usages - Alt-F7"

Is there a way to find what is need in Idea, or could you suggest a tool that does it ?

0

@Mihhon please provide a demo project.

0
@Petr

public class AA {}
public class BB extends AA {}
public class CC extends BB {}
public class DD {
AA aa;
}
public class EE {
DD dd;
}
0

请先登录再写评论。