idea和eclipse的注釋還是有一些差別的。
類頭注釋:開啟file->setting->editor->filr and code templates->includes->file header
直接在右邊的檔案框裡編輯你說需要注釋的東西,然後應用儲存之後,當你建立類的時候就會自動生成注釋。
方法注釋:開啟file->setting->editor->livetemplates點選右邊上面那個綠色的+號,選擇template group雙擊,然後彈出乙個視窗,隨便新增乙個名字,我這裡新增的是mygroup然後點選ok
還是在file->setting->editor->livetemplates這個路徑下點選一下剛剛你新增的那個名字(我這是mygroup),然後點選右邊上面那個綠色的+號,選擇livetemplate雙擊,填寫下面的圖上的框
然後點選
然後選擇everywhere
最後點選右下角的edit variables 按鈕,然後彈出乙個視窗,如下:
如果想把 @param:每乙個引數可以這樣
引數值要自己寫的
groovyscript("def result=''; def params=\"$\".replaceall('[\\\\[|\\\\]|\\\\s]', '').split(',').tolist(); for(i = 0; i < params.size(); i++) ; return result", methodparameters())
IDEA 設定文件注釋
idea類和方法注釋模板設定 非常詳細 idea注釋模版配置 推薦!在 file and code templates 頁面設定類 class 的文件注釋 注意 只有新建類的時候,才能建立類的文件注釋哦 在 live templates 中新建乙個模板 缺省會新建乙個名為 user 的分組 我也懶得...
idea 類注釋,方法注釋設定
類頭注釋 開啟file setting editor filr and code templates includes file header 直接在右邊的檔案框裡編輯你說需要注釋的東西,然後應用儲存之後,當你建立類的時候就會自動生成注釋。方法注釋 開啟file setting editor liv...
Idea專案注釋規範設定
idea專案注釋規範設定文件 1 類注釋 2 方法注釋 description description 方法是 param param return return auther guohui date date time 2.1新建template group 2.2 命名 2.3 建立templa...