IDE: started dialog to edit extra help for messages

git-svn-id: trunk@35154 -
This commit is contained in:
mattias 2012-02-05 12:54:33 +00:00
parent 35b935f66e
commit ba1bcfe955
3 changed files with 296 additions and 1 deletions

1
.gitattributes vendored
View File

@ -4297,6 +4297,7 @@ ide/genericlisteditor.lfm svneol=native#text/plain
ide/genericlisteditor.pas svneol=native#text/plain ide/genericlisteditor.pas svneol=native#text/plain
ide/gotofrm.lfm svneol=native#text/plain ide/gotofrm.lfm svneol=native#text/plain
ide/gotofrm.pas svneol=native#text/plain ide/gotofrm.pas svneol=native#text/plain
ide/helpfpcmessages.lfm svneol=native#text/plain
ide/helpfpcmessages.pas svneol=native#text/plain ide/helpfpcmessages.pas svneol=native#text/plain
ide/helpoptions.pas svneol=native#text/pascal ide/helpoptions.pas svneol=native#text/pascal
ide/ide.lpk svneol=native#text/xml ide/ide.lpk svneol=native#text/xml

249
ide/helpfpcmessages.lfm Normal file
View File

@ -0,0 +1,249 @@
object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog
Left = 330
Height = 460
Top = 280
Width = 622
Caption = 'EditIDEMsgHelpDialog'
ClientHeight = 460
ClientWidth = 622
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '0.9.31'
object CurMsgGroupBox: TGroupBox
Left = 6
Height = 105
Top = 6
Width = 610
Align = alTop
BorderSpacing.Around = 6
Caption = 'CurMsgGroupBox'
ClientHeight = 89
ClientWidth = 606
TabOrder = 0
object CurMsgMemo: TMemo
Left = 0
Height = 89
Top = 0
Width = 606
Align = alClient
Lines.Strings = (
'CurMsgMemo'
)
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 0
end
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 42
Top = 412
Width = 610
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 1
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object AllGroupBox: TGroupBox
Left = 6
Height = 289
Top = 117
Width = 277
Align = alLeft
BorderSpacing.Around = 6
Caption = 'AllGroupBox'
ClientHeight = 273
ClientWidth = 273
TabOrder = 2
object URLsListBox: TListBox
Left = 0
Height = 247
Top = 0
Width = 273
Align = alClient
ItemHeight = 0
ScrollWidth = 271
TabOrder = 0
TopIndex = -1
end
object AddButton: TButton
Left = 0
Height = 26
Top = 247
Width = 273
Align = alBottom
AutoSize = True
Caption = 'AddButton'
TabOrder = 1
end
end
object CurGroupBox: TGroupBox
Left = 300
Height = 289
Top = 117
Width = 316
Align = alClient
BorderSpacing.Around = 6
Caption = 'CurGroupBox'
ClientHeight = 273
ClientWidth = 312
TabOrder = 3
object DeleteButton: TButton
AnchorSideLeft.Control = CurGroupBox
AnchorSideTop.Control = URLEdit
AnchorSideTop.Side = asrBottom
Left = 6
Height = 26
Top = 171
Width = 84
AutoSize = True
BorderSpacing.Around = 6
Caption = 'DeleteButton'
TabOrder = 0
end
object NameLabel: TLabel
AnchorSideLeft.Control = CurGroupBox
AnchorSideTop.Control = NameEdit
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 11
Width = 64
BorderSpacing.Around = 6
Caption = 'NameLabel'
ParentColor = False
end
object NameEdit: TEdit
AnchorSideLeft.Control = NameLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CurGroupBox
AnchorSideRight.Control = CurGroupBox
AnchorSideRight.Side = asrBottom
Left = 76
Height = 24
Top = 6
Width = 230
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
TabOrder = 1
Text = 'NameEdit'
end
object URLLabel: TLabel
AnchorSideLeft.Control = CurGroupBox
AnchorSideTop.Control = OnlyRegExEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CurGroupBox
AnchorSideRight.Side = asrBottom
Left = 6
Height = 15
Top = 126
Width = 300
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
Caption = 'URLLabel'
ParentColor = False
WordWrap = True
end
object URLEdit: TEdit
AnchorSideLeft.Control = CurGroupBox
AnchorSideTop.Control = URLLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CurGroupBox
AnchorSideRight.Side = asrBottom
Left = 6
Height = 24
Top = 141
Width = 300
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
TabOrder = 2
Text = 'URLEdit'
end
object OnlyFPCMsgIDsLabel: TLabel
AnchorSideLeft.Control = CurGroupBox
AnchorSideTop.Control = NameEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CurGroupBox
AnchorSideRight.Side = asrBottom
Left = 6
Height = 15
Top = 36
Width = 300
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
Caption = 'OnlyFPCMsgIDsLabel'
ParentColor = False
WordWrap = True
end
object OnlyFPCMsgIDsEdit: TEdit
AnchorSideLeft.Control = CurGroupBox
AnchorSideTop.Control = OnlyFPCMsgIDsLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CurGroupBox
AnchorSideRight.Side = asrBottom
Left = 6
Height = 24
Top = 51
Width = 300
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
TabOrder = 3
Text = 'OnlyFPCMsgIDsEdit'
end
object OnlyRegExLabel: TLabel
AnchorSideLeft.Control = CurGroupBox
AnchorSideTop.Control = OnlyFPCMsgIDsEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CurGroupBox
AnchorSideRight.Side = asrBottom
Left = 6
Height = 15
Top = 81
Width = 300
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
Caption = 'OnlyRegExLabel'
ParentColor = False
WordWrap = True
end
object OnlyRegExEdit: TEdit
AnchorSideLeft.Control = CurGroupBox
AnchorSideTop.Control = OnlyRegExLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CurGroupBox
AnchorSideRight.Side = asrBottom
Left = 6
Height = 24
Top = 96
Width = 300
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
TabOrder = 4
Text = 'OnlyRegExEdit'
end
end
object Splitter1: TSplitter
Left = 289
Height = 289
Top = 117
Width = 5
end
end

