사용자 도구

사이트 도구


intellij_idea:live_template

문서의 이전 판입니다!


IntelliJ Live Template

특수 변수

  • $END$ : 라이브템플릿 수행 후 커서를 둘 위치
  • $SELECTION$ : 현재 선택된 문자열. Ctrl-Alt-T로 selection template을 실행하면 선택된 문자열에 대한 행위가 실행된다.
  • $$ : $ 문자 그 자체

Date deep copy Getter/Setter template

DateUtils.dateDeepCopy(Date) 라는 유틸리티 메소드가 이미 존재한다고 가정하여, Date 객체를 Deep Copy 하는 setter, getter 를 자동생성해본다.

  • Abbrevication : ddc
  • Description : date deep copy
  • Template Text:
    public Date get$FIELD$() {
        return DateUtils.dateDeepCopy($field$);
    }
     
    public void set$FIELD$(Date $field$) {
        this.$field$ = DateUtils.dateDeepCopy($field$);
    }
  • Applicable : in Java declaration
  • Reformat according to style : check
  • Use static import if possible : check
  • Shorten FQ names : check
  • Variables
    • field : 아무것도 필요없음
    • FIELD :
      • Expression : capitalize(field) FIELD에 입력한 값을 대문자화
intellij_idea/live_template.1470282111.txt.gz · 마지막으로 수정됨: 2016/08/04 12:11 저자 kwon37xi