This repository was archived by the owner on Apr 26, 2019. It is now read-only.
Avoid auto-generating methods if already present in parent classes #127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @TomasKypta, this PR solves issues #68, #74, #82, #100, #108 following @NikolaDespotoski's explanation here #74.
Behaviour followed has been:
1. find method (onCreate/onCreateView/onDestroyView) in current class and superclasses.
1.a. if list returned has size 1, that means that the only method found is the Android code base one. Then, add method in current class with bind/unbind.
1.b. otherwise
1.b.1. if no methods from 1 (that is to say, current class and superclasses) has ButterKnife bind/unbind declared.
1.b.1.1. find method only in current class
1.b.1.1.a. if method is found, just add bind/unbind.
1.b.1.1.b. otherwise, add method with bind/unbind.
1.b.2. otherwise, no action is needed
(not sure if it's the best explanation that way, maybe a flow chart would have been better).