mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 10:00:33 +02:00
examples: idehelp: started options for fpc keywords
git-svn-id: trunk@35112 -
This commit is contained in:
parent
7bf4b456a5
commit
3a4a59c37b
@ -22,10 +22,13 @@
|
|||||||
</Item1>
|
</Item1>
|
||||||
</Files>
|
</Files>
|
||||||
<Type Value="RunAndDesignTime"/>
|
<Type Value="RunAndDesignTime"/>
|
||||||
<RequiredPkgs Count="1">
|
<RequiredPkgs Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="IDEIntf"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<PackageName Value="IDEIntf"/>
|
||||||
|
</Item2>
|
||||||
</RequiredPkgs>
|
</RequiredPkgs>
|
||||||
<UsageOptions>
|
<UsageOptions>
|
||||||
<UnitPath Value="$(PkgOutDir)"/>
|
<UnitPath Value="$(PkgOutDir)"/>
|
||||||
|
@ -1,9 +1,180 @@
|
|||||||
object MyHelpSetupDialog: TMyHelpSetupDialog
|
object MyHelpSetupDialog: TMyHelpSetupDialog
|
||||||
Height = 384
|
Left = 0
|
||||||
Width = 581
|
Height = 474
|
||||||
ClientHeight = 384
|
Top = 0
|
||||||
ClientWidth = 581
|
Width = 767
|
||||||
|
ClientHeight = 474
|
||||||
|
ClientWidth = 767
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
DesignLeft = 358
|
DesignLeft = 270
|
||||||
DesignTop = 166
|
DesignTop = 332
|
||||||
|
object PageControl1: TPageControl
|
||||||
|
Left = 0
|
||||||
|
Height = 474
|
||||||
|
Top = 0
|
||||||
|
Width = 767
|
||||||
|
ActivePage = ContextTabSheet
|
||||||
|
Align = alClient
|
||||||
|
TabIndex = 3
|
||||||
|
TabOrder = 0
|
||||||
|
object FPCKeywordsTabSheet: TTabSheet
|
||||||
|
Caption = 'FPCKeywordsTabSheet'
|
||||||
|
ClientHeight = 442
|
||||||
|
ClientWidth = 761
|
||||||
|
object FPCKeywordsMemo: TMemo
|
||||||
|
AnchorSideTop.Control = FPCKeywordsEnableCheckBox
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 381
|
||||||
|
Top = 55
|
||||||
|
Width = 749
|
||||||
|
Align = alBottom
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Lines.Strings = (
|
||||||
|
'FPCKeywordsMemo'
|
||||||
|
)
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object FPCKeywordsEnableCheckBox: TCheckBox
|
||||||
|
AnchorSideLeft.Control = FPCKeywordsTabSheet
|
||||||
|
AnchorSideTop.Control = FPCKeywordsNoteLabel
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 22
|
||||||
|
Top = 27
|
||||||
|
Width = 189
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'FPCKeywordsEnableCheckBox'
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object FPCKeywordsNoteLabel: TLabel
|
||||||
|
Left = 6
|
||||||
|
Height = 15
|
||||||
|
Top = 6
|
||||||
|
Width = 749
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'FPCKeywordsNoteLabel'
|
||||||
|
ParentColor = False
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DirectivesTabSheet: TTabSheet
|
||||||
|
Caption = 'DirectivesTabSheet'
|
||||||
|
ClientHeight = 442
|
||||||
|
ClientWidth = 761
|
||||||
|
object DirectivesNoteLabel: TLabel
|
||||||
|
Left = 6
|
||||||
|
Height = 15
|
||||||
|
Top = 6
|
||||||
|
Width = 749
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'DirectivesNoteLabel'
|
||||||
|
ParentColor = False
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
object DirectivesEnableCheckBox: TCheckBox
|
||||||
|
AnchorSideLeft.Control = DirectivesTabSheet
|
||||||
|
AnchorSideTop.Control = DirectivesNoteLabel
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 22
|
||||||
|
Top = 27
|
||||||
|
Width = 170
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'DirectivesEnableCheckBox'
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object DirectivesMemo: TMemo
|
||||||
|
AnchorSideTop.Control = DirectivesEnableCheckBox
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 381
|
||||||
|
Top = 55
|
||||||
|
Width = 749
|
||||||
|
Align = alBottom
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Lines.Strings = (
|
||||||
|
'DirectivesMemo'
|
||||||
|
)
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object MessagesTabSheet: TTabSheet
|
||||||
|
Caption = 'MessagesTabSheet'
|
||||||
|
ClientHeight = 442
|
||||||
|
ClientWidth = 761
|
||||||
|
object MessagesNoteLabel: TLabel
|
||||||
|
Left = 6
|
||||||
|
Height = 15
|
||||||
|
Top = 6
|
||||||
|
Width = 749
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'MessagesNoteLabel'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object MessagesEnableCheckBox: TCheckBox
|
||||||
|
AnchorSideLeft.Control = MessagesTabSheet
|
||||||
|
AnchorSideTop.Control = MessagesNoteLabel
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 22
|
||||||
|
Top = 27
|
||||||
|
Width = 171
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'MessagesEnableCheckBox'
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ContextTabSheet: TTabSheet
|
||||||
|
Caption = 'ContextTabSheet'
|
||||||
|
ClientHeight = 442
|
||||||
|
ClientWidth = 761
|
||||||
|
object ContextNoteLabel: TLabel
|
||||||
|
Left = 6
|
||||||
|
Height = 15
|
||||||
|
Top = 6
|
||||||
|
Width = 749
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'ContextNoteLabel'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object ContextEnableCheckBox: TCheckBox
|
||||||
|
AnchorSideLeft.Control = ContextTabSheet
|
||||||
|
AnchorSideTop.Control = ContextNoteLabel
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 22
|
||||||
|
Top = 27
|
||||||
|
Width = 159
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'ContextEnableCheckBox'
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object ContextMemo: TMemo
|
||||||
|
AnchorSideTop.Control = ContextEnableCheckBox
|
||||||
|
Left = 6
|
||||||
|
Height = 90
|
||||||
|
Top = 346
|
||||||
|
Width = 749
|
||||||
|
Align = alBottom
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Lines.Strings = (
|
||||||
|
'ContextMemo'
|
||||||
|
)
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ClassesTabSheet: TTabSheet
|
||||||
|
Caption = 'ClassesTabSheet'
|
||||||
|
end
|
||||||
|
object SourcesTabSheet: TTabSheet
|
||||||
|
Caption = 'SourcesTabSheet'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -45,7 +45,8 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||||
LazHelpIntf, HelpIntfs, IDEHelpIntf, IDEDialogs, IDEOptionsIntf;
|
LazHelpIntf, HelpIntfs, ComCtrls, StdCtrls, IDEHelpIntf, IDEDialogs,
|
||||||
|
IDEOptionsIntf;
|
||||||
|
|
||||||
const
|
const
|
||||||
MyHelpOptionID: integer = 10000; // an arbitrary number, choose a big number
|
MyHelpOptionID: integer = 10000; // an arbitrary number, choose a big number
|
||||||
@ -63,6 +64,7 @@ type
|
|||||||
FAllKeywordNode: THelpNode;
|
FAllKeywordNode: THelpNode;
|
||||||
public
|
public
|
||||||
KeywordToText: TStrings; // every line has the format: Keyword=Text
|
KeywordToText: TStrings; // every line has the format: Keyword=Text
|
||||||
|
Enabled: boolean;
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function GetNodesForKeyword(const HelpKeyword: string;
|
function GetNodesForKeyword(const HelpKeyword: string;
|
||||||
@ -85,6 +87,7 @@ type
|
|||||||
private
|
private
|
||||||
FAllDirectiveNode: THelpNode;
|
FAllDirectiveNode: THelpNode;
|
||||||
public
|
public
|
||||||
|
Enabled: boolean;
|
||||||
FPCDirectiveToText: TStrings; // every line has the format: Keyword=Text
|
FPCDirectiveToText: TStrings; // every line has the format: Keyword=Text
|
||||||
IDEDirectiveToText: TStrings; // every line has the format: Keyword=Text
|
IDEDirectiveToText: TStrings; // every line has the format: Keyword=Text
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
@ -109,6 +112,8 @@ type
|
|||||||
private
|
private
|
||||||
FAllMessageNode: THelpNode;
|
FAllMessageNode: THelpNode;
|
||||||
public
|
public
|
||||||
|
Enabled: boolean;
|
||||||
|
constructor Create(TheOwner: TComponent); override;
|
||||||
function GetNodesForMessage(const AMessage: string; MessageParts: TStrings;
|
function GetNodesForMessage(const AMessage: string; MessageParts: TStrings;
|
||||||
var ListOfNodes: THelpNodeQueryList; var ErrMsg: string
|
var ListOfNodes: THelpNodeQueryList; var ErrMsg: string
|
||||||
): TShowHelpResult; override;
|
): TShowHelpResult; override;
|
||||||
@ -133,6 +138,7 @@ type
|
|||||||
private
|
private
|
||||||
FAllContextNode: THelpNode;
|
FAllContextNode: THelpNode;
|
||||||
public
|
public
|
||||||
|
Enabled: boolean;
|
||||||
ContextToMessage: TStrings; // every line has the format: DecimalNumber=Text
|
ContextToMessage: TStrings; // every line has the format: DecimalNumber=Text
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -150,8 +156,28 @@ type
|
|||||||
{ TMyHelpSetupDialog }
|
{ TMyHelpSetupDialog }
|
||||||
|
|
||||||
TMyHelpSetupDialog = class(TAbstractIDEOptionsEditor)
|
TMyHelpSetupDialog = class(TAbstractIDEOptionsEditor)
|
||||||
|
ContextEnableCheckBox: TCheckBox;
|
||||||
|
ContextMemo: TMemo;
|
||||||
|
ContextNoteLabel: TLabel;
|
||||||
|
DirectivesEnableCheckBox: TCheckBox;
|
||||||
|
DirectivesMemo: TMemo;
|
||||||
|
DirectivesNoteLabel: TLabel;
|
||||||
|
FPCKeywordsEnableCheckBox: TCheckBox;
|
||||||
|
FPCKeywordsMemo: TMemo;
|
||||||
|
FPCKeywordsNoteLabel: TLabel;
|
||||||
|
MessagesEnableCheckBox: TCheckBox;
|
||||||
|
MessagesNoteLabel: TLabel;
|
||||||
|
PageControl1: TPageControl;
|
||||||
|
FPCKeywordsTabSheet: TTabSheet;
|
||||||
|
DirectivesTabSheet: TTabSheet;
|
||||||
|
MessagesTabSheet: TTabSheet;
|
||||||
|
ContextTabSheet: TTabSheet;
|
||||||
|
SourcesTabSheet: TTabSheet;
|
||||||
|
ClassesTabSheet: TTabSheet;
|
||||||
private
|
private
|
||||||
public
|
public
|
||||||
|
HelpShortCutAsText: string;
|
||||||
|
PkgName: string;
|
||||||
function GetTitle: String; override;
|
function GetTitle: String; override;
|
||||||
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
||||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||||
@ -166,8 +192,8 @@ implementation
|
|||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
// register help databases
|
// register help databases
|
||||||
// For demonstration purpose one help database per help type
|
// For demonstration purpose there is one help database per help type.
|
||||||
// Normally you would combine them into one or a few.
|
// Normally you would combine them into one database.
|
||||||
MyFPCKeywordHelpDatabase:=TMyFPCKeywordHelpDatabase(
|
MyFPCKeywordHelpDatabase:=TMyFPCKeywordHelpDatabase(
|
||||||
HelpDatabases.CreateHelpDatabase('MyFPCKeyWordHelpDB',TMyFPCKeywordHelpDatabase,true));
|
HelpDatabases.CreateHelpDatabase('MyFPCKeyWordHelpDB',TMyFPCKeywordHelpDatabase,true));
|
||||||
MyDirectiveHelpDatabase:=TMyDirectiveHelpDatabase(
|
MyDirectiveHelpDatabase:=TMyDirectiveHelpDatabase(
|
||||||
@ -190,11 +216,41 @@ end;
|
|||||||
|
|
||||||
procedure TMyHelpSetupDialog.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TMyHelpSetupDialog.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
|
// fpc keywords
|
||||||
|
FPCKeywordsEnableCheckBox.Checked:=MyFPCKeywordHelpDatabase.Enabled;
|
||||||
|
FPCKeywordsMemo.Text:=Trim(MyFPCKeywordHelpDatabase.KeywordToText.Text);
|
||||||
|
|
||||||
|
// directives
|
||||||
|
|
||||||
|
// messages
|
||||||
|
|
||||||
|
// context
|
||||||
|
|
||||||
|
// classes
|
||||||
|
|
||||||
|
// sources
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMyHelpSetupDialog.Setup(ADialog: TAbstractOptionsEditorDialog);
|
procedure TMyHelpSetupDialog.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||||
begin
|
begin
|
||||||
|
HelpShortCutAsText:='F1';
|
||||||
|
PkgName:='DemoIDEHelp';
|
||||||
|
|
||||||
|
// fpc keywords
|
||||||
|
FPCKeywordsNoteLabel.Caption:='Simple help for FPC keywords installed by package '+PkgName+'.'
|
||||||
|
+' You get this help when you press the help key ('+HelpShortCutAsText+') in the source editor and caret is not on an identifier.'
|
||||||
|
+' Each line has the format "keyword=text" without the quotes. For example "repeat=This keyword starts a repeat-until loop."';
|
||||||
|
FPCKeywordsEnableCheckBox.Caption:='Enable';
|
||||||
|
|
||||||
|
// directives
|
||||||
|
|
||||||
|
// messages
|
||||||
|
|
||||||
|
// context
|
||||||
|
|
||||||
|
// classes
|
||||||
|
|
||||||
|
// sources
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -207,6 +263,19 @@ end;
|
|||||||
|
|
||||||
procedure TMyHelpSetupDialog.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TMyHelpSetupDialog.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
|
// fpc keywords
|
||||||
|
MyFPCKeywordHelpDatabase.Enabled:=FPCKeywordsEnableCheckBox.Checked;
|
||||||
|
MyFPCKeywordHelpDatabase.KeywordToText.Text:=Trim(FPCKeywordsMemo.Text);
|
||||||
|
|
||||||
|
// directives
|
||||||
|
|
||||||
|
// messages
|
||||||
|
|
||||||
|
// context
|
||||||
|
|
||||||
|
// classes
|
||||||
|
|
||||||
|
// sources
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -215,6 +284,7 @@ end;
|
|||||||
constructor TMyContextHelpDatabase.Create(TheOwner: TComponent);
|
constructor TMyContextHelpDatabase.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
Enabled:=true;
|
||||||
ContextToMessage:=TStringList.Create;
|
ContextToMessage:=TStringList.Create;
|
||||||
ContextToMessage.Add('3456=A help text for helpcontext 3456');
|
ContextToMessage.Add('3456=A help text for helpcontext 3456');
|
||||||
end;
|
end;
|
||||||
@ -233,7 +303,7 @@ var
|
|||||||
begin
|
begin
|
||||||
ErrMsg:='';
|
ErrMsg:='';
|
||||||
Result:=shrHelpNotFound;
|
Result:=shrHelpNotFound;
|
||||||
if (csDesigning in ComponentState) then exit;
|
if (csDesigning in ComponentState) or (not Enabled) then exit;
|
||||||
|
|
||||||
Msg:=ContextToMessage.Values[IntToStr(HelpContext)];
|
Msg:=ContextToMessage.Values[IntToStr(HelpContext)];
|
||||||
if Msg='' then exit;
|
if Msg='' then exit;
|
||||||
@ -272,6 +342,12 @@ end;
|
|||||||
|
|
||||||
{ TMyMessagesHelpDatabase }
|
{ TMyMessagesHelpDatabase }
|
||||||
|
|
||||||
|
constructor TMyMessagesHelpDatabase.Create(TheOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(TheOwner);
|
||||||
|
Enabled:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
function TMyMessagesHelpDatabase.GetNodesForMessage(const AMessage: string;
|
function TMyMessagesHelpDatabase.GetNodesForMessage(const AMessage: string;
|
||||||
MessageParts: TStrings; var ListOfNodes: THelpNodeQueryList;
|
MessageParts: TStrings; var ListOfNodes: THelpNodeQueryList;
|
||||||
var ErrMsg: string): TShowHelpResult;
|
var ErrMsg: string): TShowHelpResult;
|
||||||
@ -280,7 +356,7 @@ var
|
|||||||
begin
|
begin
|
||||||
ErrMsg:='';
|
ErrMsg:='';
|
||||||
Result:=shrHelpNotFound;
|
Result:=shrHelpNotFound;
|
||||||
if (csDesigning in ComponentState) then exit;
|
if (csDesigning in ComponentState) or (not Enabled) then exit;
|
||||||
debugln(['TMyMessagesHelpDatabase.GetNodesForDirective AMessage="',AMessage,'" Parts="',MessageParts.Text,'"']);
|
debugln(['TMyMessagesHelpDatabase.GetNodesForDirective AMessage="',AMessage,'" Parts="',MessageParts.Text,'"']);
|
||||||
|
|
||||||
// check if the message fits
|
// check if the message fits
|
||||||
@ -324,6 +400,7 @@ end;
|
|||||||
constructor TMyDirectiveHelpDatabase.Create(TheOwner: TComponent);
|
constructor TMyDirectiveHelpDatabase.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
Enabled:=true;
|
||||||
FPCDirectiveToText:=TStringList.Create;
|
FPCDirectiveToText:=TStringList.Create;
|
||||||
FPCDirectiveToText.Add('mode=Set the syntax, e.g. fpc, objfpc, delphi, macpas, tp');
|
FPCDirectiveToText.Add('mode=Set the syntax, e.g. fpc, objfpc, delphi, macpas, tp');
|
||||||
IDEDirectiveToText:=TStringList.Create;
|
IDEDirectiveToText:=TStringList.Create;
|
||||||
@ -346,7 +423,7 @@ var
|
|||||||
Title: String;
|
Title: String;
|
||||||
begin
|
begin
|
||||||
Result:=shrHelpNotFound;
|
Result:=shrHelpNotFound;
|
||||||
if (csDesigning in ComponentState) then exit;
|
if (csDesigning in ComponentState) or (not Enabled) then exit;
|
||||||
debugln(['TMyDirectiveHelpDatabase.GetNodesForDirective HelpDirective="',HelpDirective,'"']);
|
debugln(['TMyDirectiveHelpDatabase.GetNodesForDirective HelpDirective="',HelpDirective,'"']);
|
||||||
if (FPCDirectiveHelpPrefix<>'')
|
if (FPCDirectiveHelpPrefix<>'')
|
||||||
and (LeftStr(HelpDirective,length(FPCDirectiveHelpPrefix))=FPCDirectiveHelpPrefix)
|
and (LeftStr(HelpDirective,length(FPCDirectiveHelpPrefix))=FPCDirectiveHelpPrefix)
|
||||||
@ -416,6 +493,7 @@ end;
|
|||||||
constructor TMyFPCKeywordHelpDatabase.Create(TheOwner: TComponent);
|
constructor TMyFPCKeywordHelpDatabase.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
Enabled:=true;
|
||||||
KeywordToText:=TStringList.Create;
|
KeywordToText:=TStringList.Create;
|
||||||
KeywordToText.Add('procedure=Named code block');
|
KeywordToText.Add('procedure=Named code block');
|
||||||
end;
|
end;
|
||||||
@ -434,7 +512,7 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
Result:=shrHelpNotFound;
|
Result:=shrHelpNotFound;
|
||||||
if (csDesigning in ComponentState) then exit;
|
if (csDesigning in ComponentState) or (not Enabled) then exit;
|
||||||
if (FPCKeyWordHelpPrefix='')
|
if (FPCKeyWordHelpPrefix='')
|
||||||
or (LeftStr(HelpKeyword,length(FPCKeyWordHelpPrefix))<>FPCKeyWordHelpPrefix)
|
or (LeftStr(HelpKeyword,length(FPCKeyWordHelpPrefix))<>FPCKeyWordHelpPrefix)
|
||||||
then exit;
|
then exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user