plsql-md-doc icon indicating copy to clipboard operation
plsql-md-doc copied to clipboard

The Package Purpose Documentation gets deleted with SQL-Developer

Open JuergenSchuster opened this issue 7 years ago • 3 comments

Hi guys,

there is a new solution out I guess from @RamonEsteveCuevas ? where you can add docu for the purpose of the Package Body. But it is implemented that it gets only retrieved when you start with the comment before the create package body.

This comment is not saved by SQL-Developer. So the Package purpose comment should also be recognised when it comes right after create or replace package body. See attached file: Package_SQL_Developer.pdf

Additional Information

I spoke to @JuergenSchuster today and here's some additional information on this ticket. His team primarily develops directly in the DB and then exports all the packages into file at the end of each development cycle. Though I don't agree with this practice it's fairly common in the Oracle world.

When developing in the DB anything comments before the create or replace package and after the end; / are saved in the DB. Ex:

/** 
 * Some comments
 */
create or replace package my_pkg 
...

These comments will be lost. Where as

create or replace package my_pkg 
/** 
 * Some comments
 */

...

The comments will be preserved because they reside in the the package.

The issue that needs to be resolved for this ticket is if we can modify the docx engine to view the comments before or after a create or replace package statement and process them in the same fashion.

JuergenSchuster avatar Jul 18 '17 21:07 JuergenSchuster

I think with over a Million SQL-Developer users this is common practice. I agree that @martindsouza s approach is the better one. But in my almost 30 years of PL/SQL development I haven't met anyone doing this. So having a Package Body purpose documentation is for me a 1.0 feature of any PL/SQL documentation approach. #MakeARealProductOutOfIt ;-)

JuergenSchuster avatar Jul 19 '17 06:07 JuergenSchuster

Hi @JuergenSchuster

Created a pull request #66 where this issue is fixed. Can you check if this fixes the issue you are having?

Kind regards,

Ramon Esteve Cuevas

RamonEsteveCuevas avatar Jul 21 '17 11:07 RamonEsteveCuevas

@JuergenSchuster I've merged @RamonEsteveCuevas code. Please test updated code and if it works we can close this ticket. Thanks @RamonEsteveCuevas for all the help!

martindsouza avatar Jul 28 '17 04:07 martindsouza