Closed owjhart closed 10 years ago
Great! Thanks! I've been meaning to fix this for a while now.
There is a slight regression. If you've included the AlertDialog
class then then had this piece of code:
new AlertDialog.Builder(getActivity())
.setMessage(toastString)
.setNeutralButton(R.string.profile_error_dismiss, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
})
.create()
.show();
your new code will ask you which Builder
you want to import. Ideally I'd like it so if you've already imported a class then you can use its inner-classes without having to import them as well.
If you could fix this small problem then I'll merge your pull request right away! If you don't have time let me know and I'll give it a go myself.
Thanks again :+1:
Good find! I won't have time this week. If you could give it a go that'd be great. Thanks~!
I'll see if I can find some time tomorrow :-)
On 11 November 2013 15:54, owjsub notifications@github.com wrote:
Good find! I won't have time this week. If you could give it a go that'd be great. Thanks~!
— Reply to this email directly or view it on GitHubhttps://github.com/ribot/SublimeAndroidImport/pull/8#issuecomment-28211186 .
I've fixed this issue using your commit with a patch on top of it. Thank you for the contribution!
Scenario: If I have already imported com.actionbarsherlock.view.MenuItem, then if I run
Cmd+Shift+O
, I expect android.view.MenuItem to not be imported.Solution: Compare class names at the end of the package paths instead of comparing full package paths.