Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Implementing IOTACodeInsightManager in expert


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Aug 2, 2016 10:16 PM Last Post By: Alzbeta Slapkova
Alzbeta Slapkova

Posts: 20
Registered: 7/1/15
Implementing IOTACodeInsightManager in expert  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 13, 2015 6:16 AM
Hi guys.

I would like to implement IOTACodeInsightManager for my custom language in XE8. I started with this example: http://www.delphigroups.info/2/3/1063766.html and I ran into following issues:

1) Manager is working fine - I can see my symbols shown but I cannot see hints (tooltips) for them (both function GetHelpInsightHtml: WideString; and function GetHintText(HintLine, HintCol: Integer): string; are implemented in my class)

http://www.unsigned.sk/tmp/rad/ide.png

2) After clicking identifier nothing is called. I can see the identifier underlined but GotoDefinition(out AFileName: string; out ALineNum: Integer; Index: Integer): Boolean; is not fired
Also the procedure GetCodeInsightType(AChar: Char; AElement: Integer; out CodeInsightType: TOTACodeInsightType; out InvokeType: TOTAInvokeType); is never fired

3) When I choose my manager in Editor Options - Code Insight I got List Index of bounds: http://www.unsigned.sk/tmp/rad/insight.png

[5015B2F4]{rtl220.bpl } System.Classes.TStringList.Get (Line 6932, "System.Classes.pas" + 2) + $A
[21276847]{vclide220.bpl} IDERegIniPropSet.TRegistryPropSet.GetCurrentPath (Line 140, "IDERegIniPropSet.pas" + 2) + $11
[21276B2C]{vclide220.bpl} IDERegIniPropSet.TRegistryPropSet.GetFieldData (Line 184, "IDERegIniPropSet.pas" + 26) + $12
[21272C59]{vclide220.bpl} IDEPropSet.TPropField.GetValue (Line 812, "IDEPropSet.pas" + 1) + $C
[2127F80E]{vclide220.bpl} IDEPropCtrls.TPropCheckBox.GetFieldState (Line 1084, "IDEPropCtrls.pas" + 3) + $5
[2127F899]{vclide220.bpl} IDEPropCtrls.TPropCheckBox.DataChange (Line 1101, "IDEPropCtrls.pas" + 1) + $2
[2127537C]{vclide220.bpl} IDEPropSet.TFieldPropLink.RecordChanged (Line 2049, "IDEPropSet.pas" + 5) + $13
[212750B2]{vclide220.bpl} IDEPropSet.TPropLink.DataEvent (Line 1905, "IDEPropSet.pas" + 5) + $A
[21274582]{vclide220.bpl} IDEPropSet.TCustomPropSet.NotifyPropLinks (Line 1448, "IDEPropSet.pas" + 3) + $B
[21274EF5]{vclide220.bpl} IDEPropSet.TPropSet.DataEvent (Line 1821, "IDEPropSet.pas" + 3) + $6
[212779B9]{vclide220.bpl} IDERegIniPropSet.TRegistryPropSet.SetKeyIndex (Line 408, "IDERegIniPropSet.pas" + 11) + $6
[206E7AA4]{coreide220.bpl} CodeInsight.TCodeInsightOptions.CodeInsightManagerComboSelect (Line 110, "CodeInsight.pas" + 1) + $9
[206E704F]{coreide220.bpl} CodeInsightOptionsFrm.TCodeInsightOptionsPg.CodeInsightManagerComboSelect (Line 102, "CodeInsightOptionsFrm.pas" + 0) + $17
[506A6A02]{vcl220.bpl } Vcl.StdCtrls.TCustomCombo.Select (Line 4398, "Vcl.StdCtrls.pas" + 2) + $A
[506A67C2]{vcl220.bpl } Vcl.StdCtrls.TCustomCombo.CNCommand (Line 4322, "Vcl.StdCtrls.pas" + 24) + $6
[50682FE9]{vcl220.bpl } Vcl.Controls.TControl.WndProc (Line 7245, "Vcl.Controls.pas" + 91) + $6
[50687B91]{vcl220.bpl } Vcl.Controls.TWinControl.WndProc (Line 10079, "Vcl.Controls.pas" + 158) + $6
[5017EF44]{rtl220.bpl } System.Classes.{System.Generics.Collections}TDictionary<System.Integer,System.Classes.IInterfaceList>.TryGetValue (Line 6308, "System.Generics.Collections.pas" + 6) + $2
[50177B4D]{rtl220.bpl } System.Classes.TObservers.IsObserving (Line 19028, "System.Classes.pas" + 1) + $F
[50177BC8]{rtl220.bpl } System.Classes.TObservers.IsObserving (Line 19038, "System.Classes.pas" + 11) + $20
[506A669F]{vcl220.bpl } Vcl.StdCtrls.TCustomCombo.WndProc (Line 4294, "Vcl.StdCtrls.pas" + 70) + $4
[506A7FB1]{vcl220.bpl } Vcl.StdCtrls.TCustomComboBox.WndProc (Line 5000, "Vcl.StdCtrls.pas" + 27) + $4
[50682C24]{vcl220.bpl } Vcl.Controls.TControl.Perform (Line 7023, "Vcl.Controls.pas" + 10) + $8
[50687CF7]{vcl220.bpl } Vcl.Controls.DoControlMsg (Line 10148, "Vcl.Controls.pas" + 12) + $11
[5068877F]{vcl220.bpl } Vcl.Controls.TWinControl.WMCommand (Line 10423, "Vcl.Controls.pas" + 1) + $5
[50682FE9]{vcl220.bpl } Vcl.Controls.TControl.WndProc (Line 7245, "Vcl.Controls.pas" + 91) + $6
[50688ABC]{vcl220.bpl } Vcl.Controls.TWinControl.WMWindowPosChanging (Line 10559, "Vcl.Controls.pas" + 11) + $6
[506A8003]{vcl220.bpl } Vcl.StdCtrls.TCustomComboBox.WMPaint (Line 5033, "Vcl.StdCtrls.pas" + 10) + $2
[21091CBE]{designide220.bpl} DeskUtil.SetFocusHook (Line 463, "DeskUtil.pas" + 4) + $C
[50687B91]{vcl220.bpl } Vcl.Controls.TWinControl.WndProc (Line 10079, "Vcl.Controls.pas" + 158) + $6
[2185459B]{vclactnband220.bpl} Vcl.ActnMenus.CallWindowHook (Line 748, "Vcl.ActnMenus.pas" + 20) + $F
[506871B0]{vcl220.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 9786, "Vcl.Controls.pas" + 3) + $6
[50172D80]{rtl220.bpl } System.Classes.StdWndProc (Line 16882, "System.Classes.pas" + 8) + $0
[0C5F03E7]{Castalia220.bpl} Castaliaeditor.UnregisterEditorListener + $7DF
[50687CA2]{vcl220.bpl } Vcl.Controls.TWinControl.DefaultHandler (Line 10120, "Vcl.Controls.pas" + 30) + $19
[5068878E]{vcl220.bpl } Vcl.Controls.TWinControl.WMCommand (Line 10423, "Vcl.Controls.pas" + 1) + $14
[50682FE9]{vcl220.bpl } Vcl.Controls.TControl.WndProc (Line 7245, "Vcl.Controls.pas" + 91) + $6
[50775B7D]{vcl220.bpl } Vcl.Themes.TCustomStyleEngine.HookCBProc (Line 7301, "Vcl.Themes.pas" + 1) + $9
[5077227B]{vcl220.bpl } Vcl.Themes.TStyleManager.GetIsCustomStyleActive (Line 5451, "Vcl.Themes.pas" + 0) + $7
[50775B85]{vcl220.bpl } Vcl.Themes.TCustomStyleEngine.HookCBProc (Line 7303, "Vcl.Themes.pas" + 3) + $0
[50775CF2]{vcl220.bpl } Vcl.Themes.TCustomStyleEngine.HookCBProc (Line 7349, "Vcl.Themes.pas" + 49) + $18
[21091CBE]{designide220.bpl} DeskUtil.SetFocusHook (Line 463, "DeskUtil.pas" + 4) + $C
[50687B91]{vcl220.bpl } Vcl.Controls.TWinControl.WndProc (Line 10079, "Vcl.Controls.pas" + 158) + $6
[5017EF44]{rtl220.bpl } System.Classes.{System.Generics.Collections}TDictionary<System.Integer,System.Classes.IInterfaceList>.TryGetValue (Line 6308, "System.Generics.Collections.pas" + 6) + $2
[50177B4D]{rtl220.bpl } System.Classes.TObservers.IsObserving (Line 19028, "System.Classes.pas" + 1) + $F
[50177BC8]{rtl220.bpl } System.Classes.TObservers.IsObserving (Line 19038, "System.Classes.pas" + 11) + $20
[506A669F]{vcl220.bpl } Vcl.StdCtrls.TCustomCombo.WndProc (Line 4294, "Vcl.StdCtrls.pas" + 70) + $4
[506A7FB1]{vcl220.bpl } Vcl.StdCtrls.TCustomComboBox.WndProc (Line 5000, "Vcl.StdCtrls.pas" + 27) + $4
[2185459B]{vclactnband220.bpl} Vcl.ActnMenus.CallWindowHook (Line 748, "Vcl.ActnMenus.pas" + 20) + $F
[506871B0]{vcl220.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 9786, "Vcl.Controls.pas" + 3) + $6
[50172D80]{rtl220.bpl } System.Classes.StdWndProc (Line 16882, "System.Classes.pas" + 8) + $0
[0C5F03E7]{Castalia220.bpl} Castaliaeditor.UnregisterEditorListener + $7DF
[0C5F0A48]{Castalia220.bpl} Castaliaeditor.GetSourceFromModule + $290
[0C588B18]{Castalia220.bpl} Castaliahookutils. + $0
[508298BF]{vcl220.bpl } Vcl.AppEvnts.TMultiCaster.GetAppEvents (Line 654, "Vcl.AppEvnts.pas" + 1) + $3
[507CC78D]{vcl220.bpl } Vcl.Forms.TApplication.CancelHint (Line 11181, "Vcl.Forms.pas" + 6) + $D
[507CB41F]{vcl220.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 10352, "Vcl.Forms.pas" + 23) + $1
[507CB462]{vcl220.bpl } Vcl.Forms.TApplication.HandleMessage (Line 10382, "Vcl.Forms.pas" + 1) + $4
[507C69DA]{vcl220.bpl } Vcl.Forms.TCustomForm.ShowModal (Line 7148, "Vcl.Forms.pas" + 33) + $5
[206EF2BD]{coreide220.bpl} EnvOptions.TEnvironmentOptions.StampIt (Line 1043, "EnvOptions.pas" + 33) + $1
[500FEB79]{rtl220.bpl } System.Rtti.RawInvoke (Line 7476, "System.Rtti.pas" + 44) + $2
[500FEF7B]{rtl220.bpl } System.Rtti.Invoke (Line 7700, "System.Rtti.pas" + 79) + $2
[500F5E66]{rtl220.bpl } System.Rtti.TRttiInstanceMethodEx.DispatchInvoke (Line 5652, "System.Rtti.pas" + 101) + $1C
[500FF410]{rtl220.bpl } System.Rtti.TRttiMethod.Invoke (Line 8620, "System.Rtti.pas" + 1) + $D
[206EF0C6]{coreide220.bpl} EnvOptions.TEnvironmentOptions.Edit (Line 997, "EnvOptions.pas" + 2) + $67
[50172023]{rtl220.bpl } System.Classes.TBasicAction.Execute (Line 16378, "System.Classes.pas" + 3) + $7
[5066C5DA]{vcl220.bpl } Vcl.ActnList.TCustomAction.Execute (Line 259, "Vcl.ActnList.pas" + 19) + $35
[50171E7B]{rtl220.bpl } System.Classes.TBasicActionLink.Execute (Line 16289, "System.Classes.pas" + 2) + $7
[2185508D]{vclactnband220.bpl} Vcl.ActnMenus.TCustomActionMenuBar.ExecAction (Line 1077, "Vcl.ActnMenus.pas" + 6) + $D
[21856930]{vclactnband220.bpl} Vcl.ActnMenus.TCustomActionMenuBar.TrackMenu (Line 1843, "Vcl.ActnMenus.pas" + 19) + $15
[2185A34A]{vclactnband220.bpl} Vcl.ActnMenus.TCustomActionMainMenuBar.TrackMenu (Line 3637, "Vcl.ActnMenus.pas" + 5) + $3
[21854C38]{vclactnband220.bpl} Vcl.ActnMenus.TCustomActionMenuBar.CMItemClicked (Line 955, "Vcl.ActnMenus.pas" + 2) + $11
[21854C41]{vclactnband220.bpl} Vcl.ActnMenus.TCustomActionMenuBar.CMItemClicked (Line 956, "Vcl.ActnMenus.pas" + 3) + $4
[50682FE9]{vcl220.bpl } Vcl.Controls.TControl.WndProc (Line 7245, "Vcl.Controls.pas" + 91) + $6
[0C588B18]{Castalia220.bpl} Castaliahookutils. + $0
[506872A6]{vcl220.bpl } Vcl.Controls.GetControlAtPos (Line 9809, "Vcl.Controls.pas" + 4) + $75
[50687A39]{vcl220.bpl } Vcl.Controls.TWinControl.WndProc (Line 10031, "Vcl.Controls.pas" + 110) + $1D
[50687B91]{vcl220.bpl } Vcl.Controls.TWinControl.WndProc (Line 10079, "Vcl.Controls.pas" + 158) + $6
[21856A46]{vclactnband220.bpl} Vcl.ActnMenus.TCustomActionMenuBar.WndProc (Line 1882, "Vcl.ActnMenus.pas" + 25) + $4
[506871B0]{vcl220.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 9786, "Vcl.Controls.pas" + 3) + $6
[50172D80]{rtl220.bpl } System.Classes.StdWndProc (Line 16882, "System.Classes.pas" + 8) + $0
[507CB41F]{vcl220.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 10352, "Vcl.Forms.pas" + 23) + $1
[507CB462]{vcl220.bpl } Vcl.Forms.TApplication.HandleMessage (Line 10382, "Vcl.Forms.pas" + 1) + $4
[507CB795]{vcl220.bpl } Vcl.Forms.TApplication.Run (Line 10520, "Vcl.Forms.pas" + 26) + $3

