8 Replies Latest reply on Apr 23, 2008 5:43 PM by Kris Rice-Oracle

    Shared Snippets?

      Is there a feature similar to Shared Reports where I can point to a networked drive and have shared snippets loaded?

      We currently share reports amongst several people by pointing to a common folder. It would be nice to do the same with snippets.

        • 1. Re: Shared Snippets?
          Kris Rice-Oracle
          You can although it's not as simple. Not sure how I over looked this one.

          Edit sqldeveloper.conf and add this:
          AddVMOption -Draptor.user.snippets=/path/to/my/file.xml:/next/path/to/another_file.xml

          • 2. Re: Shared Snippets?
            Just out of curiosity is this also possible with SQL Editor Code Templates in the Early Adopter series?
            • 3. Re: Shared Snippets?
              Barry Mcgillin-Oracle
              no, I didnt hook it up, but we should.
              • 4. Re: Shared Snippets?
                How can I specify a full path on Windows if the path separator is a colon?

                For example, I can specify

                AddVMOption -Draptor.user.snippets=c:/shared/foo.xml:c:/shared/bar.xml

                Can I escape the colon that is part of the drive letter?
                • 5. Re: Shared Snippets?
                  I just tried it out. You can backslash the colon in the drive letter and it works.
                  • 6. Re: Shared Snippets?
                    In the next release, code templates will be saved as a separate XML file similar to Snippets. It would also support multiple template files using paths contributed through VM argument: -Draptor.user.codeTemplates=c:/sharedTemplate.xml

                    This should support sharing of code templates.

                    - Rakesh
                    • 7. Re: Shared Snippets?

                      I'm using SQLDeveloper and this works to get the snippets into my view, but editing/adding new ones goes directly to the UserSnippets.xml file.

                      It looks like you're merging the contents of the multiple snippets files, based on the group category value. That makes perfect sense, but it then loses context for which file it came from.

                      I don't really have a better answer, just thinking out loud here. It would be nice to maintain snippets related to a project our subversion repo along with everything else.

                      Do you have any thoughts on how this might be done in the future?
                      • 8. Re: Shared Snippets?
                        Kris Rice-Oracle
                        The only real thoughts I had on this was more along publishing to a website. Instead of pointing to a file you could point to http:///xxxxxx/mysnippets.xml . That should work today. I hadn't thought too much on doing this all on local file but something like a manage the files could make sense or when you add a snippet ask what file to save it to.

                        If you log it to the exchange, we'll see what others think about it and if something comes out of it.