GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add snippets for annotations and expectations · Issue #60 · utPLSQL/utPLSQL-SQLDeveloper

Add snippets for annotations and expectations #60

New issue
Copy link
New issue
Copy link
Closed
#69
Closed
Add snippets for annotations and expectations#60
#69
Copy link
Assignees
PhilippSalvisberg
Labels
enhancement
Milestone
v1.1.0

Description

@jgebal
jgebal
opened on Apr 23, 2019
Issue body actions

It would be great to have separate Snippet section in SQLDeveloper to aid users.
The snippets could contain a full list of supported annotations and expectations for current version of utPLSQL.

Ideally, utPLSQL framework could include function to provide a list of supported annotations with description and syntax examples.

Activity

  1. jgebal
    added
    enhancement
    on Apr 23, 2019
  2. PhilippSalvisberg commented on Apr 23, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Apr 23, 2019
    Member
    More actions

    Good idea. It would be nice if you could provide the snippets. You can create them within SQL Developer. They are stored in UserSnippets.xml (in %APPDATA%\SQL Developer on Windows).

    Based on that I should be able to provide them as part of the utPLSQL extension. I had a quick look at the oracle.sqldeveloper.snippet extension. There is no supported way to add additional snippets. There is a method called SnippetAddin.registerSnippet, but it is protected. However it should be possible to extend the existing UserSnippets.xml for predefined group names (e.g. utPLSQL). The event for the extension could be placed in the Preferences, similar how we currently extend the code templates. This way user defined snippets are modified via explicit user interaction only.

  3. PhilippSalvisberg commented on Apr 23, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Apr 23, 2019
    Member
    More actions

    Ideally, utPLSQL framework could include function to provide a list of supported annotations with description and syntax examples.

    If the utPLSQL framework provides this information, then the it should be possible to update the snippets based on that. However, choosing the right connection to get this information will be challenging, since the preference dialog does not have a connection context. Of course we could add a context menu on the connection to do the snippet update. The question is if we want to support older utPLSQL versions also. If the answer is yes, then we have to provide the snippets as part of the extension (at least for the older utPLSQL versions).

  4. lwasylow commented on Jul 12, 2019

    @lwasylow
    lwasylow
    on Jul 12, 2019
    Member
    More actions

    Hi is a first shot at snippets :)
    UserSnippets.zip

    Reacted by Philipp Salvisberg
  5. PhilippSalvisberg commented on Jul 12, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 12, 2019
    Member
    More actions

    Thanks @lwasylow . Good idea to provide a category for annotations and another one for expectations. I think it is even doable to maintain this UserSnippets.xml manually.

    I plan to include it in the resource folder and provide a button in the preference dialog for the merge with the user's UserSnippets.xml. It's not perfect, but not that bad as well.

    Reacted by Lukasz Wasylow
  6. lwasylow commented on Jul 12, 2019

    @lwasylow
    lwasylow
    on Jul 12, 2019
    Member
    More actions

    Yeah it's small enough to maintain manually and to be fair probably easier. Sounds like good plan
    I actually like the snippets is like building a Lego now :)

  7. PhilippSalvisberg
    self-assigned this
    on Jul 13, 2019
  8. PhilippSalvisberg
    added this to the v1.1.0 milestone on Jul 13, 2019
  9. PhilippSalvisberg
    closed this as completedin #69on Jul 13, 2019
  10. PhilippSalvisberg
    added a commit that references this issue on Jul 13, 2019

    Merge pull request #69 from PhilippSalvisberg/feature/issue_60_snippets

    031f08c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @PhilippSalvisberg
    PhilippSalvisberg

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    • v1.1.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.