mirror of https://gitlab.com/basile.b/dexed.git
- no license to MIT license
- protection for empty project compile/run - widget close bugfix
This commit is contained in:
parent
e41d7a4e72
commit
ff1e518e5a
|
@ -0,0 +1,21 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014 Basile Burg.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
|
@ -34,6 +34,7 @@
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
||||||
<IncludeAssertionCode Value="True"/>
|
<IncludeAssertionCode Value="True"/>
|
||||||
|
<CPPInline Value="False"/>
|
||||||
</SyntaxOptions>
|
</SyntaxOptions>
|
||||||
</Parsing>
|
</Parsing>
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
|
@ -46,7 +47,6 @@
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<DebugInfoType Value="dsDwarf2Set"/>
|
|
||||||
<UseHeaptrc Value="True"/>
|
<UseHeaptrc Value="True"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
</Linking>
|
</Linking>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<OtherUnitFiles Value="..\src"/>
|
<OtherUnitFiles Value="..\src;$(LazarusDir)\components\anchordocking"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item5>
|
</Item5>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="14">
|
<Units Count="12">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="coedit.lpr"/>
|
<Filename Value="coedit.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
|
@ -175,55 +175,36 @@
|
||||||
<UnitName Value="ce_d2syn"/>
|
<UnitName Value="ce_d2syn"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
<Unit7>
|
<Unit7>
|
||||||
<Filename Value="..\src\ce_project.pas"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
<ComponentName Value="CEProjectWidget"/>
|
|
||||||
<HasResources Value="True"/>
|
|
||||||
<ResourceBaseClass Value="Form"/>
|
|
||||||
<UnitName Value="ce_project"/>
|
|
||||||
</Unit7>
|
|
||||||
<Unit8>
|
|
||||||
<Filename Value="..\src\ce_synmemo.pas"/>
|
<Filename Value="..\src\ce_synmemo.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="ce_synmemo"/>
|
<UnitName Value="ce_synmemo"/>
|
||||||
</Unit8>
|
</Unit7>
|
||||||
<Unit9>
|
<Unit8>
|
||||||
<Filename Value="..\src\ce_dmdwrap.pas"/>
|
<Filename Value="..\src\ce_dmdwrap.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="ce_dmdwrap"/>
|
<UnitName Value="ce_dmdwrap"/>
|
||||||
</Unit9>
|
</Unit8>
|
||||||
<Unit10>
|
<Unit9>
|
||||||
<Filename Value="..\src\ce_projconfframe.pas"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
<ComponentName Value="CEProjConfFrame"/>
|
|
||||||
<HasResources Value="True"/>
|
|
||||||
<ResourceBaseClass Value="Frame"/>
|
|
||||||
<UnitName Value="ce_projconfframe"/>
|
|
||||||
</Unit10>
|
|
||||||
<Unit11>
|
|
||||||
<Filename Value="..\src\ce_projconf.pas"/>
|
<Filename Value="..\src\ce_projconf.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="CEProjectConfigurationWidget"/>
|
<ComponentName Value="CEProjectConfigurationWidget"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="ce_projconf"/>
|
<UnitName Value="ce_projconf"/>
|
||||||
</Unit11>
|
</Unit9>
|
||||||
<Unit12>
|
<Unit10>
|
||||||
<Filename Value="..\src\ce_projconfall.pas"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
<ComponentName Value="CEProjConfAll"/>
|
|
||||||
<HasResources Value="True"/>
|
|
||||||
<ResourceBaseClass Value="Frame"/>
|
|
||||||
<UnitName Value="ce_projconfall"/>
|
|
||||||
</Unit12>
|
|
||||||
<Unit13>
|
|
||||||
<Filename Value="..\src\ce_projinspect.pas"/>
|
<Filename Value="..\src\ce_projinspect.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="CEProjectInspectWidget"/>
|
<ComponentName Value="CEProjectInspectWidget"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="ce_projinspect"/>
|
<UnitName Value="ce_projinspect"/>
|
||||||
</Unit13>
|
</Unit10>
|
||||||
|
<Unit11>
|
||||||
|
<Filename Value="..\src\ce_jsoninfos.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="ce_jsoninfos"/>
|
||||||
|
</Unit11>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -234,7 +215,7 @@
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<OtherUnitFiles Value="..\src"/>
|
<OtherUnitFiles Value="..\src;$(LazarusDir)\components\anchordocking"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
|
|
|
@ -7,8 +7,8 @@ uses
|
||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, ce_widget,
|
Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, ce_widget,
|
||||||
ce_dmdwrap, ce_common, ce_synmemo, ce_main, ce_messages, ce_editor, ce_projinspect,
|
ce_dmdwrap, ce_common, ce_synmemo, ce_main, ce_messages, ce_editor,
|
||||||
ce_projconf;
|
ce_projinspect, ce_projconf, ce_jsoninfos, jsonparser;
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
|
|
@ -54,11 +54,12 @@ object TCEProject
|
||||||
outputOptions.release = False
|
outputOptions.release = False
|
||||||
outputOptions.unittest = True
|
outputOptions.unittest = True
|
||||||
outputOptions.versionIdentifier = 'revision_1'
|
outputOptions.versionIdentifier = 'revision_1'
|
||||||
|
pathsOptions.outputFilename = '..\output\main.exe'
|
||||||
end>
|
end>
|
||||||
Sources.Strings = (
|
Sources.Strings = (
|
||||||
'..\src\main.d'
|
'..\src\main.d'
|
||||||
'..\src\bar.d'
|
'..\src\bar.d'
|
||||||
'..\src\foo.d'
|
'..\src\foo.d'
|
||||||
)
|
)
|
||||||
ConfigurationIndex = 1
|
ConfigurationIndex = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,6 +12,5 @@ class Bar{
|
||||||
debug(1) writeln("bar says: debug level < 2");
|
debug(1) writeln("bar says: debug level < 2");
|
||||||
debug(2) writeln("bar says: debug level < 3");
|
debug(2) writeln("bar says: debug level < 3");
|
||||||
debug(3) writeln("bar says: debug level < 4");
|
debug(3) writeln("bar says: debug level < 4");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,5 @@ class Foo{
|
||||||
debug(1) writeln("foo says: debug level < 2");
|
debug(1) writeln("foo says: debug level < 2");
|
||||||
debug(2) writeln("foo says: debug level < 3");
|
debug(2) writeln("foo says: debug level < 3");
|
||||||
debug(3) writeln("foo says: debug level < 4");
|
debug(3) writeln("foo says: debug level < 4");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
Test:
|
Test:
|
||||||
- prj save/load
|
- prj save/load
|
||||||
- prj compile
|
- prj compile/run
|
||||||
- multiples sources
|
- multiples sources
|
||||||
- relative paths
|
- relative paths
|
||||||
- various switches
|
- various switches
|
||||||
|
|
|
@ -303,7 +303,9 @@ begin
|
||||||
Dec(fChangedCount);
|
Dec(fChangedCount);
|
||||||
if fChangedCount > 0 then
|
if fChangedCount > 0 then
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF DEBUG}
|
||||||
writeln('project update count > 0');
|
writeln('project update count > 0');
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
fChangedCount := 0;
|
fChangedCount := 0;
|
||||||
|
|
|
@ -321,7 +321,7 @@ end;
|
||||||
|
|
||||||
function TMsgOpts.getOpts: string;
|
function TMsgOpts.getOpts: string;
|
||||||
const
|
const
|
||||||
DepStr : array[TDepHandling] of string = ('-d ','-dw ', '-de ');
|
DepStr : array[TDepHandling] of string = ('-d ',''(*-dw*), '-de ');
|
||||||
begin
|
begin
|
||||||
result := DepStr[fDepHandling];
|
result := DepStr[fDepHandling];
|
||||||
if fVerb then result += '-v ';
|
if fVerb then result += '-v ';
|
||||||
|
@ -750,8 +750,8 @@ begin
|
||||||
result :=
|
result :=
|
||||||
fDocOpts.getOpts + fDebugOpts.getOpts + fMsgOpts.getOpts
|
fDocOpts.getOpts + fDebugOpts.getOpts + fMsgOpts.getOpts
|
||||||
+ fOutputOpts.getOpts + fPathsOpts.getOpts + fOthers.getOpts;
|
+ fOutputOpts.getOpts + fPathsOpts.getOpts + fOthers.getOpts;
|
||||||
if result[length(result)] = ' ' then
|
if length(result) > 0 then if result[length(result)] = ' ' then
|
||||||
setlength(result, length(result)-1);
|
setlength(result, length(result)-1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompilerConfiguration.setName(const aValue: string);
|
procedure TCompilerConfiguration.setName(const aValue: string);
|
||||||
|
|
|
@ -1,33 +1,34 @@
|
||||||
inherited CEEditorWidget: TCEEditorWidget
|
inherited CEEditorWidget: TCEEditorWidget
|
||||||
Left = 1098
|
Left = 1163
|
||||||
Height = 382
|
Height = 382
|
||||||
Top = 91
|
Top = 91
|
||||||
Width = 526
|
Width = 461
|
||||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
|
||||||
Caption = 'Source editor'
|
Caption = 'Source editor'
|
||||||
ClientHeight = 382
|
ClientHeight = 382
|
||||||
ClientWidth = 526
|
ClientWidth = 461
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 382
|
Height = 382
|
||||||
Width = 526
|
Width = 461
|
||||||
ClientHeight = 382
|
ClientHeight = 382
|
||||||
ClientWidth = 526
|
ClientWidth = 461
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 382
|
Height = 382
|
||||||
Width = 526
|
Width = 461
|
||||||
BevelOuter = bvRaised
|
BevelOuter = bvRaised
|
||||||
ClientHeight = 382
|
ClientHeight = 382
|
||||||
ClientWidth = 526
|
ClientWidth = 461
|
||||||
object PageControl: TExtendedNotebook[0]
|
object PageControl: TExtendedNotebook[0]
|
||||||
Left = 3
|
Left = 3
|
||||||
Height = 351
|
Height = 351
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 520
|
Width = 455
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
|
Images = imgList
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = PageControlChange
|
OnChange = PageControlChange
|
||||||
Options = [nboShowCloseButtons]
|
OnCloseTabClicked = PageControlCloseTabClicked
|
||||||
|
Options = [nboShowCloseButtons, nboShowAddTabButton]
|
||||||
TabDragMode = dmAutomatic
|
TabDragMode = dmAutomatic
|
||||||
TabDragAcceptMode = dmAutomatic
|
TabDragAcceptMode = dmAutomatic
|
||||||
end
|
end
|
||||||
|
@ -35,7 +36,7 @@ inherited CEEditorWidget: TCEEditorWidget
|
||||||
Left = 3
|
Left = 3
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 356
|
Top = 356
|
||||||
Width = 520
|
Width = 455
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
|
|
|
@ -5,7 +5,7 @@ unit ce_editor;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, eventlog, FileUtil, ExtendedNotebook, Forms, Controls,
|
Classes, SysUtils, FileUtil, ExtendedNotebook, Forms, Controls,
|
||||||
Graphics, SynEditKeyCmds, ComCtrls, SynEditHighlighter, ExtCtrls, Menus,
|
Graphics, SynEditKeyCmds, ComCtrls, SynEditHighlighter, ExtCtrls, Menus,
|
||||||
SynEditHighlighterFoldBase, SynMacroRecorder, SynPluginSyncroEdit, SynEdit,
|
SynEditHighlighterFoldBase, SynMacroRecorder, SynPluginSyncroEdit, SynEdit,
|
||||||
SynHighlighterLFM, ce_widget, ce_d2syn, ce_synmemo, ce_common;
|
SynHighlighterLFM, ce_widget, ce_d2syn, ce_synmemo, ce_common;
|
||||||
|
@ -18,6 +18,7 @@ type
|
||||||
macRecorder: TSynMacroRecorder;
|
macRecorder: TSynMacroRecorder;
|
||||||
editorStatus: TStatusBar;
|
editorStatus: TStatusBar;
|
||||||
procedure PageControlChange(Sender: TObject);
|
procedure PageControlChange(Sender: TObject);
|
||||||
|
procedure PageControlCloseTabClicked(Sender: TObject);
|
||||||
protected
|
protected
|
||||||
procedure autoWidgetUpdate; override;
|
procedure autoWidgetUpdate; override;
|
||||||
private
|
private
|
||||||
|
@ -27,6 +28,7 @@ type
|
||||||
procedure memoKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure memoKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure memoMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
procedure memoMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
procedure memoChange(Sender: TObject);
|
procedure memoChange(Sender: TObject);
|
||||||
|
procedure memoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||||
function getCurrentEditor: TCESynMemo;
|
function getCurrentEditor: TCESynMemo;
|
||||||
function getEditor(index: NativeInt): TCESynMemo;
|
function getEditor(index: NativeInt): TCESynMemo;
|
||||||
function getEditorCount: NativeInt;
|
function getEditorCount: NativeInt;
|
||||||
|
@ -34,7 +36,6 @@ type
|
||||||
procedure identifierToD2Syn(const aMemo: TCESynMemo);
|
procedure identifierToD2Syn(const aMemo: TCESynMemo);
|
||||||
public
|
public
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
|
||||||
procedure addEditor;
|
procedure addEditor;
|
||||||
procedure removeEditor(const aIndex: NativeInt);
|
procedure removeEditor(const aIndex: NativeInt);
|
||||||
//
|
//
|
||||||
|
@ -47,6 +48,9 @@ type
|
||||||
implementation
|
implementation
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
|
uses
|
||||||
|
ce_main;
|
||||||
|
|
||||||
constructor TCEEditorWidget.create(aOwner: TComponent);
|
constructor TCEEditorWidget.create(aOwner: TComponent);
|
||||||
var
|
var
|
||||||
bmp: TBitmap;
|
bmp: TBitmap;
|
||||||
|
@ -63,11 +67,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCEEditorWidget.destroy;
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TCEEditorWidget.getEditorCount: NativeInt;
|
function TCEEditorWidget.getEditorCount: NativeInt;
|
||||||
begin
|
begin
|
||||||
result := pageControl.PageCount;
|
result := pageControl.PageCount;
|
||||||
|
@ -75,7 +74,9 @@ end;
|
||||||
|
|
||||||
function TCEEditorWidget.getEditorIndex: NativeInt;
|
function TCEEditorWidget.getEditorIndex: NativeInt;
|
||||||
begin
|
begin
|
||||||
result := pageControl.PageIndex;
|
if pageControl.PageCount > 0 then
|
||||||
|
result := pageControl.PageIndex
|
||||||
|
else result := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEEditorWidget.getCurrentEditor: TCESynMemo;
|
function TCEEditorWidget.getCurrentEditor: TCESynMemo;
|
||||||
|
@ -109,6 +110,12 @@ begin
|
||||||
focusedEditorChanged;
|
focusedEditorChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEEditorWidget.PageControlCloseTabClicked(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// closeBtn not implemented
|
||||||
|
mainForm.actFileClose.Execute;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEEditorWidget.addEditor;
|
procedure TCEEditorWidget.addEditor;
|
||||||
var
|
var
|
||||||
sheet: TTabSheet;
|
sheet: TTabSheet;
|
||||||
|
@ -125,6 +132,7 @@ begin
|
||||||
memo.OnKeyUp := @memoKeyDown;
|
memo.OnKeyUp := @memoKeyDown;
|
||||||
memo.OnMouseDown := @memoMouseDown;
|
memo.OnMouseDown := @memoMouseDown;
|
||||||
memo.OnChange := @memoChange;
|
memo.OnChange := @memoChange;
|
||||||
|
memo.OnMouseMove := @memoMouseMove;
|
||||||
//
|
//
|
||||||
//http://bugs.freepascal.org/view.php?id=26320
|
//http://bugs.freepascal.org/view.php?id=26320
|
||||||
focusedEditorChanged;
|
focusedEditorChanged;
|
||||||
|
@ -155,6 +163,12 @@ begin
|
||||||
identifierToD2Syn(TCESynMemo(Sender));
|
identifierToD2Syn(TCESynMemo(Sender));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEEditorWidget.memoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
if ssLeft in Shift then
|
||||||
|
fNeedAutoUpdate := true;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEEditorWidget.memoChange(Sender: TObject);
|
procedure TCEEditorWidget.memoChange(Sender: TObject);
|
||||||
var
|
var
|
||||||
ed: TCESynMemo;
|
ed: TCESynMemo;
|
||||||
|
|
|
@ -0,0 +1,147 @@
|
||||||
|
unit ce_jsoninfos;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, jsonparser, fpjson;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
TJSonLoader = class(TThread)
|
||||||
|
private
|
||||||
|
parser: TJSONParser;
|
||||||
|
public
|
||||||
|
Filename: string;
|
||||||
|
Data: TJsonData;
|
||||||
|
procedure Execute; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TDSourceInfo = record
|
||||||
|
line: integer;
|
||||||
|
infs: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TDSourceInfos = array of TDSourceInfo;
|
||||||
|
|
||||||
|
TInfKind = (ikModule, ikImport, ikFunction, ikAlias, ikClass, ikStruct,
|
||||||
|
ikMixin, ikEnum, ikTemplate);
|
||||||
|
|
||||||
|
const
|
||||||
|
InfKindStr: array[TInfKind] of string = ('module', 'import', 'function', 'alias',
|
||||||
|
'class', 'structure', 'mixin', 'enum', 'template');
|
||||||
|
|
||||||
|
InfKindNonModule = [ikImport..ikTemplate];
|
||||||
|
|
||||||
|
type
|
||||||
|
TJSonInfos = class
|
||||||
|
private
|
||||||
|
fFilenames: TStringList;
|
||||||
|
|
||||||
|
procedure FilesChanged(Sender: TObject);
|
||||||
|
procedure scan;
|
||||||
|
public
|
||||||
|
fData: array of TJsonData;
|
||||||
|
constructor create;
|
||||||
|
destructor destroy; override;
|
||||||
|
//
|
||||||
|
function getFileModule(const index: integer): TDSourceInfos;
|
||||||
|
function getMembers(const aFileIndex, aModuleIndex: integer; const aKind: TInfKind): TDSourceInfos;
|
||||||
|
property Files: TStringList read fFilenames;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
JSONInfos: TJSonInfos;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure TJSonLoader.Execute;
|
||||||
|
var
|
||||||
|
str: TMemoryStream;
|
||||||
|
begin
|
||||||
|
str := TMemoryStream.create;
|
||||||
|
parser := TJSONParser.Create(str);
|
||||||
|
try
|
||||||
|
str.LoadFromFile(Filename);
|
||||||
|
Data := parser.parse;
|
||||||
|
finally
|
||||||
|
str.free;
|
||||||
|
parser.free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TJSonInfos.create;
|
||||||
|
begin
|
||||||
|
fFilenames := TStringList.Create;
|
||||||
|
fFilenames.OnChange := @FilesChanged;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TJSonInfos.destroy;
|
||||||
|
begin
|
||||||
|
fFilenames.Free;
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TJSonInfos.FilesChanged(Sender: TObject);
|
||||||
|
begin
|
||||||
|
scan;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TJSonInfos.scan;
|
||||||
|
var
|
||||||
|
fname: string;
|
||||||
|
str: TmemoryStream;
|
||||||
|
begin
|
||||||
|
setLength(fData,0);
|
||||||
|
str := tMemoryStream.Create;
|
||||||
|
for fname in fFilenames do
|
||||||
|
begin
|
||||||
|
str.LoadFromFile(fname);
|
||||||
|
str.Position := 0;
|
||||||
|
setLength(fData, length(fData)+1);
|
||||||
|
fData[high(fData)] := GetJSON(str);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TJSonInfos.getFileModule(const index: integer): TDSourceInfos;
|
||||||
|
var
|
||||||
|
memb: TJsonData;
|
||||||
|
i: nativeInt;
|
||||||
|
begin
|
||||||
|
setlength(result,0);
|
||||||
|
memb := fData[index].GetPath('');
|
||||||
|
for i := 0 to memb.Count-1 do
|
||||||
|
begin
|
||||||
|
if memb.Items[i].GetPath('kind').AsString <> 'module' then continue;
|
||||||
|
setlength(result, length(result) + 1);
|
||||||
|
result[high(result)].infs := memb.Items[i].GetPath('name').AsString;
|
||||||
|
result[high(result)].line := 0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TJSonInfos.getMembers(const aFileIndex, aModuleIndex: integer; const aKind: TInfKind): TDSourceInfos;
|
||||||
|
var
|
||||||
|
memb: TJsonData;
|
||||||
|
i: nativeInt;
|
||||||
|
begin
|
||||||
|
setlength(result,0);
|
||||||
|
memb := fData[aFileIndex].items[aModuleIndex].GetPath('members');
|
||||||
|
for i := 0 to memb.Count-1 do
|
||||||
|
begin
|
||||||
|
if memb.Items[i].GetPath('kind').AsString <> InfKindStr[aKind]
|
||||||
|
then continue;
|
||||||
|
setlength(result, length(result) + 1);
|
||||||
|
result[high(result)].infs := memb.Items[i].GetPath('name').AsString;
|
||||||
|
if (aKind = ikModule) then result[high(result)].line := 0
|
||||||
|
else result[high(result)].line := memb.Items[i].GetPath('line').AsInt64;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
initialization
|
||||||
|
JSONInfos := TJSonInfos.create;
|
||||||
|
finalization
|
||||||
|
JSONInfos.Free;
|
||||||
|
end.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
object CEMainForm: TCEMainForm
|
object CEMainForm: TCEMainForm
|
||||||
Left = 1098
|
Left = 1162
|
||||||
Height = 53
|
Height = 53
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 805
|
Width = 741
|
||||||
AllowDropFiles = True
|
AllowDropFiles = True
|
||||||
Caption = 'Coedit'
|
Caption = 'Coedit'
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
|
@ -10,6 +10,7 @@ object CEMainForm: TCEMainForm
|
||||||
OnDropFiles = FormDropFiles
|
OnDropFiles = FormDropFiles
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
Position = poMainFormCenter
|
Position = poMainFormCenter
|
||||||
|
ShowHint = True
|
||||||
LCLVersion = '1.2.4.0'
|
LCLVersion = '1.2.4.0'
|
||||||
object mainMenu: TMainMenu
|
object mainMenu: TMainMenu
|
||||||
Images = imgList
|
Images = imgList
|
||||||
|
@ -2565,8 +2566,9 @@ object CEMainForm: TCEMainForm
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
object ApplicationProperties1: TApplicationProperties
|
object ApplicationProperties1: TApplicationProperties
|
||||||
HintPause = 2
|
HintHidePause = 1000
|
||||||
HintShortPause = 2
|
HintPause = 25
|
||||||
|
HintShortPause = 8
|
||||||
left = 96
|
left = 96
|
||||||
end
|
end
|
||||||
object LfmSyn: TSynLFMSyn
|
object LfmSyn: TSynLFMSyn
|
||||||
|
|
|
@ -7,9 +7,9 @@ interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, SynEditKeyCmds, SynHighlighterLFM, Forms,
|
Classes, SysUtils, FileUtil, SynEditKeyCmds, SynHighlighterLFM, Forms,
|
||||||
AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg,
|
AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg,
|
||||||
Controls, Graphics, Dialogs, Menus, ActnList, ExtCtrls, process, ce_common,
|
Controls, Graphics, Dialogs, Menus, ActnList, ExtCtrls, process, ce_jsoninfos, ce_common,
|
||||||
ce_dmdwrap, ce_synmemo, ce_widget, ce_messages, ce_editor, ce_projinspect,
|
ce_dmdwrap, ce_synmemo, ce_widget, ce_messages, ce_editor, ce_projinspect,
|
||||||
ce_projconf;
|
ce_projconf, ce_staticexplorer;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -140,6 +140,7 @@ type
|
||||||
fEditWidg: TCEEditorWidget;
|
fEditWidg: TCEEditorWidget;
|
||||||
fProjWidg: TCEProjectInspectWidget;
|
fProjWidg: TCEProjectInspectWidget;
|
||||||
fPrjCfWidg: TCEProjectConfigurationWidget;
|
fPrjCfWidg: TCEProjectConfigurationWidget;
|
||||||
|
fStExpWidg: TCEStaticExplorerWidget;
|
||||||
|
|
||||||
// widget interfaces subroutines
|
// widget interfaces subroutines
|
||||||
procedure checkWidgetActions(const aWidget: TCEWidget);
|
procedure checkWidgetActions(const aWidget: TCEWidget);
|
||||||
|
@ -204,11 +205,13 @@ begin
|
||||||
fEditWidg := TCEEditorWidget.create(nil);
|
fEditWidg := TCEEditorWidget.create(nil);
|
||||||
fProjWidg := TCEProjectInspectWidget.create(nil);
|
fProjWidg := TCEProjectInspectWidget.create(nil);
|
||||||
fPrjCfWidg:= TCEProjectConfigurationWidget.create(nil);
|
fPrjCfWidg:= TCEProjectConfigurationWidget.create(nil);
|
||||||
|
//fStExpWidg:= TCEStaticExplorerWidget.create(nil);
|
||||||
|
|
||||||
fWidgList.addWidget(@fMesgWidg);
|
fWidgList.addWidget(@fMesgWidg);
|
||||||
fWidgList.addWidget(@fEditWidg);
|
fWidgList.addWidget(@fEditWidg);
|
||||||
fWidgList.addWidget(@fProjWidg);
|
fWidgList.addWidget(@fProjWidg);
|
||||||
fWidgList.addWidget(@fPrjCfWidg);
|
fWidgList.addWidget(@fPrjCfWidg);
|
||||||
|
//fWidgList.addWidget(@fStExpWidg);
|
||||||
|
|
||||||
for widg in fWidgList do widg.Show;
|
for widg in fWidgList do widg.Show;
|
||||||
|
|
||||||
|
@ -247,6 +250,7 @@ begin
|
||||||
fEditWidg.Free;
|
fEditWidg.Free;
|
||||||
fProjWidg.Free;
|
fProjWidg.Free;
|
||||||
fPrjCfWidg.Free;
|
fPrjCfWidg.Free;
|
||||||
|
fStExpWidg.Free;
|
||||||
fProject.Free;
|
fProject.Free;
|
||||||
//
|
//
|
||||||
inherited;
|
inherited;
|
||||||
|
@ -700,12 +704,19 @@ var
|
||||||
dmdproc: TProcess;
|
dmdproc: TProcess;
|
||||||
olddir, prjpath: string;
|
olddir, prjpath: string;
|
||||||
const
|
const
|
||||||
// option -v causes an hang if poWaitOnExit is included
|
// option -v causes a hang if poWaitOnExit is included
|
||||||
procopts: array[boolean] of TProcessOptions = (
|
procopts: array[boolean] of TProcessOptions = (
|
||||||
[poWaitOnExit, poStdErrToOutput, poUsePipes],
|
[poWaitOnExit, poStdErrToOutput, poUsePipes],
|
||||||
[poStdErrToOutput, poUsePipes]
|
[poStdErrToOutput, poUsePipes]
|
||||||
);
|
);
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
if aProject.Sources.Count = 0 then
|
||||||
|
begin
|
||||||
|
fMesgWidg.addCeErr( aProject.fileName + ' has no source files' );
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
olddir := '';
|
olddir := '';
|
||||||
dmdproc := TProcess.Create(nil);
|
dmdproc := TProcess.Create(nil);
|
||||||
getDir(0, olddir);
|
getDir(0, olddir);
|
||||||
|
@ -753,7 +764,7 @@ begin
|
||||||
|
|
||||||
procname := aProject.currentConfiguration.pathsOptions.outputFilename;
|
procname := aProject.currentConfiguration.pathsOptions.outputFilename;
|
||||||
if procname <> '' then procname := aProject.getAbsoluteFilename(procname)
|
if procname <> '' then procname := aProject.getAbsoluteFilename(procname)
|
||||||
else
|
else if aProject.Sources.Count > 0 then
|
||||||
begin
|
begin
|
||||||
procname := extractFilename(aProject.Sources.Strings[0]);
|
procname := extractFilename(aProject.Sources.Strings[0]);
|
||||||
procname := procname[1..length(procname)-2];
|
procname := procname[1..length(procname)-2];
|
||||||
|
@ -841,12 +852,15 @@ end;
|
||||||
procedure TCEMainForm.widgetShowFromAction(sender: TObject);
|
procedure TCEMainForm.widgetShowFromAction(sender: TObject);
|
||||||
var
|
var
|
||||||
widg: TCEWidget;
|
widg: TCEWidget;
|
||||||
|
win: TControl;
|
||||||
begin
|
begin
|
||||||
widg := TCEWidget( TComponent(sender).tag );
|
widg := TCEWidget( TComponent(sender).tag );
|
||||||
if widg = nil then exit;
|
if widg = nil then exit;
|
||||||
if widg.Visible then widg.Hide else widg.Show;
|
win := DockMaster.GetAnchorSite(widg);
|
||||||
|
if win = nil then exit;
|
||||||
|
win.Show;
|
||||||
|
win.BringToFront;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
{$REGION project ***************************************************************}
|
{$REGION project ***************************************************************}
|
||||||
|
@ -953,8 +967,13 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actProjOptsExecute(Sender: TObject);
|
procedure TCEMainForm.actProjOptsExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
win: TControl;
|
||||||
begin
|
begin
|
||||||
fPrjCfWidg.Show;
|
win := DockMaster.GetAnchorSite(fPrjCfWidg);
|
||||||
|
if win = nil then exit;
|
||||||
|
win.Show;
|
||||||
|
win.BringToFront;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actProjSourceExecute(Sender: TObject);
|
procedure TCEMainForm.actProjSourceExecute(Sender: TObject);
|
||||||
|
|
|
@ -1,37 +1,38 @@
|
||||||
inherited CEMessagesWidget: TCEMessagesWidget
|
inherited CEMessagesWidget: TCEMessagesWidget
|
||||||
Left = 1097
|
Left = 1163
|
||||||
Height = 170
|
Height = 172
|
||||||
Top = 513
|
Top = 511
|
||||||
Width = 807
|
Width = 741
|
||||||
Caption = 'Messages'
|
Caption = 'Messages'
|
||||||
ClientHeight = 170
|
ClientHeight = 172
|
||||||
ClientWidth = 807
|
ClientWidth = 741
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 170
|
Height = 172
|
||||||
Width = 807
|
Width = 741
|
||||||
ClientHeight = 170
|
ClientHeight = 172
|
||||||
ClientWidth = 807
|
ClientWidth = 741
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 170
|
Height = 172
|
||||||
Width = 807
|
Width = 741
|
||||||
ClientHeight = 170
|
ClientHeight = 172
|
||||||
ClientWidth = 807
|
ClientWidth = 741
|
||||||
object List: TListView[0]
|
object List: TListView[0]
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 166
|
Height = 168
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 803
|
Width = 737
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSort = False
|
AutoSort = False
|
||||||
AutoWidthLastColumn = True
|
AutoWidthLastColumn = True
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Width = 799
|
Width = 733
|
||||||
end>
|
end>
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
|
IconOptions.WrapText = False
|
||||||
|
MultiSelect = True
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
RowSelect = True
|
|
||||||
ShowColumnHeaders = False
|
ShowColumnHeaders = False
|
||||||
SmallImages = imgList
|
SmallImages = imgList
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
@ -39,7 +40,13 @@ inherited CEMessagesWidget: TCEMessagesWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited contextMenu: TPopupMenu
|
||||||
|
left = 8
|
||||||
|
top = 8
|
||||||
|
end
|
||||||
object imgList: TImageList[2]
|
object imgList: TImageList[2]
|
||||||
|
left = 40
|
||||||
|
top = 8
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
4C69050000001000000010000000CF986200D1996200D1996234D0965DBCCF94
|
4C69050000001000000010000000CF986200D1996200D1996234D0965DBCCF94
|
||||||
5BFFCE945AFFCE935AFFCE935AFFCE935AFFCE935AFFCE945AFFCF945BFFD096
|
5BFFCE945AFFCE935AFFCE935AFFCE935AFFCE935AFFCE945AFFCF945BFFD096
|
||||||
|
|
|
@ -6,7 +6,7 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
|
||||||
ExtCtrls, ComCtrls, ce_widget, ActnList, Menus;
|
ExtCtrls, ComCtrls, ce_widget, ActnList, Menus, clipbrd;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -17,8 +17,12 @@ type
|
||||||
private
|
private
|
||||||
fActClear: TAction;
|
fActClear: TAction;
|
||||||
fActSaveMsg: TAction;
|
fActSaveMsg: TAction;
|
||||||
|
fActCopyMsg: TAction;
|
||||||
|
fActSelAll: TAction;
|
||||||
procedure actClearExecute(Sender: TObject);
|
procedure actClearExecute(Sender: TObject);
|
||||||
procedure actSaveMsgExecute(Sender: TObject);
|
procedure actSaveMsgExecute(Sender: TObject);
|
||||||
|
procedure actCopyMsgExecute(Sender: TObject);
|
||||||
|
procedure actSelAllExecute(Sender: TObject);
|
||||||
public
|
public
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
//
|
//
|
||||||
|
@ -57,6 +61,12 @@ begin
|
||||||
fActClear := TAction.Create(self);
|
fActClear := TAction.Create(self);
|
||||||
fActClear.OnExecute := @actClearExecute;
|
fActClear.OnExecute := @actClearExecute;
|
||||||
fActClear.caption := 'Clear messages';
|
fActClear.caption := 'Clear messages';
|
||||||
|
fActCopyMsg := TAction.Create(self);
|
||||||
|
fActCopyMsg.OnExecute := @actCopyMsgExecute;
|
||||||
|
fActCopyMsg.Caption := 'Copy message(s)';
|
||||||
|
fActSelAll := TAction.Create(self);
|
||||||
|
fActSelAll.OnExecute := @actSelAllExecute;
|
||||||
|
fActSelAll.Caption := 'Select all';
|
||||||
fActSaveMsg := TAction.Create(self);
|
fActSaveMsg := TAction.Create(self);
|
||||||
fActSaveMsg.OnExecute := @actSaveMsgExecute;
|
fActSaveMsg.OnExecute := @actSaveMsgExecute;
|
||||||
fActSaveMsg.caption := 'Save messages to...';
|
fActSaveMsg.caption := 'Save messages to...';
|
||||||
|
@ -66,6 +76,12 @@ begin
|
||||||
itm.Action := fActClear;
|
itm.Action := fActClear;
|
||||||
contextMenu.Items.Add(itm);
|
contextMenu.Items.Add(itm);
|
||||||
itm := TMenuItem.Create(self);
|
itm := TMenuItem.Create(self);
|
||||||
|
itm.Action := fActCopyMsg;
|
||||||
|
contextMenu.Items.Add(itm);
|
||||||
|
itm := TMenuItem.Create(self);
|
||||||
|
itm.Action := fActSelAll;
|
||||||
|
contextMenu.Items.Add(itm);
|
||||||
|
itm := TMenuItem.Create(self);
|
||||||
itm.Action := fActSaveMsg;
|
itm.Action := fActSaveMsg;
|
||||||
contextMenu.Items.Add(itm);
|
contextMenu.Items.Add(itm);
|
||||||
end;
|
end;
|
||||||
|
@ -127,14 +143,17 @@ end;
|
||||||
|
|
||||||
function TCEMessagesWidget.contextActionCount: integer;
|
function TCEMessagesWidget.contextActionCount: integer;
|
||||||
begin
|
begin
|
||||||
result := 2;
|
result := 4;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEMessagesWidget.contextAction(index: integer): TAction;
|
function TCEMessagesWidget.contextAction(index: integer): TAction;
|
||||||
begin
|
begin
|
||||||
case index of
|
case index of
|
||||||
0: result := fActClear;
|
0: result := fActClear;
|
||||||
1: result := fActSaveMsg;
|
1: result := fActCopyMsg;
|
||||||
|
2: result := fActSelAll;
|
||||||
|
3: result := fActSaveMsg;
|
||||||
|
else result := nil;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -143,6 +162,22 @@ begin
|
||||||
List.Clear;
|
List.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEMessagesWidget.actCopyMsgExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: NativeInt;
|
||||||
|
str: string;
|
||||||
|
begin
|
||||||
|
str := '';
|
||||||
|
for i := 0 to List.Items.Count-1 do if List.Items[i].Selected then
|
||||||
|
str += List.Items[i].Caption + LineEnding;
|
||||||
|
Clipboard.AsText := str;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEMessagesWidget.actSelAllExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
List.SelectAll;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEMessagesWidget.actSaveMsgExecute(Sender: TObject);
|
procedure TCEMessagesWidget.actSaveMsgExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
lst: TStringList;
|
lst: TStringList;
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
Left = 1098
|
Left = 1163
|
||||||
Height = 278
|
Height = 278
|
||||||
Width = 455
|
Width = 471
|
||||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
|
||||||
Caption = 'Project configuration'
|
Caption = 'Project configuration'
|
||||||
ClientHeight = 278
|
ClientHeight = 278
|
||||||
ClientWidth = 455
|
ClientWidth = 471
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 278
|
Height = 278
|
||||||
Width = 455
|
Width = 471
|
||||||
ClientHeight = 278
|
ClientHeight = 278
|
||||||
ClientWidth = 455
|
ClientWidth = 471
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 278
|
Height = 278
|
||||||
Width = 455
|
Width = 471
|
||||||
ClientHeight = 278
|
ClientHeight = 278
|
||||||
ClientWidth = 455
|
ClientWidth = 471
|
||||||
object Tree: TTreeView[0]
|
object Tree: TTreeView[0]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 244
|
Height = 244
|
||||||
|
Hint = 'filter configuration elements'
|
||||||
Top = 30
|
Top = 30
|
||||||
Width = 150
|
Width = 150
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
|
@ -52,18 +52,19 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 451
|
Width = 467
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 24
|
ClientHeight = 24
|
||||||
ClientWidth = 451
|
ClientWidth = 467
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object selConf: TComboBox
|
object selConf: TComboBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 23
|
||||||
|
Hint = 'select a configuration'
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 360
|
Width = 376
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Top = 1
|
BorderSpacing.Top = 1
|
||||||
BorderSpacing.Right = 1
|
BorderSpacing.Right = 1
|
||||||
|
@ -73,8 +74,9 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object btnAddConf: TSpeedButton
|
object btnAddConf: TSpeedButton
|
||||||
Left = 361
|
Left = 377
|
||||||
Height = 24
|
Height = 24
|
||||||
|
Hint = 'add an empty configuration'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 30
|
||||||
Align = alRight
|
Align = alRight
|
||||||
|
@ -118,8 +120,9 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
object btnDelConf: TSpeedButton
|
object btnDelConf: TSpeedButton
|
||||||
Left = 391
|
Left = 407
|
||||||
Height = 24
|
Height = 24
|
||||||
|
Hint = 'remove selected configuration'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 30
|
||||||
Align = alRight
|
Align = alRight
|
||||||
|
@ -163,8 +166,9 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
object btnCloneConf: TSpeedButton
|
object btnCloneConf: TSpeedButton
|
||||||
Left = 421
|
Left = 437
|
||||||
Height = 24
|
Height = 24
|
||||||
|
Hint = 'clone selected configuration'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 30
|
||||||
Align = alRight
|
Align = alRight
|
||||||
|
@ -218,7 +222,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
Left = 159
|
Left = 159
|
||||||
Height = 244
|
Height = 244
|
||||||
Top = 30
|
Top = 30
|
||||||
Width = 292
|
Width = 308
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
|
@ -234,8 +238,13 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited contextMenu: TPopupMenu
|
||||||
|
left = 8
|
||||||
|
top = 240
|
||||||
|
end
|
||||||
object imgList: TImageList[2]
|
object imgList: TImageList[2]
|
||||||
left = 32
|
left = 40
|
||||||
|
top = 240
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
4C690200000010000000100000008D8B89008D8B89008F8D8B008F8D8B008C8A
|
4C690200000010000000100000008D8B89008D8B89008F8D8B008F8D8B008C8A
|
||||||
880092908E00908E8CFF8F8D8BFF908E8CFF92908E008F8D8B008F8D8B008F8D
|
880092908E00908E8CFF8F8D8BFF908E8CFF92908E008F8D8B008F8D8B008F8D
|
||||||
|
|
|
@ -32,6 +32,7 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
|
||||||
ScrollBars = ssAutoBoth
|
ScrollBars = ssAutoBoth
|
||||||
ShowRoot = False
|
ShowRoot = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnKeyDown = TreeKeyDown
|
||||||
Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoToolTips, tvoThemedDraw]
|
Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoToolTips, tvoThemedDraw]
|
||||||
Items.Data = {
|
Items.Data = {
|
||||||
F9FFFFFF020002000000000000000000000000000000FFFFFFFF000000000000
|
F9FFFFFF020002000000000000000000000000000000FFFFFFFF000000000000
|
||||||
|
@ -53,6 +54,7 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
|
||||||
object btnAddFile: TSpeedButton
|
object btnAddFile: TSpeedButton
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 24
|
Height = 24
|
||||||
|
Hint = 'add a source file to the project'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 28
|
Width = 28
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
|
@ -143,6 +145,7 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
|
||||||
object btnAddFold: TSpeedButton
|
object btnAddFold: TSpeedButton
|
||||||
Left = 56
|
Left = 56
|
||||||
Height = 24
|
Height = 24
|
||||||
|
Hint = 'add a folder of source to the project'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 28
|
Width = 28
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
|
@ -202,6 +205,7 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
|
||||||
object btnRemFile: TSpeedButton
|
object btnRemFile: TSpeedButton
|
||||||
Left = 28
|
Left = 28
|
||||||
Height = 24
|
Height = 24
|
||||||
|
Hint = 'remove a source file from the project'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 28
|
Width = 28
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
|
@ -246,8 +250,13 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited contextMenu: TPopupMenu
|
||||||
|
left = 8
|
||||||
|
top = 352
|
||||||
|
end
|
||||||
object imgList: TImageList[2]
|
object imgList: TImageList[2]
|
||||||
left = 32
|
left = 40
|
||||||
|
top = 352
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
4C69040000001000000010000000B3B3B1EFB0B0ADFFAEAEACFFAEAEACFFAEAE
|
4C69040000001000000010000000B3B3B1EFB0B0ADFFAEAEACFFAEAEACFFAEAE
|
||||||
ACFFAFAFACFFAFAFADFFB1B1AFD5B4B4B100B5B5B300B5B5B300B5B5B300B5B5
|
ACFFAFAFACFFAFAFADFFB1B1AFD5B4B4B100B5B5B300B5B5B300B5B5B300B5B5
|
||||||
|
|
|
@ -23,6 +23,7 @@ type
|
||||||
procedure btnAddFoldClick(Sender: TObject);
|
procedure btnAddFoldClick(Sender: TObject);
|
||||||
procedure btnRemFileClick(Sender: TObject);
|
procedure btnRemFileClick(Sender: TObject);
|
||||||
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
|
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
|
||||||
|
procedure TreeKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
protected
|
protected
|
||||||
procedure manualWidgetUpdate; override;
|
procedure manualWidgetUpdate; override;
|
||||||
private
|
private
|
||||||
|
@ -70,6 +71,11 @@ begin
|
||||||
manualWidgetUpdate;
|
manualWidgetUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEProjectInspectWidget.TreeKeyDown(Sender: TObject; var Key: Word;Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
if Key = 13 then TreeDblClick(nil);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEProjectInspectWidget.TreeDblClick(sender: TObject);
|
procedure TCEProjectInspectWidget.TreeDblClick(sender: TObject);
|
||||||
var
|
var
|
||||||
fname: string;
|
fname: string;
|
||||||
|
@ -113,9 +119,17 @@ end;
|
||||||
|
|
||||||
procedure TCEProjectInspectWidget.btnAddFoldClick(Sender: TObject);
|
procedure TCEProjectInspectWidget.btnAddFoldClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
dir, ext, fname: string;
|
dir, fname: string;
|
||||||
sr: TSearchRec;
|
sr: TSearchRec;
|
||||||
lst: TStringList;
|
lst: TStringList;
|
||||||
|
procedure doFindFile;
|
||||||
|
var
|
||||||
|
ext: string;
|
||||||
|
begin
|
||||||
|
ext := ExtractFileExt(sr.Name);
|
||||||
|
if (ext = '.d') or (ext = '.di') then
|
||||||
|
lst.Add(dir + DirectorySeparator + sr.Name);
|
||||||
|
end;
|
||||||
begin
|
begin
|
||||||
if fProject = nil then exit;
|
if fProject = nil then exit;
|
||||||
//
|
//
|
||||||
|
@ -127,17 +141,9 @@ begin
|
||||||
if FindFirst(dir + DirectorySeparator + '*.*', faAnyFile, sr ) = 0 then
|
if FindFirst(dir + DirectorySeparator + '*.*', faAnyFile, sr ) = 0 then
|
||||||
try
|
try
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
ext := ExtractFileExt(sr.Name);
|
doFindFile;
|
||||||
if (ext = '.d') or (ext = '.di') then
|
while FindNext(sr) = 0 do doFindFile;
|
||||||
lst.Add(dir + DirectorySeparator + sr.Name);
|
for fname in lst do fProject.addSource(fname);
|
||||||
while FindNext(sr) = 0 do
|
|
||||||
begin
|
|
||||||
ext := ExtractFileExt(sr.Name);
|
|
||||||
if (ext = '.d') or (ext = '.di') then
|
|
||||||
lst.Add(dir + DirectorySeparator + sr.Name);
|
|
||||||
end;
|
|
||||||
for fname in lst do
|
|
||||||
fProject.addSource(fname);
|
|
||||||
finally
|
finally
|
||||||
lst.Free;
|
lst.Free;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
inherited CEStaticExplorerWidget: TCEStaticExplorerWidget
|
||||||
|
Left = 1569
|
||||||
|
Height = 278
|
||||||
|
Caption = 'Static explorer'
|
||||||
|
ClientHeight = 278
|
||||||
|
inherited Back: TPanel
|
||||||
|
Height = 278
|
||||||
|
ClientHeight = 278
|
||||||
|
inherited Content: TPanel
|
||||||
|
Height = 278
|
||||||
|
ClientHeight = 278
|
||||||
|
object Tree: TTreeView[0]
|
||||||
|
Left = 4
|
||||||
|
Height = 242
|
||||||
|
Top = 32
|
||||||
|
Width = 324
|
||||||
|
Align = alClient
|
||||||
|
BorderSpacing.Around = 4
|
||||||
|
DefaultItemHeight = 18
|
||||||
|
HideSelection = False
|
||||||
|
ReadOnly = True
|
||||||
|
ScrollBars = ssAutoBoth
|
||||||
|
TabOrder = 0
|
||||||
|
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
|
||||||
|
end
|
||||||
|
object Panel1: TPanel[1]
|
||||||
|
Left = 2
|
||||||
|
Height = 26
|
||||||
|
Top = 2
|
||||||
|
Width = 328
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Around = 2
|
||||||
|
BevelOuter = bvNone
|
||||||
|
ClientHeight = 26
|
||||||
|
ClientWidth = 328
|
||||||
|
TabOrder = 1
|
||||||
|
object TreeFilterEdit1: TTreeFilterEdit
|
||||||
|
Left = 2
|
||||||
|
Height = 22
|
||||||
|
Top = 2
|
||||||
|
Width = 324
|
||||||
|
ButtonWidth = 23
|
||||||
|
NumGlyphs = 1
|
||||||
|
Align = alClient
|
||||||
|
BorderSpacing.Around = 2
|
||||||
|
MaxLength = 0
|
||||||
|
TabOrder = 0
|
||||||
|
FilteredTreeview = Tree
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,70 @@
|
||||||
|
unit ce_staticexplorer;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, FileUtil, TreeFilterEdit, Forms, Controls, Graphics,
|
||||||
|
Dialogs, ExtCtrls, Menus, ComCtrls, ce_widget, jsonparser, fpjson;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TCEStaticExplorerWidget }
|
||||||
|
TCEStaticExplorerWidget = class(TCEWidget)
|
||||||
|
Panel1: TPanel;
|
||||||
|
Tree: TTreeView;
|
||||||
|
TreeFilterEdit1: TTreeFilterEdit;
|
||||||
|
private
|
||||||
|
public
|
||||||
|
constructor create(aOwner: TComponent); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
uses
|
||||||
|
ce_jsoninfos;
|
||||||
|
|
||||||
|
constructor TCEStaticExplorerWidget.create(aOwner: TComponent);
|
||||||
|
var
|
||||||
|
rt, nd, mb: TTreeNode;
|
||||||
|
infs: TDSourceInfos;
|
||||||
|
mods: TDSourceInfos;
|
||||||
|
dt: TJsonData;
|
||||||
|
memberKind: TInfKind;
|
||||||
|
i,j,k: Integer;
|
||||||
|
membinfs: TDSourceInfos;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
fID := 'ID_SEXPL';
|
||||||
|
//
|
||||||
|
for i:= 0 to high(JSonInfos.fData) do
|
||||||
|
begin
|
||||||
|
|
||||||
|
mods := JSonInfos.getFileModule(i);
|
||||||
|
for j := 0 to high(mods) do
|
||||||
|
begin
|
||||||
|
|
||||||
|
rt := Tree.Items.Add(nil, mods[j].infs);
|
||||||
|
|
||||||
|
for memberKind in InfKindNonModule do
|
||||||
|
begin
|
||||||
|
membinfs := JSonInfos.getMembers(i, j, memberKind);
|
||||||
|
nd := Tree.Items.AddChild(rt, InfKindStr[memberKind]);
|
||||||
|
for k := 0 to high(membinfs) do
|
||||||
|
begin
|
||||||
|
mb := Tree.Items.AddChild(nd, membinfs[k].infs);
|
||||||
|
mb.Data := @membinfs[k];
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
object CEWidget: TCEWidget
|
object CEWidget: TCEWidget
|
||||||
Left = 1570
|
Left = 1538
|
||||||
Height = 121
|
Height = 121
|
||||||
Top = 721
|
Top = 721
|
||||||
Width = 332
|
Width = 332
|
||||||
|
@ -7,6 +7,7 @@ object CEWidget: TCEWidget
|
||||||
Caption = 'CEWidget'
|
Caption = 'CEWidget'
|
||||||
ClientHeight = 121
|
ClientHeight = 121
|
||||||
ClientWidth = 332
|
ClientWidth = 332
|
||||||
|
ShowHint = True
|
||||||
LCLVersion = '1.2.4.0'
|
LCLVersion = '1.2.4.0'
|
||||||
object Back: TPanel
|
object Back: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
|
|
|
@ -6,7 +6,7 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, ExtCtrls,
|
Classes, SysUtils, FileUtil, Forms, Controls, ExtCtrls,
|
||||||
AnchorDocking, AnchorDockStorage, ActnList, Menus, syncobjs, ce_common;
|
AnchorDocking, AnchorDockStorage, ActnList, Menus, ce_common;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ type
|
||||||
protected
|
protected
|
||||||
fID: string;
|
fID: string;
|
||||||
fNeedAutoUpdate: boolean;
|
fNeedAutoUpdate: boolean;
|
||||||
fLocker: TCriticalSection;
|
|
||||||
procedure autoWidgetUpdate; virtual;
|
procedure autoWidgetUpdate; virtual;
|
||||||
procedure manualWidgetUpdate; virtual;
|
procedure manualWidgetUpdate; virtual;
|
||||||
published
|
published
|
||||||
|
@ -88,15 +87,12 @@ begin
|
||||||
fAutoUpdater := TTimer.Create(self);
|
fAutoUpdater := TTimer.Create(self);
|
||||||
fAutoUpdater.Interval := 50;
|
fAutoUpdater.Interval := 50;
|
||||||
fAutoUpdater.OnTimer := @autoUpdaterEvent;
|
fAutoUpdater.OnTimer := @autoUpdaterEvent;
|
||||||
fLocker := TCriticalSection.Create;
|
|
||||||
DockMaster.MakeDockable(Self, true, true, true);
|
DockMaster.MakeDockable(Self, true, true, true);
|
||||||
DockMaster.GetAnchorSite(Self).Header.HeaderPosition := adlhpTop;
|
DockMaster.GetAnchorSite(Self).Header.HeaderPosition := adlhpTop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCEWidget.destroy;
|
destructor TCEWidget.destroy;
|
||||||
begin
|
begin
|
||||||
fLocker.Leave;
|
|
||||||
fLocker.Free;
|
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -110,14 +106,14 @@ begin
|
||||||
Dec(fWidgUpdateCount);
|
Dec(fWidgUpdateCount);
|
||||||
if fWidgUpdateCount > 0 then
|
if fWidgUpdateCount > 0 then
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF DEBUG}
|
||||||
writeln('widget update count > 0');
|
writeln('widget update count > 0');
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
fManuUpdating := true;
|
fManuUpdating := true;
|
||||||
//fLocker.Enter;
|
|
||||||
manualWidgetUpdate;
|
manualWidgetUpdate;
|
||||||
//fLocker.Leave;
|
|
||||||
fManuUpdating := false;
|
fManuUpdating := false;
|
||||||
fWidgUpdateCount := 0;
|
fWidgUpdateCount := 0;
|
||||||
|
|
||||||
|
@ -126,9 +122,7 @@ end;
|
||||||
procedure TCEWidget.forceManualWidgetUpdate;
|
procedure TCEWidget.forceManualWidgetUpdate;
|
||||||
begin
|
begin
|
||||||
fManuUpdating := true;
|
fManuUpdating := true;
|
||||||
//fLocker.Enter;
|
|
||||||
manualWidgetUpdate;
|
manualWidgetUpdate;
|
||||||
//fLocker.Leave;
|
|
||||||
fManuUpdating := false;
|
fManuUpdating := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -137,10 +131,8 @@ begin
|
||||||
if not fNeedAutoUpdate then exit;
|
if not fNeedAutoUpdate then exit;
|
||||||
fAutoUpdating := true;
|
fAutoUpdating := true;
|
||||||
try
|
try
|
||||||
//fLocker.Enter;
|
|
||||||
autoWidgetUpdate;
|
autoWidgetUpdate;
|
||||||
finally
|
finally
|
||||||
//fLocker.Leave;
|
|
||||||
fAutoUpdating := false;
|
fAutoUpdating := false;
|
||||||
fNeedAutoUpdate := false;
|
fNeedAutoUpdate := false;
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue