代码之家  ›  专栏  ›  技术社区  ›  John Doe

导出的eclipse首选项包含!/=

  •  1
  • John Doe  · 技术社区  · 7 年前

    我从eclipse产品中导出了首选项,将它们与我的 plugin_customization.ini 文件。输出的前两行 *.epf 文件如下:

    #Wed Jul 25 10:59:27 EEST 2018 \!/=

    什么意思 \!/= ?
    我也注意到了 plugin_cusotomization.ini 我维护的文件,但它出现在文件的中间。

    1 回复  |  直到 7 年前
        1
  •  1
  •   greg-449    7 年前

    这是Eclipse首选项中节点的名称( IEclipsePreferences )保存此首选项。

    ! 指定这是首选项节点定义(前面的 \ 只是一个属性文件转义)。 / 是根节点的路径。属性没有值。

    代码在 org.eclipse.core.internal.preferences.PreferencesService

    private static final char EXPORT_ROOT_PREFIX = '!';
    private static final float EXPORT_VERSION = 3;
    private static final String VERSION_KEY = "file_export_version"; //$NON-NLS-1$
    
    public IStatus exportPreferences(IEclipsePreferences node, OutputStream output, String[] excludesList) throws CoreException {
    
        ... other code
    
        properties = convertToProperties(node, excludesList);
        if (properties.isEmpty())
            return Status.OK_STATUS;
        properties.put(VERSION_KEY, Float.toString(EXPORT_VERSION));
        properties.put(EXPORT_ROOT_PREFIX + node.absolutePath(), EMPTY_STRING);