This commit is contained in:
Basile Burg 2014-06-18 08:58:24 +02:00
parent 9f2e572f6d
commit b36a4931e3
21 changed files with 391 additions and 191 deletions

View File

@ -126,7 +126,7 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item5> </Item5>
</RequiredPackages> </RequiredPackages>
<Units Count="13"> <Units Count="14">
<Unit0> <Unit0>
<Filename Value="coedit.lpr"/> <Filename Value="coedit.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -216,6 +216,14 @@
<ResourceBaseClass Value="Frame"/> <ResourceBaseClass Value="Frame"/>
<UnitName Value="ce_projconfall"/> <UnitName Value="ce_projconfall"/>
</Unit12> </Unit12>
<Unit13>
<Filename Value="..\src\ce_projinspect.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CEProjectInspectWidget"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ce_projinspect"/>
</Unit13>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@ -6,9 +6,9 @@ uses
{$IFDEF UNIX}{$IFDEF UseCThreads} {$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads, cthreads,
{$ENDIF}{$ENDIF} {$ENDIF}{$ENDIF}
Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, ce_main, ce_widget, Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, ce_widget,
ce_common, ce_messages, ce_editor, ce_project, ce_synmemo, ce_dmdwrap, ce_dmdwrap, ce_common, ce_synmemo, ce_main, ce_messages, ce_editor, ce_projinspect,
ce_projconf, ce_projconfframe, ce_projconfall; ce_projconf;
{$R *.res} {$R *.res}

View File

@ -33,8 +33,8 @@ object TCEProject
documentationOptions.generateDocumentation = True documentationOptions.generateDocumentation = True
documentationOptions.generateJSON = False documentationOptions.generateJSON = False
documentationOptions.DocumentationDirectory = '..\doc' documentationOptions.DocumentationDirectory = '..\doc'
debugingOptions.debug = True debugingOptions.debug = False
debugingOptions.debugIdentifier = '1' debugingOptions.debugIdentifier = '3'
debugingOptions.addDInformations = False debugingOptions.addDInformations = False
debugingOptions.addCInformations = False debugingOptions.addCInformations = False
debugingOptions.generateMapFile = False debugingOptions.generateMapFile = False

View File

@ -18,5 +18,9 @@ void main(string args[])
auto foo = new Foo; auto foo = new Foo;
auto bar = new Bar; auto bar = new Bar;
readln; scope(exit)
{
delete foo;
delete bar;
}
} }

View File

@ -148,16 +148,19 @@ end;
function getModuleName(const aSource: TStrings): string; function getModuleName(const aSource: TStrings): string;
var var
ln: string; ln: string;
pos: NativeInt; pos, lcnt: NativeInt;
id: string; id: string;
tok: boolean; tok: boolean;
begin begin
result := ''; result := '';
tok := false; tok := false;
lcnt := -1;
for ln in aSource do for ln in aSource do
begin begin
pos := 1; pos := 1;
id := ''; id := '';
lcnt += 1;
if lcnt > 100 then exit;
while(true) do while(true) do
begin begin
@ -377,8 +380,8 @@ end;
function TCEProject.getAbsoluteSourceName(const aIndex: integer): string; function TCEProject.getAbsoluteSourceName(const aIndex: integer): string;
begin begin
if aIndex < 0 then exit; if aIndex < 0 then exit('');
if aIndex > fSrcs.Count-1 then exit; if aIndex > fSrcs.Count-1 then exit('');
result := expandFileNameEx(fBasePath, fSrcs.Strings[aIndex]); result := expandFileNameEx(fBasePath, fSrcs.Strings[aIndex]);
end; end;

View File

@ -290,7 +290,7 @@ constructor TSynD2Syn.create(aOwner: TComponent);
begin begin
inherited create(aOwner); inherited create(aOwner);
DefaultFilter:= '.d|.di'; DefaultFilter:= 'D source|*.d|D interface|*.di';
fKeyWords.create; fKeyWords.create;

View File

