This discussion is archived
8 Replies Latest reply: Apr 23, 2008 10:43 AM by Kris Rice RSS

Shared Snippets?

618109 Newbie
Currently Being Moderated
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.

Thanks,
Don
  • 1. Re: Shared Snippets?
    Kris Rice Employee ACE
    Currently Being Moderated
    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

    -kris
  • 2. Re: Shared Snippets?
    Sentinel Pro
    Currently Being Moderated
    Just out of curiosity is this also possible with SQL Editor Code Templates in the Early Adopter series?
  • 3. Re: Shared Snippets?
    Barry McGillin Journeyer
    Currently Being Moderated
    no, I didnt hook it up, but we should.
    Barry
  • 4. Re: Shared Snippets?
    618109 Newbie
    Currently Being Moderated
    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?
    618109 Newbie
    Currently Being Moderated
    I just tried it out. You can backslash the colon in the drive letter and it works.
  • 6. Re: Shared Snippets?
    579564 Newbie
    Currently Being Moderated
    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?
    35442 Newbie
    Currently Being Moderated
    Kris,

    I'm using SQLDeveloper 1.5.0.53 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 Employee ACE
    Currently Being Moderated
    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.

    -kris