Apparently my manager is not registered properly (however some features are working fine) - I created registry keys manually (in separate branch for debugging expert not to mess my IDE):

http://www.unsigned.sk/tmp/rad/debug.png http://www.unsigned.sk/tmp/rad/reg.png

Maybe there is some problem with its identification - name, ID?

function TNsisCodeInsightManager.GetIDString: string;
begin
  Result := WizardInfo.coWizardPrefix + ClassName;
end;
 
function TNsisCodeInsightManager.GetName: string;
begin
  Result := EvaluationInfo.coNSIS;
end;
 
function TNsisCodeInsightManager.GetOptionSetName: string;
begin
  Result := EvaluationInfo.coNSIS;
end;
 
// Note: coNSIS is simply 'NSIS'


Am I missing something or is there anything more I need to do?

Edited by: Alzbeta Slapkova on Dec 13, 2015 6:17 AM: Fixed link
Alzbeta Slapkova

Posts: 20
Registered: 7/1/15
Re: Implementing IOTACodeInsightManager in expert  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 2, 2016 10:16 PM   in response to: Alzbeta Slapkova in response to: Alzbeta Slapkova
Alzbeta Slapkova wrote:
Hi guys.

I would like to implement IOTACodeInsightManager for my custom language in XE8.

Meanwhile I partially solved this (http://rad-installer.com/features.html#code-completion) but it is not perfect. If anyone has some info about this please let me know.

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02