Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public boolean validate(Element element, AnnotationElements validatedElements) {

validatorHelper.hasOrmLiteJars(element, valid);

validatorHelper.enclosingElementHasEnhancedViewSupportAnnotation(element, validatedElements, valid);
validatorHelper.enclosingElementHasEnhancedComponentAnnotation(element, validatedElements, valid);

validatorHelper.isNotPrivate(element, valid);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@
import org.androidannotations.annotations.App;
import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.OrmLiteDao;
import org.androidannotations.annotations.SystemService;
import org.androidannotations.annotations.Trace;
import org.androidannotations.annotations.Transactional;
import org.androidannotations.annotations.UiThread;
import org.androidannotations.annotations.ViewById;
import org.androidannotations.test15.R;
import org.androidannotations.test15.ormlite.DatabaseHelper;
import org.androidannotations.test15.ormlite.User;
import org.androidannotations.test15.ormlite.UserDao;
import org.androidannotations.test15.roboguice.SampleRoboApplication;

@EFragment(R.layout.injected)
Expand All @@ -43,6 +47,9 @@ public class MyFragment extends AbstractFragment {

@SystemService
ActivityManager activityManager;

@OrmLiteDao(helper = DatabaseHelper.class, model = User.class)
UserDao userDao;

@Click
void myButton() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@
import org.androidannotations.annotations.Background;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EProvider;
import org.androidannotations.annotations.OrmLiteDao;
import org.androidannotations.annotations.SystemService;
import org.androidannotations.annotations.Trace;
import org.androidannotations.annotations.UiThread;
import org.androidannotations.annotations.sharedpreferences.Pref;
import org.androidannotations.test15.ebean.EnhancedClass;
import org.androidannotations.test15.eservice.MyService;
import org.androidannotations.test15.ormlite.DatabaseHelper;
import org.androidannotations.test15.ormlite.User;
import org.androidannotations.test15.ormlite.UserDao;
import org.androidannotations.test15.prefs.SomePrefs_;

@EProvider
Expand All @@ -43,6 +47,9 @@ public class MyProvider extends ContentProvider {
@Bean
EnhancedClass dependency;

@OrmLiteDao(helper = DatabaseHelper.class, model = User.class)
UserDao userDao;

@Pref
SomePrefs_ somePrefs;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@
import org.androidannotations.annotations.Background;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EService;
import org.androidannotations.annotations.OrmLiteDao;
import org.androidannotations.annotations.SystemService;
import org.androidannotations.annotations.Trace;
import org.androidannotations.annotations.UiThread;
import org.androidannotations.test15.ebean.EnhancedClass;
import org.androidannotations.test15.ormlite.DatabaseHelper;
import org.androidannotations.test15.ormlite.User;
import org.androidannotations.test15.ormlite.UserDao;

@EService
public class MyService extends IntentService {
Expand All @@ -38,6 +42,9 @@ public class MyService extends IntentService {
@Bean
EnhancedClass dependency;

@OrmLiteDao(helper = DatabaseHelper.class, model = User.class)
UserDao userDao;

public MyService() {
super(MyService.class.getSimpleName());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@
import com.google.inject.Module;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EApplication;
import org.androidannotations.annotations.OrmLiteDao;
import org.androidannotations.test15.ebean.EmptyDependency;
import org.androidannotations.test15.ormlite.DatabaseHelper;
import org.androidannotations.test15.ormlite.User;
import org.androidannotations.test15.ormlite.UserDao;

@EApplication
public class SampleRoboApplication extends RoboApplication {

@Bean
public EmptyDependency someDependency;

@OrmLiteDao(helper = DatabaseHelper.class, model = User.class)
UserDao userDao;

private Module module = new RobolectricSampleModule();

@Override
Expand Down