zoukankan      html  css  js  c++  java
  • 关于Eclipse生成和导入Patch文件.

    &

    生成的文件如下:

    如果系统对这个patch文件有识别的话是一个带有问号的icon文件.

     1 diff --git a/main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/model/metadata/MetadataEmfFactory.java b/main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/model/metadata/MetadataEmfFactory.java
     2 index a5f97fd..8e7cb2f 100644
     3 --- a/main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/model/metadata/MetadataEmfFactory.java
     4 +++ b/main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/model/metadata/MetadataEmfFactory.java
     5 @@ -73,9 +73,9 @@ public class MetadataEmfFactory {
     6                  colType.setComment(metaCol.getComment());
     7                  colType.setKey(metaCol.isKey());
     8                  colType.setNullable(metaCol.isNullable());
     9 -                if (metaCol.getLength() == null) {
    10 -                    // colType.setLength(-1);
    11 -                    colType.unsetLength();
    12 +                if (metaCol.getLength() == null || metaCol.getLength().intValue() < 0) {
    13 +                    colType.setLength(-1);
    14 +                    // colType.unsetLength();
    15                  } else {
    16                      colType.setLength(metaCol.getLength());
    17                  }
    18 @@ -90,9 +90,9 @@ public class MetadataEmfFactory {
    19                  }
    20  
    21                  colType.setName(metaCol.getLabel());
    22 -                if (metaCol.getPrecision() == null) {
    23 -                    // colType.setPrecision(-1);
    24 -                    colType.unsetPrecision();
    25 +                if (metaCol.getPrecision() == null || metaCol.getPrecision().intValue() < 0) {
    26 +                    colType.setPrecision(-1);
    27 +                    // colType.unsetPrecision();
    28                  } else {
    29                      colType.setPrecision(metaCol.getPrecision());
    30                  }
    31 @@ -144,12 +144,8 @@ public class MetadataEmfFactory {
    32              metaCol.setComment(colType.getComment());
    33              metaCol.setKey(colType.isKey());
    34              metaCol.setNullable(colType.isNullable());
    35 -            if (colType.isSetLength()) {
    36 -                if (colType.getLength() >= 0) {
    37 -                    metaCol.setLength(new Integer(colType.getLength()));
    38 -                } else {
    39 -                    metaCol.setLength(null);
    40 -                }
    41 +            if (colType.getLength() >= 0) {
    42 +                metaCol.setLength(new Integer(colType.getLength()));
    43              } else {
    44                  metaCol.setLength(null);
    45              }
    46 @@ -168,12 +164,8 @@ public class MetadataEmfFactory {
    47                  }
    48              }
    49              metaCol.setLabel(colType.getName());
    50 -            if (colType.isSetPrecision()) {
    51 -                if (colType.getPrecision() >= 0) {
    52 -                    metaCol.setPrecision(new Integer(colType.getPrecision()));
    53 -                } else {
    54 -                    metaCol.setPrecision(null);
    55 -                }
    56 +            if (colType.getPrecision() >= 0) {
    57 +                metaCol.setPrecision(new Integer(colType.getPrecision()));
    58              } else {
    59                  metaCol.setPrecision(null);
    60              }
  • 相关阅读:
    2019最新windows 10永久激活码 win10专业版密钥 win10通用序列号
    安装Office2016遇到“无法流式传输Office”问题
    windows cannot find powershell.exe windows 7
    AI illustrator 如何裁剪图片(扣取局部区域)
    64位 windows2008 R2 上安装32位oracle 10g 的方法
    计算器进行进制数之间的换算
    Linux服务器上监控网络带宽的18个常用命令
    iOS 如何判断一个点在圆、方框、三角形区域内?
    CircularSlider半弧形滑动条
    iOS圆弧渐变进度条的实现
  • 原文地址:https://www.cnblogs.com/DreamDrive/p/4694200.html
Copyright © 2011-2022 走看看