You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3efcc09
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/helper/IdValidatorHelper.java
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/helper/ValidatorHelper.java
if (element.getAnnotation(Enhanced.class) == null) {
155
-
annotationHelper.printAnnotationError(reportElement, "%s can only be used in a class annotated with " + TargetAnnotationHelper.annotationName(Enhanced.class));
if (element.getAnnotation(EActivity.class) == null) {
176
-
annotationHelper.printAnnotationError(reportElement, "%s can only be used in a class annotated with " + TargetAnnotationHelper.annotationName(EActivity.class));
for (Class<? extendsAnnotation> a : VALID_EBEAN_ANNOTATIONS) {
194
-
if (element.getAnnotation(a) != null) {
195
-
ok = true;
186
+
/*
187
+
* This is for the case where the element has the right
188
+
* annotation, but that annotation was not validated. We do not
189
+
* add any compile error (should already exist on the
190
+
* annotation), but we still invalidate this element.
191
+
*/
192
+
if (!layoutAnnotatedElements.contains(element)) {
193
+
valid.invalidate();
194
+
}
195
+
196
+
foundAnnotation = true;
197
+
break;
196
198
}
197
199
}
198
200
199
-
if (!ok) {
201
+
if (!foundAnnotation) {
200
202
valid.invalidate();
201
-
annotationHelper.printAnnotationError(reportElement, "%s can only be used in a class annotated with " + getFormattedValidEnhancedBeanAnnotationTypes() + ".");
203
+
annotationHelper.printAnnotationError(reportElement, "%s can only be used in a class annotated with " + getFormattedValidEnhancedBeanAnnotationTypes(validAnnotations) + ".");
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/processing/InjectProcessor.java
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/validation/AfterViewsValidator.java
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/validation/AppValidator.java
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/validation/ExtraValidator.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ public Class<? extends Annotation> getTarget() {
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/validation/InjectValidator.java
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/validation/ResValidator.java
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/validation/RestServiceValidator.java
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/validation/RunnableValidator.java
0 commit comments