{ *************************************************************************** * * * This source is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This code is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * A copy of the GNU General Public License is available on the World * * Wide Web at . You can also * * obtain it by writing to the Free Software Foundation, * * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * * *************************************************************************** Author: Mattias Gaertner Abstract: Defines the standard message Quick Fix menu items. } unit MsgQuickFixes; {$mode objfpc}{$H+} interface uses Classes, SysUtils, LCLProc, MsgIntf, LazarusIDEStrConsts; procedure QuickFixParameterNotUsed(Sender: TObject; Msg: TIDEMessageLine); procedure QuickFixUnitNotUsed(Sender: TObject; Msg: TIDEMessageLine); procedure InitStandardIDEQuickFixItems; procedure FreeStandardIDEQuickFixItems; implementation procedure QuickFixParameterNotUsed(Sender: TObject; Msg: TIDEMessageLine); begin DebugLn('QuickFixParameterNotUsed '); end; procedure QuickFixUnitNotUsed(Sender: TObject; Msg: TIDEMessageLine); begin DebugLn('QuickFixUnitNotUsed '); end; procedure InitStandardIDEQuickFixItems; begin IDEMsgQuickFixes:=TIDEMsgQuickFixItems.Create; //RegisterIDEMsgQuickFix('Parameter xxx not used','Quick fix: Add dummy line', // 'Parameter "[a-z_0-9]+" not used',nil,@QuickFixParameterNotUsed); RegisterIDEMsgQuickFix('Unit xxx not used in yyy','Quick fix: Remove unit', 'Unit "[a-z_0-9]+" not used in [a-z_0-9]+',nil,@QuickFixUnitNotUsed); end; procedure FreeStandardIDEQuickFixItems; begin FreeThenNil(IDEMsgQuickFixes); end; end.