@ -85,13 +85,13 @@ type
end; end;
(***************************************************************************** (*****************************************************************************
* Describes the target registry size * Describes the target registry size
*) *)
TTargetSystem = (auto, os32bit, os64bit); TTargetSystem = (auto, os32bit, os64bit);
(** (**
* Describes the output kind * Describes the output kind
*) *)
TBinaryKind = (executable, staticlib, sharedlib, obj); TBinaryKind = (executable, staticlib, sharedlib, obj);
(***************************************************************************** (*****************************************************************************
@ -767,9 +767,6 @@ procedure TCompilerConfiguration.subOptsChanged(sender: TObject);
begin begin
Changed(true); Changed(true);
doChanged; doChanged;
{$IFDEF DEBUG}
writeln( #13#10 + getCmdLine);
{$ENDIF}
end; end;
procedure TCompilerConfiguration.doChanged; procedure TCompilerConfiguration.doChanged;

View File

@ -5,10 +5,10 @@ unit ce_editor;
interface interface
uses uses
Classes, SysUtils, FileUtil, ExtendedNotebook, Forms, Controls, Graphics, Classes, SysUtils, eventlog, FileUtil, ExtendedNotebook, Forms, Controls,
SynEditKeyCmds, ComCtrls, SynEditHighlighter, SynEditHighlighterFoldBase, Graphics, SynEditKeyCmds, ComCtrls, SynEditHighlighter, ExtCtrls, Menus,
SynMacroRecorder, SynPluginSyncroEdit, SynEdit, Dialogs, ExtCtrls, ce_widget, SynEditHighlighterFoldBase, SynMacroRecorder, SynPluginSyncroEdit, SynEdit,
ce_d2syn, ce_synmemo, ce_common; SynHighlighterLFM, ce_widget, ce_d2syn, ce_synmemo, ce_common;
type type
{ TCEEditorWidget } { TCEEditorWidget }
@ -99,6 +99,7 @@ begin
fSyncEdit.Editor := curr; fSyncEdit.Editor := curr;
identifierToD2Syn(curr); identifierToD2Syn(curr);
md := getModuleName(curr.Lines); md := getModuleName(curr.Lines);
if md = '' then md := extractFileName(curr.fileName);
pageControl.ActivePage.Caption := md; pageControl.ActivePage.Caption := md;
end; end;

View File

@ -8,7 +8,7 @@ object CEMainForm: TCEMainForm
DragMode = dmAutomatic DragMode = dmAutomatic
Menu = mainMenu Menu = mainMenu
OnDropFiles = FormDropFiles OnDropFiles = FormDropFiles
LCLVersion = '1.2.2.0' LCLVersion = '1.2.4.0'
object mainMenu: TMainMenu object mainMenu: TMainMenu
Images = imgList Images = imgList
object MenuItem1: TMenuItem object MenuItem1: TMenuItem
@ -252,6 +252,42 @@ object CEMainForm: TCEMainForm
end end
object MenuItem50: TMenuItem object MenuItem50: TMenuItem
Action = actFileSaveAll Action = actFileSaveAll
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000001900000033000000330000
0033000000330000003300000033000000330000003300000021BB871F00BB87
1F00BB871F00BB871F00BB871F00BB871F00996E1795BF8816FFBF8816FFBF88
16FFBF8816FFBF8816FFBF8816FFBF8816FFBF8816FFA77819B9BB871F00BB87
1F00BB871F00BB871F00BB871F00BB861E00BF8816FFF6CD8BFFF3C275FFF9FC
FFFF8B8D90FFF9F9F9FFF4F8FCFFF2C174FFF6CD8BFFBF8816FFBB871F00BB87
1F00BB871F00000000180000003300000033BF8816FFF3CC8BFFEBB65CFFF2ED
ECFF7F7978FFF1E9E2FFEEE9E8FFEAB55AFFF3CC8BFFBF8816FFBB871F00BB87
1F00BB871F00986D1795BF8816FFBF8816FFBF8816FFF3CE92FFE6AC4DFFEAD9
C6FFFFFFFFFFFDFEFFFFE8D7C4FFE6AC4CFFF3CE93FFBF8816FF000000190000
003300000033BF8816FFF7CE8EFFF5C780FFBF8816FFF4D29BFFE3A43BFFE3A3
35FFE3A131FFE3A131FFE3A235FFE3A43BFFF4D39BFFBF8816FF996E1795BF88
16FFBF8816FFBF8816FFF4CD8DFFEEBD6AFFBF8816FFF5D5A3FFE8C99DFFEDE4
E1FFEEE4DFFFEEE4DFFFEDE4E1FFE8C99DFFF5D6A5FFBF8816FFBF8816FFF7CE
8EFFF5C780FFBF8816FFF3CF94FFEAB359FFBF8816FFF7DCAFFFEFE7E3FFB1A9
A4FFB3ABA4FFB3ABA4FFB1A9A4FFEFE7E3FFF7DDB0FFBF8816FFBF8816FFF4CD
8EFFEEBD6AFFBF8816FFF4D39CFFE7A944FFBF8816FFF9E4C4FFEFEBE5FFF0EA
E0FFF1EBE0FFF1EBE0FFF0EAE0FFEFEBE5FFFAE5C5FFBF8816FFBF8816FFF4CF
95FFEAB359FFBF8816FFF5D6A5FFEACEA8FFBF8816FFFDE6C1FFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEE9C7FFBF8816FFBF8816FFF5D4
9DFFE7A944FFBF8816FFF7DDB0FFF0EAEAFFE0BC73FFBF8816FFBF8816FFBF88
16FFBF8816FFBF8816FFBF8816FFBF8816FFBF8816FFB9841AA7BF8816FFF6D7
A7FFEACEA9FFBF8816FFF9E4C3FFEFECE8FFF0ECE9FFF1EEECFFF1EEECFFF1EE
EDFFF2F0F1FFFDE9CDFFBF8816FFB9841A00BA861D00BB871E00BF8816FFF8DE
B2FFF0ECEEFFBF8816FFFCE4BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFE9C9FFBF8816FFBB861D00BB871F00BB871F00BF8816FFFBE6
C7FFF0EFEFFFE0BC73FFBF8816FFBF8816FFBF8816FFBF8816FFBF8816FFBF88
16FFBF8816FFBF8816FFB9841A7BBB871E00BB871F00BB871F00BF8816FFFFE9
C8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEDD0FFBF88
16FFBA851B00BA861D00BB871E00BB871F00BB871F00BB871F00B9841AA7BF88
16FFBF8816FFBF8816FFBF8816FFBF8816FFBF8816FFBF8816FFBF8816FFB985
1BA5BB871F00BB871F00BB871F00BB871F00BB871F00BB871F00
}
end end
object MenuItem25: TMenuItem object MenuItem25: TMenuItem
Caption = '-' Caption = '-'
@ -901,6 +937,9 @@ object CEMainForm: TCEMainForm
9FE5AEACA9FFB9B6B5FFABA9A5FFA7A5A2D2A8A6A323FFFFFF00 9FE5AEACA9FFB9B6B5FFABA9A5FFA7A5A2D2A8A6A323FFFFFF00
} }
end end
object MenuItem51: TMenuItem
Action = actProjSource
end
object MenuItem40: TMenuItem object MenuItem40: TMenuItem
Caption = '-' Caption = '-'
end end
@ -1026,9 +1065,81 @@ object CEMainForm: TCEMainForm
end end
object MenuItem48: TMenuItem object MenuItem48: TMenuItem
Action = actProjRun Action = actProjRun
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
001F000000080000003300000033000000040000002400000000000000000000
0000000000000000000000000000000000330000003300000033000000332D73
BAAF1B3D60523F93D4FF3F93D4FF102438413578BAC300000024000000000000
0000000000230000002F00000000B88445FFC89451FFCE934AFF6D8192FF40A9
EAFF429EDDFF52D0F8FF52D0F8FF439EDCFF48AAE2FF3980C8B6000000000000
0023AA7A3EBFB68243ED00000033B58142FFF5C378FFFCC371FFAD7E49FF3B9E
E3FF4ECFFBFF41B0EDFF42B1EDFF50CFFAFF439EDCFF1B3D5F5200000000AA7A
3FBED2A76FFFD7A561FFB88241FFD39F58FFEDB96BFFF7B962FF288DE3FF4CCF
FCFF40B0EDFFC39F7BFF987653CB42B1EEFF52D0F9FF3F92D5FF00000000B984
43E9DDBB8CFFEEC486FFE8B466FFF1CC96FFF7DCB5FFFFDEADFF288CDFFF4CCE
FBFF3FAFEDFFFAB66DFFC7751FCE41B1EFFF52D0F9FF3F92D5FF000000330000
0033B78242FFE4B163FFEBC68EFFEACFA9FFD1A774FFD9A970FFCCBBA4FF399C
E1FF4CCEFBFF3FB0EEFF40B1EFFF4FCFFCFF429EDCFF16324E31B98545FFB782
42FFC8934EFFDFAB5EFFE4C494FFB68245DAB8813F3CBE823B2561809CFF37A8
EFFF399DE3FF4CCFFDFF4AC7F8FF3D9EE1FF45AAE4FF3982CB9FC38F4EFFE2B5
72FFDEB06AFFDBA658FFC59555FF926935300000000000000000AA7333436A83
99FFCD9F5FFF298DE2FF2B8FE1FFB48B5AFF3081D29100000000C5995FFFF1DC
BBFFECD2ACFFD6A152FFC18C49FF70502A620000000C0000000C704F2861C88D
44FFDFA24CFFEACEA6FFF1D7B2FFD79A51FF0000000000000000B98442FFB680
3EFFCEA673FFDBAE6EFFCB954BFFB88344FF6E4F2A616E4F2A61B88344FFCD97
4AFFDCAE6DFFD0A772FFB9813CFFBE843FFF0000000000000000000000000000
002FBA8547FFCE9949FFDAB276FFC9944BFFBE8943FFBE8943FFC9944BFFDAB2
76FFCE9949FFBA8546FF0000002F00000000000000000000000000000000B782
42ECD3AE7CFFE7CBA4FFEAD4B2FFE8D0ADFFCF9D56FFCF9D56FFE8D0ADFFEAD4
B2FFE7CBA4FFD3AE7CFFB78242EC00000000000000000000000000000000B985
44AFCCA26CFFD4B080FFB98343FFCCA470FFC9984EFFC9984EFFCCA470FFB983
43FFD4B080FFCCA26CFFB98544AF000000000000000000000000000000000000
0000B98544AFB98443E900000000B78140FFE9D4B4FFE9D4B4FFB78140FF0000
0000B98443E9B98544AF00000000000000000000000000000000000000000000
0000000000000000000000000000BA8545FFB9843FFFB9843FFFBA8545FF0000
0000000000000000000000000000000000000000000000000000
}
end end
object MenuItem49: TMenuItem object MenuItem49: TMenuItem
Action = actProjRunWithArgs Action = actProjRunWithArgs
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
001F000000080000003300000033000000040000002400000000000000000000
0000000000000000000000000000000000330000003300000033000000332D73
BAAF1B3D60523F93D4FF3F93D4FF102438413578BAC300000024000000000000
0000000000230000002F00000000B88445FFC89451FFCE934AFF6D8192FF40A9
EAFF429EDDFF52D0F8FF52D0F8FF439EDCFF48AAE2FF3980C8B6000000000000
0023AA7A3EBFB68243ED00000033B58142FFF5C378FFFCC371FFAD7E49FF3B9E
E3FF4ECFFBFF41B0EDFF42B1EDFF50CFFAFF439EDCFF1B3D5F5200000000AA7A
3FBED2A76FFFD7A561FFB88241FFD39F58FFEDB96BFFF7B962FF288DE3FF4CCF
FCFF40B0EDFFC39F7BFF987653CB42B1EEFF52D0F9FF3F92D5FF00000000B984
43E9DDBB8CFFEEC486FFE8B466FFF1CC96FFF7DCB5FFFFDEADFF288CDFFF4CCE
FBFF3FAFEDFFFAB66DFFC7751FCE41B1EFFF52D0F9FF3F92D5FF000000330000
0033B78242FFE4B163FFEBC68EFFEACFA9FFD1A774FFD9A970FFCCBBA4FF399C
E1FF4CCEFBFF3FB0EEFF40B1EFFF4FCFFCFF429EDCFF16324E31B98545FFB782
42FFC8934EFFDFAB5EFFE4C494FFB68245DAB8813F3CBE823B2561809CFF37A8
EFFF399DE3FF4CCFFDFF4AC7F8FF3D9EE1FF45AAE4FF3982CB9FC38F4EFFE2B5
72FFDEB06AFFDBA658FFC59555FF926935300000000000000000AA7333436A83
99FFCD9F5FFF298DE2FF2B8FE1FFB48B5AFF3081D29100000000C5995FFFF1DC
BBFFECD2ACFFD6A152FFC18C49FF70502A620000000C0000000C704F2861C88D
44FFDFA24CFFEACEA6FFF1D7B2FFD79A51FF0000000000000000B98442FFB680
3EFFCEA673FFDBAE6EFFCB954BFFB88344FF6E4F2A616E4F2A61B88344FFCD97
4AFFDCAE6DFFD0A772FFB9813CFFBE843FFF0000000000000000000000000000
002FBA8547FFCE9949FFDAB276FFC9944BFFBE8943FFBE8943FFC9944BFFDAB2
76FFCE9949FFBA8546FF0000002F00000000000000000000000000000000B782
42ECD3AE7CFFE7CBA4FFEAD4B2FFE8D0ADFFCF9D56FFCF9D56FFE8D0ADFFEAD4
B2FFE7CBA4FFD3AE7CFFB78242EC00000000000000000000000000000000B985
44AFCCA26CFFD4B080FFB98343FFCCA470FFC9984EFFC9984EFFCCA470FFB983
43FFD4B080FFCCA26CFFB98544AF000000000000000000000000000000000000
0000B98544AFB98443E900000000B78140FFE9D4B4FFE9D4B4FFB78140FF0000
0000B98443E9B98544AF00000000000000000000000000000000000000000000
0000000000000000000000000000BA8545FFB9843FFFB9843FFFBA8545FF0000
0000000000000000000000000000000000000000000000000000
}
end end
end end
object MenuItem8: TMenuItem object MenuItem8: TMenuItem
@ -1236,9 +1347,81 @@ object CEMainForm: TCEMainForm
end end
object MenuItem45: TMenuItem object MenuItem45: TMenuItem
Action = actProjRun Action = actProjRun
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
001F000000080000003300000033000000040000002400000000000000000000
0000000000000000000000000000000000330000003300000033000000332D73
BAAF1B3D60523F93D4FF3F93D4FF102438413578BAC300000024000000000000
0000000000230000002F00000000B88445FFC89451FFCE934AFF6D8192FF40A9
EAFF429EDDFF52D0F8FF52D0F8FF439EDCFF48AAE2FF3980C8B6000000000000
0023AA7A3EBFB68243ED00000033B58142FFF5C378FFFCC371FFAD7E49FF3B9E
E3FF4ECFFBFF41B0EDFF42B1EDFF50CFFAFF439EDCFF1B3D5F5200000000AA7A
3FBED2A76FFFD7A561FFB88241FFD39F58FFEDB96BFFF7B962FF288DE3FF4CCF
FCFF40B0EDFFC39F7BFF987653CB42B1EEFF52D0F9FF3F92D5FF00000000B984
43E9DDBB8CFFEEC486FFE8B466FFF1CC96FFF7DCB5FFFFDEADFF288CDFFF4CCE
FBFF3FAFEDFFFAB66DFFC7751FCE41B1EFFF52D0F9FF3F92D5FF000000330000
0033B78242FFE4B163FFEBC68EFFEACFA9FFD1A774FFD9A970FFCCBBA4FF399C
E1FF4CCEFBFF3FB0EEFF40B1EFFF4FCFFCFF429EDCFF16324E31B98545FFB782
42FFC8934EFFDFAB5EFFE4C494FFB68245DAB8813F3CBE823B2561809CFF37A8
EFFF399DE3FF4CCFFDFF4AC7F8FF3D9EE1FF45AAE4FF3982CB9FC38F4EFFE2B5
72FFDEB06AFFDBA658FFC59555FF926935300000000000000000AA7333436A83
99FFCD9F5FFF298DE2FF2B8FE1FFB48B5AFF3081D29100000000C5995FFFF1DC
BBFFECD2ACFFD6A152FFC18C49FF70502A620000000C0000000C704F2861C88D
44FFDFA24CFFEACEA6FFF1D7B2FFD79A51FF0000000000000000B98442FFB680
3EFFCEA673FFDBAE6EFFCB954BFFB88344FF6E4F2A616E4F2A61B88344FFCD97
4AFFDCAE6DFFD0A772FFB9813CFFBE843FFF0000000000000000000000000000
002FBA8547FFCE9949FFDAB276FFC9944BFFBE8943FFBE8943FFC9944BFFDAB2
76FFCE9949FFBA8546FF0000002F00000000000000000000000000000000B782
42ECD3AE7CFFE7CBA4FFEAD4B2FFE8D0ADFFCF9D56FFCF9D56FFE8D0ADFFEAD4
B2FFE7CBA4FFD3AE7CFFB78242EC00000000000000000000000000000000B985
44AFCCA26CFFD4B080FFB98343FFCCA470FFC9984EFFC9984EFFCCA470FFB983
43FFD4B080FFCCA26CFFB98544AF000000000000000000000000000000000000
0000B98544AFB98443E900000000B78140FFE9D4B4FFE9D4B4FFB78140FF0000
0000B98443E9B98544AF00000000000000000000000000000000000000000000
0000000000000000000000000000BA8545FFB9843FFFB9843FFFBA8545FF0000
0000000000000000000000000000000000000000000000000000
}
end end
object MenuItem46: TMenuItem object MenuItem46: TMenuItem
Action = actProjRunWithArgs Action = actProjRunWithArgs
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
001F000000080000003300000033000000040000002400000000000000000000
0000000000000000000000000000000000330000003300000033000000332D73
BAAF1B3D60523F93D4FF3F93D4FF102438413578BAC300000024000000000000
0000000000230000002F00000000B88445FFC89451FFCE934AFF6D8192FF40A9
EAFF429EDDFF52D0F8FF52D0F8FF439EDCFF48AAE2FF3980C8B6000000000000
0023AA7A3EBFB68243ED00000033B58142FFF5C378FFFCC371FFAD7E49FF3B9E
E3FF4ECFFBFF41B0EDFF42B1EDFF50CFFAFF439EDCFF1B3D5F5200000000AA7A
3FBED2A76FFFD7A561FFB88241FFD39F58FFEDB96BFFF7B962FF288DE3FF4CCF
FCFF40B0EDFFC39F7BFF987653CB42B1EEFF52D0F9FF3F92D5FF00000000B984
43E9DDBB8CFFEEC486FFE8B466FFF1CC96FFF7DCB5FFFFDEADFF288CDFFF4CCE
FBFF3FAFEDFFFAB66DFFC7751FCE41B1EFFF52D0F9FF3F92D5FF000000330000
0033B78242FFE4B163FFEBC68EFFEACFA9FFD1A774FFD9A970FFCCBBA4FF399C
E1FF4CCEFBFF3FB0EEFF40B1EFFF4FCFFCFF429EDCFF16324E31B98545FFB782
42FFC8934EFFDFAB5EFFE4C494FFB68245DAB8813F3CBE823B2561809CFF37A8
EFFF399DE3FF4CCFFDFF4AC7F8FF3D9EE1FF45AAE4FF3982CB9FC38F4EFFE2B5
72FFDEB06AFFDBA658FFC59555FF926935300000000000000000AA7333436A83
99FFCD9F5FFF298DE2FF2B8FE1FFB48B5AFF3081D29100000000C5995FFFF1DC
BBFFECD2ACFFD6A152FFC18C49FF70502A620000000C0000000C704F2861C88D
44FFDFA24CFFEACEA6FFF1D7B2FFD79A51FF0000000000000000B98442FFB680
3EFFCEA673FFDBAE6EFFCB954BFFB88344FF6E4F2A616E4F2A61B88344FFCD97
4AFFDCAE6DFFD0A772FFB9813CFFBE843FFF0000000000000000000000000000
002FBA8547FFCE9949FFDAB276FFC9944BFFBE8943FFBE8943FFC9944BFFDAB2
76FFCE9949FFBA8546FF0000002F00000000000000000000000000000000B782
42ECD3AE7CFFE7CBA4FFEAD4B2FFE8D0ADFFCF9D56FFCF9D56FFE8D0ADFFEAD4
B2FFE7CBA4FFD3AE7CFFB78242EC00000000000000000000000000000000B985
44AFCCA26CFFD4B080FFB98343FFCCA470FFC9984EFFC9984EFFCCA470FFB983
43FFD4B080FFCCA26CFFB98544AF000000000000000000000000000000000000
0000B98544AFB98443E900000000B78140FFE9D4B4FFE9D4B4FFB78140FF0000
0000B98443E9B98544AF00000000000000000000000000000000000000000000
0000000000000000000000000000BA8545FFB9843FFFB9843FFFBA8545FF0000
0000000000000000000000000000000000000000000000000000
}
end end
end end
object mnuItemWin: TMenuItem object mnuItemWin: TMenuItem
@ -1303,30 +1486,35 @@ object CEMainForm: TCEMainForm
Caption = 'Save file' Caption = 'Save file'
ImageIndex = 3 ImageIndex = 3
OnExecute = actFileSaveExecute OnExecute = actFileSaveExecute
ShortCut = 16467
end end
object actFileSaveAs: TAction object actFileSaveAs: TAction
Category = 'File' Category = 'File'
Caption = 'Save file as...' Caption = 'Save file as...'
ImageIndex = 2 ImageIndex = 2
OnExecute = actFileSaveAsExecute OnExecute = actFileSaveAsExecute
ShortCut = 49235
end end
object actFileOpen: TAction object actFileOpen: TAction
Category = 'File' Category = 'File'
Caption = 'Open file...' Caption = 'Open file...'
ImageIndex = 9 ImageIndex = 9
OnExecute = actFileOpenExecute OnExecute = actFileOpenExecute
ShortCut = 16463
end end
object actFileNew: TAction object actFileNew: TAction
Category = 'File' Category = 'File'
Caption = 'new empty file' Caption = 'new empty file'
ImageIndex = 8 ImageIndex = 8
OnExecute = actFileNewExecute OnExecute = actFileNewExecute
ShortCut = 16462
end end
object actFileNewRun: TAction object actFileNewRun: TAction
Category = 'File' Category = 'File'
Caption = 'New runnable module' Caption = 'New runnable module'
ImageIndex = 22 ImageIndex = 22
OnExecute = actFileNewRunExecute OnExecute = actFileNewRunExecute
ShortCut = 49230
end end
object actFileAddToProj: TAction object actFileAddToProj: TAction
Category = 'File' Category = 'File'
@ -1339,6 +1527,7 @@ object CEMainForm: TCEMainForm
Caption = 'Compile and run file' Caption = 'Compile and run file'
ImageIndex = 22 ImageIndex = 22
OnExecute = actFileCompAndRunExecute OnExecute = actFileCompAndRunExecute
ShortCut = 16503
end end
object ActFileCompAndRunWithArgs: TAction object ActFileCompAndRunWithArgs: TAction
Category = 'File' Category = 'File'
@ -1357,6 +1546,7 @@ object CEMainForm: TCEMainForm
Caption = 'Close file' Caption = 'Close file'
ImageIndex = 27 ImageIndex = 27
OnExecute = actFileCloseExecute OnExecute = actFileCloseExecute
ShortCut = 16471
end end
object actProjSave: TAction object actProjSave: TAction
Category = 'Project' Category = 'Project'
@ -1394,17 +1584,25 @@ object CEMainForm: TCEMainForm
ImageIndex = 24 ImageIndex = 24
OnExecute = actProjOptsExecute OnExecute = actProjOptsExecute
end end
object actProjSource: TAction
Category = 'Project'
Caption = 'View Project source'
ImageIndex = 12
OnExecute = actProjSourceExecute
end
object actProjCompile: TAction object actProjCompile: TAction
Category = 'Project' Category = 'Project'
Caption = 'Compile project' Caption = 'Compile project'
ImageIndex = 21 ImageIndex = 21
OnExecute = actProjCompileExecute OnExecute = actProjCompileExecute
ShortCut = 16504
end end
object actProjCompileAndRun: TAction object actProjCompileAndRun: TAction
Category = 'Project' Category = 'Project'
Caption = 'Compile and run project' Caption = 'Compile and run project'
ImageIndex = 21 ImageIndex = 21
OnExecute = actProjCompileAndRunExecute OnExecute = actProjCompileAndRunExecute
ShortCut = 24696
end end
object actProjCompAndRunWithArgs: TAction object actProjCompAndRunWithArgs: TAction
Category = 'Project' Category = 'Project'
@ -1417,6 +1615,7 @@ object CEMainForm: TCEMainForm
Caption = 'Run project' Caption = 'Run project'
ImageIndex = 21 ImageIndex = 21
OnExecute = actProjRunExecute OnExecute = actProjRunExecute
ShortCut = 120
end end
object actProjRunWithArgs: TAction object actProjRunWithArgs: TAction
Category = 'Project' Category = 'Project'
@ -2332,4 +2531,20 @@ object CEMainForm: TCEMainForm
HintShortPause = 2 HintShortPause = 2
left = 96 left = 96
end end
object LfmSyn: TSynLFMSyn
DefaultFilter = 'Fichiers fiches Lazarus (*.lfm)|*.lfm'
Enabled = False
CommentAttri.Foreground = clGreen
CommentAttri.FrameEdges = sfeAround
IdentifierAttri.Foreground = clBlack
IdentifierAttri.FrameEdges = sfeAround
KeyAttri.Foreground = clNavy
KeyAttri.FrameEdges = sfeAround
NumberAttri.Foreground = clPurple
NumberAttri.FrameEdges = sfeAround
SpaceAttri.FrameEdges = sfeAround
StringAttri.Foreground = clBlue
StringAttri.FrameEdges = sfeAround
left = 128
end
end end

