I am going to start working on projects recently. The project specifies method annotation templates. So how does idea customize the annotation templates?
There are two solutions:
1. Installing the Jindent plug-in has the advantage of automatically generating templates, but unfortunately, I failed to install it. I don’t know why I can’t Apply after setting it up. It may be a problem with my version. Students who fail, please see Plan 2.
2. Download Jindent plug-in: http://plugins.jetbrains.com/plugin/2170?pr=idea, you can also install it online directly in idea, similar to online install2 of eclipse. Use the Live Template template set up by idea (this method is recommended)
Solution 1: Jindent plug-in (I installed it online directly)
1.File―->Settings―->Plugin―->Install Jet….
2. Search for Jindent and install
3. After installation, you need to restart, and then open Settings again, you can see the last option Other Settings
Plan 2:
1. Still Settings, search Live, you can see Live Template, click the + sign on the right, select the second item, enter the name, such as MyTemplate
2. Select the newly created MyTemplate, click the green + sign again, select the first one, and give it a name, such as dd, the simpler the better
3. The next step is to set the template
4. Click the Edit variables button, select the expression provided by idea, and finally Apply
Finally got it done. This thing bothered me for a day and almost forced me to switch back to Myeclipse. It was mainly caused by the Jindent plug-in that cannot be applied...
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.