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

Include package type and body memeber functions

Open lwasylow opened this issue 7 years ago • 4 comments

Is there a chance to include a type specs and body to be analyzed for member procedures , constructors etc. ?

E,g,

  • member procedure print_red_text(self in out nocopy ut_console_reporter_base, a_text varchar2)
  • constructor function ut_executable
  • map member function pk return varchar2
  • overriding member procedure after_calling_run

I had a look and was hoping its just a matter of modify regex in dox.js but I'm no js expert and seems like it didnt work :)

lwasylow avatar Jun 05 '18 20:06 lwasylow

@lwasylow we support type tags. For the other options can you please provide code snippets for them and how you'd like the documentation to work?

martindsouza avatar Jun 05 '18 21:06 martindsouza

Of course We have a sample type and type body:

create or replace type ut_console_reporter_base under ut_output_reporter_base(
  static procedure set_color_enabled(a_flag boolean),

  member procedure print_red_text(self in out nocopy ut_console_reporter_base, a_text varchar2),

  member procedure print_green_text(self in out nocopy ut_console_reporter_base, a_text varchar2),

  member procedure print_yellow_text(self in out nocopy ut_console_reporter_base, a_text varchar2),

  member procedure print_blue_text(self in out nocopy ut_console_reporter_base, a_text varchar2),

  member procedure print_cyan_text(self in out nocopy ut_console_reporter_base, a_text varchar2),

  member procedure print_magenta_text(self in out nocopy ut_console_reporter_base, a_text varchar2)

) not final not instantiable
/

create or replace type body ut_console_reporter_base is
  static procedure set_color_enabled(a_flag boolean) is
  begin
    ut_ansiconsole_helper.color_enabled(a_flag);
  end;

  member procedure print_red_text(self in out nocopy ut_console_reporter_base, a_text varchar2) is
  begin
    self.print_text(ut_ansiconsole_helper.red(a_text));
  end;

  member procedure print_green_text(self in out nocopy ut_console_reporter_base, a_text varchar2) is
  begin
    self.print_text(ut_ansiconsole_helper.green(a_text));
  end;

  member procedure print_yellow_text(self in out nocopy ut_console_reporter_base, a_text varchar2) is
  begin
    self.print_text(ut_ansiconsole_helper.yellow(a_text));
  end;

  member procedure print_blue_text(self in out nocopy ut_console_reporter_base, a_text varchar2) is
  begin
    self.print_text(ut_ansiconsole_helper.red(a_text));
  end;

  member procedure print_cyan_text(self in out nocopy ut_console_reporter_base, a_text varchar2) is
  begin
    self.print_text(ut_ansiconsole_helper.cyan(a_text));
  end;

  member procedure print_magenta_text(self in out nocopy ut_console_reporter_base, a_text varchar2) is
  begin
    self.print_text(ut_ansiconsole_helper.magenta(a_text));
  end;

end;
/

I would like to see that type create as a md page (as currently is when config includes tps|tpb) however under that page would like to see listed member procedures and functions sames as per package functionality pretty much (so variables,exceptions etc.). Now this might be pushing it but the types can inherit (under) so maybe new section as well in md to saying where inherit from e.g.

lwasylow avatar Jun 05 '18 21:06 lwasylow

Documentation for inheritance would be super-useful. It's pretty hard to get an overview of inherited fields and methods in IDEs

jgebal avatar Jun 05 '18 21:06 jgebal

Even a link to parent type would be great.

jgebal avatar Jun 05 '18 21:06 jgebal