mirror of https://gitlab.com/basile.b/dexed.git
deleted TCEMainForm.expandSymbolicString() in favor of the new dedicated TCESymbolExpander class
This commit is contained in:
parent
52be1650f4
commit
43c646aebb
|
@ -47,7 +47,7 @@ implementation
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ce_main;
|
ce_symstring;
|
||||||
|
|
||||||
{$REGION Standard Comp/Obj------------------------------------------------------}
|
{$REGION Standard Comp/Obj------------------------------------------------------}
|
||||||
constructor TCECdbWidget.create(aOwner: TComponent);
|
constructor TCECdbWidget.create(aOwner: TComponent);
|
||||||
|
@ -164,7 +164,7 @@ begin
|
||||||
if (fCdbProc = nil) or (key <> #13) then
|
if (fCdbProc = nil) or (key <> #13) then
|
||||||
exit;
|
exit;
|
||||||
//
|
//
|
||||||
cmd := CEMainForm.expandSymbolicString(txtCdbCmd.Text);
|
cmd := symbolExpander.get(txtCdbCmd.Text);
|
||||||
inp := cmd + LineEnding;
|
inp := cmd + LineEnding;
|
||||||
fCdbProc.Input.Write(inp[1], length(inp));
|
fCdbProc.Input.Write(inp[1], length(inp));
|
||||||
//
|
//
|
||||||
|
|
|
@ -56,7 +56,7 @@ type
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ce_main;
|
ce_symstring;
|
||||||
|
|
||||||
constructor TCEToolItem.create(ACollection: TCollection);
|
constructor TCEToolItem.create(ACollection: TCollection);
|
||||||
begin
|
begin
|
||||||
|
@ -89,12 +89,12 @@ begin
|
||||||
fProcess.OnReadData:= @processOutput;
|
fProcess.OnReadData:= @processOutput;
|
||||||
fProcess.OnTerminate:= @processOutput;
|
fProcess.OnTerminate:= @processOutput;
|
||||||
fProcess.Options := fOpts;
|
fProcess.Options := fOpts;
|
||||||
fProcess.Executable := CEMainForm.expandSymbolicString(fExecutable);
|
fProcess.Executable := symbolExpander.get(fExecutable);
|
||||||
fProcess.ShowWindow := fShowWin;
|
fProcess.ShowWindow := fShowWin;
|
||||||
fProcess.CurrentDirectory := CEMainForm.expandSymbolicString(fWorkingDir);
|
fProcess.CurrentDirectory := symbolExpander.get(fWorkingDir);
|
||||||
fProcess.Parameters.Clear;
|
fProcess.Parameters.Clear;
|
||||||
for i:= 0 to fParameters.Count-1 do
|
for i:= 0 to fParameters.Count-1 do
|
||||||
fProcess.Parameters.AddText(CEMainForm.expandSymbolicString(fParameters.Strings[i]));
|
fProcess.Parameters.AddText(symbolExpander.get(fParameters.Strings[i]));
|
||||||
fProcess.Execute;
|
fProcess.Execute;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -355,7 +355,7 @@ type
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ce_main;
|
ce_symstring;
|
||||||
|
|
||||||
procedure TOptsGroup.doChanged;
|
procedure TOptsGroup.doChanged;
|
||||||
begin
|
begin
|
||||||
|
@ -370,9 +370,9 @@ begin
|
||||||
if fGenJson then
|
if fGenJson then
|
||||||
aList.Add('-X');
|
aList.Add('-X');
|
||||||
if fDocDir <> '' then
|
if fDocDir <> '' then
|
||||||
aList.Add('-Dd' + CEMainForm.expandSymbolicString(fDocDir));
|
aList.Add('-Dd' + symbolExpander.get(fDocDir));
|
||||||
if fJsonFname <> '' then
|
if fJsonFname <> '' then
|
||||||
aList.Add('-Xf' + CEMainForm.expandSymbolicString(fJsonFname));
|
aList.Add('-Xf' + symbolExpander.get(fJsonFname));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDocOpts.assign(aValue: TPersistent);
|
procedure TDocOpts.assign(aValue: TPersistent);
|
||||||
|
@ -844,18 +844,18 @@ var
|
||||||
begin
|
begin
|
||||||
for str in fSrcs do
|
for str in fSrcs do
|
||||||
begin
|
begin
|
||||||
str := CEMainForm.expandSymbolicString(str);
|
str := symbolExpander.get(str);
|
||||||
if not listAsteriskPath(str, aList, dExtList) then
|
if not listAsteriskPath(str, aList, dExtList) then
|
||||||
aList.Add(str);
|
aList.Add(str);
|
||||||
end;
|
end;
|
||||||
for str in fIncl do
|
for str in fIncl do
|
||||||
aList.Add('-I'+ CEMainForm.expandSymbolicString(str));
|
aList.Add('-I'+ symbolExpander.get(str));
|
||||||
for str in fImpt do
|
for str in fImpt do
|
||||||
aList.Add('-J'+ CEMainForm.expandSymbolicString(str));
|
aList.Add('-J'+ symbolExpander.get(str));
|
||||||
if fFname <> '' then
|
if fFname <> '' then
|
||||||
aList.Add('-of' + CEMainForm.expandSymbolicString(fFname));
|
aList.Add('-of' + symbolExpander.get(fFname));
|
||||||
if fObjDir <> '' then
|
if fObjDir <> '' then
|
||||||
aList.Add('-od' + CEMainForm.expandSymbolicString(fObjDir));
|
aList.Add('-od' + symbolExpander.get(fObjDir));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPathsOpts.assign(aValue: TPersistent);
|
procedure TPathsOpts.assign(aValue: TPersistent);
|
||||||
|
@ -958,7 +958,7 @@ begin
|
||||||
str2 := '-' + str1
|
str2 := '-' + str1
|
||||||
else
|
else
|
||||||
str2 := str1;
|
str2 := str1;
|
||||||
aList.AddText(CEMainForm.expandSymbolicString(str2));
|
aList.AddText(symbolExpander.get(str2));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
134
src/ce_main.pas
134
src/ce_main.pas
|
@ -277,7 +277,6 @@ type
|
||||||
procedure UpdateDockCaption(Exclude: TControl = nil); override;
|
procedure UpdateDockCaption(Exclude: TControl = nil); override;
|
||||||
//
|
//
|
||||||
procedure openFile(const aFilename: string);
|
procedure openFile(const aFilename: string);
|
||||||
function expandSymbolicString(const symString: string): string;
|
|
||||||
//
|
//
|
||||||
property WidgetList: TCEWidgetList read fWidgList;
|
property WidgetList: TCEWidgetList read fWidgList;
|
||||||
property LibraryManager: TLibraryManager read fLibMan;
|
property LibraryManager: TLibraryManager read fLibMan;
|
||||||
|
@ -293,7 +292,7 @@ implementation
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SynMacroRecorder, strutils, ce_options;
|
SynMacroRecorder, strutils, ce_options, ce_symstring;
|
||||||
|
|
||||||
{$REGION Standard Comp/Obj------------------------------------------------------}
|
{$REGION Standard Comp/Obj------------------------------------------------------}
|
||||||
constructor TCEMainForm.create(aOwner: TComponent);
|
constructor TCEMainForm.create(aOwner: TComponent);
|
||||||
|
@ -1307,7 +1306,7 @@ begin
|
||||||
|
|
||||||
fRunProc.CurrentDirectory := extractFilePath(fRunProc.Executable);
|
fRunProc.CurrentDirectory := extractFilePath(fRunProc.Executable);
|
||||||
if runArgs <> '' then
|
if runArgs <> '' then
|
||||||
fRunProc.Parameters.DelimitedText := expandSymbolicString(runArgs);
|
fRunProc.Parameters.DelimitedText := symbolExpander.get(runArgs);
|
||||||
fRunProc.Executable := fname + exeExt;
|
fRunProc.Executable := fname + exeExt;
|
||||||
fPrInpWidg.process := fRunProc;
|
fPrInpWidg.process := fRunProc;
|
||||||
fRunProc.Execute;
|
fRunProc.Execute;
|
||||||
|
@ -1720,135 +1719,6 @@ begin
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
function TCEMainForm.expandSymbolicString(const symString: string): string;
|
|
||||||
var
|
|
||||||
elems: TStringList;
|
|
||||||
elem: string;
|
|
||||||
begs, ends: boolean;
|
|
||||||
i, j, extLen: integer;
|
|
||||||
begin
|
|
||||||
result := '';
|
|
||||||
if symString = '' then exit;
|
|
||||||
//
|
|
||||||
elems := TStringList.Create;
|
|
||||||
try
|
|
||||||
i := 0;
|
|
||||||
elem := '';
|
|
||||||
repeat
|
|
||||||
inc(i);
|
|
||||||
if not (symString[i] in ['<', '>']) then
|
|
||||||
elem += symString[i]
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
if symString[i] = '<' then
|
|
||||||
begs := true;
|
|
||||||
ends := symString[i] = '>';
|
|
||||||
elems.Add(elem);
|
|
||||||
elem := '';
|
|
||||||
if begs and ends then
|
|
||||||
begin
|
|
||||||
begs := false;
|
|
||||||
ends := false;
|
|
||||||
elems.Objects[elems.Count-1] := Self;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
until
|
|
||||||
i = length(symString);
|
|
||||||
elems.Add(elem);
|
|
||||||
elem := '';
|
|
||||||
for i:= 0 to elems.Count-1 do
|
|
||||||
begin
|
|
||||||
if elems.Objects[i] = nil then
|
|
||||||
result += elems.Strings[i]
|
|
||||||
else case elems.Strings[i] of
|
|
||||||
'<','>' :
|
|
||||||
continue;
|
|
||||||
'CPF', 'CurrentProjectFile':
|
|
||||||
begin
|
|
||||||
if fProject <> nil then begin
|
|
||||||
if fileExists(fProject.fileName) then
|
|
||||||
result += fProject.fileName
|
|
||||||
else
|
|
||||||
result += '``';
|
|
||||||
end else result += '``';
|
|
||||||
end;
|
|
||||||
'CPFS', 'CurrentProjectFiles':
|
|
||||||
begin
|
|
||||||
if fProject <> nil then begin
|
|
||||||
for j := 0 to fProject.Sources.Count-1 do
|
|
||||||
begin
|
|
||||||
result += fProject.getAbsoluteSourceName(j);
|
|
||||||
if fProject.Sources.Count > 1 then
|
|
||||||
if j <> fProject.Sources.Count-1 then
|
|
||||||
result += LineEnding;
|
|
||||||
end;
|
|
||||||
if fProject.Sources.Count = 0 then
|
|
||||||
result += '``';
|
|
||||||
end else result += '``';
|
|
||||||
end;
|
|
||||||
'CPN', 'CurrentProjectName':
|
|
||||||
begin
|
|
||||||
if fProject <> nil then begin
|
|
||||||
if fileExists(fProject.fileName) then
|
|
||||||
begin
|
|
||||||
result += extractFileName(fProject.fileName);
|
|
||||||
extLen := length(ExtractFileExt(result));
|
|
||||||
result := result[1..length(result)-extLen];
|
|
||||||
end else result += '``';
|
|
||||||
end else result += '``';
|
|
||||||
end;
|
|
||||||
'CPP', 'CurrentProjectPath':
|
|
||||||
begin
|
|
||||||
if fProject <> nil then begin
|
|
||||||
if fileExists(fProject.fileName) then
|
|
||||||
result += extractFilePath(fProject.fileName)
|
|
||||||
else result += '``';
|
|
||||||
end else result += '``';
|
|
||||||
end;
|
|
||||||
'CPR', 'CurrentProjectRoot':
|
|
||||||
begin
|
|
||||||
if fProject <> nil then begin
|
|
||||||
if directoryExists(fProject.getAbsoluteFilename(fProject.RootFolder)) then
|
|
||||||
result += fProject.getAbsoluteFilename(fProject.RootFolder)
|
|
||||||
else if directoryExists(fProject.RootFolder) then
|
|
||||||
result += fProject.RootFolder;
|
|
||||||
end else result += '``';
|
|
||||||
end;
|
|
||||||
'CFF', 'CurrentFileFile':
|
|
||||||
begin
|
|
||||||
if fDoc <> nil then begin
|
|
||||||
if fileExists(fDoc.fileName) then
|
|
||||||
result += fDoc.fileName
|
|
||||||
else result += '``';
|
|
||||||
end else result += '``';
|
|
||||||
end;
|
|
||||||
'CFP', 'CurrentFilePath':
|
|
||||||
begin
|
|
||||||
if fDoc <> nil then begin
|
|
||||||
if fileExists(fDoc.fileName) then
|
|
||||||
result += extractFilePath(fDoc.fileName)
|
|
||||||
else result += '``'
|
|
||||||
end else result += '``';
|
|
||||||
end;
|
|
||||||
'CI', 'CurrentIdentifier':
|
|
||||||
begin
|
|
||||||
if fDoc <> nil then begin
|
|
||||||
if fDoc.Identifier <> '' then
|
|
||||||
result += fDoc.Identifier
|
|
||||||
else result += '``'
|
|
||||||
end else result += '``';
|
|
||||||
end;
|
|
||||||
'CAF', 'CoeditApplicationFile':
|
|
||||||
result += application.ExeName;
|
|
||||||
'CAP', 'CoeditApplicationPath':
|
|
||||||
result += extractFilePath(Application.ExeName);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
elems.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure PlugDispatchToHost(aPlugin: TCEPlugin; opCode: LongWord; data0: Integer; data1, data2: Pointer); cdecl;
|
procedure PlugDispatchToHost(aPlugin: TCEPlugin; opCode: LongWord; data0: Integer; data1, data2: Pointer); cdecl;
|
||||||
var
|
var
|
||||||
ctxt: NativeUint;
|
ctxt: NativeUint;
|
||||||
|
|
|
@ -90,7 +90,7 @@ type
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ce_interfaces, controls, dialogs, ce_main;
|
ce_interfaces, controls, dialogs, ce_symstring;
|
||||||
|
|
||||||
constructor TCEProject.create(aOwner: TComponent);
|
constructor TCEProject.create(aOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
|
@ -310,7 +310,7 @@ end;
|
||||||
function TCEProject.outputFilename: string;
|
function TCEProject.outputFilename: string;
|
||||||
begin
|
begin
|
||||||
result := currentConfiguration.pathsOptions.outputFilename;
|
result := currentConfiguration.pathsOptions.outputFilename;
|
||||||
result := CEMainForm.expandSymbolicString(result);
|
result := symbolExpander.get(result);
|
||||||
if result <> '' then
|
if result <> '' then
|
||||||
begin
|
begin
|
||||||
if not fileExists(result) then
|
if not fileExists(result) then
|
||||||
|
@ -462,7 +462,7 @@ var
|
||||||
pname: string;
|
pname: string;
|
||||||
i, j: integer;
|
i, j: integer;
|
||||||
begin
|
begin
|
||||||
pname := CEMainForm.expandSymbolicString(processInfo.executable);
|
pname := symbolExpander.get(processInfo.executable);
|
||||||
if (not exeInSysPath(pname)) and (pname <> '') then
|
if (not exeInSysPath(pname)) and (pname <> '') then
|
||||||
exit(false)
|
exit(false)
|
||||||
else if (pname = '') then
|
else if (pname = '') then
|
||||||
|
@ -474,7 +474,7 @@ begin
|
||||||
process.Executable := pname;
|
process.Executable := pname;
|
||||||
j := process.Parameters.Count-1;
|
j := process.Parameters.Count-1;
|
||||||
for i:= 0 to j do
|
for i:= 0 to j do
|
||||||
process.Parameters.AddText(CEMainForm.expandSymbolicString(process.Parameters.Strings[i]));
|
process.Parameters.AddText(symbolExpander.get(process.Parameters.Strings[i]));
|
||||||
for i:= 0 to j do
|
for i:= 0 to j do
|
||||||
process.Parameters.Delete(0);
|
process.Parameters.Delete(0);
|
||||||
if process.CurrentDirectory = '' then
|
if process.CurrentDirectory = '' then
|
||||||
|
@ -567,7 +567,7 @@ begin
|
||||||
i := 1;
|
i := 1;
|
||||||
repeat
|
repeat
|
||||||
prm := ExtractDelimited(i, runArgs, [' ']);
|
prm := ExtractDelimited(i, runArgs, [' ']);
|
||||||
prm := CEMainForm.expandSymbolicString(prm);
|
prm := symbolExpander.get(prm);
|
||||||
if prm <> '' then
|
if prm <> '' then
|
||||||
fRunner.Parameters.AddText(prm);
|
fRunner.Parameters.AddText(prm);
|
||||||
Inc(i);
|
Inc(i);
|
||||||
|
|
|
@ -59,7 +59,7 @@ implementation
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ce_main;
|
ce_main, ce_symstring;
|
||||||
|
|
||||||
{$REGION Standard Comp/Obj------------------------------------------------------}
|
{$REGION Standard Comp/Obj------------------------------------------------------}
|
||||||
constructor TCEProjectInspectWidget.create(aOwner: TComponent);
|
constructor TCEProjectInspectWidget.create(aOwner: TComponent);
|
||||||
|
@ -321,7 +321,7 @@ begin
|
||||||
begin
|
begin
|
||||||
if fold = '' then
|
if fold = '' then
|
||||||
continue;
|
continue;
|
||||||
itm := Tree.Items.AddChild(fImpsNode, shortenPath(CEMainForm.expandSymbolicString(fold)));
|
itm := Tree.Items.AddChild(fImpsNode, shortenPath(symbolExpander.get(fold)));
|
||||||
itm.ImageIndex := 5;
|
itm.ImageIndex := 5;
|
||||||
itm.SelectedIndex := 5;
|
itm.SelectedIndex := 5;
|
||||||
end;
|
end;
|
||||||
|
@ -331,7 +331,7 @@ begin
|
||||||
begin
|
begin
|
||||||
if fold = '' then
|
if fold = '' then
|
||||||
continue;
|
continue;
|
||||||
itm := Tree.Items.AddChild(fInclNode, shortenPath(CEMainForm.expandSymbolicString(fold)));
|
itm := Tree.Items.AddChild(fInclNode, shortenPath(symbolExpander.get(fold)));
|
||||||
itm.ImageIndex := 5;
|
itm.ImageIndex := 5;
|
||||||
itm.SelectedIndex := 5;
|
itm.SelectedIndex := 5;
|
||||||
end;
|
end;
|
||||||
|
@ -344,11 +344,11 @@ begin
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
try
|
try
|
||||||
if listAsteriskPath(src, lst) then for src in lst do begin
|
if listAsteriskPath(src, lst) then for src in lst do begin
|
||||||
itm := Tree.Items.AddChild(fXtraNode, shortenPath(CEMainForm.expandSymbolicString(src)));
|
itm := Tree.Items.AddChild(fXtraNode, shortenPath(symbolExpander.get(src)));
|
||||||
itm.ImageIndex := 2;
|
itm.ImageIndex := 2;
|
||||||
itm.SelectedIndex := 2;
|
itm.SelectedIndex := 2;
|
||||||
end else begin
|
end else begin
|
||||||
itm := Tree.Items.AddChild(fXtraNode, shortenPath(CEMainForm.expandSymbolicString(src)));
|
itm := Tree.Items.AddChild(fXtraNode, shortenPath(symbolExpander.get(src)));
|
||||||
itm.ImageIndex := 2;
|
itm.ImageIndex := 2;
|
||||||
itm.SelectedIndex := 2;
|
itm.SelectedIndex := 2;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -84,7 +84,7 @@ type
|
||||||
implementation
|
implementation
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses ce_main, ce_libman;
|
uses ce_libman, ce_symstring, ce_main;
|
||||||
|
|
||||||
{$REGION Standard Comp/Obj------------------------------------------------------}
|
{$REGION Standard Comp/Obj------------------------------------------------------}
|
||||||
constructor TCEStaticExplorerWidget.create(aOwner: TComponent);
|
constructor TCEStaticExplorerWidget.create(aOwner: TComponent);
|
||||||
|
@ -382,9 +382,9 @@ begin
|
||||||
if srcFname <> itm then fDmdProc.Parameters.Add(itm);
|
if srcFname <> itm then fDmdProc.Parameters.Add(itm);
|
||||||
end;
|
end;
|
||||||
for itm in fProj.currentConfiguration.pathsOptions.Includes do
|
for itm in fProj.currentConfiguration.pathsOptions.Includes do
|
||||||
fDmdProc.Parameters.Add('-I' + CEMainForm.expandSymbolicString(itm));
|
fDmdProc.Parameters.Add('-I' + symbolExpander.get(itm));
|
||||||
for itm in fProj.currentConfiguration.pathsOptions.Imports do
|
for itm in fProj.currentConfiguration.pathsOptions.Imports do
|
||||||
fDmdProc.Parameters.Add('-J' + CEMainForm.expandSymbolicString(itm));
|
fDmdProc.Parameters.Add('-J' + symbolExpander.get(itm));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//adds the libman entries
|
//adds the libman entries
|
||||||
|
|
|
@ -27,7 +27,7 @@ type
|
||||||
procedure updateSymbols;
|
procedure updateSymbols;
|
||||||
public
|
public
|
||||||
constructor create;
|
constructor create;
|
||||||
destructor destroy;
|
destructor destroy; override;
|
||||||
//
|
//
|
||||||
procedure projNew(aProject: TCEProject);
|
procedure projNew(aProject: TCEProject);
|
||||||
procedure projClosing(aProject: TCEProject);
|
procedure projClosing(aProject: TCEProject);
|
||||||
|
@ -59,6 +59,7 @@ end;
|
||||||
destructor TCESymbolExpander.destroy;
|
destructor TCESymbolExpander.destroy;
|
||||||
begin
|
begin
|
||||||
EntitiesConnector.removeObserver(self);
|
EntitiesConnector.removeObserver(self);
|
||||||
|
inherited;
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
@ -66,14 +67,12 @@ end;
|
||||||
procedure TCESymbolExpander.projNew(aProject: TCEProject);
|
procedure TCESymbolExpander.projNew(aProject: TCEProject);
|
||||||
begin
|
begin
|
||||||
fProj := aProject;
|
fProj := aProject;
|
||||||
updateSymbols;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCESymbolExpander.projClosing(aProject: TCEProject);
|
procedure TCESymbolExpander.projClosing(aProject: TCEProject);
|
||||||
begin
|
begin
|
||||||
if fProj <> aProject then exit;
|
if fProj <> aProject then exit;
|
||||||
fProj := nil;
|
fProj := nil;
|
||||||
updateSymbols;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCESymbolExpander.projFocused(aProject: TCEProject);
|
procedure TCESymbolExpander.projFocused(aProject: TCEProject);
|
||||||
|
@ -84,7 +83,6 @@ end;
|
||||||
procedure TCESymbolExpander.projChanged(aProject: TCEProject);
|
procedure TCESymbolExpander.projChanged(aProject: TCEProject);
|
||||||
begin
|
begin
|
||||||
if fProj <> aProject then exit;
|
if fProj <> aProject then exit;
|
||||||
updateSymbols;
|
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
@ -92,26 +90,22 @@ end;
|
||||||
procedure TCESymbolExpander.docNew(aDoc: TCESynMemo);
|
procedure TCESymbolExpander.docNew(aDoc: TCESynMemo);
|
||||||
begin
|
begin
|
||||||
fDoc := aDoc;
|
fDoc := aDoc;
|
||||||
updateSymbols;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCESymbolExpander.docClosing(aDoc: TCESynMemo);
|
procedure TCESymbolExpander.docClosing(aDoc: TCESynMemo);
|
||||||
begin
|
begin
|
||||||
if aDoc <> fDoc then exit;
|
if aDoc <> fDoc then exit;
|
||||||
fDoc := nil;
|
fDoc := nil;
|
||||||
updateSymbols;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCESymbolExpander.docFocused(aDoc: TCESynMemo);
|
procedure TCESymbolExpander.docFocused(aDoc: TCESynMemo);
|
||||||
begin
|
begin
|
||||||
fDoc := aDoc;
|
fDoc := aDoc;
|
||||||
updateSymbols;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCESymbolExpander.docChanged(aDoc: TCESynMemo);
|
procedure TCESymbolExpander.docChanged(aDoc: TCESynMemo);
|
||||||
begin
|
begin
|
||||||
if aDoc <> fDoc then exit;
|
if aDoc <> fDoc then exit;
|
||||||
updateSymbols;
|
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
@ -141,7 +135,9 @@ begin
|
||||||
fSymbols[CFF] := na;
|
fSymbols[CFF] := na;
|
||||||
fSymbols[CFP] := na;
|
fSymbols[CFP] := na;
|
||||||
end;
|
end;
|
||||||
fSymbols[CI] := fDoc.Identifier;
|
if fDoc.Identifier <> '' then
|
||||||
|
fSymbols[CI] := fDoc.Identifier
|
||||||
|
else fSymbols[CI] := na;
|
||||||
end else begin
|
end else begin
|
||||||
fSymbols[CFF] := na;
|
fSymbols[CFF] := na;
|
||||||
fSymbols[CFP] := na;
|
fSymbols[CFP] := na;
|
||||||
|
@ -191,6 +187,7 @@ var
|
||||||
begin
|
begin
|
||||||
result := '';
|
result := '';
|
||||||
if symString = '' then exit;
|
if symString = '' then exit;
|
||||||
|
updateSymbols;
|
||||||
//
|
//
|
||||||
elems := TStringList.Create;
|
elems := TStringList.Create;
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue