Check-in [3c4dc7f26d]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Moved ODS for OutputDebugString to separate unit.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | updatecheck
Files: files | file ages | folders
SHA1: 3c4dc7f26d93969a9799a3ad21d80f1c653bfa1b
User & Date: tinus 2017-02-19 20:29:44
Context
2017-02-19
20:38
Implemented updating and replacing of plugin. check-in: 6d33ea7784 user: tinus tags: updatecheck
20:29
Moved ODS for OutputDebugString to separate unit. check-in: 3c4dc7f26d user: tinus tags: updatecheck
20:24
Moved ODS for OutputDebugString to separate unit. check-in: 636a5f5ef3 user: tinus tags: updatecheck
Changes

Changes to src/F_PreviewHTML.pas.

    66     66       procedure ForgetBuffer(const BufferID: TBufferID);
    67     67       procedure DisplayPreview(HTML: string; const BufferID: TBufferID);
    68     68     end;
    69     69   
    70     70   var
    71     71     frmHTMLPreview: TfrmHTMLPreview;
    72     72   
    73         -procedure ODS(const DebugOutput: string); overload;
    74         -procedure ODS(const DebugOutput: string; const Args: array of const); overload;
    75         -
    76     73   ////////////////////////////////////////////////////////////////////////////////////////////////////
    77     74   implementation
    78     75   uses
    79     76     ShellAPI, ComObj, StrUtils, IOUtils, Masks, MSHTML,
    80     77     RegExpr, L_SpecialFolders,
    81         -  WebBrowser, SciSupport, U_Npp_PreviewHTML;
           78  +  WebBrowser, SciSupport,
           79  +  Debug,
           80  +  U_Npp_PreviewHTML;
    82     81   
    83     82   {$R *.dfm}
    84     83   
    85         -var
    86         -  OutputLog: TStreamWriter;
    87         -
    88         -{ ------------------------------------------------------------------------------------------------ }
    89         -procedure ODS(const DebugOutput: string); overload;
    90         -begin
    91         -  OutputDebugString(PChar('PreviewHTML['+IntToHex(GetCurrentThreadId, 4)+']: ' + DebugOutput));
    92         -  if OutputLog = nil then begin
    93         -    OutputLog := TStreamWriter.Create(TFileStream.Create(ChangeFileExt(TSpecialFolders.DLLFullName, '.log'), fmCreate or fmShareDenyWrite), TEncoding.UTF8);
    94         -    OutputLog.OwnStream;
    95         -    OutputLog.BaseStream.Seek(0, soFromEnd);
    96         -  end;
    97         -  OutputLog.Write(FormatDateTime('yyyy-MM-dd hh:nn:ss.zzz: ', Now));
    98         -  OutputLog.WriteLine(DebugOutput);
    99         -end {ODS};
   100         -{ ------------------------------------------------------------------------------------------------ }
   101         -procedure ODS(const DebugOutput: string; const Args: array of const); overload;
   102         -begin
   103         -  ODS(Format(DebugOutput, Args));
   104         -end{ODS};
   105         -
   106     84   
   107     85   { ================================================================================================ }
   108     86   
   109     87   { ------------------------------------------------------------------------------------------------ }
   110     88   procedure TfrmHTMLPreview.FormCreate(Sender: TObject);
   111     89   begin
   112     90     FScrollPositions := TDictionary<TBufferID,TPoint>.Create;
................................................................................
   717    695   procedure TfrmHTMLPreview.wbIETitleChange(ASender: TObject; const Text: WideString);
   718    696   begin
   719    697     inherited;
   720    698     self.UpdateDisplayInfo(StringReplace(Text, 'about:blank', '', [rfReplaceAll]));
   721    699   end;
   722    700   
   723    701   
   724         -initialization
   725         -
   726         -finalization
   727         -  OutputLog.Free;
   728         -
   729    702   end.

Changes to src/U_CustomFilter.pas.

    34     34   
    35     35   ////////////////////////////////////////////////////////////////////////////////////////////////////
    36     36   implementation
    37     37   
    38     38   uses
    39     39     IOUtils,
    40     40     process, Pipes,
           41  +  Debug,
    41     42     F_PreviewHTML;
    42     43   
    43     44   { TCustomFilterThread }
    44     45   
    45     46   { ------------------------------------------------------------------------------------------------ }
    46     47   constructor TCustomFilterThread.Create(const Data: TFilterData);
    47     48   begin

Changes to src/prj/PreviewHTML.dpr.

    26     26     F_About in '..\F_About.pas' {AboutForm},
    27     27     F_PreviewHTML in '..\F_PreviewHTML.pas' {frmHTMLPreview},
    28     28     WebBrowser in '..\lib\WebBrowser.pas',
    29     29     L_VersionInfoW in '..\common\L_VersionInfoW.pas',
    30     30     L_SpecialFolders in '..\common\L_SpecialFolders.pas',
    31     31     RegExpr in '..\common\RegExpr.pas',
    32     32     U_CustomFilter in '..\U_CustomFilter.pas',
    33         -  U_AutoUpdate in '..\U_AutoUpdate.pas';
           33  +  U_AutoUpdate in '..\U_AutoUpdate.pas',
           34  +  Debug in '..\Debug.pas';
    34     35   
    35     36   {$R *.res}
    36     37   
    37     38   {$Include '..\lib\NppPluginInclude.pas'}
    38     39   
    39     40   begin
    40     41     { First, assign the procedure to the DLLProc variable }
    41     42     DllProc := @DLLEntryPoint;
    42     43     { Now invoke the procedure to reflect that the DLL is attaching to the process }
    43     44     DLLEntryPoint(DLL_PROCESS_ATTACH);
    44     45   end.