Android Studio Plugin
Hi All,
I am a beginner in development of plugin and using IntelliJ. my question is that, if I want to inject a code inside an android application activity in a specific place for example inside Oncreat() method after variable initialization. Is there any reference or code samples that I can take a look at in order to get some Idea?
Thank you in advance
请先登录再写评论。
What do you mean by "injecting code"? Could you give a sample?
yes, of course. For example, I have this activity that is called login activity
Ok, you will need to navigate through PSI and then insert the text into Document:
https://www.jetbrains.org/intellij/sdk/docs/basics/architectural_overview/psi_files.html
https://www.jetbrains.org/intellij/sdk/docs/basics/architectural_overview/documents.html#what-are-the-rules-of-working-with-documents
Good luck!
Okay. Thank you for your help. one more question, Template files are not supported in community edition?
Template files are supported in Community as well.