zoukankan      html  css  js  c++  java
  • eclipse注释模板及格式化模板导入步骤

    1.点击Window->Preference->Java -> Code Style -> Formatter

    2.点击右侧Import选择*.xml模板文件导入即可

    3.如果需要对模板进行修改,可点击Edit编辑即可

    模板实例:

    <?xml version="1.0" encoding="UTF-8"?>
    <profiles version="10">
    <profile  Profile" version="10">
    <setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
    <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
    <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
    <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
    <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
    <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
    ...........
    ............
    ............
    ..........
    ............
    

      注释模板导入:

    1.点击Window->Preference->Java -> Code Style -> Code  Templates

    2.点击右侧Comments,然后点击Import选择*.xml模板文件导入即可

    3.如果需要对模板进行修改,可点击Comments下的某一项,然后点击Edit编辑即可

    实例:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/** 
     * @Title: ${file_name} 
     * @Package ${package_name} 
     * @Description:
     * @author ${user} 
     * @date ${date} ${time} 
     * @version V1.0 
     */ /**
    .....................
    ........................
    ................
    ...............
    ..............
    .................
    ................
    

      

  • 相关阅读:
    好消息:Dubbo & Spring Boot要来了
    过年回家,程序猿最怕的5件事
    到底什么是分布式系统?
    SLA服务可用性4个9是什么意思?怎么达到?
    漏洞:会话固定攻击(session fixation attack)
    Mybatis传递多个参数的4种方式(干货)
    注意:阿里Druid连接池监控的两个坑
    消息中间件ActiveMQ、RabbitMQ、RocketMQ、ZeroMQ、Kafka如何选型?
    Java程序员必须掌握的常用Linux命令。
    编程词汇
  • 原文地址:https://www.cnblogs.com/byteworld/p/5945234.html
Copyright © 2011-2022 走看看