New items are not added to metadata subscription automatically

Issue #2154 resolved
Magdalena Kusiak created an issue

After retrieving new metadata items from org a popup appears asking if you want to add it to metadata subscription. However, despite clicking yes the new entries are not added to package.xml.
It’s working fine when using SFDX projects, but stopped working about a month ago for non-SFDX ones.

Comments (10)

  1. Scott Wells repo owner

    Hi. Can you please add the following to Help>Diagnostic Tools>Debug Log Settings:

    #com.illuminatedcloud.intellij.settings.module.ModuleContentsSynchronizationListener
    

    then reproduce the behavior and attach the resulting idea.log file for review? You can find it using Help>Show Log in Explorer/Finder/Files.

  2. Magdalena Kusiak reporter

    Hi Scott. Attaching the log file. I also noticed that the same happens when you add a new apex class to the project. A popup is displayed asking whether to add new content to metadata subscription and then even if you select Yes, nothing happens.

  3. Scott Wells repo owner

    Thanks for the log. Here's the issue:

    java.lang.AssertionError: Wrong line separators: '<!--types>\r\n        ...' at offset 10
        at com.intellij.openapi.util.text.StringUtil.assertValidSeparators(StringUtil.java:2450)
        at com.intellij.openapi.editor.impl.DocumentImpl.assertValidSeparators(DocumentImpl.java:715)
        at com.intellij.openapi.editor.impl.DocumentImpl.insertString(DocumentImpl.java:543)
        at com.illuminatedcloud.intellij.util.IlluminatedCloudXmlUtil.lambda$addComments$3(SourceFile:335)
    

    It looks like there's something odd in your package.xml file. It's specifying line separators as the issue, but I suspect it may have something to do with the way that comment is formatted. Do you mind providing the actual package.xml file so I can see what might be going on?

  4. Scott Wells repo owner

    Note that as a temporary workaround, you could change the file's line separators from CRLF to LF. With tomorrow's fix, though, that will not be necessary, and the file's existing line separators are properly retained when IC2 auto-updates the package.xml file.

  5. Log in to comment