{"action":"created","issue":{"url":"https://api.github.com/repos/MarcusWolschon/osmeditor4android/issues/374","labels_url":"https://api.github.com/repos/MarcusWolschon/osmeditor4android/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/MarcusWolschon/osmeditor4android/issues/374/comments","events_url":"https://api.github.com/repos/MarcusWolschon/osmeditor4android/issues/374/events","html_url":"https://github.com/MarcusWolschon/osmeditor4android/pull/374","id":114585394,"number":374,"title":"DRY SelectedActionModeCallback","user":{"login":"johnjohndoe","id":144518,"avatar_url":"https://avatars.githubusercontent.com/u/144518?v=3","gravatar_id":"","url":"https://api.github.com/users/johnjohndoe","html_url":"https://github.com/johnjohndoe","followers_url":"https://api.github.com/users/johnjohndoe/followers","following_url":"https://api.github.com/users/johnjohndoe/following{/other_user}","gists_url":"https://api.github.com/users/johnjohndoe/gists{/gist_id}","starred_url":"https://api.github.com/users/johnjohndoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnjohndoe/subscriptions","organizations_url":"https://api.github.com/users/johnjohndoe/orgs","repos_url":"https://api.github.com/users/johnjohndoe/repos","events_url":"https://api.github.com/users/johnjohndoe/events{/privacy}","received_events_url":"https://api.github.com/users/johnjohndoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-02T12:35:06Z","updated_at":"2015-11-18T15:08:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MarcusWolschon/osmeditor4android/pulls/374","html_url":"https://github.com/MarcusWolschon/osmeditor4android/pull/374","diff_url":"https://github.com/MarcusWolschon/osmeditor4android/pull/374.diff","patch_url":"https://github.com/MarcusWolschon/osmeditor4android/pull/374.patch"},"body":"I noticed that *MemberSelectedActionModeCallback*, *ParentSelectedActionModeCallback* and *TagSelectedActionModeCallback* share a lot of **common code**. So I took some time to see if these three classes can be consolidated. Here is the outcome :-}\r\n\r\nPlease let me know if you come up with **better naming** for the \"generic\" class *SelectedActionModeCallback* or for the interfaces *AccessibleRow* and *AccessibleRelation*. I am happy to refactor this branch before merging. I guess you have more insight into the application then I am.\r\n\r\nAlso, please make sure to penile **review/test** what I did before merging. I tried to commit small atomic steps to en-ease your review process.\r\n\r\nPing me before merging - I am **happy to rebase** this branch onto the latest commit on `0.9.7` to produce a clean empty merge commit."},"comment":{"url":"https://api.github.com/repos/MarcusWolschon/osmeditor4android/issues/comments/157742315","html_url":"https://github.com/MarcusWolschon/osmeditor4android/pull/374#issuecomment-157742315","issue_url":"https://api.github.com/repos/MarcusWolschon/osmeditor4android/issues/374","id":157742315,"user":{"login":"simonpoole","id":1011860,"avatar_url":"https://avatars.githubusercontent.com/u/1011860?v=3","gravatar_id":"","url":"https://api.github.com/users/simonpoole","html_url":"https://github.com/simonpoole","followers_url":"https://api.github.com/users/simonpoole/followers","following_url":"https://api.github.com/users/simonpoole/following{/other_user}","gists_url":"https://api.github.com/users/simonpoole/gists{/gist_id}","starred_url":"https://api.github.com/users/simonpoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonpoole/subscriptions","organizations_url":"https://api.github.com/users/simonpoole/orgs","repos_url":"https://api.github.com/users/simonpoole/repos","events_url":"https://api.github.com/users/simonpoole/events{/privacy}","received_events_url":"https://api.github.com/users/simonpoole/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T15:08:00Z","updated_at":"2015-11-18T15:08:00Z","body":"OK, I have had an intensive look at the PR now, there are just a small number of things that should be changed. \r\n\r\n* the main issue is with naming, I can see where you are coming from, but the current names are very confusing. I would suggest, for lack of a better idea right now, renaming AccessibleRelation to PropertyEntries and relationDeselected to entryDeselected, or perhaps even better to PropertyRows and rowDeselected. Further I would rename the interface AccessibleRow simply to Row, and SelectedActionModeCallback to RowSelectedActionModeCallback\r\n\r\n* in TagSelectedActionModeCallback there is some potential for further simplifying the code by calling the methods in the super class (SelectedActionModeCallback)  this is done a lot in the EasyEditManager code for reference.\r\n"}}