mirror of https://gitlab.com/basile.b/dexed.git
fix #136 projects inspector, remove selected source, error if other missing sources
This commit is contained in:
parent
4c6ed49e7d
commit
260323080f
|
|
@ -207,6 +207,8 @@ begin
|
||||||
folds.Add(fold);
|
folds.Add(fold);
|
||||||
for i:= 0 to fProj.sourcesCount-1 do
|
for i:= 0 to fProj.sourcesCount-1 do
|
||||||
begin
|
begin
|
||||||
|
if not (fProj.sourceAbsolute(i).fileExists) then
|
||||||
|
continue;
|
||||||
fold := fProj.sourceAbsolute(i).extractFilePath;
|
fold := fProj.sourceAbsolute(i).extractFilePath;
|
||||||
if folds.IndexOf(fold) = -1 then
|
if folds.IndexOf(fold) = -1 then
|
||||||
folds.Add(fold);
|
folds.Add(fold);
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||||
SynEdit, SynHighlighterDiff, process,
|
SynEdit, SynHighlighterDiff, process,
|
||||||
ce_common, ComCtrls, StdCtrls, ExtCtrls, Buttons;
|
ce_common, StdCtrls, ExtCtrls, Buttons;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCEDiffViewer = class(TForm)
|
TCEDiffViewer = class(TForm)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||||
Menus, ComCtrls, Buttons, LazFileUtils, fphttpclient, StdCtrls, math,
|
Menus, ComCtrls, Buttons, LazFileUtils, fphttpclient, StdCtrls,
|
||||||
fpjson, jsonparser,
|
fpjson, jsonparser,
|
||||||
ce_widget, ce_interfaces, ce_ceproject, ce_dmdwrap, ce_common, ce_dialogs,
|
ce_widget, ce_interfaces, ce_ceproject, ce_dmdwrap, ce_common, ce_dialogs,
|
||||||
ce_sharedres, process, ce_dubproject, ce_observer, ce_libman,
|
ce_sharedres, process, ce_dubproject, ce_observer, ce_libman,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, TASources, TAGraph, TATransformations, TASeries,
|
Classes, SysUtils, FileUtil, TASources, TAGraph, TATransformations, TASeries,
|
||||||
TATools, Forms, Controls, Graphics, Dialogs, ExtCtrls, Menus, ComCtrls,
|
TATools, Forms, Controls, Graphics, Dialogs, ExtCtrls, Menus, ComCtrls,
|
||||||
StdCtrls, TALegend, TADrawUtils, math,
|
StdCtrls, TALegend, math,
|
||||||
ce_widget, ce_common, ce_stringrange, ce_dsgncontrols, ce_ddemangle;
|
ce_widget, ce_common, ce_stringrange, ce_dsgncontrols, ce_ddemangle;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
|
||||||
|
|
@ -448,6 +448,20 @@ begin
|
||||||
if i <> -1 then
|
if i <> -1 then
|
||||||
proj.Sources.Delete(i);
|
proj.Sources.Delete(i);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
fname := '';
|
||||||
|
for i := 0 to proj.sourcesCount-1 do
|
||||||
|
if not proj.sourceAbsolute(i).fileExists then
|
||||||
|
fname += LineEnding + ' "' + proj.sourceAbsolute(i) + '" ';
|
||||||
|
|
||||||
|
if fname.isNotEmpty and (dlgOkCancel('Other source(s) not found: ' + LineEnding
|
||||||
|
+ fname + LineEnding + LineEnding + 'Remove all invalid files ?') = mrOK) then
|
||||||
|
begin
|
||||||
|
for j := proj.sourcesCount-1 downto 0 do
|
||||||
|
if not proj.sourceAbsolute(j).fileExists then
|
||||||
|
proj.Sources.Delete(j);
|
||||||
|
end;
|
||||||
|
|
||||||
proj.endUpdate;
|
proj.endUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ begin
|
||||||
begin
|
begin
|
||||||
sym := true;
|
sym := true;
|
||||||
path := project.sourceAbsolute(i);
|
path := project.sourceAbsolute(i);
|
||||||
if not hasDlangSyntax(path.extractFileExt) then
|
if not hasDlangSyntax(path.extractFileExt) or not path.fileExists then
|
||||||
continue;
|
continue;
|
||||||
clbck.fModStart := false;
|
clbck.fModStart := false;
|
||||||
srcc.LoadFromFile(path);
|
srcc.LoadFromFile(path);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue