mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 18:46:01 +02:00
* fix CodeComplete loading and use a unit for standard units code complete
This commit is contained in:
parent
a1c7acdd77
commit
61c47fed1a
@ -216,7 +216,8 @@ var
|
|||||||
begin Overflow:=true; Exit; end;
|
begin Overflow:=true; Exit; end;
|
||||||
st:=P^.GetName;
|
st:=P^.GetName;
|
||||||
if Length(st)>=CodeCompleteMinLen then
|
if Length(st)>=CodeCompleteMinLen then
|
||||||
UnitsCodeCompleteWords^.Insert(NewStr(Lowcasestr(st)));
|
if not ((level=1) and OnlyStandard and (st=UpCaseStr(CodeCompleteUnitName))) then
|
||||||
|
UnitsCodeCompleteWords^.Insert(NewStr(Lowcasestr(st)));
|
||||||
{ this is wrong because it inserted args or locals of proc
|
{ this is wrong because it inserted args or locals of proc
|
||||||
in the globals list !! PM}
|
in the globals list !! PM}
|
||||||
if (P^.Items<>nil) and (level=1) and
|
if (P^.Items<>nil) and (level=1) and
|
||||||
@ -262,14 +263,16 @@ begin
|
|||||||
{ compile a dummy file to get symbol info }
|
{ compile a dummy file to get symbol info }
|
||||||
with HiddenSource^.Editor^ do
|
with HiddenSource^.Editor^ do
|
||||||
begin
|
begin
|
||||||
FileName:='__fp__.pp';
|
FileName:=CodeCompleteUnitName+'.pp';
|
||||||
|
Addline('unit '+CodeCompleteUnitName+';');
|
||||||
|
Addline('interface');
|
||||||
if StandardUnits<>'' then
|
if StandardUnits<>'' then
|
||||||
begin
|
begin
|
||||||
AddLine('uses');
|
AddLine('uses');
|
||||||
Addline(StandardUnits);
|
Addline(StandardUnits);
|
||||||
Addline(' ;');
|
Addline(' ;');
|
||||||
end;
|
end;
|
||||||
Addline('begin');
|
Addline('implementation');
|
||||||
Addline('end.');
|
Addline('end.');
|
||||||
SetModified(true);
|
SetModified(true);
|
||||||
// SaveFile;
|
// SaveFile;
|
||||||
@ -314,19 +317,19 @@ begin
|
|||||||
if S.Status=stOK then
|
if S.Status=stOK then
|
||||||
S.Read(NewUseStandardUnitsInCodeComplete,Sizeof(UseStandardUnitsInCodeComplete));
|
S.Read(NewUseStandardUnitsInCodeComplete,Sizeof(UseStandardUnitsInCodeComplete));
|
||||||
if S.Status=stOK then
|
if S.Status=stOK then
|
||||||
NewUseStandardUnitsInCodeComplete:=UseStandardUnitsInCodeComplete;
|
UseStandardUnitsInCodeComplete:=NewUseStandardUnitsInCodeComplete;
|
||||||
if S.Status=stOK then
|
if S.Status=stOK then
|
||||||
S.Read(NewUseAllUnitsInCodeComplete,Sizeof(UseAllUnitsInCodeComplete));
|
S.Read(NewUseAllUnitsInCodeComplete,Sizeof(UseAllUnitsInCodeComplete));
|
||||||
if S.Status=stOK then
|
if S.Status=stOK then
|
||||||
NewUseAllUnitsInCodeComplete:=UseAllUnitsInCodeComplete;
|
UseAllUnitsInCodeComplete:=NewUseAllUnitsInCodeComplete;
|
||||||
if S.Status=stOK then
|
if S.Status=stOK then
|
||||||
S.Read(NewShowOnlyUnique,Sizeof(ShowOnlyUnique));
|
S.Read(NewShowOnlyUnique,Sizeof(ShowOnlyUnique));
|
||||||
if S.Status=stOK then
|
if S.Status=stOK then
|
||||||
NewShowOnlyUnique:=ShowOnlyUnique;
|
ShowOnlyUnique:=NewShowOnlyUnique;
|
||||||
if S.Status=stOK then
|
if S.Status=stOK then
|
||||||
S.Read(NewCodeCompleteMinLen,Sizeof(CodeCompleteMinLen));
|
S.Read(NewCodeCompleteMinLen,Sizeof(CodeCompleteMinLen));
|
||||||
if S.Status=stOK then
|
if S.Status=stOK then
|
||||||
NewCodeCompleteMinLen:=CodeCompleteMinLen;
|
CodeCompleteMinLen:=NewCodeCompleteMinLen;
|
||||||
if S.Status=stOK then
|
if S.Status=stOK then
|
||||||
StPtr:=S.ReadStr
|
StPtr:=S.ReadStr
|
||||||
else
|
else
|
||||||
@ -633,7 +636,10 @@ END.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.9 2002-09-09 06:53:54 pierre
|
Revision 1.10 2002-09-11 13:12:42 pierre
|
||||||
|
* fix CodeComplete loading and use a unit for standard units code complete
|
||||||
|
|
||||||
|
Revision 1.9 2002/09/09 06:53:54 pierre
|
||||||
* avoid to save file used by codecomplete
|
* avoid to save file used by codecomplete
|
||||||
|
|
||||||
Revision 1.8 2002/09/09 06:22:45 pierre
|
Revision 1.8 2002/09/09 06:22:45 pierre
|
||||||
|
@ -54,6 +54,7 @@ const
|
|||||||
DesktopTempName = 'fp___.dsk';
|
DesktopTempName = 'fp___.dsk';
|
||||||
GrepOutName = 'grep$$.out';
|
GrepOutName = 'grep$$.out';
|
||||||
GrepErrName = 'grep$$.err';
|
GrepErrName = 'grep$$.err';
|
||||||
|
CodeCompleteUnitName = '__fp__';
|
||||||
|
|
||||||
HTMLIndexExt = WHTMLHlp.extHTMLIndex;
|
HTMLIndexExt = WHTMLHlp.extHTMLIndex;
|
||||||
HTMLExt = WHTMLHlp.extHTML;
|
HTMLExt = WHTMLHlp.extHTML;
|
||||||
@ -446,7 +447,10 @@ implementation
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.9 2002-09-07 15:40:42 peter
|
Revision 1.10 2002-09-11 13:12:42 pierre
|
||||||
|
* fix CodeComplete loading and use a unit for standard units code complete
|
||||||
|
|
||||||
|
Revision 1.9 2002/09/07 15:40:42 peter
|
||||||
* old logs removed and tabs fixed
|
* old logs removed and tabs fixed
|
||||||
|
|
||||||
Revision 1.8 2002/09/03 13:57:05 pierre
|
Revision 1.8 2002/09/03 13:57:05 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user