HI
 I've added evaluate text at cursor

and in LFM should be added
  EvaluateDlg.onActivate:=FormShow;


Darek
Index: debugger/evaluatedlg.pp
===================================================================
--- debugger/evaluatedlg.pp     (wersja 9416)
+++ debugger/evaluatedlg.pp     (kopia robocza)
@@ -63,8 +63,14 @@
       Shift: TShiftState);
     procedure tbEvaluateClick(Sender: TObject);
     procedure tbWatchClick(Sender: TObject);
+    
   private
+    function GetFindText: string;
+    procedure SetFindText(const NewFindText: string);
+
   public
+    property FindText: string read GetFindText write SetFindText;
+
   end;
 
 implementation
@@ -92,6 +98,22 @@
   end;
 end;
 
+procedure TEvaluateDlg.SetFindText(const NewFindText: string);
+begin
+  if NewFindText<>'' then begin
+    cmbExpression.Text := NewFindText;
+    cmbExpression.SelectAll;
+    tbEvaluate.Click;
+  end;
+  ActiveControl := cmbExpression;
+end;
+
+function TEvaluateDlg.GetFindText: string;
+begin
+  Result := cmbExpression.Text;
+end;
+
+
 procedure TEvaluateDlg.FormShow(Sender: TObject);
 begin
   cmbExpression.SetFocus;

Index: components/codetools/pascalparsertool.pas
===================================================================
--- components/codetools/pascalparsertool.pas   (wersja 9416)
+++ components/codetools/pascalparsertool.pas   (kopia robocza)
@@ -468,7 +468,7 @@
     exit;
   end;
   ClearLastError;
-  DebugLn('TPascalParserTool.BuildTree B 
OnlyIntf=',dbgs(OnlyInterfaceNeeded),'  
',TCodeBuffer(Scanner.MainCode).Filename);
+//  DebugLn('TPascalParserTool.BuildTree B 
OnlyIntf=',dbgs(OnlyInterfaceNeeded),'  
',TCodeBuffer(Scanner.MainCode).Filename);
   //CheckHeap('TBasicCodeTool.BuildTree B '+IntToStr(MemCheck_GetMem_Cnt));
   
   // scan code

Index: ide/debugmanager.pas
===================================================================
--- ide/debugmanager.pas        (wersja 9416)
+++ ide/debugmanager.pas        (kopia robocza)
@@ -1114,7 +1114,7 @@
     then Include(FManagerStates,dmsInitializingDebuggerObjectFailed);
   end;
 
-  DebugLn('[TDebugManager.OnDebuggerChangeState] state: ', 
STATENAME[FDebugger.State]);
+  //DebugLn('[TDebugManager.OnDebuggerChangeState] state: ', 
STATENAME[FDebugger.State]);
 
   // All conmmands
   // -------------------
@@ -1313,6 +1313,11 @@
         TBreakPointsDlg(CurDialog).BaseDirectory:=Project1.ProjectDirectory;
     end;
   end;
+  if (CurDialog is tEvaluateDlg) and  (sourceNotebook<>nil)
+  then begin
+        tEvaluateDlg(CurDialog).FindText:=
+         SourceNotebook.GetActiveSE.GetWordAtCurrentCaret;
+  end;
   FDialogs[ADialogType].Show;
   FDialogs[ADialogType].BringToFront;
 end;


Reply via email to