View File

@ -5,9 +5,9 @@ unit ce_main;
interface interface
uses uses
Classes, SysUtils, FileUtil, SynEditKeyCmds, Forms, Controls, Graphics, Classes, SysUtils, FileUtil, SynEditKeyCmds, SynHighlighterLFM, Forms,
Dialogs, Menus, ActnList, ce_common, ce_widget, ce_messages, ce_editor, Controls, Graphics, Dialogs, Menus, ActnList, process, ce_common, ce_dmdwrap,
ce_project, ce_synmemo, ce_projconf, process, ce_dmdwrap; ce_synmemo, ce_widget, ce_messages, ce_editor, ce_projinspect, ce_projconf;
type type
@ -23,6 +23,7 @@ type
actFileSaveAs: TAction; actFileSaveAs: TAction;
actFileSave: TAction; actFileSave: TAction;
actFileCompAndRunWithArgs: TAction; actFileCompAndRunWithArgs: TAction;
actProjSource: TAction;
actProjRun: TAction; actProjRun: TAction;
actProjRunWithArgs: TAction; actProjRunWithArgs: TAction;
actProjCompile: TAction; actProjCompile: TAction;
@ -89,6 +90,7 @@ type
MenuItem48: TMenuItem; MenuItem48: TMenuItem;
MenuItem49: TMenuItem; MenuItem49: TMenuItem;
MenuItem50: TMenuItem; MenuItem50: TMenuItem;
MenuItem51: TMenuItem;
mnuItemWin: TMenuItem; mnuItemWin: TMenuItem;
MenuItem4: TMenuItem; MenuItem4: TMenuItem;
MenuItem5: TMenuItem; MenuItem5: TMenuItem;
@ -96,6 +98,7 @@ type
MenuItem7: TMenuItem; MenuItem7: TMenuItem;
MenuItem8: TMenuItem; MenuItem8: TMenuItem;
MenuItem9: TMenuItem; MenuItem9: TMenuItem;
LfmSyn: TSynLFMSyn;
procedure actFileAddToProjExecute(Sender: TObject); procedure actFileAddToProjExecute(Sender: TObject);
procedure actFileCloseExecute(Sender: TObject); procedure actFileCloseExecute(Sender: TObject);
procedure actFileCompAndRunExecute(Sender: TObject); procedure actFileCompAndRunExecute(Sender: TObject);
@ -125,13 +128,14 @@ type
procedure actProjSaveAsExecute(Sender: TObject); procedure actProjSaveAsExecute(Sender: TObject);
procedure actProjSaveExecute(Sender: TObject); procedure actProjSaveExecute(Sender: TObject);
procedure actEdUndoExecute(Sender: TObject); procedure actEdUndoExecute(Sender: TObject);
procedure actProjSourceExecute(Sender: TObject);
procedure FormDropFiles(Sender: TObject; const FileNames: array of String); procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
private private
fProject: TCEProject; fProject: TCEProject;
fWidgList: TCEWidgetList; fWidgList: TCEWidgetList;
fMesgWidg: TCEMessagesWidget; fMesgWidg: TCEMessagesWidget;
fEditWidg: TCEEditorWidget; fEditWidg: TCEEditorWidget;
fProjWidg: TCEProjectWidget; fProjWidg: TCEProjectInspectWidget;
fPrjCfWidg: TCEProjectConfigurationWidget; fPrjCfWidg: TCEProjectConfigurationWidget;
// widget interfaces subroutines // widget interfaces subroutines
@ -151,6 +155,7 @@ type
procedure saveFileAs(const edIndex: NativeInt; const aFilename: string); procedure saveFileAs(const edIndex: NativeInt; const aFilename: string);
// project sub routines // project sub routines
procedure saveProjSource(const aEditor: TCESynMemo);
procedure projChange(sender: TObject); procedure projChange(sender: TObject);
procedure newProj; procedure newProj;
procedure saveProj; procedure saveProj;
@ -168,7 +173,7 @@ type
property WidgetList: TCEWidgetList read fWidgList; property WidgetList: TCEWidgetList read fWidgList;
property MessageWidget: TCEMessagesWidget read fMesgWidg; property MessageWidget: TCEMessagesWidget read fMesgWidg;
property EditWidget: TCEEditorWidget read fEditWidg; property EditWidget: TCEEditorWidget read fEditWidg;
property ProjectWidget: TCEProjectWidget read fProjWidg; property ProjectWidget: TCEProjectInspectWidget read fProjWidg;
end; end;
var var
@ -194,7 +199,7 @@ begin
fWidgList := TCEWidgetList.Create; fWidgList := TCEWidgetList.Create;
fMesgWidg := TCEMessagesWidget.create(nil); fMesgWidg := TCEMessagesWidget.create(nil);
fEditWidg := TCEEditorWidget.create(nil); fEditWidg := TCEEditorWidget.create(nil);
fProjWidg := TCEProjectWidget.create(nil); fProjWidg := TCEProjectInspectWidget.create(nil);
fPrjCfWidg:= TCEProjectConfigurationWidget.create(nil); fPrjCfWidg:= TCEProjectConfigurationWidget.create(nil);
fWidgList.addWidget(@fMesgWidg); fWidgList.addWidget(@fMesgWidg);
@ -219,7 +224,6 @@ begin
end; end;
newProj; newProj;
end; end;
destructor TCEMainForm.destroy; destructor TCEMainForm.destroy;
@ -288,6 +292,7 @@ begin
actProjCompAndRunWithArgs.Enabled := hasProj; actProjCompAndRunWithArgs.Enabled := hasProj;
actProjRun.Enabled := hasProj; actProjRun.Enabled := hasProj;
actProjRunWithArgs.Enabled := hasProj; actProjRunWithArgs.Enabled := hasProj;
actProjSource.Enabled := hasProj;
actFileAddToProj.Enabled := hasEd and hasProj; actFileAddToProj.Enabled := hasEd and hasProj;
@ -376,6 +381,12 @@ begin
if fEditWidg = nil then exit; if fEditWidg = nil then exit;
if edIndex >= fEditWidg.editorCount then exit; if edIndex >= fEditWidg.editorCount then exit;
// //
if fEditWidg.editor[edIndex].Highlighter = LfmSyn then
begin
saveProjSource(fEditWidg.editor[edIndex]);
exit;
end;
//
str := fEditWidg.editor[edIndex].fileName; str := fEditWidg.editor[edIndex].fileName;
if str = '' then exit; if str = '' then exit;
try try
@ -405,6 +416,7 @@ begin
// //
with TOpenDialog.Create(nil) do with TOpenDialog.Create(nil) do
try try
filter := 'D source|*.d|D interface|*.di|all files|*.*';
if execute then if execute then
begin begin
openFile(filename); openFile(filename);
@ -469,6 +481,8 @@ var
begin begin
if fEditWidg = nil then exit; if fEditWidg = nil then exit;
if fEditWidg.editorIndex < 0 then exit; if fEditWidg.editorIndex < 0 then exit;
if fEditWidg.editor[fEditWidg.editorIndex].Highlighter = LfmSyn
then exit;
// //
str := fEditWidg.editor[fEditWidg.editorIndex].fileName; str := fEditWidg.editor[fEditWidg.editorIndex].fileName;
fProject.addSource(str); fProject.addSource(str);
@ -493,6 +507,7 @@ begin
for fname in FileNames do for fname in FileNames do
openFile(fname); openFile(fname);
end; end;
{$ENDREGION} {$ENDREGION}
{$REGION edit ******************************************************************} {$REGION edit ******************************************************************}
@ -804,8 +819,12 @@ end;
{$REGION view ******************************************************************} {$REGION view ******************************************************************}
procedure TCEMainForm.widgetShowFromAction(sender: TObject); procedure TCEMainForm.widgetShowFromAction(sender: TObject);
var
widg: TCEWidget;
begin begin
TCEWidget( TComponent(sender).tag ).Show; widg := TCEWidget( TComponent(sender).tag );
if widg = nil then exit;
if widg.Visible then widg.Hide else widg.Show;
end; end;
{$ENDREGION} {$ENDREGION}
@ -819,6 +838,16 @@ begin
widg.projChange(fProject); widg.projChange(fProject);
end; end;
procedure TCEMainForm.saveProjSource(const aEditor: TCESynMemo);
begin
if fProject = nil then exit;
if fProject.fileName <> aEditor.fileName then exit;
//
aEditor.modified := false;
aEditor.Lines.SaveToFile(fProject.fileName);
self.openProj(fProject.fileName);
end;
procedure TCEMainForm.closeProj; procedure TCEMainForm.closeProj;
var var
widg: TCEWidget; widg: TCEWidget;
@ -907,5 +936,14 @@ procedure TCEMainForm.actProjOptsExecute(Sender: TObject);
begin begin
fPrjCfWidg.Show; fPrjCfWidg.Show;
end; end;
procedure TCEMainForm.actProjSourceExecute(Sender: TObject);
begin
if fProject = nil then exit;
if not fileExists(fProject.fileName) then exit;
//
openFile(fProject.fileName);
EditWidget.currentEditor.Highlighter := LfmSyn;
end;
{$ENDREGION} {$ENDREGION}
end. end.

