ribot / SublimeAndroidImport

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

First import is multiple choice #13

Open matt-oakes opened 10 years ago

matt-oakes commented 10 years ago

This error is shown when there are currently no imports and the only import in the class is one which requires user action:

Traceback (most recent call last):
  File "./sublime_plugin.py", line 356, in run_
  File "./android_import.py", line 234, in run
    insert_point = self.find_import_position(file_contents)
  File "./android_import.py", line 171, in find_import_position
    self.view.insert(self.edit, self.view.text_point(1, 0), '\n')

This is an example of the situation it happens in:

package ws.oakes.streak.model;

public class Entry {
    public Long _id;
    public Date date;
}