ribot / SublimeAndroidImport

A Sublime Text 2/3 plugin which automatically adds imports from the Android SDK.
30 stars 6 forks source link

Handle user defined classes whose names conflict with API classes #16

Open qgates opened 10 years ago

qgates commented 10 years ago

So I have a class in my Android app "Helpers" yet AndroidImport wants to import another Helpers class (android.provider.SyncStateContract.Helpers). Because my class exists within the same package namespace, it doesn't need an explicit import, which is where AndroidImport gets confused.

Be nice to have some way for AndroidImport to check for this situation, or if that's too complicated, some project-specific excludes for AndroidImport.

matt-oakes commented 10 years ago

Would it be good enough to look for Java files in the same directory and assume the name of them is the name of the classes to exclude? On 1 Mar 2014 04:03, "qgates" notifications@github.com wrote:

So I have a class in my Android app "Helpers" yet AndroidImport wants to import another Helpers class (android.provider.SyncStateContract.Helpers). Because my class exists within the same package namespace, it doesn't need an explicit import, which is where AndroidImport gets confused.

Be nice to have some way for AndroidImport to check for this situation, or if that's too complicated, some project-specific excludes for AndroidImport.

Reply to this email directly or view it on GitHubhttps://github.com/ribot/SublimeAndroidImport/issues/16 .