View File

@ -170,6 +170,22 @@ function semanticMsgAna(const aMessg: string): TMessageKind;
var var
pos: Nativeint; pos: Nativeint;
idt: string; idt: string;
function checkIdent: TMessageKind;
begin
case idt of
'ERROR', 'error', 'Error', 'Invalid', 'invalid',
'illegal', 'Illegal', 'fatal', 'Fatal', 'Critical', 'critical':
exit(msgkError);
'Warning', 'warning':
exit(msgkWarn);
'Hint', 'hint', 'Tip', 'tip':
exit(msgkHint);
'Information', 'information':
exit(msgkInfo);
else
exit(msgkUnknown);
end;
end;
begin begin
idt := ''; idt := '';
pos := 1; pos := 1;
@ -180,27 +196,20 @@ begin
if aMessg[pos] in [#0..#32] then if aMessg[pos] in [#0..#32] then
begin begin
Inc(pos); Inc(pos);
result := checkIdent;
if result <> msgkUnknown then exit;
idt := ''; idt := '';
continue; continue;
end; end;
if not (aMessg[pos] in ['a'..'z', 'A'..'Z']) then if not (aMessg[pos] in ['a'..'z', 'A'..'Z']) then
begin begin
Inc(pos); Inc(pos);
result := checkIdent;
if result <> msgkUnknown then exit;
idt := ''; idt := '';
continue; continue;
end; end;
idt += aMessg[pos]; idt += aMessg[pos];
case idt of
'ERROR', 'error', 'Error', 'Invalid', 'invalid',
'illegal', 'Illegal', 'fatal', 'Fatal', 'Critical', 'critical':
exit(msgkError);
'Warning', 'warning':
exit(msgkWarn);
'Hint', 'hint', 'Tip', 'tip':
exit(msgkHint);
'Information', 'information':
exit(msgkInfo);
end;
Inc(pos); Inc(pos);
end; end;
end; end;

View File

@ -1,26 +1,26 @@
inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
Left = 1098 Left = 1098
Height = 278 Height = 278
Width = 448 Width = 455
BorderIcons = [biSystemMenu, biMinimize, biMaximize] BorderIcons = [biSystemMenu, biMinimize, biMaximize]
Caption = 'Project configuration' Caption = 'Project configuration'
ClientHeight = 278 ClientHeight = 278
ClientWidth = 448 ClientWidth = 455
inherited Back: TPanel inherited Back: TPanel
Height = 278 Height = 278
Width = 448 Width = 455
ClientHeight = 278 ClientHeight = 278
ClientWidth = 448 ClientWidth = 455
inherited Content: TPanel inherited Content: TPanel
Height = 252 Height = 252
Width = 448 Width = 455
ClientHeight = 252 ClientHeight = 252
ClientWidth = 448 ClientWidth = 455
object Tree: TTreeView[0] object Tree: TTreeView[0]
Left = 5 Left = 5
Height = 216 Height = 216
Top = 31 Top = 31
Width = 190 Width = 150
Align = alLeft Align = alLeft
AutoExpand = True AutoExpand = True
BorderSpacing.Left = 4 BorderSpacing.Left = 4
@ -48,46 +48,22 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
FF0000000000000000000E000000416C6C2063617465676F72696573 FF0000000000000000000E000000416C6C2063617465676F72696573
} }
end end
inline frameEditAll: TCEProjConfAll[1] object Panel1: TPanel[1]
Left = 202
Height = 220
Top = 29
Width = 243
Align = alClient
BorderSpacing.Around = 2
ClientHeight = 220
ClientWidth = 243
TabOrder = 1
DesignLeft = 1406
DesignTop = 572
inherited Grid: TTIPropertyGrid
Left = 2
Height = 216
Top = 2
Width = 239
BackgroundColor = clDefault
BorderSpacing.Around = 2
DefaultItemHeight = 22
PreferredSplitterX = 150
SplitterX = 150
end
end
object Panel1: TPanel[2]
Left = 3 Left = 3
Height = 24 Height = 24
Top = 3 Top = 3
Width = 442 Width = 449
Align = alTop Align = alTop
BorderSpacing.Around = 2 BorderSpacing.Around = 2
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 24 ClientHeight = 24
ClientWidth = 442 ClientWidth = 449
TabOrder = 2 TabOrder = 1
object selConf: TComboBox object selConf: TComboBox
Left = 0 Left = 0
Height = 23 Height = 23
Top = 1 Top = 1
Width = 351 Width = 358
Align = alClient Align = alClient
BorderSpacing.Top = 1 BorderSpacing.Top = 1
BorderSpacing.Right = 1 BorderSpacing.Right = 1
@ -97,7 +73,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
TabOrder = 0 TabOrder = 0
end end
object btnAddConf: TSpeedButton object btnAddConf: TSpeedButton
Left = 352 Left = 359
Height = 24 Height = 24
Top = 0 Top = 0
Width = 30 Width = 30
@ -142,7 +118,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
ShowCaption = False ShowCaption = False
end end
object btnDelConf: TSpeedButton object btnDelConf: TSpeedButton
Left = 382 Left = 389
Height = 24 Height = 24
Top = 0 Top = 0
Width = 30 Width = 30
@ -187,7 +163,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
ShowCaption = False ShowCaption = False
end end
object btnCloneConf: TSpeedButton object btnCloneConf: TSpeedButton
Left = 412 Left = 419
Height = 24 Height = 24
Top = 0 Top = 0
Width = 30 Width = 30
@ -232,15 +208,33 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
ShowCaption = False ShowCaption = False
end end
end end
object Splitter1: TSplitter[3] object Splitter1: TSplitter[2]
Left = 195 Left = 155
Height = 222 Height = 222
Top = 29 Top = 29
Width = 5 Width = 5
end end
object Grid: TTIPropertyGrid[3]
Left = 160
Height = 216
Top = 31
Width = 290
Align = alClient
BorderSpacing.Top = 4
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
DefaultValueFont.Color = clWindowText
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Indent = 16
NameFont.Color = clWindowText
OnEditorFilter = GridEditorFilter
PreferredSplitterX = 145
SplitterX = 145
ValueFont.Color = clMaroon
end
end end
inherited Header: TPanel inherited Header: TPanel
Width = 448 Width = 455
end end
end end
object imgList: TImageList[2] object imgList: TImageList[2]

