mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
Limit Progress Indicator Updates
Fixed an issue with the progress indicator updates, where updates of the progress indicator would flush the message queue of SAP GUI and cause a GUI crash or hang. The problem is described in SAP note #2084109 and seems to occur for large repositories (especially after installing SAP GUI 7.50 PL6)
This commit is contained in:
parent
ade1b4819c
commit
28a1554526
|
@ -21,7 +21,10 @@ CLASS zcl_abapgit_progress DEFINITION
|
|||
!iv_current TYPE i
|
||||
RETURNING
|
||||
VALUE(rv_pct) TYPE i .
|
||||
PRIVATE SECTION.
|
||||
private section.
|
||||
|
||||
data MV_CV_TIME_NEXT type SY-UZEIT .
|
||||
data MV_CV_DATUM_NEXT type SY-DATUM .
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
@ -52,14 +55,31 @@ CLASS ZCL_ABAPGIT_PROGRESS IMPLEMENTATION.
|
|||
|
||||
METHOD show.
|
||||
|
||||
DATA: lv_pct TYPE i.
|
||||
DATA: lv_pct TYPE i.
|
||||
DATA: lv_time TYPE t.
|
||||
|
||||
CONSTANTS: c_wait_secs TYPE i VALUE 2.
|
||||
|
||||
lv_pct = calc_pct( iv_current ).
|
||||
|
||||
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
|
||||
EXPORTING
|
||||
percentage = lv_pct
|
||||
text = iv_text.
|
||||
GET TIME.
|
||||
lv_time = sy-uzeit.
|
||||
IF mv_cv_time_next IS INITIAL AND mv_cv_datum_next IS INITIAL.
|
||||
mv_cv_time_next = lv_time.
|
||||
mv_cv_datum_next = sy-datum.
|
||||
ENDIF.
|
||||
|
||||
"We only do a progress indication if enough time has passed
|
||||
IF lv_time >= mv_cv_time_next AND sy-datum = mv_cv_datum_next OR
|
||||
sy-datum > mv_cv_datum_next.
|
||||
|
||||
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
|
||||
EXPORTING
|
||||
percentage = lv_pct
|
||||
text = iv_text.
|
||||
mv_cv_time_next = lv_time + c_wait_secs.
|
||||
|
||||
ENDIF.
|
||||
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
|
|
|
@ -14,6 +14,20 @@
|
|||
<FIXPT>X</FIXPT>
|
||||
<UNICODE>X</UNICODE>
|
||||
</VSEOCLASS>
|
||||
<DESCRIPTIONS>
|
||||
<SEOCOMPOTX>
|
||||
<CLSNAME>ZCL_ABAPGIT_PROGRESS</CLSNAME>
|
||||
<CMPNAME>MV_CV_DATUM_NEXT</CMPNAME>
|
||||
<LANGU>E</LANGU>
|
||||
<DESCRIPT>Date or Earliest, Next Progress Display</DESCRIPT>
|
||||
</SEOCOMPOTX>
|
||||
<SEOCOMPOTX>
|
||||
<CLSNAME>ZCL_ABAPGIT_PROGRESS</CLSNAME>
|
||||
<CMPNAME>MV_CV_TIME_NEXT</CMPNAME>
|
||||
<LANGU>E</LANGU>
|
||||
<DESCRIPT>Time of Earliest, Next Progress Display</DESCRIPT>
|
||||
</SEOCOMPOTX>
|
||||
</DESCRIPTIONS>
|
||||
</asx:values>
|
||||
</asx:abap>
|
||||
</abapGit>
|
||||
|
|
Loading…
Reference in New Issue
Block a user