Skip to content

Commit bd6f697

Browse files
committed
Setting the processor options for androidannotations#521. Also updated a few header files
1 parent 17e21f1 commit bd6f697

7 files changed

Lines changed: 70 additions & 3 deletions

File tree

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/api/view/HasViews.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright (C) 2010-2013 eBusiness Information, Excilys Group
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed To in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
116
package org.androidannotations.api.view;
217

318
import android.view.View;

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/api/view/OnViewChangedListener.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright (C) 2010-2013 eBusiness Information, Excilys Group
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed To in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
116
package org.androidannotations.api.view;
217

318
public interface OnViewChangedListener {

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/api/view/OnViewChangedNotifier.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright (C) 2010-2013 eBusiness Information, Excilys Group
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed To in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
116
package org.androidannotations.api.view;
217

318
import java.util.LinkedList;

‎AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/AndroidAnnotationProcessor.java‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
*/
1616
package org.androidannotations;
1717

18+
import static org.androidannotations.helper.AndroidManifestFinder.ANDROID_MANIFEST_FILE_OPTION;
19+
import static org.androidannotations.helper.ModelConstants.TRACE_OPTION;
20+
1821
import java.io.IOException;
1922
import java.io.PrintWriter;
2023
import java.io.StringWriter;
@@ -24,6 +27,7 @@
2427
import javax.annotation.processing.Messager;
2528
import javax.annotation.processing.ProcessingEnvironment;
2629
import javax.annotation.processing.RoundEnvironment;
30+
import javax.annotation.processing.SupportedOptions;
2731
import javax.annotation.processing.SupportedSourceVersion;
2832
import javax.lang.model.SourceVersion;
2933
import javax.lang.model.element.Element;
@@ -327,6 +331,7 @@
327331
HierarchyViewerSupport.class //
328332
})
329333
@SupportedSourceVersion(SourceVersion.RELEASE_6)
334+
@SupportedOptions({ TRACE_OPTION, ANDROID_MANIFEST_FILE_OPTION })
330335
public class AndroidAnnotationProcessor extends AnnotatedAbstractProcessor {
331336

332337
private final TimeStats timeStats = new TimeStats();
@@ -512,8 +517,8 @@ private ModelValidator buildModelValidator(IRClass rClass, AndroidSystemServices
512517

513518
private boolean traceActivated() {
514519
Map<String, String> options = processingEnv.getOptions();
515-
if (options.containsKey("trace")) {
516-
String trace = options.get("trace");
520+
if (options.containsKey(TRACE_OPTION)) {
521+
String trace = options.get(TRACE_OPTION);
517522
return !"false".equals(trace);
518523
} else {
519524
return true;

‎AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/helper/AndroidManifestFinder.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
public class AndroidManifestFinder {
4242

43-
private static final String ANDROID_MANIFEST_FILE_OPTION = "androidManifestFile";
43+
public static final String ANDROID_MANIFEST_FILE_OPTION = "androidManifestFile";
4444

4545
private static final int MAX_PARENTS_FROM_SOURCE_FOLDER = 10;
4646

‎AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/helper/ModelConstants.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public abstract class ModelConstants {
1919

2020
public static final String GENERATION_SUFFIX = "_";
2121

22+
public static final String TRACE_OPTION = "trace";
23+
2224
private ModelConstants() {
2325
}
2426

‎AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/processing/ViewChangedHolder.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright (C) 2010-2013 eBusiness Information, Excilys Group
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed To in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
116
package org.androidannotations.processing;
217

318
import static com.sun.codemodel.JExpr.invoke;

0 commit comments

Comments
 (0)