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

feature: RoleHandlerHelper#getRoleHandlers(Class), forEachRoleHandler, getParentRoleHandler #1794

Merged
merged 4 commits into from
Jan 4, 2018

Conversation

pvojtechovsky
Copy link
Collaborator

Some helper methods which allows generically access Spoon model

}
}

public static RoleHandler getParentRoleHandler(CtElement element) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to getRoleHandler?

add API documentation?

thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to getRoleHandler?

are you sure? I think that there should be something about parent in the method name, because it returns role of this element in parent.

api doc.
I forgot that ... It compiles without documentation well :-) I will add it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it returns role of this element in parent.

a role is always with respect to the parent, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case of this method yes.

@@ -71,4 +78,51 @@ public static RoleHandler getOptionalRoleHandler(Class<? extends CtElement> targ
}
return null;
}

/**
* @param targetClass a Close whose handlers we are looking for
Copy link
Collaborator

@surli surli Jan 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand your documentation here: what's a "Close"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should sleep more ... at least sometime ... "Close" is wrong. Correct is "Class" ;-) I will fix it.

@monperrus
Copy link
Collaborator

This PR is OK but for the method name getParentRoleHandler.
WDYT of getRoleHandlerWrtParent (wrt = with respect to) or getRoleWrtParentHandler?

@monperrus monperrus merged commit 8e6ea43 into INRIA:master Jan 4, 2018
@monperrus
Copy link
Collaborator

thanks!

@pvojtechovsky pvojtechovsky deleted the feaGetRoleHandlers branch September 1, 2018 07:24
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

Successfully merging this pull request may close these issues.

3 participants