Ali p3c (code specifications, eclipse plug-ins, templates, idea plug-in)

Ali p3c

I. Description

Codes of check-ins p3c, according to "Ali Baba Java Development Manual" turned into a plug-in automation.

(Advanced Black: P-3C "Orion", anti-submarine patrol aircraft, Ali probably take advanced p3c, monitoring, detecting potential problems of meaning)

Second, the source address

https://github.com/alibaba/p3c


Alibaba Java Development Manual

I. Description

"Ali Baba Java Development Manual" aimed at the efficient code, the code quality.

Second, the purpose

Standardization, normalization, effective coordination.

Third, download

Alibaba Java Development Manual (full version) .pdf


Ali coding standards set

A, eclipse

https://www.eclipse.org/downloads/

Two, eclipse code specifications

1. Download

【p3c-formatter】:【https://github.com/alibaba/p3c/tree/master/p3c-formatter

2. Import code formatting styles

3. import code format

 

Three, eclipse plug-in

1. Download

【p3c-eclipse-plugin】:https://p3c.alibaba.com/plugin/eclipse/update

2. [features] and [] copied to eclipse plugins directory and restart eclipse

3. Write a test file

Copy the code
/**
 * @author lsysy
 * @date 2018/11/13
 */
public class Test {
    public static void main(String[] args) {
        String Ba = "Ba";
        if ("Ba" == Ba) {
            System.out.println(Ba);
        }
    }
}
Copy the code

4. Click for encoding Ali statute scan (if not available, click switch languages, and then switch back to restart)

  

(Automatic formatting setting save eclipse) 5. Optional

Four, idea

https://blog.csdn.net/mashuai720/article/details/79389314

Five, idea plug

1. Download

【p3c-idea-plugin】:【https://plugins.jetbrains.com/plugin/10046-alibaba-java-coding-guidelines

【eclipse-code-formatter】:【https://plugins.jetbrains.com/plugin/6546-eclipse-code-formatter

 

【save-actions-plugin】:【https://plugins.jetbrains.com/plugin/7642-save-actions

2. Install

3. Use

Six, idea code specifications

1. Prepare

/**
 * @author ${USER}
 * @date ${DATE}
 */
FileHeader

2. Write file header comment

3. import code format pattern (introduced eclipse-codestyle.xml)

4. Optional (automatic formatting setting idea to save)

 

 

Original Address: https: //www.cnblogs.com/lsysy/p/9954785.html

Ali p3c

I. Description

Codes of check-ins p3c, according to "Ali Baba Java Development Manual" turned into a plug-in automation.

(Advanced Black: P-3C "Orion", anti-submarine patrol aircraft, Ali probably take advanced p3c, monitoring, detecting potential problems of meaning)

Second, the source address

https://github.com/alibaba/p3c


Alibaba Java Development Manual

I. Description

"Ali Baba Java Development Manual" aimed at the efficient code, the code quality.

Second, the purpose

Standardization, normalization, effective coordination.

Third, download

Alibaba Java Development Manual (full version) .pdf


Ali coding standards set

A, eclipse

https://www.eclipse.org/downloads/

Two, eclipse code specifications

1. Download

【p3c-formatter】:【https://github.com/alibaba/p3c/tree/master/p3c-formatter

2. 导入代码格式化样式

3. 导入代码格式文件

 

三、eclipse插件

1. 下载

【p3c-eclipse-plugin】:https://p3c.alibaba.com/plugin/eclipse/update

2. 将【features】及【plugins】复制到eclipse目录,重启eclipse

3. 编写测试文件

Copy the code
/**
 * @author lsysy
 * @date 2018/11/13
 */
public class Test {
    public static void main(String[] args) {
        String Ba = "Ba";
        if ("Ba" == Ba) {
            System.out.println(Ba);
        }
    }
}
Copy the code

4. Click for encoding Ali statute scan (if not available, click switch languages, and then switch back to restart)

  

(Automatic formatting setting save eclipse) 5. Optional

Four, idea

https://blog.csdn.net/mashuai720/article/details/79389314

Five, idea plug

1. Download

【p3c-idea-plugin】:【https://plugins.jetbrains.com/plugin/10046-alibaba-java-coding-guidelines

【eclipse-code-formatter】:【https://plugins.jetbrains.com/plugin/6546-eclipse-code-formatter

 

【save-actions-plugin】:【https://plugins.jetbrains.com/plugin/7642-save-actions

2. Install

3. Use

Six, idea code specifications

1. Prepare

/**
 * @author ${USER}
 * @date ${DATE}
 */
FileHeader

2. Write file header comment

3. import code format pattern (introduced eclipse-codestyle.xml)

4. Optional (automatic formatting setting idea to save)

 

 

Original Address: https: //www.cnblogs.com/lsysy/p/9954785.html

Guess you like

Origin www.cnblogs.com/jpfss/p/11646025.html