View File

@ -5,9 +5,9 @@ unit ce_projconf;
interface interface
uses uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, Classes, SysUtils, FileUtil, RTTIGrids, Forms, Controls, Graphics, Dialogs,
ComCtrls, StdCtrls, Menus, Buttons, ce_widget, ce_common, ce_projconfall, ExtCtrls, ComCtrls, StdCtrls, Menus, Buttons, ce_widget, ce_common,
ce_dmdwrap; ce_projconfall, ce_dmdwrap, PropEdits, ObjectInspector;
type type
@ -15,16 +15,18 @@ type
TCEProjectConfigurationWidget = class(TCEWidget) TCEProjectConfigurationWidget = class(TCEWidget)
imgList: TImageList; imgList: TImageList;
selConf: TComboBox; selConf: TComboBox;
frameEditAll: TCEProjConfAll;
Panel1: TPanel; Panel1: TPanel;
btnAddConf: TSpeedButton; btnAddConf: TSpeedButton;
btnDelConf: TSpeedButton; btnDelConf: TSpeedButton;
btnCloneConf: TSpeedButton; btnCloneConf: TSpeedButton;
Splitter1: TSplitter; Splitter1: TSplitter;
Grid: TTIPropertyGrid;
Tree: TTreeView; Tree: TTreeView;
procedure btnAddConfClick(Sender: TObject); procedure btnAddConfClick(Sender: TObject);
procedure btnDelConfClick(Sender: TObject); procedure btnDelConfClick(Sender: TObject);
procedure btnCloneCurrClick(Sender: TObject); procedure btnCloneCurrClick(Sender: TObject);
procedure GridEditorFilter(Sender: TObject; aEditor: TPropertyEditor;
var aShow: boolean);
procedure selConfChange(Sender: TObject); procedure selConfChange(Sender: TObject);
procedure TreeChange(Sender: TObject; Node: TTreeNode); procedure TreeChange(Sender: TObject; Node: TTreeNode);
private private
@ -65,8 +67,8 @@ end;
procedure TCEProjectConfigurationWidget.projClose(const aProject: TCEProject); procedure TCEProjectConfigurationWidget.projClose(const aProject: TCEProject);
begin begin
frameEditAll.Grid.TIObject := nil; Grid.TIObject := nil;
frameEditAll.Grid.ItemIndex :=-1; Grid.ItemIndex :=-1;
fProj := nil; fProj := nil;
end; end;
@ -84,7 +86,13 @@ end;
procedure TCEProjectConfigurationWidget.TreeChange(Sender: TObject; procedure TCEProjectConfigurationWidget.TreeChange(Sender: TObject;
Node: TTreeNode); Node: TTreeNode);
begin begin
frameEditAll.Grid.TIObject := getGridTarget; Grid.TIObject := getGridTarget;
end;
procedure TCEProjectConfigurationWidget.GridEditorFilter(Sender: TObject;
aEditor: TPropertyEditor; var aShow: boolean);
begin
if aEditor.ClassType = TCollectionPropertyEditor then aShow := false;
end; end;
procedure TCEProjectConfigurationWidget.btnAddConfClick(Sender: TObject); procedure TCEProjectConfigurationWidget.btnAddConfClick(Sender: TObject);
@ -108,9 +116,9 @@ begin
if fProj.OptionsCollection.Count = 1 then exit; if fProj.OptionsCollection.Count = 1 then exit;
// //
beginManualWidgetUpdate; beginManualWidgetUpdate;
frameEditAll.Grid.TIObject := nil; Grid.TIObject := nil;
frameEditAll.Grid.Clear; Grid.Clear;
frameEditAll.Invalidate; Invalidate;
fProj.OptionsCollection.Delete(selConf.ItemIndex); fProj.OptionsCollection.Delete(selConf.ItemIndex);
fProj.ConfigurationIndex := 0; fProj.ConfigurationIndex := 0;
endManualWidgetUpdate; endManualWidgetUpdate;
@ -138,6 +146,7 @@ begin
if fProj = nil then exit(nil); if fProj = nil then exit(nil);
if fProj.ConfigurationIndex = -1 then exit(nil); if fProj.ConfigurationIndex = -1 then exit(nil);
if Tree.Selected = nil then exit(nil); if Tree.Selected = nil then exit(nil);
// Warning: TTreeNode.StateIndex is usually made for the images...it's not a tag
case Tree.Selected.StateIndex of case Tree.Selected.StateIndex of
1: exit( fProj ); 1: exit( fProj );
2: exit( fProj.currentConfiguration.messagesOptions ); 2: exit( fProj.currentConfiguration.messagesOptions );
@ -161,7 +170,7 @@ begin
selConf.Items.Add(fProj.configuration[i].name); selConf.Items.Add(fProj.configuration[i].name);
selConf.ItemIndex := fProj.ConfigurationIndex; selConf.ItemIndex := fProj.ConfigurationIndex;
frameEditAll.Grid.TIObject := getGridTarget; Grid.TIObject := getGridTarget;
end; end;
end. end.