View File

@ -39,7 +39,8 @@ interface
uses uses
Classes, SysUtils, LCLProc, Dialogs, FileUtil, TextTools, MacroIntf, Classes, SysUtils, LCLProc, Dialogs, FileUtil, TextTools, MacroIntf,
LazarusIDEStrConsts, LazConfigStorage, HelpIntfs, IDEHelpIntf, LazHelpIntf, LazarusIDEStrConsts, LazConfigStorage, HelpIntfs, IDEHelpIntf, LazHelpIntf,
LazHelpHTML, CodeToolsFPCMsgs, FileProcs, CodeToolManager, CodeCache; LazHelpHTML, StdCtrls, ButtonPanel, ExtCtrls, Forms, CodeToolsFPCMsgs,
FileProcs, CodeToolManager, CodeCache;
const const
lihcFPCMessages = 'FreePascal Compiler messages'; lihcFPCMessages = 'FreePascal Compiler messages';
@ -84,6 +85,30 @@ type
write SetFPCTranslationFile; write SetFPCTranslationFile;
end; end;
{ TEditIDEMsgHelpDialog }
TEditIDEMsgHelpDialog = class(TForm)
AddButton: TButton;
ButtonPanel1: TButtonPanel;
CurGroupBox: TGroupBox;
CurMsgGroupBox: TGroupBox;
CurMsgMemo: TMemo;
DeleteButton: TButton;
NameEdit: TEdit;
NameLabel: TLabel;
OnlyFPCMsgIDsLabel: TLabel;
OnlyFPCMsgIDsEdit: TEdit;
OnlyRegExEdit: TEdit;
OnlyRegExLabel: TLabel;
Splitter1: TSplitter;
AllGroupBox: TGroupBox;
URLEdit: TEdit;
URLLabel: TLabel;
URLsListBox: TListBox;
procedure FormCreate(Sender: TObject);
public
end;
procedure CreateFPCMessagesHelpDB; procedure CreateFPCMessagesHelpDB;
function AddFPCMessageHelpItem(const Title, URL, RegularExpression: string function AddFPCMessageHelpItem(const Title, URL, RegularExpression: string
): THelpDBIRegExprMessage; ): THelpDBIRegExprMessage;
@ -125,6 +150,26 @@ begin
FPCMessagesHelpDB.RegisterItem(Result); FPCMessagesHelpDB.RegisterItem(Result);
end; end;
{ TEditIDEMsgHelpDialog }
procedure TEditIDEMsgHelpDialog.FormCreate(Sender: TObject);
begin
Caption:='Edit additional help for FPC messages';
CurMsgGroupBox.Caption:='Selected message in messages window:';
AllGroupBox.Caption:='All additional';
AddButton.Caption:='Create new item';
NameLabel.Caption:='Name:';
OnlyFPCMsgIDsLabel.Caption:='Only messages with these FPC IDs (comma separated):';
OnlyRegExLabel.Caption:='Only messages fitting this regular expression:';
URLLabel.Caption:='URL on wiki, the base url is '
+(FPCMessagesHelpDB as THTMLHelpDatabase).GetEffectiveBaseURL;
DeleteButton.Caption:='Delete this item';
end;
{ TFPCMessagesHelpDatabase } { TFPCMessagesHelpDatabase }
procedure TFPCMessagesHelpDatabase.SetFoundComment(const AValue: string); procedure TFPCMessagesHelpDatabase.SetFoundComment(const AValue: string);