This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
tuto_ecj_android [2014/03/03 16:05] Denis Pallez |
tuto_ecj_android [2014/03/03 17:27] (current) Denis Pallez |
||
---|---|---|---|
Line 3: | Line 3: | ||
First of all, to make the development of Android app easier, you have to install the Eclipse framework. In this environment, you will have to install the Android SDK to get all the tools. This two first steps are explained here :\\ [[http://www.tutomobile.fr/installer-le-sdk-android-sur-eclipse-tutoriel-android-n%C2%B01/09/06/2010/|- In French]]\\ [[http://developer.android.com/sdk/installing/installing-adt.html|- In English]]\\ Then, you have to download the ECJ library [[http://cs.gmu.edu/%7Eeclab/projects/ecj/|here]]\\ You can find the official ECJ manual [[http://cs.gmu.edu/%7Eeclab/projects/ecj/docs/manual/manual.pdf|here]]\\ | First of all, to make the development of Android app easier, you have to install the Eclipse framework. In this environment, you will have to install the Android SDK to get all the tools. This two first steps are explained here :\\ [[http://www.tutomobile.fr/installer-le-sdk-android-sur-eclipse-tutoriel-android-n%C2%B01/09/06/2010/|- In French]]\\ [[http://developer.android.com/sdk/installing/installing-adt.html|- In English]]\\ Then, you have to download the ECJ library [[http://cs.gmu.edu/%7Eeclab/projects/ecj/|here]]\\ You can find the official ECJ manual [[http://cs.gmu.edu/%7Eeclab/projects/ecj/docs/manual/manual.pdf|here]]\\ | ||
- | |||
- | [[#begin|Back to begin]] | ||
===== 2. Create a new Android Project ===== | ===== 2. Create a new Android Project ===== | ||
Line 10: | Line 8: | ||
When the two first steps are done, we will create a new Android project with eclipse. <code> - File -> new -> Android application project</code>\\ {{ECJ_Android_fichiers:1.png}}\\ <code>- Give a name at your project and let the default configurations. | When the two first steps are done, we will create a new Android project with eclipse. <code> - File -> new -> Android application project</code>\\ {{ECJ_Android_fichiers:1.png}}\\ <code>- Give a name at your project and let the default configurations. | ||
- In your workspace, your new project should be as shown below :</code>\\ \\ {{ECJ_Android_fichiers:2.png}}\\ | - In your workspace, your new project should be as shown below :</code>\\ \\ {{ECJ_Android_fichiers:2.png}}\\ | ||
- | |||
- | [[#begin|Back to begin]] | ||
===== 3. Add ECJ library in your project ===== | ===== 3. Add ECJ library in your project ===== | ||
Line 28: | Line 24: | ||
- Right click on this new package -> new -> File | - Right click on this new package -> new -> File | ||
- Name the new file "config_ecj.params" for exemple</code>\\ \\ You can now edit your configuration file as usual.\\ {{ECJ_Android_fichiers:6.png}}\\ | - Name the new file "config_ecj.params" for exemple</code>\\ \\ You can now edit your configuration file as usual.\\ {{ECJ_Android_fichiers:6.png}}\\ | ||
- | |||
- | [[#begin|Back to begin]] | ||
===== 4. Collect configuration data ===== | ===== 4. Collect configuration data ===== | ||
Line 65: | Line 59: | ||
result = evaluatedState.evolve(); | result = evaluatedState.evolve(); | ||
</code> | </code> | ||
- | |||
- | [[#begin|Back to begin]] | ||
===== 5. Print configuration data ===== | ===== 5. Print configuration data ===== | ||
Line 88: | Line 80: | ||
</code> | </code> | ||
\\ {{ECJ_Android_fichiers:7.png}}\\ | \\ {{ECJ_Android_fichiers:7.png}}\\ | ||
- | |||
- | [[#begin|Back to begin]] | ||
===== 6. Write in a File with Android ===== | ===== 6. Write in a File with Android ===== | ||
Line 127: | Line 117: | ||
As you can understand, this code write the text "Hello World" into the file "config_ecj_in.in".\\ | As you can understand, this code write the text "Hello World" into the file "config_ecj_in.in".\\ | ||
- | |||
- | [[#begin|Back to begin]] | ||
===== 7. Use a file in an another one ===== | ===== 7. Use a file in an another one ===== | ||
Line 139: | Line 127: | ||
</code> | </code> | ||
Now, if you load "mainConfigFile.params" as show in this [[#collectInfo|example]] you will also initialize you popullation with "config_ecj_in.in".\\ Simple, isn't it ?\\ Here is the end of our tutorial. Good luck !\\ | Now, if you load "mainConfigFile.params" as show in this [[#collectInfo|example]] you will also initialize you popullation with "config_ecj_in.in".\\ Simple, isn't it ?\\ Here is the end of our tutorial. Good luck !\\ | ||
- | |||
- | [[#begin|Back to begin]] | ||
Any questions or suggestions ? [[guegan@polytech.unice.fr;fauvelja@polytech.unice.fr;adiaz@polytech.unice.fr;arnaud@polyech.unice.fr?subject=Tutorial%20ECJ%20in%20Android|Contact us !]] | Any questions or suggestions ? [[guegan@polytech.unice.fr;fauvelja@polytech.unice.fr;adiaz@polytech.unice.fr;arnaud@polyech.unice.fr?subject=Tutorial%20ECJ%20in%20Android|Contact us !]] |