View File

@ -1,20 +0,0 @@
inherited CEProjConfAll: TCEProjConfAll
Height = 428
Width = 297
ClientHeight = 428
ClientWidth = 297
DesignLeft = 1271
DesignTop = 500
object Grid: TTIPropertyGrid[0]
Left = 0
Height = 428
Top = 0
Width = 297
Align = alClient
DefaultValueFont.Color = clWindowText
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Indent = 16
NameFont.Color = clWindowText
ValueFont.Color = clMaroon
end
end

View File

@ -1,28 +0,0 @@
unit ce_projconfall;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, RTTIGrids, Forms, Controls, Graphics, Dialogs,
ce_projconfframe;
type
{ TCEProjConfAll }
TCEProjConfAll = class(TCEProjConfFrame)
Grid: TTIPropertyGrid;
private
{ private declarations }
public
{ public declarations }
end;
implementation
{$R *.lfm}
end.

View File

@ -1,9 +0,0 @@
object CEProjConfFrame: TCEProjConfFrame
Left = 0
Height = 240
Top = 0
Width = 320
TabOrder = 0
DesignLeft = 677
DesignTop = 497
end

View File

@ -1,20 +0,0 @@
unit ce_projconfframe;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, ce_common;
type
TCEProjConfFrame = class(TFrame)
private
protected
end;
implementation
{$R *.lfm}
end.

