Please make the UI pretty
*&---------------------------------------------------------------------*
*& Report zbc_uml_classdiagram
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zbc_uml_classdiagram.


DATA gs_tadir TYPE tadir.

DATA:
  p_obj TYPE seoclsname, " Object name (Class/Interface)
  p_pkg TYPE devclass.   " Package name

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
* SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: s_obj FOR gs_tadir-obj_name.
SELECT-OPTIONS: s_pkg FOR gs_tadir-devclass.
SELECTION-SCREEN END OF BLOCK a1.

SELECTION-SCREEN BEGIN OF BLOCK a2 WITH FRAME TITLE TEXT2.
" Configuration parameters
PARAMETERS:
  p_inc_cl AS CHECKBOX DEFAULT abap_true USER-COMMAND config, " Include classes
  p_inc_at AS CHECKBOX DEFAULT abap_true USER-COMMAND config, " Include attributes
  p_inc_mt AS CHECKBOX DEFAULT abap_true USER-COMMAND config, " Include methods
  p_icn_dt AS CHECKBOX DEFAULT abap_false USER-COMMAND config, " Include data types
  p_inc_mp AS CHECKBOX DEFAULT abap_true USER-COMMAND config, " Include method parameters
  p_inc_om AS CHECKBOX DEFAULT abap_true USER-COMMAND config, " Include optional markers
  p_inc_ri AS CHECKBOX DEFAULT abap_true USER-COMMAND config, " Include relation inheritance
  p_inc_rc AS CHECKBOX DEFAULT abap_false USER-COMMAND config, " Include relation composition
  p_inc_ra AS CHECKBOX DEFAULT abap_false USER-COMMAND config, " Include relation aggregation
  p_inc_rs AS CHECKBOX DEFAULT abap_false USER-COMMAND config, " Include relation association
  p_inc_if AS CHECKBOX DEFAULT abap_false USER-COMMAND config, " Include interfaces
  p_inc_rt AS CHECKBOX DEFAULT abap_false USER-COMMAND config, " Include return type
  p_inc_nt AS CHECKBOX DEFAULT abap_false USER-COMMAND config. " Include notes
SELECTION-SCREEN END OF BLOCK a2.

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
* INITIALIZATION
INITIALIZATION.
  p_obj = 'ZCL_BC_UML_CLASS_DIAGRAM'.
  p_pkg = 'ZBC_UML'.
  p_inc_cl = abap_true.
  p_inc_at = abap_true.
  p_inc_mt = abap_true.
  p_icn_dt = abap_true.
  p_inc_mp = abap_false.
  p_inc_om = abap_false.
  p_inc_ri = abap_true.
  p_inc_rc = abap_true.
  p_inc_ra = abap_false.
  p_inc_rs = abap_false.
  p_inc_if = abap_false.
  p_inc_rt = abap_false.
  p_inc_nt = abap_false.
  %_s_obj_%_app_%-text = 'Objekt-Name'.
  %_s_pkg_%_app_%-text = 'Paket-Name'.
  %_p_inc_cl_%_app_%-text = 'Klassen'.
  %_p_inc_at_%_app_%-text = 'Attribute'.
  %_p_inc_mt_%_app_%-text = 'Methoden'.
  %_p_icn_dt_%_app_%-text = 'Datentypen'.
  %_p_inc_mp_%_app_%-text = 'Methodenparameter'.
  %_p_inc_om_%_app_%-text = 'Optionale markieren'.
  %_p_inc_ri_%_app_%-text = 'Relationen Vererbung'.
  %_p_inc_rc_%_app_%-text = 'Relationen Komposition'.
  %_p_inc_ra_%_app_%-text = 'Relationen Aggregation'.
  %_p_inc_rs_%_app_%-text = 'Relationen Assoziation'.
  %_p_inc_if_%_app_%-text = 'Interfaces'.
  %_p_inc_rt_%_app_%-text = 'Rückgabetyp'.
  %_p_inc_nt_%_app_%-text = 'Notizen'.


AT SELECTION-SCREEN.
  IF p_obj IS INITIAL AND p_pkg IS INITIAL.
    MESSAGE 'Please specify either an object name or a package name.' TYPE 'E'.
  ENDIF.



START-OF-SELECTION.
  DATA ls_config TYPE zbc_uml_renderer=>ty_config.

  ls_config-include_classes = p_inc_cl.
  ls_config-include_attributes = p_inc_at.
  ls_config-include_methods = p_inc_mt.
  ls_config-include_data_types = p_icn_dt.
  ls_config-include_method_parameters = p_inc_mp.
  ls_config-include_optional_markers = p_inc_om.
  ls_config-include_relation_inheritance = p_inc_ri.
  ls_config-include_relation_composition = p_inc_rc.
  ls_config-include_relation_aggregation = p_inc_ra.
  ls_config-include_relation_association = p_inc_rs.
  ls_config-include_interfaces = p_inc_if.
  ls_config-include_return_type = p_inc_rt.
  ls_config-include_notes = p_inc_nt.

  DATA lt_packages TYPE zbc_uml_class_diagram=>tt_packages.

  DATA(a) = NEW zbc_uml_class_diagram( it_packages = CONV #( s_pkg[] )
                                       it_classes = CONV #( s_obj[] )
                                       io_renderer = NEW zbc_uml_renderer_plantuml( ls_config ) ).

  a->generate( ).
  a->render( ).
  a->display_diagram( ).