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);
|
||||
for i:= 0 to fProj.sourcesCount-1 do
|
||||
begin
|
||||
if not (fProj.sourceAbsolute(i).fileExists) then
|
||||
continue;
|
||||
fold := fProj.sourceAbsolute(i).extractFilePath;
|
||||
if folds.IndexOf(fold) = -1 then
|
||||
folds.Add(fold);
|
||||
|
|
|
@ -7,7 +7,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||
SynEdit, SynHighlighterDiff, process,
|
||||
ce_common, ComCtrls, StdCtrls, ExtCtrls, Buttons;
|
||||
ce_common, StdCtrls, ExtCtrls, Buttons;
|
||||
|
||||
type
|
||||
TCEDiffViewer = class(TForm)
|
||||
|
|
|
@ -6,7 +6,7 @@ interface
|
|||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
Menus, ComCtrls, Buttons, LazFileUtils, fphttpclient, StdCtrls, math,
|
||||
Menus, ComCtrls, Buttons, LazFileUtils, fphttpclient, StdCtrls,
|
||||
fpjson, jsonparser,
|
||||
ce_widget, ce_interfaces, ce_ceproject, ce_dmdwrap, ce_common, ce_dialogs,
|
||||
ce_sharedres, process, ce_dubproject, ce_observer, ce_libman,
|
||||
|
|
|
@ -7,7 +7,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, FileUtil, TASources, TAGraph, TATransformations, TASeries,
|
||||
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;
|
||||
|
||||
type
|
||||
|
|
|
@ -448,6 +448,20 @@ begin
|
|||
if i <> -1 then
|
||||
proj.Sources.Delete(i);
|
||||
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;
|
||||
end;
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ begin
|
|||
begin
|
||||
sym := true;
|
||||
path := project.sourceAbsolute(i);
|
||||
if not hasDlangSyntax(path.extractFileExt) then
|
||||
if not hasDlangSyntax(path.extractFileExt) or not path.fileExists then
|
||||
continue;
|
||||
clbck.fModStart := false;
|
||||
srcc.LoadFromFile(path);
|
||||
|
|
Loading…
Reference in New Issue