-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add files via upload #100
Add files via upload #100
Conversation
for issue #35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to implement the EntityParsingStep interface and add stuff to the Singleton, not return a static set
@Override | ||
public JavaEntity construct(EntityBuilder builder, CompilationUnit declaration) { | ||
// Existing logic to parse the entity | ||
JavaEntity entity = next.construct(builder, declaration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to parse the entity here, just put everything into the builder
Set<String> associatedClassNames = getAssociatedClassNames(entity); | ||
associatedClassNames.forEach(builder::addAssociation); | ||
|
||
return entity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to return next.construct here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is supposed to address issue #35
@Override | ||
public JavaEntity construct(EntityBuilder builder, CompilationUnit declaration) { | ||
// Existing logic to parse the entity | ||
JavaEntity entity = next.construct(builder, declaration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call this at the end of the function!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise it will run out of order. Just look at the other steps
return entity; | ||
} | ||
|
||
private Set<String> getAssociatedClassNames(Object entity) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't your task to just get the parent class of the ClassOrInterfaceDeclaration if it has one? Kind of confused on why all this logic is needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
for issue #35