I have an .pas file and in middle of programming - Code Completion stopped working. I removed IDEFixPack, which is suspect but nothing changed. What can be?
(I'll answer myself, just left this findind to community).
unit Unit2;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs;
type
TForm2 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
end.
EDIT: I suspect that can be caused by strange line-endings (mixed CR, LR and CRLF throught the file):
unit Unit2;[CR]
[LF]
interface[CR][LF]
[LF]
uses[LF]
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,[CR]
Vcl.Controls, Vcl.Forms, Vcl.Dialogs;[LF]
And so on...
One cause of this is: line-ending chars are mixed inside an source-file. Use Dos2Unix (in a batch) or Notepad++(if is just an single or few files) to correct this to Windows line-ending (CRLF) and the Code Completion will come back. Happened to me right now and made me lose more than an hour trying to find what was happening. Of course, CC on delphi is bugged and this is just one cause. But is a devious one.