View File

@ -1,4 +1,4 @@
inherited CEProjectWidget: TCEProjectWidget inherited CEProjectInspectWidget: TCEProjectInspectWidget
Left = 1670 Left = 1670
Height = 405 Height = 405
Top = 89 Top = 89

View File

@ -1,4 +1,4 @@
unit ce_project; unit ce_projinspect;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@ -9,8 +9,8 @@ uses
Dialogs, ExtCtrls, ComCtrls, Menus, Buttons, ce_common, ce_widget; Dialogs, ExtCtrls, ComCtrls, Menus, Buttons, ce_common, ce_widget;
type type
{ TCEProjectWidget } { TCEProjectInspectWidget }
TCEProjectWidget = class(TCEWidget) TCEProjectInspectWidget = class(TCEWidget)
imgList: TImageList; imgList: TImageList;
Panel1: TPanel; Panel1: TPanel;
btnAddFile: TSpeedButton; btnAddFile: TSpeedButton;
@ -42,7 +42,7 @@ implementation
uses uses
ce_main; ce_main;
constructor TCEProjectWidget.create(aOwner: TComponent); constructor TCEProjectInspectWidget.create(aOwner: TComponent);
begin begin
inherited; inherited;
fID := 'ID_PROJ'; fID := 'ID_PROJ';
@ -51,25 +51,25 @@ begin
fConfNode := Tree.Items[1]; fConfNode := Tree.Items[1];
end; end;
procedure TCEProjectWidget.projNew(const aProject: TCEProject); procedure TCEProjectInspectWidget.projNew(const aProject: TCEProject);
begin begin
fProject := aProject; fProject := aProject;
manualWidgetUpdate; manualWidgetUpdate;
end; end;
procedure TCEProjectWidget.projChange(const aProject: TCEProject); procedure TCEProjectInspectWidget.projChange(const aProject: TCEProject);
begin begin
fProject := aProject; fProject := aProject;
manualWidgetUpdate; manualWidgetUpdate;
end; end;
procedure TCEProjectWidget.projClose(const aProject: TCEProject); procedure TCEProjectInspectWidget.projClose(const aProject: TCEProject);
begin begin
fProject := nil; fProject := nil;
manualWidgetUpdate; manualWidgetUpdate;
end; end;
procedure TCEProjectWidget.TreeDblClick(sender: TObject); procedure TCEProjectInspectWidget.TreeDblClick(sender: TObject);
var var
fname: string; fname: string;
i: NativeInt; i: NativeInt;
@ -96,7 +96,7 @@ begin
end; end;
end; end;
procedure TCEProjectWidget.btnAddFileClick(Sender: TObject); procedure TCEProjectInspectWidget.btnAddFileClick(Sender: TObject);
begin begin
if fProject = nil then exit; if fProject = nil then exit;
// //
@ -110,7 +110,7 @@ begin
end; end;
end; end;
procedure TCEProjectWidget.btnAddFoldClick(Sender: TObject); procedure TCEProjectInspectWidget.btnAddFoldClick(Sender: TObject);
var var
dir, ext, fname: string; dir, ext, fname: string;
sr: TSearchRec; sr: TSearchRec;
@ -143,7 +143,7 @@ begin
end; end;
end; end;
procedure TCEProjectWidget.btnRemFileClick(Sender: TObject); procedure TCEProjectInspectWidget.btnRemFileClick(Sender: TObject);
var var
fname: string; fname: string;
i: NativeInt; i: NativeInt;
@ -160,7 +160,7 @@ begin
end end
end; end;
procedure TCEProjectWidget.manualWidgetUpdate; procedure TCEProjectInspectWidget.manualWidgetUpdate;
var var
src, conf: string; src, conf: string;
itm: TTreeNode; itm: TTreeNode;

View File

@ -7,7 +7,7 @@ object CEWidget: TCEWidget
Caption = 'CEWidget' Caption = 'CEWidget'
ClientHeight = 121 ClientHeight = 121
ClientWidth = 320 ClientWidth = 320
LCLVersion = '1.2.2.0' LCLVersion = '1.2.4.0'
object Back: TPanel object Back: TPanel
Left = 0 Left = 0
Height = 121 Height = 121

View File

@ -6,7 +6,7 @@ interface
uses uses
Classes, SysUtils, FileUtil, Forms, Controls, ExtCtrls, Classes, SysUtils, FileUtil, Forms, Controls, ExtCtrls,
ce_common, ActnList, Menus, syncobjs; ActnList, Menus, syncobjs, ce_common;
type type
@ -111,7 +111,6 @@ begin
begin begin
writeln('widget update count > 0'); writeln('widget update count > 0');
exit; exit;
end; end;
fManuUpdating := true; fManuUpdating := true;