procedure TSourceEditor.ProcessCommand(Sender: TObject; var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer); // these are normal commands for synedit (lower than ecUserFirst), // define extra actions here // for non synedit keys (bigger than ecUserFirst) use ProcessUserCommand var AddChar: Boolean; s: String; i: Integer; begin //DebugLn('TSourceEditor.ProcessCommand Command=',dbgs(Command)); FSharedValues.SetActiveSharedEditor(Self); AutoStartCompletionBoxTimer.AutoEnabled:=false; //clq 2020 要在项目的 include path 中加入 D:\test1\la_src\ide\include\win64 才可以编译 //ll ...
procedure TSourceEditor.UserCommandProcessed(Sender: TObject; var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer); // called after the source editor processed a key var Handled: boolean; begin Handled:=true; case Command of
ecNone: ;
ecChar: begin if AutoBlockCompleteChar(AChar) then Handled:=true; if EditorOpts.AutoDisplayFunctionPrototypes then if (aChar = '(') or (aChar = ',') then SourceNotebook.StartShowCodeContext(False);
//clq 2020 似乎可以当做 synedit 的 CommandProcessed 事件
if (AChar<>' ') //忽略空格 and(AChar<>';') //忽略分号 then StartIdentCompletionBox(False, False); //ok!!! end;
else begin Handled:=false; if FaOwner<>nil then TSourceNotebook(FaOwner).ParentCommandProcessed(Self,Command,aChar,Data, Handled); end; end; if Handled then Command:=ecNone; end;