Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java classes defined in another class could not be recognized properly #23

Open
HickeyHsu opened this issue May 26, 2022 · 3 comments
Open

Comments

@HickeyHsu
Copy link

For example:

import ast.Visitor;

public class Normalizer {
    visitors = new ArrayList<>();
    visitors.add(new VisitorA ());
    public class VisitorA extends Visitor{
    }
}

In this case, VisitorA will not generate a link with Normalizer;
At the same time, imported ast.Visitor identified as node<ast.Visitor>in dependency_graph, and identified as node <visitor> in inheritance_graph. This causes the repeatedly appearing node to in complete_graph.

I haven`t tested in other language.

@HickeyHsu
Copy link
Author

Another problem:
for import like :

import org.antlr.v4.runtime.*;

Tools fails to build proper nodes and edges

@HickeyHsu
Copy link
Author

For example:

import ast.Visitor;

public class Normalizer {
    visitors = new ArrayList<>();
    visitors.add(new VisitorA ());
    public class VisitorA extends Visitor{
    }
}

In this case, VisitorA will not generate a link with Normalizer; At the same time, imported ast.Visitor identified as node<ast.Visitor>in dependency_graph, and identified as node <visitor> in inheritance_graph. This causes the repeatedly appearing node to in complete_graph.

I haven`t tested in other language.

I made some rough changes to the code to make the improvements mentioned above.
view at https://github.com/HickeyHsu/SoftwareNetGen

@glato
Copy link
Owner

glato commented May 29, 2022

@HickeyHsu Thanks for the feedback. I'll have a closer look at the issues and try to give you feedback in the following days. Probably this is the case, since the parsers can't really handle nested structures (yet) to extract them in a recursive way. I'll have a look at your modifications, looking forward 👋.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants