尋求有用的Eclipse Java代碼模板[關 閉] - Seeking useful Eclipse Java code templates [closed]

問題:

You can create various Java code templates in Eclipse via 您可以通過Eclipse在Eclipse中創建各種Java代碼模板

Window > Preferences > Java > Editor > Templates 窗口>首選項> Java>編輯器>模板

eg 例如

sysout is expanded to: sysout擴展爲:

System.out.println(${word_selection}${});${cursor}

You can activate this by typing sysout followed by CTRL+SPACE 您可以通過鍵入sysout然後按CTRL+SPACE來激活它

What useful Java code templates do you currently use? 您目前使用哪些有用的Java代碼模板? Include the name and description of it and why it's awesome. 包括它的名稱和描述以及爲什麼它很棒。

I am looking for an original/novel use of a template rather than a built-in existing feature. 我正在尋找原型/新穎的模板使用而不是內置的現有功能。

  • Create Log4J logger 創建Log4J記錄器
  • Get swt color from display 從顯示中獲取swt顏色
  • Syncexec - Eclipse Framework Syncexec - Eclipse框架
  • Singleton Pattern/Enum Singleton Generation Singleton Pattern / Enum Singleton Generation
  • Readfile READFILE
  • Const 常量
  • Traceout Traceout
  • Format String 格式字符串
  • Comment Code Review 評論代碼評論
  • String format 字符串格式
  • Try Finally Lock 嘗試最後鎖定
  • Message Format i18n and log 消息格式i18n和日誌
  • Equalsbuilder Equalsbuilder
  • Hashcodebuilder Hashcodebuilder
  • Spring Object Injection 彈簧對象注入
  • Create FileOutputStream 創建FileOutputStream

解決方案:

參考一: https://stackoom.com/question/4JeU
參考二: Seeking useful Eclipse Java code templates [closed]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章