Announcement

Collapse
No announcement yet.

Import file format at the bottom, not top

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Import file format at the bottom, not top

    I've made a helper that tidies up XML files to make them more readable and easy to compare. This is for XML files that have no line breaks or anything. Seen this for Visual Studio 2015 exported settings. My helper registers for the XML format and sends the source file through an external process just simply reformats the source XML document.

    The problem is, when this file format helper is imported by somebody else, it's inserted at the top of the file formats list. So my helper has a higher priority than the default XML comparer. This is not wanted here. I still want the default XML file format come first. Only if this doesn't work with a particular file, the user can manually switch the source file format from "XML" to "XML Tidy". This also prevents edits to the files, so it certainly shouldn't be the default behaviour for all XML files from now on.

    How can I specify in my exported file format that it should be re-imported at the bottom of the list instead of the top? I'd like to specify this in the package to make it as easy for users to import and use it.

  • #2
    Hello,

    File Format installs are always imported at the top of the list, as the alternative would import and not be used without user action. We don't have a method of defining position during the import. You could customize the BCFileFormats.xml to automate the re-ordering, or have the user use the down Yellow arrow to move the format lower in the list.

    Additionally, for other users finding this post, we also have a few XML file formats for download if you would like to see some examples of reordering XML:
    http://www.scootersoftware.com/downl..._moreformatsv4
    Aaron P Scooter Software

    Comment


    • #3
      "This format will supercede a default file format." That's what the interesting XML formats say. I have this already. But I definitely want it to be an option, not the default for all XML comparisons. I want to opt in to a readable format, not to the capability to edit the files. And I want to see the truth (i. e. the original file) first, and then decide whether I need a cleaned up view of it.

      Could I then ask for the feature to allow specifying a file format import at the bottom of the list, please?

      Comment


      • #4
        I can add your notes to our Customer Wishlist.

        Is this for a fresh deployment? If you have an automated install, we often see customers who will create a template BCFileFormats.xml set up on their machine first, then deploy the software and copy their template .xmls into the settings directory (%AppData%\Scooter Software\Beyond Compare 4\ by default). This way they can deploy the software with a specific set of settings pre-configured.
        Aaron P Scooter Software

        Comment


        • #5
          No, I just made a regular tool as BCPackage that can be installed at any time. It's not coupled to the entire BC installation in any way.

          Comment


          • #6
            Right. We most commonly see this type of deployment/customization during a fresh install, so I was outlining how other customers generally handle customizing the order of file formats during an installation.

            If BC4 is already installed, this would work for you without launching the program and moving the format down the list. If BC4 isn't installed yet, then this is the method I'd recommend. We currently have quite a bit already scheduled, so we won't likely be able to tackle this wishlist entry in short order.
            Aaron P Scooter Software

            Comment


            • #7
              Thanks for considering it. Until then I simply need a piece of manual installation guide.

              Comment


              • #8
                Hello,

                Did you need any help with the steps? If so, just let us know and we can try to help with the manual setup steps.
                Aaron P Scooter Software

                Comment


                • #9
                  I meant instructions for the users of my extension, so they can use the existing file formats dialog to move my extension further down in the list. That's okay, it's not that hard.

                  Comment


                  • #10
                    Hello,

                    Just learned a new trick today: If you Disable (uncheck) a File Format in the File Formats dialog, then Tools menu -> Export it using BC4, when you import it into BC4 it will stay disabled. This way, it would still appear at the top of the list, but because the newer format is disabled it would still use the previous defaults.
                    Aaron P Scooter Software

                    Comment


                    • #11
                      What's the use of a disabled file format entry? Isn't it, well, disabled just as it wouldn't exist?

                      Comment


                      • #12
                        No. A disabled format won't be picked automatically, but can be selected manually from the dropdown list. It is similar in functionality to having an item be lower in the list: it can be selected manually or saved as part of a session, but the original format is used automatically when the files are first loaded.
                        Aaron P Scooter Software

                        Comment


                        • #13
                          Okay, the disabled export works now. It's sorted at the top of the list of file formats, but it does what I wanted to have. Thank you.

                          Comment

                          Working...
                          X