oracle-samples/oracle-db-examples

User Defined Extensions and code templates deployment through an Update Center ?

DominiqueComte opened this issue ยท 6 comments

Hi,

Is it possible to add "User Defined Extensions" or code templates to SQL Developer through a packaged extension bundle ?

Thanks

For user defined extensions, yes. Code templates I'll have to research. (Depends how they are persisted.)

The (sqldeveloper/extension/readme.md) Examples page has links to this information.
Specifically

  • The Set Up / Tutorial is a walk through including creating and using check for update bundles.
  • The (external) Example UpdateCenter is both a github repository showing how, as well as an operating update center.

(Edited to correct case of codeTemplates variable)
Updating/adding templates may be possible via extension but would require changes in sqldeveloper to allow re-loading the template map.

As currently supplied, the user extension mechanism for code templates is via a system property and can be set in the sqldeveloper/bin/sldeveloper.conf file.

 ## Add/override code template definitions from user file(s)
 ## Directory path syntax i.e., ';' separator for Windows, ':' for *nix/mac
 ## e.g., /goodStuff/templates1.xml:/goodStuff/templates2.xml for *nix/Mac
 AddVMOption -Draptor.user.codeTemplates=c:\goodStuff\templates1.xml;c:\goodStuff\templates2.xml

See ~/.sqldeveloper/CodeTemplate.xml for the predefined ones.

The extension mechanism allows for delivering files anywhere within the sqldeveloper installation directory but I can't see any way to update the conf file.

Thanks for the pointers to the update sites, I'll try that.

AddVMOption raptor.user.codetemplates=c:\goodStuff\templates1.xml;c:\goodStuff\templates2.xml

I haven' managed to make that work.
I am using Windows 10 and SQLDev version 20.2, I tried to put the AddVMOption line in the sqldeveloper.conf file of the application directory, in the product.conf file of the user's AppData directory, writing it with slashes both ways, using "AddVMOption -Draptor.user...", but sqldeveloper just doesn't try to load the file I put there.

Hmm, let me check that.

-Draptor.user.codeTemplates
my apologies.

That was it.

It works with forward slashes in the path (/) even on Windows.