mirror of https://gitlab.com/basile.b/dexed.git
Compare commits
No commits in common. "master" and "v3.9.24" have entirely different histories.
|
|
@ -19,14 +19,14 @@ branches:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- ps: |
|
- ps: |
|
||||||
$LDC_URL = "https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-windows-multilib.7z"
|
$LDC_URL = "https://github.com/ldc-developers/ldc/releases/download/v1.27.1/ldc2-1.27.1-windows-x64.7z"
|
||||||
$LDC_NME = "C:\ldc.7z";
|
$LDC_NME = "C:\ldc.7z";
|
||||||
$LAZ_URL = "https://gitlab.com/basile.b/laz-bin-cache.git"
|
$LAZ_URL = "https://gitlab.com/basile.b/laz-bin-cache.git"
|
||||||
$LAZ_NME = "laz-bin-cache\lazarus-2.2.0-fpc-3.2.2-win64.exe"
|
$LAZ_NME = "laz-bin-cache\lazarus-2.2.0-fpc-3.2.2-win64.exe"
|
||||||
|
|
||||||
(new-object net.webclient).DownloadFile($LDC_URL, $LDC_NME)
|
(new-object net.webclient).DownloadFile($LDC_URL, $LDC_NME)
|
||||||
7z x $LDC_NME -o"C:\" -y -r
|
7z x $LDC_NME -o"C:\" -y -r
|
||||||
Rename-Item "C:\ldc2-1.33.0-windows-multilib" "C:\ldc"
|
Rename-Item "C:\ldc2-1.27.1-windows-x64" "C:\ldc"
|
||||||
|
|
||||||
git clone $LAZ_URL --depth=1
|
git clone $LAZ_URL --depth=1
|
||||||
Start-Process -FilePath $LAZ_NME -Wait -ArgumentList "/SILENT", "/SUPPRESSMSGBOXES", "/DIR=C:\lazarus"
|
Start-Process -FilePath $LAZ_NME -Wait -ArgumentList "/SILENT", "/SUPPRESSMSGBOXES", "/DIR=C:\lazarus"
|
||||||
|
|
@ -16,9 +16,30 @@ pages:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
|
|
||||||
release:
|
release:
|
||||||
image: registry.gitlab.com/basile.b/dexed/rlz-image.fedora.x86_64:1.3
|
image: dlang2/ldc-ubuntu
|
||||||
variables:
|
variables:
|
||||||
GIT_SUBMODULE_STRATEGY: normal
|
GIT_SUBMODULE_STRATEGY: normal
|
||||||
|
before_script:
|
||||||
|
- apt-get update -y
|
||||||
|
# deps, packaging tools
|
||||||
|
- apt-get install -y rpm
|
||||||
|
- apt-get install -y git
|
||||||
|
- apt-get install -y zip
|
||||||
|
- apt-get install -y libcurl4-openssl-dev
|
||||||
|
- apt-get install -y git-lfs && git lfs install
|
||||||
|
# gitlab Ubuntu-based runners default to LD gold
|
||||||
|
# but linking lazarus programs requires LD bfd.
|
||||||
|
- update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 20
|
||||||
|
- update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 10
|
||||||
|
- update-alternatives --config ld
|
||||||
|
- ld --version
|
||||||
|
# lazarus
|
||||||
|
- git clone https://gitlab.com/basile.b/laz-bin-cache.git --depth=1
|
||||||
|
- cd laz-bin-cache
|
||||||
|
- apt install -y ./fpc-laz_3.2.2-210709_amd64.deb
|
||||||
|
- apt install -y ./fpc-src_3.2.2-210709_amd64.deb
|
||||||
|
- apt install -y ./lazarus-project_2.2.0-0_amd64.deb
|
||||||
|
- cd ..
|
||||||
script:
|
script:
|
||||||
- bash setup/build-release.sh
|
- bash setup/build-release.sh
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
|
||||||
43
CHANGELOG.md
43
CHANGELOG.md
|
|
@ -1,46 +1,3 @@
|
||||||
# v3.9.27-devel
|
|
||||||
|
|
||||||
## Enhancements
|
|
||||||
|
|
||||||
- Added the _Git Blame_ widget.
|
|
||||||
- Search & Replace, add visual feedback in the editor.
|
|
||||||
|
|
||||||
## Bugs fixed
|
|
||||||
|
|
||||||
- Mini-explorer, clearing the filter had for effect to scan the root folder instead of the selected one. (#129)
|
|
||||||
- Mini-explorer, on startup selected folder becomes the root, instead of the previous root. (#130)
|
|
||||||
- With dark themes warning message on exit was barely legible.
|
|
||||||
- Editor, completions, better behavior with `..` and when "auto-dot" is enabled (_autoDotDelay_ > 0).
|
|
||||||
|
|
||||||
# v3.9.26
|
|
||||||
|
|
||||||
## Enhancements
|
|
||||||
|
|
||||||
- Editor, added the _Undo All_ action.
|
|
||||||
- GDB Commander, custom executables selected for debugging are now stored in a persistent MRU list.
|
|
||||||
|
|
||||||
## Bugx fixed
|
|
||||||
|
|
||||||
- Fixed windows release (#116). From now ldc2 >= 1.31.0 is a minimal requirement.
|
|
||||||
- The context lines of the diff viewer were not legible whith dark themes.
|
|
||||||
- Font size of reloaded document not always correct.
|
|
||||||
|
|
||||||
# v3.9.25
|
|
||||||
|
|
||||||
## Enhancements
|
|
||||||
|
|
||||||
- Added support for the new DUB package naming scheme.
|
|
||||||
However older DUB versions (or package installed with) are still supported. (#118)
|
|
||||||
- Add highlighter preset "Arc Dark".
|
|
||||||
|
|
||||||
## Bugs fixed
|
|
||||||
|
|
||||||
- Completion did not work properly for dependencies specified with a _path_ property.
|
|
||||||
- Word completions (non-semantics ones) did not include identifiers containing digits. (#121)
|
|
||||||
- Messages, "select all" could hang the IDE for a while (#120)
|
|
||||||
- Custom tools editor, when focused and typing, a useless input box appeared.
|
|
||||||
- Symbol List, spurious errors when the code used most recently added languages constructs.
|
|
||||||
|
|
||||||
# v3.9.24
|
# v3.9.24
|
||||||
|
|
||||||
## Enhancements
|
## Enhancements
|
||||||
|
|
|
||||||
19
README.md
19
README.md
|
|
@ -24,15 +24,22 @@ Dexed, the _D Extended EDitor_, is an IDE for the [D programming language](https
|
||||||
|
|
||||||
## Project information
|
## Project information
|
||||||
|
|
||||||
- :bookmark: latest release: version 3.9.26, Mon 18 Sep. 2023.
|
- :bookmark: latest release: version 3.9.23, Wed 15 Jul. 2022.
|
||||||
- :scroll: licensed under the terms of the Boost software license.
|
- :scroll: licensed under the terms of the Boost software license.
|
||||||
|
- :dollar: Development can be supported with [Paypal donations](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AQDJVC39PJF7J).
|
||||||
|
|
||||||
## Download version 3.9.26
|
## Download version 3.9.23
|
||||||
|
|
||||||
- :package: [setup program for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.26/downloads/binaries/dexed.3.9.26.linux64.setup.zip)
|
- :package: [setup program for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.23/downloads/binaries/dexed.3.9.23.linux64.setup.zip)
|
||||||
- :package: [binaries for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.26/downloads/binaries/dexed.3.9.26.linux64.zip)
|
- :package: [binaries for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.23/downloads/binaries/dexed.3.9.23.linux64.zip)
|
||||||
- :package: [rpm for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.26/downloads/binaries/dexed-3.9.26-0.x86_64.rpm)
|
- :package: [rpm for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.23/downloads/binaries/dexed-3.9.23-0.x86_64.rpm)
|
||||||
- :package: [deb for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.26/downloads/binaries/dexed-3.9.26.amd64.deb)
|
- :package: [deb for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.23/downloads/binaries/dexed-3.9.23.amd64.deb)
|
||||||
|
|
||||||
|
The _zip_ archives allow to move freely the files.
|
||||||
|
The _setup.zip_ archives contain a command line program that installs to predefined locations so that the software can be run without additional intervention.
|
||||||
|
The _deb_ and the _rpm_ packages are for those who prefer the official setup system of their linux systems.
|
||||||
|
FreeBSD (all archs), Linux (32 bit) and Windows (32 bits) versions must be [built manually](https://basile.b.gitlab.io/dexed/build.html).
|
||||||
|
A Windows 64bit build can be found [on appveyor](https://ci.appveyor.com/project/BBasile/dexed/history). Click the top most item that has a green left margin and download the file listed in the "Artifacts" tab.
|
||||||
|
|
||||||
[**See this page**](https://basile.b.gitlab.io/dexed/setup.html) for more information about the setup.
|
[**See this page**](https://basile.b.gitlab.io/dexed/setup.html) for more information about the setup.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,7 @@
|
||||||
"path" : "../etc/libdparse"
|
"path" : "../etc/libdparse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dflags-linux" : [
|
"dflags" : [
|
||||||
"-link-defaultlib-shared=false"
|
"-link-defaultlib-shared=false"
|
||||||
],
|
]
|
||||||
"dflags-windows" : [
|
|
||||||
"-link-defaultlib-shared=false",
|
|
||||||
"-fvisibility=public",
|
|
||||||
"-dllimport=none",
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|
@ -432,7 +432,7 @@ static assert (!MustAddGcRange!(SymbolListBuilder!(ListFmt.Pas)));
|
||||||
override void visit(const ContinueStatement) {}
|
override void visit(const ContinueStatement) {}
|
||||||
override void visit(const Deprecated) {}
|
override void visit(const Deprecated) {}
|
||||||
override void visit(const Expression) {}
|
override void visit(const Expression) {}
|
||||||
override void dynamicDispatch(const ExpressionNode) {}
|
override void visit(const ExpressionNode) {}
|
||||||
override void visit(const ExpressionStatement) {}
|
override void visit(const ExpressionStatement) {}
|
||||||
override void visit(const FunctionAttribute) {}
|
override void visit(const FunctionAttribute) {}
|
||||||
override void visit(const FunctionContract) {}
|
override void visit(const FunctionContract) {}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Dexed is mostly programmed in Object Pascal, using the the [Lazarus development
|
||||||
* [Download](http://lazarus.freepascal.org/index.php?page=downloads) and setup the latest Lazarus version (>= 2.2.0) and FPC + FPC sources (= 3.2.2) for your platform.
|
* [Download](http://lazarus.freepascal.org/index.php?page=downloads) and setup the latest Lazarus version (>= 2.2.0) and FPC + FPC sources (= 3.2.2) for your platform.
|
||||||
* Windows: the three packages are bundled in an installer.
|
* Windows: the three packages are bundled in an installer.
|
||||||
* Linux: the three packages must be downloaded and setup individually. It's recommended to download the packages from _SourceForge_ and not from the official repository of the distribution because they don't always propose the latest version.
|
* Linux: the three packages must be downloaded and setup individually. It's recommended to download the packages from _SourceForge_ and not from the official repository of the distribution because they don't always propose the latest version.
|
||||||
* [Download](https://github.com/ldc-developers/ldc/releases) and setup LDC2 (>= v1.31.0), the LLVM-based D compiler. It is used to compile the part of the IDE that's written in D, a library called _libdexed-d_. LDC2 binaries must be visible in the system PATH variable. Note that building _libdexed-d_ is automatic.
|
* [Download](https://github.com/ldc-developers/ldc/releases) and setup LDC2, the LLVM-based D compiler. It is used to compile the part of the IDE that's written in D, a library called _libdexed-d_. LDC2 binaries must be visible in the system PATH variable. Note that building _libdexed-d_ is automatic.
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit fe6d1e38fb4fc04323170389cfec67ed7fd4e24a
|
Subproject commit b94a1573acc5c5c6b21794970af5907f2a21822d
|
||||||
|
|
@ -125,4 +125,3 @@ __gshared
|
||||||
__traits
|
__traits
|
||||||
__vector
|
__vector
|
||||||
__parameters
|
__parameters
|
||||||
__rvalue
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
#!/usr/bin/sh
|
|
||||||
isitthere --if=sxkeywords.txt --ml=128 --is=6574 --fk=pascal --of=sxkw.pas --fn=KeywordMatch
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
alias
|
|
||||||
apply
|
|
||||||
asm
|
|
||||||
assert
|
|
||||||
auto
|
|
||||||
break
|
|
||||||
class
|
|
||||||
const
|
|
||||||
continue
|
|
||||||
defer
|
|
||||||
delete
|
|
||||||
do
|
|
||||||
echo
|
|
||||||
else
|
|
||||||
enum
|
|
||||||
false
|
|
||||||
finally
|
|
||||||
foreach
|
|
||||||
from
|
|
||||||
function
|
|
||||||
goto
|
|
||||||
if
|
|
||||||
import
|
|
||||||
in
|
|
||||||
label
|
|
||||||
new
|
|
||||||
null
|
|
||||||
on
|
|
||||||
overload
|
|
||||||
protection
|
|
||||||
return
|
|
||||||
static
|
|
||||||
struct
|
|
||||||
super
|
|
||||||
switch
|
|
||||||
template
|
|
||||||
this
|
|
||||||
throw
|
|
||||||
true
|
|
||||||
try
|
|
||||||
union
|
|
||||||
unit
|
|
||||||
var
|
|
||||||
version
|
|
||||||
with
|
|
||||||
while
|
|
||||||
|
|
||||||
char
|
|
||||||
bool
|
|
||||||
f32
|
|
||||||
f64
|
|
||||||
s16
|
|
||||||
s32
|
|
||||||
s64
|
|
||||||
s8
|
|
||||||
ssize
|
|
||||||
u16
|
|
||||||
u32
|
|
||||||
u64
|
|
||||||
u8
|
|
||||||
usize
|
|
||||||
|
|
@ -434,7 +434,6 @@
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<DebugInfoType Value="dsDwarf2"/>
|
|
||||||
<UseHeaptrc Value="True"/>
|
<UseHeaptrc Value="True"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
<Options>
|
<Options>
|
||||||
|
|
@ -488,7 +487,6 @@
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<DebugInfoType Value="dsDwarf2"/>
|
|
||||||
<UseHeaptrc Value="True"/>
|
<UseHeaptrc Value="True"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
<Options>
|
<Options>
|
||||||
|
|
@ -513,7 +511,7 @@
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<environment>
|
<environment>
|
||||||
<UserOverrides Count="1">
|
<UserOverrides Count="1">
|
||||||
<Variable0 Name="LD_LIBRARY_PATH" Value="$(ProjPath)/../bin"/>
|
<Variable0 Name="LD_LIBRARY_PATH" Value="./"/>
|
||||||
</UserOverrides>
|
</UserOverrides>
|
||||||
</environment>
|
</environment>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
|
@ -521,7 +519,7 @@
|
||||||
<Mode0 Name="default">
|
<Mode0 Name="default">
|
||||||
<environment>
|
<environment>
|
||||||
<UserOverrides Count="1">
|
<UserOverrides Count="1">
|
||||||
<Variable0 Name="LD_LIBRARY_PATH" Value="$(ProjPath)/../bin"/>
|
<Variable0 Name="LD_LIBRARY_PATH" Value="./"/>
|
||||||
</UserOverrides>
|
</UserOverrides>
|
||||||
</environment>
|
</environment>
|
||||||
</Mode0>
|
</Mode0>
|
||||||
|
|
@ -553,7 +551,7 @@
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item8>
|
</Item8>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="65">
|
<Units Count="64">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="dexed.lpr"/>
|
<Filename Value="dexed.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
|
|
@ -886,13 +884,6 @@
|
||||||
<Filename Value="..\src\u_makeproject.pas"/>
|
<Filename Value="..\src\u_makeproject.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
</Unit63>
|
</Unit63>
|
||||||
<Unit64>
|
|
||||||
<Filename Value="..\src\u_blame.pas"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
<ComponentName Value="BlameWidget"/>
|
|
||||||
<HasResources Value="True"/>
|
|
||||||
<ResourceBaseClass Value="Form"/>
|
|
||||||
</Unit64>
|
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
|
@ -916,7 +907,6 @@
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<GenerateDebugInfo Value="False"/>
|
<GenerateDebugInfo Value="False"/>
|
||||||
<DebugInfoType Value="dsDwarf2"/>
|
|
||||||
</Debugging>
|
</Debugging>
|
||||||
<LinkSmart Value="True"/>
|
<LinkSmart Value="True"/>
|
||||||
<Options>
|
<Options>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ uses
|
||||||
u_lcldragdrop, u_stringrange, u_dlangmaps, u_projgroup, u_projutils,
|
u_lcldragdrop, u_stringrange, u_dlangmaps, u_projgroup, u_projutils,
|
||||||
u_d2synpresets, u_dbgitf, u_ddemangle, u_dubproject, LCLVersion,
|
u_d2synpresets, u_dbgitf, u_ddemangle, u_dubproject, LCLVersion,
|
||||||
u_halstead, u_diff, u_profileviewer, u_semver, u_term, u_simpleget,
|
u_halstead, u_diff, u_profileviewer, u_semver, u_term, u_simpleget,
|
||||||
u_makeproject, u_blame;
|
u_makeproject;
|
||||||
|
|
||||||
{$if lcl_fullversion < 2020000}
|
{$if lcl_fullversion < 2020000}
|
||||||
{$ERROR Lazarus version >= 2.2 required}
|
{$ERROR Lazarus version >= 2.2 required}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
Fixes https://github.com/Basile-z/Coedit/issues/218
|
||||||
|
Must be applied to any Lazarus 1.8.0 Vanilla.
|
||||||
|
Has not be applied to Lazarus 1.8.1 or newer.
|
||||||
|
--- synedit.pp
|
||||||
|
+++ synedit.pp
|
||||||
|
@@ -8945,7 +8945,7 @@
|
||||||
|
while not Highlighter.GetEol do begin
|
||||||
|
Start := Highlighter.GetTokenPos + 1;
|
||||||
|
Token := Highlighter.GetToken;
|
||||||
|
+ if (PosX >= Start) and (PosX < Start + Length(Token)) then begin
|
||||||
|
- if (PosX >= Start) and (PosX <= Start + Length(Token)) then begin
|
||||||
|
Attri := Highlighter.GetTokenAttribute;
|
||||||
|
TokenType := Highlighter.GetTokenKind;
|
||||||
|
exit(True);
|
||||||
|
@@ -8990,7 +8990,7 @@
|
||||||
|
//TokenType := Highlighter.GetTokenKind;
|
||||||
|
Attri := Highlighter.GetTokenAttribute;
|
||||||
|
//DebugLn([' TCustomSynEdit.CaretAtIdentOrString: Start=', Start, ', Token=', Token]);
|
||||||
|
+ if (PosX >= Start) and (PosX < Start + Length(Token)) then
|
||||||
|
- if (PosX >= Start) and (PosX <= Start + Length(Token)) then
|
||||||
|
begin
|
||||||
|
AtIdent := Attri = Highlighter.IdentifierAttribute;
|
||||||
|
NearString := (Attri = Highlighter.StringAttribute)
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
FROM fedora:37
|
|
||||||
RUN dnf install -y "coreutils" "dpkg" "rpm" "rpm-build" "zip" "tar" "make" "findutils" "curl" "git" "libgcc" "bash" "which" &&\
|
|
||||||
curl -JLO "https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20x86_64%20RPM/Lazarus%202.2.6/fpc-3.2.2-1.x86_64.rpm/download" &&\
|
|
||||||
curl -JLO "https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20x86_64%20RPM/Lazarus%202.2.6/fpc-src-3.2.2-1.x86_64.rpm" &&\
|
|
||||||
curl -JLO "https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20x86_64%20RPM/Lazarus%202.2.6/lazarus-2.2.6-0.x86_64.rpm/download" &&\
|
|
||||||
dnf install -y "fpc-3.2.2-1.x86_64.rpm" "fpc-src-3.2.2-1.x86_64.rpm" "lazarus-2.2.6-0.x86_64.rpm" &&\
|
|
||||||
curl -JLO "https://github.com/ldc-developers/ldc/releases/download/v1.32.2/ldc2-1.32.2-linux-x86_64.tar.xz" &&\
|
|
||||||
tar -xf "ldc2-1.32.2-linux-x86_64.tar.xz" && mv "ldc2-1.32.2-linux-x86_64" "ldc2-" &&\
|
|
||||||
ln -s "/ldc2-/bin/ldc2" "/usr/bin/ldc2" && ln -s "/ldc2-/bin/ldmd2" "/usr/bin/ldmd2" && ln -s "/ldc2-/bin/dub" "/usr/bin/dub" &&\
|
|
||||||
dnf clean all && rm -rf "/var/cache/yum"
|
|
||||||
|
|
@ -51,7 +51,7 @@ git fetch --tags
|
||||||
if [ ! -z "$dcd_ver" ]; then
|
if [ ! -z "$dcd_ver" ]; then
|
||||||
git checkout $dcd_ver
|
git checkout $dcd_ver
|
||||||
fi
|
fi
|
||||||
make ldc -j5
|
make ldc
|
||||||
echo "...done"
|
echo "...done"
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|
@ -69,7 +69,7 @@ git fetch --tags
|
||||||
if [ ! -z "$dscanner_ver" ]; then
|
if [ ! -z "$dscanner_ver" ]; then
|
||||||
git checkout $dscanner_ver
|
git checkout $dscanner_ver
|
||||||
fi
|
fi
|
||||||
make ldc -j5
|
make ldc
|
||||||
echo "...done"
|
echo "...done"
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|
@ -126,10 +126,10 @@ if [ ! -z "$GITLAB_CI" ]; then
|
||||||
LOG=$(./extract_last_changelog_part)
|
LOG=$(./extract_last_changelog_part)
|
||||||
LOG=$(echo "$LOG" | sed -z 's/\n/\\n/g' | sed -z 's/\"/\\"/g')
|
LOG=$(echo "$LOG" | sed -z 's/\n/\\n/g' | sed -z 's/\"/\\"/g')
|
||||||
|
|
||||||
ASSET_RPM='{ "name" : "'$RPM_NAME'" , "url" : "'$LNK_BASE$RPM_NAME'" , "direct_asset_path" : "/binaries/'$RPM_NAME'" }'
|
ASSET_RPM='{ "name" : "'$RPM_NAME'" , "url" : "'$LNK_BASE$RPM_NAME'" , "filepath" : "/binaries/'$RPM_NAME'" }'
|
||||||
ASSET_DEB='{ "name" : "'$DEB_NAME'" , "url" : "'$LNK_BASE$DEB_NAME'" , "direct_asset_path" : "/binaries/'$DEB_NAME'" }'
|
ASSET_DEB='{ "name" : "'$DEB_NAME'" , "url" : "'$LNK_BASE$DEB_NAME'" , "filepath" : "/binaries/'$DEB_NAME'" }'
|
||||||
ASSET_ZP1='{ "name" : "'$ZP1_NAME'" , "url" : "'$LNK_BASE$ZP1_NAME'" , "direct_asset_path" : "/binaries/'$ZP1_NAME'" }'
|
ASSET_ZP1='{ "name" : "'$ZP1_NAME'" , "url" : "'$LNK_BASE$ZP1_NAME'" , "filepath" : "/binaries/'$ZP1_NAME'" }'
|
||||||
ASSET_ZP2='{ "name" : "'$ZP2_NAME'" , "url" : "'$LNK_BASE$ZP2_NAME'" , "direct_asset_path" : "/binaries/'$ZP2_NAME'" }'
|
ASSET_ZP2='{ "name" : "'$ZP2_NAME'" , "url" : "'$LNK_BASE$ZP2_NAME'" , "filepath" : "/binaries/'$ZP2_NAME'" }'
|
||||||
|
|
||||||
# ASSET_RPM='{ "name" : "'$RPM_NAME'" , "url" : "'$LNK_BASE$RPM_NAME'" }'
|
# ASSET_RPM='{ "name" : "'$RPM_NAME'" , "url" : "'$LNK_BASE$RPM_NAME'" }'
|
||||||
# ASSET_DEB='{ "name" : "'$DEB_NAME'" , "url" : "'$LNK_BASE$DEB_NAME'" }'
|
# ASSET_DEB='{ "name" : "'$DEB_NAME'" , "url" : "'$LNK_BASE$DEB_NAME'" }'
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
sudo docker build $(realpath ".") -t "registry.gitlab.com/basile.b/dexed/rlz-image.fedora.x86_64:1.3"
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
v3.9.26
|
v3.9.24
|
||||||
|
|
|
||||||
241
src/u_blame.lfm
241
src/u_blame.lfm
|
|
@ -1,241 +0,0 @@
|
||||||
inherited BlameWidget: TBlameWidget
|
|
||||||
Left = 1275
|
|
||||||
Height = 282
|
|
||||||
Top = 652
|
|
||||||
Width = 563
|
|
||||||
Caption = 'GIT Blame'
|
|
||||||
ClientHeight = 282
|
|
||||||
ClientWidth = 563
|
|
||||||
inherited Content: TPanel
|
|
||||||
Height = 246
|
|
||||||
Top = 36
|
|
||||||
Width = 563
|
|
||||||
ClientHeight = 246
|
|
||||||
ClientWidth = 563
|
|
||||||
object btnBlame: TButton[0]
|
|
||||||
Left = 8
|
|
||||||
Height = 32
|
|
||||||
Top = 206
|
|
||||||
Width = 547
|
|
||||||
Align = alClient
|
|
||||||
BorderSpacing.Around = 8
|
|
||||||
Caption = 'Blame'
|
|
||||||
TabOrder = 0
|
|
||||||
OnClick = btnBlameClick
|
|
||||||
end
|
|
||||||
object grpGen: TGroupBox[1]
|
|
||||||
Left = 4
|
|
||||||
Height = 95
|
|
||||||
Top = 4
|
|
||||||
Width = 555
|
|
||||||
Align = alTop
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
Caption = 'General'
|
|
||||||
ClientHeight = 76
|
|
||||||
ClientWidth = 553
|
|
||||||
TabOrder = 1
|
|
||||||
object Panel1: TPanel
|
|
||||||
Left = 4
|
|
||||||
Height = 32
|
|
||||||
Top = 4
|
|
||||||
Width = 545
|
|
||||||
Align = alTop
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
BevelColor = clNone
|
|
||||||
BevelOuter = bvNone
|
|
||||||
ClientHeight = 32
|
|
||||||
ClientWidth = 545
|
|
||||||
TabOrder = 0
|
|
||||||
object Label1: TLabel
|
|
||||||
Left = 4
|
|
||||||
Height = 24
|
|
||||||
Top = 4
|
|
||||||
Width = 118
|
|
||||||
Align = alLeft
|
|
||||||
Alignment = taCenter
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
Caption = 'Displayed Revision '
|
|
||||||
end
|
|
||||||
object lblDispRev: TStaticText
|
|
||||||
Left = 126
|
|
||||||
Height = 24
|
|
||||||
Top = 4
|
|
||||||
Width = 365
|
|
||||||
Align = alClient
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
BorderStyle = sbsSingle
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object btnCpyCurrHash: TSpeedButton
|
|
||||||
Left = 495
|
|
||||||
Height = 32
|
|
||||||
Hint = 'copy current commit hash'
|
|
||||||
Top = 0
|
|
||||||
Width = 25
|
|
||||||
Align = alRight
|
|
||||||
OnClick = btnCpyCurrHashClick
|
|
||||||
end
|
|
||||||
object btnLogCurr: TSpeedButton
|
|
||||||
Left = 520
|
|
||||||
Height = 32
|
|
||||||
Hint = 'show current commit message'
|
|
||||||
Top = 0
|
|
||||||
Width = 25
|
|
||||||
Align = alRight
|
|
||||||
OnClick = btnLogCurrClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object Panel4: TPanel
|
|
||||||
Left = 4
|
|
||||||
Height = 32
|
|
||||||
Top = 40
|
|
||||||
Width = 545
|
|
||||||
Align = alTop
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
BevelColor = clNone
|
|
||||||
BevelOuter = bvNone
|
|
||||||
ClientHeight = 32
|
|
||||||
ClientWidth = 545
|
|
||||||
TabOrder = 1
|
|
||||||
object Label4: TLabel
|
|
||||||
Left = 4
|
|
||||||
Height = 24
|
|
||||||
Top = 4
|
|
||||||
Width = 60
|
|
||||||
Align = alLeft
|
|
||||||
Alignment = taCenter
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
Caption = 'Filename '
|
|
||||||
end
|
|
||||||
object lblFname: TStaticText
|
|
||||||
Left = 68
|
|
||||||
Height = 24
|
|
||||||
Top = 4
|
|
||||||
Width = 473
|
|
||||||
Align = alClient
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
BorderStyle = sbsSingle
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object grpLine: TGroupBox[2]
|
|
||||||
Left = 4
|
|
||||||
Height = 95
|
|
||||||
Top = 103
|
|
||||||
Width = 555
|
|
||||||
Align = alTop
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
Caption = 'Current line'
|
|
||||||
ClientHeight = 76
|
|
||||||
ClientWidth = 553
|
|
||||||
TabOrder = 2
|
|
||||||
object Panel2: TPanel
|
|
||||||
Left = 4
|
|
||||||
Height = 32
|
|
||||||
Top = 4
|
|
||||||
Width = 545
|
|
||||||
Align = alTop
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
BevelColor = clNone
|
|
||||||
BevelOuter = bvNone
|
|
||||||
ClientHeight = 32
|
|
||||||
ClientWidth = 545
|
|
||||||
TabOrder = 0
|
|
||||||
object Label2: TLabel
|
|
||||||
Left = 4
|
|
||||||
Height = 24
|
|
||||||
Top = 4
|
|
||||||
Width = 111
|
|
||||||
Align = alLeft
|
|
||||||
Alignment = taCenter
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
Caption = 'Previous Revision '
|
|
||||||
end
|
|
||||||
object lblPrevRev: TStaticText
|
|
||||||
Left = 119
|
|
||||||
Height = 24
|
|
||||||
Top = 4
|
|
||||||
Width = 372
|
|
||||||
Align = alClient
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
BorderStyle = sbsSingle
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object btnCpyPrevHash: TSpeedButton
|
|
||||||
Left = 495
|
|
||||||
Height = 32
|
|
||||||
Hint = 'copy prior commit hash'
|
|
||||||
Top = 0
|
|
||||||
Width = 25
|
|
||||||
Align = alRight
|
|
||||||
OnClick = btnCpyPrevHashClick
|
|
||||||
end
|
|
||||||
object btnLogPrev: TSpeedButton
|
|
||||||
Left = 520
|
|
||||||
Height = 32
|
|
||||||
Hint = 'show prior commit message'
|
|
||||||
Top = 0
|
|
||||||
Width = 25
|
|
||||||
Align = alRight
|
|
||||||
OnClick = btnLogPrevClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object Panel3: TPanel
|
|
||||||
Left = 4
|
|
||||||
Height = 32
|
|
||||||
Top = 40
|
|
||||||
Width = 545
|
|
||||||
Align = alTop
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
BevelColor = clNone
|
|
||||||
BevelOuter = bvNone
|
|
||||||
ClientHeight = 32
|
|
||||||
ClientWidth = 545
|
|
||||||
TabOrder = 1
|
|
||||||
object Label3: TLabel
|
|
||||||
Left = 4
|
|
||||||
Height = 24
|
|
||||||
Top = 4
|
|
||||||
Width = 106
|
|
||||||
Align = alLeft
|
|
||||||
Alignment = taCenter
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
Caption = 'Author and Date '
|
|
||||||
end
|
|
||||||
object lblAuthDate: TStaticText
|
|
||||||
Left = 114
|
|
||||||
Height = 24
|
|
||||||
Top = 4
|
|
||||||
Width = 427
|
|
||||||
Align = alClient
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Around = 4
|
|
||||||
BorderStyle = sbsSingle
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
inherited toolbar: TDexedToolBar
|
|
||||||
Width = 555
|
|
||||||
end
|
|
||||||
object Timer1: TTimer[3]
|
|
||||||
Enabled = False
|
|
||||||
OnTimer = Timer1Timer
|
|
||||||
Left = 32
|
|
||||||
end
|
|
||||||
end
|
|
||||||
504
src/u_blame.pas
504
src/u_blame.pas
|
|
@ -1,504 +0,0 @@
|
||||||
unit u_blame;
|
|
||||||
|
|
||||||
{$I u_defines.inc}
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses
|
|
||||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
|
|
||||||
Buttons, ghashmap, process, Clipbrd,
|
|
||||||
u_common, u_interfaces, u_observer, u_widget,
|
|
||||||
u_synmemo, u_stringrange, u_sharedres;
|
|
||||||
|
|
||||||
type
|
|
||||||
|
|
||||||
TLineData = record
|
|
||||||
// the previous git hash
|
|
||||||
hash: string;
|
|
||||||
// if file has ever moved
|
|
||||||
filename: string;
|
|
||||||
// data, author or prev
|
|
||||||
info: string;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TBlameDataKind = (
|
|
||||||
bdkNone, // no yet computed
|
|
||||||
bdkFirst, // initial blame on HEAD
|
|
||||||
bdkBlame // display in a dedicated editor
|
|
||||||
);
|
|
||||||
|
|
||||||
TEditorData = class
|
|
||||||
private
|
|
||||||
// if this is a standard editor or one opened to start blaming
|
|
||||||
kind: TBlameDataKind;
|
|
||||||
// the filename in git
|
|
||||||
filename: string;
|
|
||||||
// current revision
|
|
||||||
currHash: string;
|
|
||||||
// previous revision and fname for each line
|
|
||||||
lineData: array of TLineData;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TEditorToData = specialize THashmap<TDexedMemo, TEditorData, TObjectHash>;
|
|
||||||
|
|
||||||
{ TBlameWidget }
|
|
||||||
|
|
||||||
TBlameWidget = class(TDexedWidget, IDocumentObserver, IProjectObserver)
|
|
||||||
btnBlame: TButton;
|
|
||||||
btnCpyPrevHash: TSpeedButton;
|
|
||||||
btnLogCurr: TSpeedButton;
|
|
||||||
btnLogPrev: TSpeedButton;
|
|
||||||
grpGen: TGroupBox;
|
|
||||||
Panel4: TPanel;
|
|
||||||
grpLine: TGroupBox;
|
|
||||||
Label1: TLabel;
|
|
||||||
Label2: TLabel;
|
|
||||||
Label3: TLabel;
|
|
||||||
Panel1: TPanel;
|
|
||||||
Label4: TLabel;
|
|
||||||
lblFname: TStaticText;
|
|
||||||
Panel2: TPanel;
|
|
||||||
Panel3: TPanel;
|
|
||||||
lblDispRev: TStaticText;
|
|
||||||
lblPrevRev: TStaticText;
|
|
||||||
lblAuthDate: TStaticText;
|
|
||||||
btnCpyCurrHash: TSpeedButton;
|
|
||||||
Timer1: TTimer;
|
|
||||||
procedure btnBlameClick(Sender: TObject);
|
|
||||||
procedure btnCpyCurrHashClick(Sender: TObject);
|
|
||||||
procedure btnCpyPrevHashClick(Sender: TObject);
|
|
||||||
procedure btnLogCurrClick(Sender: TObject);
|
|
||||||
procedure btnLogPrevClick(Sender: TObject);
|
|
||||||
procedure Timer1Timer(Sender: TObject);
|
|
||||||
private
|
|
||||||
fEditors: TEditorToData;
|
|
||||||
fDocData: TEditorData;
|
|
||||||
fDoc: TDExedMemo;
|
|
||||||
fProj: ICommonProject;
|
|
||||||
function getGitCwd(): string;
|
|
||||||
procedure showLog(const hash: string);
|
|
||||||
function checkTool(var exename: string): boolean;
|
|
||||||
protected
|
|
||||||
procedure setVisible(Value: Boolean); override;
|
|
||||||
procedure setToolBarFlat(value: boolean); override;
|
|
||||||
public
|
|
||||||
constructor create(aOwner: TComponent); override;
|
|
||||||
destructor destroy(); override;
|
|
||||||
|
|
||||||
procedure docNew(document: TDexedMemo);
|
|
||||||
procedure docFocused(document: TDexedMemo);
|
|
||||||
procedure docChanged(document: TDexedMemo);
|
|
||||||
procedure docClosing(document: TDexedMemo);
|
|
||||||
|
|
||||||
procedure projNew(project: ICommonProject);
|
|
||||||
procedure projChanged(project: ICommonProject);
|
|
||||||
procedure projClosing(project: ICommonProject);
|
|
||||||
procedure projFocused(project: ICommonProject);
|
|
||||||
procedure projCompiling(project: ICommonProject);
|
|
||||||
procedure projCompiled(project: ICommonProject; success: boolean);
|
|
||||||
|
|
||||||
procedure updateView();
|
|
||||||
|
|
||||||
procedure blameToData(gitLines: TStrings; blameLines: TStrings);
|
|
||||||
procedure blameBegin();
|
|
||||||
procedure blameContinue();
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
implementation
|
|
||||||
{$R *.lfm}
|
|
||||||
|
|
||||||
constructor TBlameWidget.create(aOwner: TComponent);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
fEditors := TEditorToData.create();
|
|
||||||
toolbarVisible:= false;
|
|
||||||
case GetIconScaledSize of
|
|
||||||
iss16:
|
|
||||||
begin
|
|
||||||
AssignPng(btnCpyCurrHash, 'COPY');
|
|
||||||
AssignPng(btnCpyPrevHash, 'COPY');
|
|
||||||
AssignPng(btnLogCurr, 'GIT');
|
|
||||||
AssignPng(btnLogPrev, 'GIT');
|
|
||||||
end;
|
|
||||||
iss24:
|
|
||||||
begin
|
|
||||||
AssignPng(btnCpyCurrHash, 'COPY24');
|
|
||||||
AssignPng(btnCpyPrevHash, 'COPY24');
|
|
||||||
AssignPng(btnLogCurr, 'GIT24');
|
|
||||||
AssignPng(btnLogPrev, 'GIT24');
|
|
||||||
end;
|
|
||||||
iss32:
|
|
||||||
begin
|
|
||||||
AssignPng(btnCpyCurrHash, 'COPY32');
|
|
||||||
AssignPng(btnCpyPrevHash, 'COPY32');
|
|
||||||
AssignPng(btnLogCurr, 'GIT32');
|
|
||||||
AssignPng(btnLogPrev, 'GIT32');
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
EntitiesConnector.addObserver(self);
|
|
||||||
end;
|
|
||||||
|
|
||||||
destructor TBlameWidget.destroy();
|
|
||||||
begin
|
|
||||||
fEditors.free();
|
|
||||||
inherited;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.setVisible(Value: Boolean);
|
|
||||||
begin
|
|
||||||
inherited SetVisible(value);
|
|
||||||
if Timer1.isAssigned then
|
|
||||||
Timer1.Enabled := value;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.setToolBarFlat(value: boolean);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
btnLogCurr.Flat := value;
|
|
||||||
btnCpyCurrHash.Flat := value;
|
|
||||||
btnLogPrev.Flat := value;
|
|
||||||
btnCpyPrevHash.Flat := value;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.docNew(document: TDexedMemo);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.docFocused(document: TDexedMemo);
|
|
||||||
begin
|
|
||||||
fDoc := document;
|
|
||||||
if fEditors.contains(document) then
|
|
||||||
begin
|
|
||||||
fDocData := fEditors[document];
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
fDocData := TEditorData.Create;
|
|
||||||
fEditors.insert(fDoc, fDocData);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.docChanged(document: TDexedMemo);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.docClosing(document: TDexedMemo);
|
|
||||||
var
|
|
||||||
closingData: TEditorData = nil;
|
|
||||||
begin
|
|
||||||
if fEditors.contains(document) then
|
|
||||||
begin
|
|
||||||
closingData := fEditors[document];
|
|
||||||
closingData.Free();
|
|
||||||
fEditors.delete(document);
|
|
||||||
end;
|
|
||||||
if fDoc = document then
|
|
||||||
fDoc := nil;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.projNew(project: ICommonProject);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.projChanged(project: ICommonProject);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.projClosing(project: ICommonProject);
|
|
||||||
begin
|
|
||||||
if project = fProj then
|
|
||||||
fProj := nil;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.projFocused(project: ICommonProject);
|
|
||||||
begin
|
|
||||||
fProj := project;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.projCompiling(project: ICommonProject);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.projCompiled(project: ICommonProject; success: boolean);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.blameToData(gitLines: TStrings; blameLines: TStrings);
|
|
||||||
var
|
|
||||||
i : integer;
|
|
||||||
line: string;
|
|
||||||
rng : TStringRange = (ptr:nil; pos:0; len:0);
|
|
||||||
tmp : string;
|
|
||||||
begin
|
|
||||||
setLength(fDocData.lineData, gitLines.Count);
|
|
||||||
for i := 0 to gitLines.count-1 do
|
|
||||||
begin
|
|
||||||
line:= gitLines[i];
|
|
||||||
rng := TStringRange.create(line);
|
|
||||||
// hash
|
|
||||||
tmp := rng.takeUntil(' ').yield().ToLower();
|
|
||||||
fDocData.lineData[i].hash := tmp;
|
|
||||||
rng.popFront();
|
|
||||||
// optional filename
|
|
||||||
if rng.front() <> '(' then
|
|
||||||
begin
|
|
||||||
tmp := rng.takeUntil('(').yield();
|
|
||||||
tmp := TrimRight(tmp);
|
|
||||||
fDocData.lineData[i].filename := tmp;
|
|
||||||
rng.popFront();
|
|
||||||
end;
|
|
||||||
// date, author
|
|
||||||
tmp := rng.takeUntil(')').yield();
|
|
||||||
fDocData.lineData[i].info := tmp;
|
|
||||||
rng.popFront;
|
|
||||||
rng.popFront;
|
|
||||||
// code
|
|
||||||
if blameLines.isAssigned() then
|
|
||||||
begin
|
|
||||||
tmp := rng.takeUntil([#13,#10]).yield();
|
|
||||||
blameLines.Add(tmp);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TBlameWidget.getGitCwd():string;
|
|
||||||
var
|
|
||||||
old: string = '';
|
|
||||||
begin
|
|
||||||
result := '';
|
|
||||||
if assigned(fProj) then
|
|
||||||
begin
|
|
||||||
result := fProj.filename.extractFileDir;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if fDoc.isAssigned then
|
|
||||||
begin
|
|
||||||
result := fDoc.fileName;
|
|
||||||
while true do
|
|
||||||
begin
|
|
||||||
result := result.extractFileDir;
|
|
||||||
if result = old then
|
|
||||||
exit;
|
|
||||||
if (result + DirectorySeparator + '.git').dirExists then
|
|
||||||
exit;
|
|
||||||
old := result;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TBlameWidget.checkTool(var exename: string): boolean;
|
|
||||||
begin
|
|
||||||
exename := exeFullName('git' + exeExt);
|
|
||||||
result := exename.fileExists();
|
|
||||||
if not result then
|
|
||||||
getMessageDisplay().message('cannot locate the `git` executable', nil, amcApp, amkErr);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.blameBegin();
|
|
||||||
var
|
|
||||||
p: TProcess = nil;
|
|
||||||
s: TStringList = nil;
|
|
||||||
d: IMessagesDisplay = nil;
|
|
||||||
i: integer;
|
|
||||||
g: string = '';
|
|
||||||
begin
|
|
||||||
if fDoc.isNotAssigned or not checkTool(g) then
|
|
||||||
exit;
|
|
||||||
p := TProcess.create(nil);
|
|
||||||
s := TStringList.Create();
|
|
||||||
try
|
|
||||||
p.Executable:= g;
|
|
||||||
p.Options := [poUsePipes, poNoConsole];
|
|
||||||
p.ShowWindow:= swoHIDE;
|
|
||||||
p.CurrentDirectory:= getGitCwd();
|
|
||||||
p.Parameters.AddStrings([ 'blame', fDoc.fileName]);
|
|
||||||
p.execute();
|
|
||||||
processOutputToStrings(p,s);
|
|
||||||
while p.Running do ;
|
|
||||||
if p.ExitCode = 0 then
|
|
||||||
begin
|
|
||||||
fDocData.filename := fDoc.fileName;
|
|
||||||
blameToData(s,nil);
|
|
||||||
fDocData.kind := bdkFirst;
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
d := getMessageDisplay();
|
|
||||||
s.LoadFromStream(p.Stderr);
|
|
||||||
for i := 0 to s.Count-1 do
|
|
||||||
d.message(s[i], fProj, amcMisc, amkAuto);
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
p.free();
|
|
||||||
s.free();
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.blameContinue();
|
|
||||||
var
|
|
||||||
newDoc: TDexedMemo = nil;
|
|
||||||
oldDoc: TDexedMemo = nil;
|
|
||||||
p: TProcess = nil;
|
|
||||||
s: TStringList = nil;
|
|
||||||
d: TLineData;
|
|
||||||
m: IMessagesDisplay = nil;
|
|
||||||
n: string = '';
|
|
||||||
h: string;
|
|
||||||
i: integer;
|
|
||||||
g: string = '';
|
|
||||||
begin
|
|
||||||
if fDoc.isNotAssigned or not checkTool(g) then
|
|
||||||
exit;
|
|
||||||
oldDoc := fDoc;
|
|
||||||
d := fDocData.lineData[fDoc.CaretY-1];
|
|
||||||
h := d.hash;
|
|
||||||
if d.filename.isNotEmpty then
|
|
||||||
n := d.filename
|
|
||||||
else if fDocData.kind = bdkFirst then
|
|
||||||
n := fDoc.fileName
|
|
||||||
else
|
|
||||||
n := fDocData.filename;
|
|
||||||
|
|
||||||
p := TProcess.create(nil);
|
|
||||||
s := TStringList.Create();
|
|
||||||
try
|
|
||||||
p.Executable := exeFullName('git' + exeExt);
|
|
||||||
p.Options := [poUsePipes, poNoConsole];
|
|
||||||
p.ShowWindow := swoHIDE;
|
|
||||||
p.CurrentDirectory:= getGitCwd();
|
|
||||||
p.Parameters.AddStrings([ 'blame', n, h]);
|
|
||||||
p.execute();
|
|
||||||
processOutputToStrings(p,s);
|
|
||||||
while p.Running do ;
|
|
||||||
if p.ExitCode = 0 then
|
|
||||||
begin
|
|
||||||
newDoc := TDexedMemo.Create(nil);
|
|
||||||
blameToData(s,newDoc.Lines);
|
|
||||||
fDocData.kind := bdkBlame;
|
|
||||||
fDocData.currHash := h;
|
|
||||||
fDocData.filename := n;
|
|
||||||
newDoc.ReadOnly := true;
|
|
||||||
newDoc.setHighligtherFrom(oldDoc);
|
|
||||||
getMultiDocHandler().forceCaption(newDoc, '<blame-only view>');
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
m := getMessageDisplay();
|
|
||||||
s.LoadFromStream(p.Stderr);
|
|
||||||
for i := 0 to s.Count-1 do
|
|
||||||
m.message(s[i], fProj, amcMisc, amkAuto);
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
p.free();
|
|
||||||
s.free();
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.updateView();
|
|
||||||
var
|
|
||||||
d: TLineData;
|
|
||||||
begin
|
|
||||||
if fDocData.isNotAssigned or (not visible) or fDoc.isNotAssigned then
|
|
||||||
exit;
|
|
||||||
if fDocData.kind = bdkNone then
|
|
||||||
begin
|
|
||||||
lblFname.Caption := fDoc.fileName;
|
|
||||||
lblDispRev.Caption := 'HEAD';
|
|
||||||
lblPrevRev.Caption := 'N/A';
|
|
||||||
lblAuthDate.Caption:= 'N/A';
|
|
||||||
btnBlame.Caption := 'Collect initial data';
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
if fDocData.kind = bdkFirst then
|
|
||||||
begin
|
|
||||||
lblFname.Caption := fDoc.fileName;
|
|
||||||
lblDispRev.Caption:= 'HEAD';
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
lblFname.Caption := fDocData.fileName;
|
|
||||||
lblDispRev.Caption:= fDocData.currHash;
|
|
||||||
end;
|
|
||||||
d := fDocData.lineData[fDoc.CaretY-1];
|
|
||||||
lblAuthDate.Caption := d.info;
|
|
||||||
if d.hash <> fDocData.currHash then
|
|
||||||
begin
|
|
||||||
btnBlame.Enabled := true;
|
|
||||||
btnBlame.Caption := format('Open blame view for %s', [d.hash]);
|
|
||||||
lblPrevRev.Caption := d.hash;
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
btnBlame.Enabled := false;
|
|
||||||
btnBlame.Caption := 'Open blame';
|
|
||||||
lblPrevRev.Caption := 'N/A (initial commit)';
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.btnBlameClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if fDocData.isNotAssigned then
|
|
||||||
exit;
|
|
||||||
if fDocData.kind = bdkNone then
|
|
||||||
blameBegin()
|
|
||||||
else
|
|
||||||
blameContinue();
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.btnCpyCurrHashClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if fDocData.isAssigned then
|
|
||||||
Clipboard.AsText := fDocData.currHash;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.btnCpyPrevHashClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if fDocData.isAssigned and (length(fDocData.lineData) <> 0) and fDoc.isAssigned then
|
|
||||||
Clipboard.AsText := fDocData.lineData[fDoc.CaretY-1].hash;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.btnLogCurrClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if fDocData.isAssigned then
|
|
||||||
showLog(fDocData.currHash);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.btnLogPrevClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if fDocData.isAssigned and (length(fDocData.lineData) <> 0) and fDoc.isAssigned then
|
|
||||||
showLog(fDocData.lineData[fDoc.CaretY-1].hash);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.showLog(const hash: string);
|
|
||||||
var
|
|
||||||
p: TProcess;
|
|
||||||
g: TStringList;
|
|
||||||
n: string = '';
|
|
||||||
begin
|
|
||||||
if not checkTool(n) or hash.isEmpty() or (hash = 'HEAD') then
|
|
||||||
exit;
|
|
||||||
p := TProcess.Create(nil);
|
|
||||||
g := TStringList.Create;
|
|
||||||
try
|
|
||||||
p.Executable := n;
|
|
||||||
p.Options := [poUsePipes, poNoConsole];
|
|
||||||
p.ShowWindow := swoHIDE;
|
|
||||||
p.CurrentDirectory:= getGitCwd();
|
|
||||||
p.Parameters.AddStrings([ 'log', hash, '-n1', '--pretty=full']);
|
|
||||||
p.execute();
|
|
||||||
processOutputToStrings(p,g);
|
|
||||||
while p.Running do ;
|
|
||||||
if p.ExitCode = 0 then
|
|
||||||
begin
|
|
||||||
showMessage(g.Text);
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
p.free;
|
|
||||||
g.free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBlameWidget.Timer1Timer(Sender: TObject);
|
|
||||||
begin
|
|
||||||
updateView;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
|
||||||
|
|
||||||
|
|
@ -351,9 +351,6 @@ type
|
||||||
// Converts the delta between two calls to GetTickCount64 to a string indicating a duration.
|
// Converts the delta between two calls to GetTickCount64 to a string indicating a duration.
|
||||||
function formatTicksAsDuration(ticks: UInt64): string;
|
function formatTicksAsDuration(ticks: UInt64): string;
|
||||||
|
|
||||||
// Returns wether runing in a dark DE
|
|
||||||
function isDarkDE(): boolean;
|
|
||||||
|
|
||||||
(**
|
(**
|
||||||
* Compares two TPoints.
|
* Compares two TPoints.
|
||||||
*)
|
*)
|
||||||
|
|
@ -1565,11 +1562,6 @@ begin
|
||||||
result += value[p .. value.length];
|
result += value[p .. value.length];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function isDarkDE(): boolean;
|
|
||||||
begin
|
|
||||||
result := clBackground < clCaptionText;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$IFDEF DEBUG}
|
{$IFDEF DEBUG}
|
||||||
initialization
|
initialization
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,9 @@ type
|
||||||
private
|
private
|
||||||
function getIndex: integer;
|
function getIndex: integer;
|
||||||
protected
|
protected
|
||||||
fFixedCaption: string;
|
|
||||||
procedure realSetText(const Value: TCaption); override;
|
procedure realSetText(const Value: TCaption); override;
|
||||||
procedure setFixedCaption(const value: string);
|
|
||||||
public
|
public
|
||||||
property index: integer read getIndex;
|
property index: integer read getIndex;
|
||||||
property fixedCaption: string read fFixedCaption write setFixedCaption;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TPageControlOption = (poPageHistory, poBottomHeader, poFlatButtons);
|
TPageControlOption = (poPageHistory, poBottomHeader, poFlatButtons);
|
||||||
|
|
@ -174,26 +171,16 @@ procedure TDexedPage.RealSetText(const Value: TCaption);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
ctrl: TDexedPageControl;
|
ctrl: TDexedPageControl;
|
||||||
v : string;
|
|
||||||
begin
|
begin
|
||||||
v := value;
|
inherited;
|
||||||
if fFixedCaption.isNotEmpty then
|
|
||||||
v := fFixedCaption;
|
|
||||||
inherited RealSetText(v);
|
|
||||||
ctrl := TDexedPageControl(owner);
|
ctrl := TDexedPageControl(owner);
|
||||||
i := ctrl.getPageIndex(self);
|
i := ctrl.getPageIndex(self);
|
||||||
ctrl.fTabs.BeginUpdate;
|
ctrl.fTabs.BeginUpdate;
|
||||||
if i <> -1 then
|
if i <> -1 then
|
||||||
ctrl.fTabs.Tabs[i] := v;
|
ctrl.fTabs.Tabs[i] := value;
|
||||||
ctrl.fTabs.EndUpdate;
|
ctrl.fTabs.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDexedPage.setFixedCaption(const value: string);
|
|
||||||
begin
|
|
||||||
fFixedCaption:= value;
|
|
||||||
caption := value;
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TDexedPageControl.Create(aowner: TComponent);
|
constructor TDexedPageControl.Create(aowner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
|
||||||
|
|
@ -648,7 +648,7 @@ begin
|
||||||
// double quoted strings | raw double quoted strings
|
// double quoted strings | raw double quoted strings
|
||||||
if (fCurrRange.notInExclusiveRange()) and readDelim(reader, fTokStop, stringPrefixes) then
|
if (fCurrRange.notInExclusiveRange()) and readDelim(reader, fTokStop, stringPrefixes) then
|
||||||
begin
|
begin
|
||||||
if readerPrev^ in ['r','x','i'] then
|
if readerPrev^ in ['r','x'] then
|
||||||
begin
|
begin
|
||||||
fCurrRange.rString := reader^ = 'r';
|
fCurrRange.rString := reader^ = 'r';
|
||||||
if not (readerNext^ = '"') then
|
if not (readerNext^ = '"') then
|
||||||
|
|
@ -747,7 +747,7 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// token string
|
// token string
|
||||||
if readDelim(reader, fTokStop, 'q{') or readDelim(reader, fTokStop, 'iq{') then
|
if readDelim(reader, fTokStop, 'q{') then
|
||||||
begin
|
begin
|
||||||
fTokKind := tkSymbl;
|
fTokKind := tkSymbl;
|
||||||
StartCodeFoldBlock(nil, fkBrackets in fFoldKinds);
|
StartCodeFoldBlock(nil, fkBrackets in fFoldKinds);
|
||||||
|
|
|
||||||
|
|
@ -595,70 +595,6 @@ begin
|
||||||
selection.Foreground := clNone;
|
selection.Foreground := clNone;
|
||||||
getHl.calls.Assign(getHl.identifiers);
|
getHl.calls.Assign(getHl.identifiers);
|
||||||
end;
|
end;
|
||||||
with fPresets.insertPreset(5) do
|
|
||||||
begin
|
|
||||||
fIsHardcoded := true;
|
|
||||||
name := 'Arc Dark';
|
|
||||||
|
|
||||||
getHl.phobosStyleType := False;
|
|
||||||
getHl.foldKinds := [fkBrackets, fkRegion];
|
|
||||||
getHl.whites.FrameEdges := sfeNone;
|
|
||||||
getHl.numbers.Foreground := 16761218;
|
|
||||||
getHl.numbers.FrameEdges := sfeNone;
|
|
||||||
getHl.symbols.Foreground := clYellow;
|
|
||||||
getHl.symbols.FrameEdges := sfeNone;
|
|
||||||
getHl.identifiers.Foreground := clWhite;
|
|
||||||
getHl.identifiers.FrameEdges := sfeNone;
|
|
||||||
getHl.comments.Foreground := 10664152;
|
|
||||||
getHl.comments.FrameEdges := sfeNone;
|
|
||||||
getHl.strings.Foreground := 5157104;
|
|
||||||
getHl.strings.FrameEdges := sfeNone;
|
|
||||||
getHl.keywords.Foreground := 8511369;
|
|
||||||
getHl.keywords.FrameEdges := sfeNone;
|
|
||||||
getHl.ddoc.Foreground := 14671730;
|
|
||||||
getHl.ddoc.FrameEdges := sfeNone;
|
|
||||||
getHl.inlineAsm.Foreground := 15500491;
|
|
||||||
getHl.inlineAsm.FrameEdges := sfeNone;
|
|
||||||
getHl.special.Foreground := 9684887;
|
|
||||||
getHl.special.FrameEdges := sfeNone;
|
|
||||||
getHl.errors.Foreground := 14807024;
|
|
||||||
getHl.attributes.Foreground := 8441210;
|
|
||||||
getHl.attributes.FrameEdges := sfeNone;
|
|
||||||
getHl.types.Foreground := 14807024;
|
|
||||||
getHl.calls.Foreground := clWhite;
|
|
||||||
getHl.calls.Style := [fsItalic];
|
|
||||||
|
|
||||||
background := 5391680;
|
|
||||||
|
|
||||||
bracketMatch.Background := clNone;
|
|
||||||
bracketMatch.Foreground := clGradientActiveCaption;
|
|
||||||
bracketMatch.FrameStyle := slsDashed;
|
|
||||||
bracketMatch.FrameEdges := sfeNone;
|
|
||||||
bracketMatch.Style := [fsBold];
|
|
||||||
|
|
||||||
currentLine.Background := 8816262;
|
|
||||||
currentLine.Foreground := clNone;
|
|
||||||
currentLine.BackAlpha := 50;
|
|
||||||
|
|
||||||
folding.Background := 7303023;
|
|
||||||
folding.Foreground := clYellow;
|
|
||||||
folding.FrameColor := clGray;
|
|
||||||
|
|
||||||
identifierMatch.Background := clMoneyGreen;
|
|
||||||
identifierMatch.Foreground := clNone;
|
|
||||||
identifierMatch.FrameColor := clInfoText;
|
|
||||||
identifierMatch.FrameEdges := sfeBottom;
|
|
||||||
identifierMatch.BackPriority := 1;
|
|
||||||
identifierMatch.BackAlpha := 30;
|
|
||||||
|
|
||||||
mouseLink.Background := clNone;
|
|
||||||
mouseLink.Foreground := clNone;
|
|
||||||
mouseLink.Style := [fsBold, fsUnderline];
|
|
||||||
|
|
||||||
selection.Background := 5987166;
|
|
||||||
selection.Foreground := clNone;
|
|
||||||
selection.BackPriority := 2;
|
|
||||||
end;
|
|
||||||
|
|
||||||
fEditor := TSynEdit.Create(self);
|
fEditor := TSynEdit.Create(self);
|
||||||
fEditor.Parent:= self;
|
fEditor.Parent:= self;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ type
|
||||||
fProj: ICommonProject;
|
fProj: ICommonProject;
|
||||||
fPortAsProcParam: string;
|
fPortAsProcParam: string;
|
||||||
fVersion: TSemVer;
|
fVersion: TSemVer;
|
||||||
|
fCanRemove: boolean;
|
||||||
procedure killServer;
|
procedure killServer;
|
||||||
procedure terminateClient; {$IFNDEF DEBUG}inline;{$ENDIF}
|
procedure terminateClient; {$IFNDEF DEBUG}inline;{$ENDIF}
|
||||||
procedure waitClient; {$IFNDEF DEBUG}inline;{$ENDIF}
|
procedure waitClient; {$IFNDEF DEBUG}inline;{$ENDIF}
|
||||||
|
|
@ -100,10 +101,11 @@ constructor TDcdWrapper.create(aOwner: TComponent);
|
||||||
var
|
var
|
||||||
fname: string;
|
fname: string;
|
||||||
i: integer = 0;
|
i: integer = 0;
|
||||||
|
r: TSemVer;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
fVersion.init('v0.0.0', false);
|
fVersion.init('v0.0.0');
|
||||||
fname := getDocPath + optsname;
|
fname := getDocPath + optsname;
|
||||||
if fname.fileExists then
|
if fname.fileExists then
|
||||||
loadFromFile(fname);
|
loadFromFile(fname);
|
||||||
|
|
@ -135,6 +137,16 @@ begin
|
||||||
fTempLines := TStringList.Create;
|
fTempLines := TStringList.Create;
|
||||||
fImportCache := TStringHashSet.Create;
|
fImportCache := TStringHashSet.Create;
|
||||||
|
|
||||||
|
fClient.Parameters.Add('--version');
|
||||||
|
fClient.Execute;
|
||||||
|
processOutputToStrings(fClient, fTempLines);
|
||||||
|
while fClient.Running do ;
|
||||||
|
fVersion.init(fTempLines.strictText);
|
||||||
|
r.major := 0;
|
||||||
|
r.minor := 9;
|
||||||
|
r.patch := 10;
|
||||||
|
fCanRemove := fVersion > r;
|
||||||
|
|
||||||
if fServer.isAssigned then
|
if fServer.isAssigned then
|
||||||
begin
|
begin
|
||||||
fServer.Execute;
|
fServer.Execute;
|
||||||
|
|
@ -430,6 +442,8 @@ end;
|
||||||
|
|
||||||
procedure TDcdWrapper.remImportFolder(const folder: string);
|
procedure TDcdWrapper.remImportFolder(const folder: string);
|
||||||
begin
|
begin
|
||||||
|
if not fCanRemove then
|
||||||
|
exit;
|
||||||
if not fAvailable or not fServerListening or not fImportCache.contains(folder) then
|
if not fAvailable or not fServerListening or not fImportCache.contains(folder) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
|
@ -446,6 +460,8 @@ var
|
||||||
i: string;
|
i: string;
|
||||||
c: integer;
|
c: integer;
|
||||||
begin
|
begin
|
||||||
|
if not fCanRemove then
|
||||||
|
exit;
|
||||||
if not fAvailable or not fServerListening then
|
if not fAvailable or not fServerListening then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -308,10 +308,7 @@ begin
|
||||||
if fDoc.isNotAssigned then
|
if fDoc.isNotAssigned then
|
||||||
exit;
|
exit;
|
||||||
if not exeInSysPath('dfmt') then
|
if not exeInSysPath('dfmt') then
|
||||||
begin
|
|
||||||
getMessageDisplay().message('DFMT is missing. See https://github.com/dlang-community/dfmt for more instructions on how to get DFMT.', nil, TAppMessageCtxt.amcAll, TAppMessageKind.amkWarn);
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
|
||||||
|
|
||||||
fBackup.Assign(fDoc.Lines);
|
fBackup.Assign(fDoc.Lines);
|
||||||
prc := TProcess.create(nil);
|
prc := TProcess.create(nil);
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,7 @@ begin
|
||||||
editor.Gutter.LineNumberPart.Visible:=false;
|
editor.Gutter.LineNumberPart.Visible:=false;
|
||||||
|
|
||||||
if ed.isAssigned then
|
if ed.isAssigned then
|
||||||
begin
|
|
||||||
editor.Font.Assign(ed.Font);
|
editor.Font.Assign(ed.Font);
|
||||||
editor.Color := ed.Color;
|
|
||||||
end;
|
|
||||||
|
|
||||||
p := TProcess.Create(self);
|
p := TProcess.Create(self);
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -55,20 +55,20 @@ type
|
||||||
keywordsMap = record
|
keywordsMap = record
|
||||||
private
|
private
|
||||||
{
|
{
|
||||||
rendered on 2025-Mar-10 11:20:03.8930671 by IsItThere.
|
rendered on 2021-Apr-14 18:49:17.621124 by IsItThere.
|
||||||
- PRNG seed: 0
|
- PRNG seed: 0
|
||||||
- map length: 512
|
- map length: 512
|
||||||
- case sensitive: true
|
- case sensitive: true
|
||||||
}
|
}
|
||||||
|
|
||||||
const fWords: array [0..511] of string =
|
const fWords: array [0..511] of string =
|
||||||
('', '', '', '', 'cdouble', '', '', '', 'creal', '', 'abstract', '', 'ulong', 'uint', '', '', '', '', 'delete', '', '', '', '', '', '', 'while', '', '', '', '', '', 'goto', 'void', '', '', 'ptrdiff_t', '', '', 'extern', '', '', '', '', '__traits', '', '', '', 'ifloat', '', '', 'dchar', 'pure', '', '', '', 'template', '', 'auto', '', 'cast', '', '', 'synchronized', '', '', '', 'union', '', '', '', '', '', '', '', '__parameters', '', 'finally', '', '', 'this', '__rvalue', '', '', 'mixin', 'throw', '', '', '', '', 'class', '', '', '', '', '', '', '', '', '', 'false', '', '', '', '', '', '', '', '', '', '', '', 'continue', '', 'import', '', '', '', 'break', '', '', 'immutable', '', 'cfloat', '', '', 'case', '', 'enum', '', '', 'override', 'public', '', 'cent', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'inout', '', '', '', 'in', '', '', '', '', 'interface', 'true', '', '', 'catch', '', 'string', '', '', 'delegate', '', 'else', '', 'if', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'short', '', '', '', '', '', '', '', '', '', 'const', '', '', '', 'wstring', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'super', '', '', 'package', '', '', '', '__gshared', '', '', '', '', '', '', '', '', '', 'is', '', '', '', '', 'scope', '', '', '__vector', '', 'foreach_reverse', '', '', '', '', 'do', '', '', '', '', '', 'unittest', '', 'switch', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'static', '', '', 'dstring', 'null', '', '', 'byte', '', 'for', 'nothrow', '', '', 'debug', 'return', '', '', '', 'align', '', '', '', '', '', '', 'module', '', 'ucent', 'long', 'int', '', '', '', 'final', '', '', '', '', '', 'shared', '', '', '', '', '', '', '', '', '', '', 'protected', '', 'lazy', '', '', '', '', '', 'private', '', 'invariant', '', '', '', '', '', 'size_t', '', '', 'asm', '', '', 'double', '', '', '', 'real', '', '', '', '', '', '', '', '', '', '', '', '', 'new', '', 'volatile', '', 'alias', '', '', '', 'foreach', '', '', '', '', '', '', '', '', '', '', '', 'ushort', 'ref', 'default', 'typeid', 'assert', '', '', '', '', '', '', '', '', '', 'export', 'char', '', '', '', '', '', '', 'struct', '', '', '', '', '', '', '', '', 'idouble', '', '', '', 'ireal', '', '', '', '', '', '', 'bool', 'typeof', '', '', '', 'pragma', '', '', 'with', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'deprecated', '', '', '', '', 'version', 'try', '', '', '', '', 'wchar', '', 'function', '', 'float', '', '', '', '', '', '', '', '', '', '', '', 'ubyte', '', '', '', '', 'out', '', '', '');
|
('', '', '', '', '', '', 'scope', '', '', '', '', 'this', 'ucent', 'delegate', 'size_t', '', '', 'ulong', 'nothrow', '', '', 'bool', '', '', '', '', 'debug', '', '', 'class', '', '', 'function', '', '', 'uint', 'private', '', 'for', '', '', '', 'false', 'deprecated', 'mixin', '', 'while', '', '', 'with', '', '', '', 'true', '', '', '', '', '', 'foreach_reverse', '', '', '', 'real', '', '', 'align', '', '', '__vector', '', '', '', '', 'pragma', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'module', '', '', '', '', '', '', '', '', '', '', '', '', '', 'interface', '', '', '', '', '', '', '', '', 'foreach', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'auto', '', 'float', '', 'typeid', 'else', '', 'string', 'creal', 'inout', '', '', 'pure', '', '', '', '', '', '', '', '', '', '', '', 'export', '', '', '', '', '', 'ubyte', 'double', '', '', '', '', '', '', '', 'do', '', '', '', 'union', '', '', '', '', '', 'static', '', 'final', 'ireal', '', '', '', '', '', 'is', '', '', 'immutable', '', 'switch', '', '', '', 'assert', '', '', '', '', 'dstring', '', '__traits', '', '', '', '', '', 'new', 'super', '', '', '', '', '', '', 'typeof', '', '', 'catch', 'short', '', 'alias', '', '', '', 'delete', 'in', '', '', '', '', '', 'cfloat', '', '', '', 'abstract', '', '', '', '__gshared', 'wstring', 'break', '', '', '', 'unittest', '', '', 'struct', '', '', '', '', '', '', '', 'throw', '', '', '', 'cdouble', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'ifloat', 'ptrdiff_t', 'template', 'cent', 'if', '', '', '', 'long', '', '', '', '', '', '', '', '', 'char', '', '', '', 'default', '', '', '', '', 'int', '', '', 'idouble', 'volatile', '', '', '', '', 'version', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'goto', '', '', '', '', '', 'package', '__parameters', '', '', '', '', '', '', '', 'shared', '', '', '', '', '', '', '', '', '', '', '', '', 'dchar', '', '', '', '', '', '', '', '', '', '', '', 'continue', '', '', '', '', '', '', '', '', 'synchronized', '', '', '', 'public', '', '', 'return', '', '', '', '', 'out', '', 'import', '', '', '', 'null', 'protected', '', 'wchar', '', 'finally', '', '', '', 'invariant', '', 'ref', '', 'case', '', '', '', '', '', '', '', '', '', 'asm', '', '', '', '', '', '', '', '', '', '', '', '', 'ushort', 'void', '', '', '', '', '', '', '', '', '', '', '', '', '', 'enum', '', '', '', '', '', '', 'byte', '', '', '', 'const', '', 'lazy', '', '', '', 'cast', '', '', '', 'extern', '', 'try', 'override', '', '', '', '', '', '', '', '');
|
||||||
|
|
||||||
const fHasEntry: array [0..511] of boolean =
|
const fHasEntry: array [0..511] of boolean =
|
||||||
(false, false, false, false, true, false, false, false, true, false, true, false, true, true, false, false, false, false, true, false, false, false, false, false, false, true, false, false, false, false, false, true, true, false, false, true, false, false, true, false, false, false, false, true, false, false, false, true, false, false, true, true, false, false, false, true, false, true, false, true, false, false, true, false, false, false, true, false, false, false, false, false, false, false, true, false, true, false, false, true, true, false, false, true, true, false, false, false, false, true, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, true, false, true, false, false, false, true, false, false, true, false, true, false, false, true, false, true, false, false, true, true, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, true, true, false, false, true, false, true, false, false, true, false, true, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, true, false, false, false, false, true, false, false, true, false, true, false, false, false, false, true, false, false, false, false, false, true, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, true, true, false, false, true, false, true, true, false, false, true, true, false, false, false, true, false, false, false, false, false, false, true, false, true, true, true, false, false, false, true, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, true, false, true, false, false, false, false, false, true, false, true, false, false, false, false, false, true, false, false, true, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, true, false, true, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, false, false, false, false, false, false, false, false, false, true, true, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, true, true, false, false, false, true, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, true, true, false, false, false, false, true, false, true, false, true, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, true, false, false, false);
|
(false, false, false, false, false, false, true, false, false, false, false, true, true, true, true, false, false, true, true, false, false, true, false, false, false, false, true, false, false, true, false, false, true, false, false, true, true, false, true, false, false, false, true, true, true, false, true, false, false, true, false, false, false, true, false, false, false, false, false, true, false, false, false, true, false, false, true, false, false, true, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, true, false, true, true, false, true, true, true, false, false, true, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, true, true, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, true, false, true, true, false, false, false, false, false, true, false, false, true, false, true, false, false, false, true, false, false, false, false, true, false, true, false, false, false, false, false, true, true, false, false, false, false, false, false, true, false, false, true, true, false, true, false, false, false, true, true, false, false, false, false, false, true, false, false, false, true, false, false, false, true, true, true, false, false, false, true, false, false, true, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, true, true, false, false, false, true, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, true, false, false, true, true, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, true, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, true, false, false, false, false, true, false, true, false, false, false, true, true, false, true, false, true, false, false, false, true, false, true, false, true, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, true, false, false, false, true, false, true, false, false, false, true, false, false, false, true, false, true, true, false, false, false, false, false, false, false, false);
|
||||||
|
|
||||||
const fCoeffs: array [0..255] of Byte =
|
const fCoeffs: array [0..255] of Byte =
|
||||||
(149, 149, 209, 70, 128, 54, 131, 42, 163, 99, 62, 99, 162, 96, 41, 68, 64, 176, 136, 67, 36, 232, 177, 99, 114, 106, 120, 83, 85, 249, 51, 53, 48, 55, 217, 168, 129, 86, 247, 153, 11, 47, 7, 88, 69, 131, 73, 188, 111, 154, 128, 152, 194, 99, 121, 84, 28, 83, 247, 175, 238, 255, 237, 177, 37, 205, 174, 140, 119, 108, 68, 1, 113, 102, 208, 214, 123, 137, 223, 57, 95, 182, 228, 85, 57, 41, 133, 64, 9, 201, 112, 156, 192, 173, 209, 166, 66, 61, 163, 143, 137, 240, 106, 91, 156, 68, 10, 100, 11, 116, 88, 139, 63, 240, 65, 193, 174, 195, 200, 62, 255, 243, 38, 238, 63, 128, 80, 248, 104, 7, 154, 154, 254, 221, 1, 238, 26, 252, 2, 169, 227, 130, 99, 240, 52, 248, 250, 72, 216, 222, 22, 227, 139, 187, 59, 217, 118, 119, 63, 220, 235, 55, 154, 87, 10, 171, 249, 239, 254, 232, 63, 174, 120, 245, 238, 228, 152, 175, 240, 174, 18, 95, 239, 185, 227, 226, 186, 161, 234, 227, 29, 152, 90, 54, 69, 136, 192, 252, 29, 237, 62, 164, 45, 151, 187, 68, 165, 60, 102, 146, 15, 97, 207, 59, 99, 48, 24, 53, 225, 174, 175, 183, 215, 24, 234, 33, 31, 255, 60, 128, 31, 89, 63, 3, 105, 233, 191, 6, 181, 198, 46, 7, 164, 17, 90, 45, 93, 185, 254, 17, 194, 218, 197, 194, 85, 71);
|
(38, 33, 180, 0, 185, 246, 108, 140, 101, 70, 225, 36, 169, 241, 207, 131, 8, 145, 253, 246, 120, 51, 192, 218, 141, 3, 128, 13, 153, 122, 147, 180, 155, 253, 108, 112, 81, 69, 216, 179, 91, 136, 140, 39, 226, 59, 35, 105, 3, 111, 139, 247, 35, 246, 8, 124, 74, 191, 207, 221, 168, 208, 182, 40, 125, 146, 113, 139, 166, 251, 161, 145, 87, 99, 57, 74, 153, 249, 60, 234, 254, 164, 213, 146, 164, 14, 30, 121, 56, 203, 76, 11, 44, 178, 124, 193, 12, 248, 217, 103, 65, 21, 164, 21, 231, 147, 173, 45, 52, 134, 110, 132, 193, 209, 254, 69, 76, 214, 121, 107, 18, 172, 20, 89, 137, 103, 6, 153, 190, 154, 210, 136, 72, 198, 124, 133, 215, 154, 155, 198, 121, 208, 215, 184, 239, 210, 214, 130, 231, 158, 210, 177, 16, 39, 121, 200, 101, 187, 168, 82, 237, 94, 101, 118, 255, 207, 85, 168, 217, 106, 177, 5, 88, 246, 217, 77, 204, 40, 208, 142, 96, 217, 123, 31, 20, 237, 212, 146, 9, 168, 103, 214, 167, 134, 75, 204, 86, 62, 164, 83, 131, 236, 14, 131, 31, 66, 95, 70, 166, 134, 47, 8, 171, 76, 79, 136, 237, 10, 178, 22, 235, 255, 228, 205, 162, 40, 103, 57, 169, 153, 164, 128, 28, 5, 216, 168, 35, 121, 33, 96, 39, 72, 230, 91, 54, 134, 223, 59, 5, 166, 146, 71, 188, 129, 179, 117);
|
||||||
class function hash(const w: string): Word; static; {$IFNDEF DEBUG}inline;{$ENDIF}
|
class function hash(const w: string): Word; static; {$IFNDEF DEBUG}inline;{$ENDIF}
|
||||||
public
|
public
|
||||||
class function match(const w: string): boolean; static; {$IFNDEF DEBUG}inline;{$ENDIF}
|
class function match(const w: string): boolean; static; {$IFNDEF DEBUG}inline;{$ENDIF}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ type
|
||||||
|
|
||||||
const
|
const
|
||||||
stringPostfixes: TCharSet = ['c', 'w', 'd'];
|
stringPostfixes: TCharSet = ['c', 'w', 'd'];
|
||||||
stringPrefixes: TCharSet = ['r', 'x', 'i', '"'];
|
stringPrefixes: TCharSet = ['r', 'x', '"'];
|
||||||
stringStopChecks: TCharSet = ['\', '"'];
|
stringStopChecks: TCharSet = ['\', '"'];
|
||||||
charStopChecks: TCharSet = ['\', #39];
|
charStopChecks: TCharSet = ['\', #39];
|
||||||
symbChars: TCharSet = [';', '{', '}', '(', ')', '[', ']', ',', '.', ':', '?', '$', '"', #39];
|
symbChars: TCharSet = [';', '{', '}', '(', ')', '[', ']', ',', '.', ':', '?', '$', '"', #39];
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ type
|
||||||
strict private
|
strict private
|
||||||
fName : string;
|
fName : string;
|
||||||
fVersions: TSemVerList;
|
fVersions: TSemVerList;
|
||||||
fNewNamingScheme: boolean;
|
|
||||||
public
|
public
|
||||||
constructor create;
|
constructor create;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
|
|
@ -39,7 +38,6 @@ type
|
||||||
function highestInInterval(constref lo, hi: TSemVer): PSemVer;
|
function highestInInterval(constref lo, hi: TSemVer): PSemVer;
|
||||||
function highest: PSemVer;
|
function highest: PSemVer;
|
||||||
property name: string read fName write fName;
|
property name: string read fName write fName;
|
||||||
property newNamingScheme: boolean read fNewNamingScheme write fNewNamingScheme;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TDubLocalPackages = class
|
TDubLocalPackages = class
|
||||||
|
|
@ -326,9 +324,9 @@ var
|
||||||
begin
|
begin
|
||||||
v := new(PSemVer);
|
v := new(PSemVer);
|
||||||
if value = 'vmaster' then
|
if value = 'vmaster' then
|
||||||
v^.init('v0.0.0-master', false)
|
v^.init('v0.0.0-master')
|
||||||
else try
|
else try
|
||||||
v^.init(value, true);
|
v^.init(value);
|
||||||
except
|
except
|
||||||
dispose(v);
|
dispose(v);
|
||||||
exit;
|
exit;
|
||||||
|
|
@ -361,12 +359,10 @@ begin
|
||||||
begin
|
begin
|
||||||
v := fVersions[i]^;
|
v := fVersions[i]^;
|
||||||
if v < lo then
|
if v < lo then
|
||||||
continue
|
continue;
|
||||||
else if (v > lo) or (v = lo) then
|
if v < hi then
|
||||||
result := fVersions[i]
|
result := fVersions[i];
|
||||||
else if (v < hi) and ((assigned(result) and (v > result^)) or (not assigned(result))) then
|
if v > hi then
|
||||||
result := fVersions[i]
|
|
||||||
else if v > hi then
|
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -399,23 +395,6 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TDubLocalPackages.update;
|
class procedure TDubLocalPackages.update;
|
||||||
|
|
||||||
procedure addPackageOrVersion(name, semVer: string; newNamingScheme: Boolean);
|
|
||||||
var
|
|
||||||
d: PDubLocalPackage = nil;
|
|
||||||
begin
|
|
||||||
if not find(name, d) then
|
|
||||||
begin
|
|
||||||
setLength(fLocalPackages, length(fLocalPackages) + 1);
|
|
||||||
fLocalPackages[high(fLocalPackages)] := TDubLocalPackage.create;
|
|
||||||
d := @fLocalPackages[high(fLocalPackages)];
|
|
||||||
d^.name := name;
|
|
||||||
d^.newNamingScheme := newNamingScheme;
|
|
||||||
end;
|
|
||||||
d^.addVersion(semVer);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
p: TStringList;
|
p: TStringList;
|
||||||
r: TStringList;
|
r: TStringList;
|
||||||
|
|
@ -425,10 +404,9 @@ var
|
||||||
i: integer;
|
i: integer;
|
||||||
j: integer = 0;
|
j: integer = 0;
|
||||||
k: integer;
|
k: integer;
|
||||||
|
d: PDubLocalPackage = nil;
|
||||||
h: TStringRange = (ptr: nil; pos: 0; len: 0);
|
h: TStringRange = (ptr: nil; pos: 0; len: 0);
|
||||||
x: string;
|
x: string;
|
||||||
u: TStringList;
|
|
||||||
g: string;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
|
@ -463,42 +441,33 @@ begin
|
||||||
j := 0;
|
j := 0;
|
||||||
s := p[i];
|
s := p[i];
|
||||||
h.init(s);
|
h.init(s);
|
||||||
// after 2.104 <cachePath>/<package>/<version>/<package>
|
while true do
|
||||||
// new naming scheme can be distinguished because '.' is not a legal char in a package name
|
|
||||||
v := s.extractFileName;
|
|
||||||
if (Pos('.', v) < 1) and (Pos('master', v) < 1) then
|
|
||||||
begin
|
begin
|
||||||
u := TStringList.Create;
|
h.popUntil('-');
|
||||||
try
|
if h.empty then
|
||||||
listFolders(u, s + DirectorySeparator);
|
break;
|
||||||
for g in u do
|
if (h.popFront^.front in ['0'..'9']) or
|
||||||
addPackageOrVersion(v, 'v' + g.extractFileName, true);
|
h.endsWith('master') then
|
||||||
finally
|
|
||||||
u.free;
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
// before 2.104 <cachePath>/<package>-<version>/<package>
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
while true do
|
|
||||||
begin
|
begin
|
||||||
h.popUntil('-');
|
j := h.position;
|
||||||
if h.empty then
|
break;
|
||||||
break;
|
|
||||||
if (h.popFront^.front in ['0'..'9']) or
|
|
||||||
h.endsWith('master') then
|
|
||||||
begin
|
|
||||||
j := h.position;
|
|
||||||
break;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
if not j.equals(0) then
|
|
||||||
begin
|
|
||||||
n := s[1..j-1];
|
|
||||||
n := n.extractFileName;
|
|
||||||
addPackageOrVersion(n, 'v' + s[j+1 .. length(s)], false);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
if j.equals(0) then
|
||||||
|
continue;
|
||||||
|
|
||||||
|
n := s[1..j-1];
|
||||||
|
n := n.extractFileName;
|
||||||
|
if not find(n, d) then
|
||||||
|
begin
|
||||||
|
setLength(fLocalPackages, length(fLocalPackages) + 1);
|
||||||
|
fLocalPackages[high(fLocalPackages)] := TDubLocalPackage.create;
|
||||||
|
d := @fLocalPackages[high(fLocalPackages)];
|
||||||
|
d^.name := n;
|
||||||
|
end;
|
||||||
|
v := 'v' + s[j+1 .. length(s)];
|
||||||
|
d^.addVersion(v);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
p.Free;
|
p.Free;
|
||||||
|
|
@ -540,6 +509,7 @@ begin
|
||||||
hi.patch := 0;
|
hi.patch := 0;
|
||||||
hi.additional :='';
|
hi.additional :='';
|
||||||
result := package^.highestInInterval(opVer, hi);
|
result := package^.highestInInterval(opVer, hi);
|
||||||
|
result := result;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if op = '=' then
|
else if op = '=' then
|
||||||
|
|
@ -1678,9 +1648,9 @@ procedure TDubProject.updateImportPathsFromJson;
|
||||||
s += w;
|
s += w;
|
||||||
// as auto detected by DUB
|
// as auto detected by DUB
|
||||||
if (s + 'source').dirExists then
|
if (s + 'source').dirExists then
|
||||||
fImportPaths.Add(s + 'source')
|
fImportPaths.Add(s)
|
||||||
else if (s + 'src').dirExists then
|
else if (s + 'src').dirExists then
|
||||||
fImportPaths.Add(s + 'src')
|
fImportPaths.Add(s)
|
||||||
// when standard src content is directly in the repo root
|
// when standard src content is directly in the repo root
|
||||||
else if (s + n).dirExists or (w.length <> 0) then
|
else if (s + n).dirExists or (w.length <> 0) then
|
||||||
fImportPaths.Add(s);
|
fImportPaths.Add(s);
|
||||||
|
|
@ -1726,18 +1696,18 @@ procedure TDubProject.updateImportPathsFromJson;
|
||||||
p := '0.0.0';
|
p := '0.0.0';
|
||||||
end
|
end
|
||||||
else if (p = 'master') or (v = '~master') then
|
else if (p = 'master') or (v = '~master') then
|
||||||
q.init('v0.0.0-master', false)
|
q.init('v0.0.0-master')
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
q.init('v' + p, true);
|
q.init('v' + p);
|
||||||
except
|
except
|
||||||
// while editing a DUB project from the DUB project editor,
|
// while editing a DUB project from the DUB project editor,
|
||||||
// '<value>', i.e "undefined JSON value" can be found here.
|
// '<value>', i.e "undefined JSON value" can be found here.
|
||||||
// So get DUB to fetch the most recent if the 'autoFetch' IDE option
|
// So get DUB to fetch the most recent if the 'autoFetch' IDE option
|
||||||
// is ON, even if another version is set later.
|
// is ON, even if another version is set later.
|
||||||
o := '>=';
|
o := '>=';
|
||||||
q.init('v0.0.0', false);
|
q.init('v0.0.0');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -1772,19 +1742,15 @@ procedure TDubProject.updateImportPathsFromJson;
|
||||||
for k := 0 to b.Count-1 do
|
for k := 0 to b.Count-1 do
|
||||||
begin
|
begin
|
||||||
s := b[k] + n;
|
s := b[k] + n;
|
||||||
p := s + '-' + u^.asString + DirectorySeparator + n + DirectorySeparator;
|
p := s + '-' + u^.asString + DirectorySeparator + n + DirectorySeparator;
|
||||||
// new naming scheme
|
// e.g vibe-d:http -> <registrypath>/vibed-<sember>/http
|
||||||
if not p.dirExists then
|
|
||||||
p := s + DirectorySeparator + u^.asString + DirectorySeparator + n + DirectorySeparator;
|
|
||||||
// e.g vibe-d:http -> <registrypath>/vibed/<semver>/vibed/http
|
|
||||||
// e.g ae:sys-wininet -> <registrypath>/ae/<semver>/ae/sys/wininet
|
|
||||||
if length(w) <> 0 then
|
if length(w) <> 0 then
|
||||||
p += strutils.ReplaceText(w, '-', DirectorySeparator);
|
p += w;
|
||||||
if not p.dirExists then
|
if not p.dirExists then
|
||||||
continue;
|
continue;
|
||||||
if (p + 'source').dirExists then
|
if (p + 'source').dirExists then
|
||||||
begin
|
begin
|
||||||
fImportPaths.Add(p + 'source');
|
fImportPaths.Add(p + 'source') ;
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
else if (p + 'src').dirExists then
|
else if (p + 'src').dirExists then
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,13 @@ inherited EditorWidget: TEditorWidget
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 398
|
Height = 398
|
||||||
Top = 36
|
|
||||||
Width = 465
|
Width = 465
|
||||||
ClientHeight = 398
|
ClientHeight = 398
|
||||||
ClientWidth = 465
|
ClientWidth = 465
|
||||||
object editorStatus: TStatusBar[0]
|
object editorStatus: TStatusBar[0]
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 20
|
Height = 19
|
||||||
Top = 376
|
Top = 377
|
||||||
Width = 465
|
Width = 465
|
||||||
BorderSpacing.Bottom = 2
|
BorderSpacing.Bottom = 2
|
||||||
Panels = <
|
Panels = <
|
||||||
|
|
@ -46,19 +45,20 @@ inherited EditorWidget: TEditorWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited toolbar: TDexedToolBar
|
inherited toolbar: TDexedToolBar
|
||||||
|
Height = 30
|
||||||
Width = 457
|
Width = 457
|
||||||
end
|
end
|
||||||
inherited contextMenu: TPopupMenu
|
inherited contextMenu: TPopupMenu
|
||||||
Left = 24
|
Left = 24
|
||||||
Top = 16
|
Top = 16
|
||||||
end
|
end
|
||||||
object macRecorder: TSynMacroRecorder[3]
|
object macRecorder: TSynMacroRecorder[2]
|
||||||
RecordShortCut = 0
|
RecordShortCut = 0
|
||||||
PlaybackShortCut = 0
|
PlaybackShortCut = 0
|
||||||
Left = 80
|
Left = 80
|
||||||
Top = 16
|
Top = 16
|
||||||
end
|
end
|
||||||
object mnuEditor: TPopupMenu[4]
|
object mnuEditor: TPopupMenu[3]
|
||||||
OnPopup = mnuEditorPopup
|
OnPopup = mnuEditorPopup
|
||||||
Left = 152
|
Left = 152
|
||||||
Top = 16
|
Top = 16
|
||||||
|
|
@ -81,17 +81,13 @@ inherited EditorWidget: TEditorWidget
|
||||||
Caption = 'Undo'
|
Caption = 'Undo'
|
||||||
OnClick = mnuedUndoClick
|
OnClick = mnuedUndoClick
|
||||||
end
|
end
|
||||||
object mnuedUndoAll: TMenuItem
|
|
||||||
Caption = 'Undo all'
|
|
||||||
OnClick = mnuedUndoAllClick
|
|
||||||
end
|
|
||||||
object mnuedRedo: TMenuItem
|
object mnuedRedo: TMenuItem
|
||||||
Caption = 'Redo'
|
Caption = 'Redo'
|
||||||
OnClick = mnuedRedoClick
|
OnClick = mnuedRedoClick
|
||||||
end
|
end
|
||||||
object mnuedRedoAll: TMenuItem
|
object enuItemRedoAll: TMenuItem
|
||||||
Caption = 'Redo all'
|
Caption = 'Redo all'
|
||||||
OnClick = mnuedRedoAllClick
|
OnClick = enuItemRedoAllClick
|
||||||
end
|
end
|
||||||
object MenuItem11: TMenuItem
|
object MenuItem11: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
|
|
@ -284,7 +280,7 @@ inherited EditorWidget: TEditorWidget
|
||||||
OnClick = MenuItem8Click
|
OnClick = MenuItem8Click
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object mnuCurFile: TPopupMenu[5]
|
object mnuCurFile: TPopupMenu[4]
|
||||||
Left = 216
|
Left = 216
|
||||||
Top = 16
|
Top = 16
|
||||||
object mnuCurFileShowInMiniExpl: TMenuItem
|
object mnuCurFileShowInMiniExpl: TMenuItem
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,7 @@ type
|
||||||
MenuItem14: TMenuItem;
|
MenuItem14: TMenuItem;
|
||||||
MenuItem15: TMenuItem;
|
MenuItem15: TMenuItem;
|
||||||
MenuItem16: TMenuItem;
|
MenuItem16: TMenuItem;
|
||||||
mnuedRedoAll: TMenuItem;
|
enuItemRedoAll: TMenuItem;
|
||||||
mnuedUndoAll: TMenuItem;
|
|
||||||
mnuCurFileCopyName: TMenuItem;
|
mnuCurFileCopyName: TMenuItem;
|
||||||
mnuCurFileShowInMiniExpl: TMenuItem;
|
mnuCurFileShowInMiniExpl: TMenuItem;
|
||||||
mnuCurFileShellOpen: TMenuItem;
|
mnuCurFileShellOpen: TMenuItem;
|
||||||
|
|
@ -114,7 +113,7 @@ type
|
||||||
editorStatus: TStatusBar;
|
editorStatus: TStatusBar;
|
||||||
mnuEditor: TPopupMenu;
|
mnuEditor: TPopupMenu;
|
||||||
mnuCurFile: TPopupMenu;
|
mnuCurFile: TPopupMenu;
|
||||||
procedure mnuedRedoAllClick(Sender: TObject);
|
procedure enuItemRedoAllClick(Sender: TObject);
|
||||||
procedure FormShortCut(var Msg: TLMKey; var Handled: Boolean);
|
procedure FormShortCut(var Msg: TLMKey; var Handled: Boolean);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure mnuCurFileCopyNameClick(Sender: TObject);
|
procedure mnuCurFileCopyNameClick(Sender: TObject);
|
||||||
|
|
@ -135,7 +134,6 @@ type
|
||||||
procedure mnuEdShowSpecClick(Sender: TObject);
|
procedure mnuEdShowSpecClick(Sender: TObject);
|
||||||
procedure mnuedSortLinesClick(Sender: TObject);
|
procedure mnuedSortLinesClick(Sender: TObject);
|
||||||
procedure mnuEdTabWidth2Click(Sender: TObject);
|
procedure mnuEdTabWidth2Click(Sender: TObject);
|
||||||
procedure mnuedUndoAllClick(Sender: TObject);
|
|
||||||
procedure mnuedUpcaseClick(Sender: TObject);
|
procedure mnuedUpcaseClick(Sender: TObject);
|
||||||
procedure MenuItem5Click(Sender: TObject);
|
procedure MenuItem5Click(Sender: TObject);
|
||||||
procedure MenuItem6Click(Sender: TObject);
|
procedure MenuItem6Click(Sender: TObject);
|
||||||
|
|
@ -205,7 +203,6 @@ type
|
||||||
procedure openDocument(const fname: string);
|
procedure openDocument(const fname: string);
|
||||||
function closeDocument(index: Integer;promptOnChanged: boolean = true): boolean;
|
function closeDocument(index: Integer;promptOnChanged: boolean = true): boolean;
|
||||||
function closeDocument(doc: TDexedMemo;promptOnChanged: boolean = true): boolean;
|
function closeDocument(doc: TDexedMemo;promptOnChanged: boolean = true): boolean;
|
||||||
procedure forceCaption(doc: TDexedMemo; value: string);
|
|
||||||
public
|
public
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
|
|
@ -363,9 +360,7 @@ begin
|
||||||
AssignPng(mnuedCut.Bitmap, 'CUT');
|
AssignPng(mnuedCut.Bitmap, 'CUT');
|
||||||
AssignPng(mnuedPaste.Bitmap, 'PASTE');
|
AssignPng(mnuedPaste.Bitmap, 'PASTE');
|
||||||
AssignPng(mnuedUndo.Bitmap, 'ARROW_UNDO');
|
AssignPng(mnuedUndo.Bitmap, 'ARROW_UNDO');
|
||||||
AssignPng(mnuedUndoAll.Bitmap, 'ARROW_UNDO');
|
|
||||||
AssignPng(mnuedRedo.Bitmap, 'ARROW_REDO');
|
AssignPng(mnuedRedo.Bitmap, 'ARROW_REDO');
|
||||||
AssignPng(mnuedRedoAll.Bitmap, 'ARROW_REDO');
|
|
||||||
AssignPng(mnuedJum2Decl.Bitmap, 'ARROW_SHOE');
|
AssignPng(mnuedJum2Decl.Bitmap, 'ARROW_SHOE');
|
||||||
AssignPng(mnuedCopy.Bitmap, 'COPY');
|
AssignPng(mnuedCopy.Bitmap, 'COPY');
|
||||||
AssignPng(mnuedNext.Bitmap, 'GO_NEXT');
|
AssignPng(mnuedNext.Bitmap, 'GO_NEXT');
|
||||||
|
|
@ -393,9 +388,7 @@ begin
|
||||||
AssignPng(mnuedCut.Bitmap, 'CUT24');
|
AssignPng(mnuedCut.Bitmap, 'CUT24');
|
||||||
AssignPng(mnuedPaste.Bitmap, 'PASTE24');
|
AssignPng(mnuedPaste.Bitmap, 'PASTE24');
|
||||||
AssignPng(mnuedUndo.Bitmap, 'ARROW_UNDO24');
|
AssignPng(mnuedUndo.Bitmap, 'ARROW_UNDO24');
|
||||||
AssignPng(mnuedUndoAll.Bitmap, 'ARROW_UNDO24');
|
|
||||||
AssignPng(mnuedRedo.Bitmap, 'ARROW_REDO24');
|
AssignPng(mnuedRedo.Bitmap, 'ARROW_REDO24');
|
||||||
AssignPng(mnuedRedoAll.Bitmap, 'ARROW_REDO24');
|
|
||||||
//AssignPng(mnuedJum2Decl.Bitmap, 'ARROW_SHOE24');
|
//AssignPng(mnuedJum2Decl.Bitmap, 'ARROW_SHOE24');
|
||||||
AssignPng(mnuedCopy.Bitmap, 'COPY24');
|
AssignPng(mnuedCopy.Bitmap, 'COPY24');
|
||||||
AssignPng(mnuedNext.Bitmap, 'GO_NEXT24');
|
AssignPng(mnuedNext.Bitmap, 'GO_NEXT24');
|
||||||
|
|
@ -423,9 +416,7 @@ begin
|
||||||
AssignPng(mnuedCut.Bitmap, 'CUT32');
|
AssignPng(mnuedCut.Bitmap, 'CUT32');
|
||||||
AssignPng(mnuedPaste.Bitmap, 'PASTE32');
|
AssignPng(mnuedPaste.Bitmap, 'PASTE32');
|
||||||
AssignPng(mnuedUndo.Bitmap, 'ARROW_UNDO32');
|
AssignPng(mnuedUndo.Bitmap, 'ARROW_UNDO32');
|
||||||
AssignPng(mnuedUndoAll.Bitmap, 'ARROW_UNDO32');
|
|
||||||
AssignPng(mnuedRedo.Bitmap, 'ARROW_REDO32');
|
AssignPng(mnuedRedo.Bitmap, 'ARROW_REDO32');
|
||||||
AssignPng(mnuedRedoAll.Bitmap, 'ARROW_REDO32');
|
|
||||||
//AssignPng(mnuedJum2Decl.Bitmap, 'ARROW_SHOE32');
|
//AssignPng(mnuedJum2Decl.Bitmap, 'ARROW_SHOE32');
|
||||||
AssignPng(mnuedCopy.Bitmap, 'COPY32');
|
AssignPng(mnuedCopy.Bitmap, 'COPY32');
|
||||||
AssignPng(mnuedNext.Bitmap, 'GO_NEXT32');
|
AssignPng(mnuedNext.Bitmap, 'GO_NEXT32');
|
||||||
|
|
@ -670,11 +661,6 @@ begin
|
||||||
exit(false);
|
exit(false);
|
||||||
exit(closeDocument(page.index, promptOnChanged));
|
exit(closeDocument(page.index, promptOnChanged));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEditorWidget.forceCaption(doc: TDexedMemo; value: string);
|
|
||||||
begin
|
|
||||||
TDexedPage(doc.Parent).fixedCaption := value;
|
|
||||||
end;
|
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
{$REGION PageControl/Editor things ---------------------------------------------}
|
{$REGION PageControl/Editor things ---------------------------------------------}
|
||||||
|
|
@ -1057,12 +1043,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEditorWidget.mnuedUndoAllClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if fDoc.isAssigned then
|
|
||||||
fDoc.undoAll();
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TEditorWidget.mnuedNextCareaClick(Sender: TObject);
|
procedure TEditorWidget.mnuedNextCareaClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if fDoc.isAssigned then
|
if fDoc.isAssigned then
|
||||||
|
|
@ -1112,7 +1092,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEditorWidget.mnuedRedoAllClick(Sender: TObject);
|
procedure TEditorWidget.enuItemRedoAllClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if fDoc.isAssigned then
|
if fDoc.isAssigned then
|
||||||
fDoc.redoAll();
|
fDoc.redoAll();
|
||||||
|
|
@ -1279,9 +1259,7 @@ begin
|
||||||
mnuedPaste.Enabled:=fDoc.CanPaste;
|
mnuedPaste.Enabled:=fDoc.CanPaste;
|
||||||
mnuedCopy.Enabled:=fDoc.SelAvail;
|
mnuedCopy.Enabled:=fDoc.SelAvail;
|
||||||
mnuedUndo.Enabled:=fDoc.CanUndo;
|
mnuedUndo.Enabled:=fDoc.CanUndo;
|
||||||
mnuedUndoAll.Enabled:=fDoc.CanUndo;
|
|
||||||
mnuedRedo.Enabled:=fDoc.CanRedo;
|
mnuedRedo.Enabled:=fDoc.CanRedo;
|
||||||
mnuedRedoAll.Enabled:=fDoc.CanRedo;
|
|
||||||
mnuedJum2Decl.Enabled:=fDoc.isDSource;
|
mnuedJum2Decl.Enabled:=fDoc.isDSource;
|
||||||
|
|
||||||
mnuEdSetSpaces.Checked:= eoTabsToSpaces in fDoc.Options;
|
mnuEdSetSpaces.Checked:= eoTabsToSpaces in fDoc.Options;
|
||||||
|
|
|
||||||
114
src/u_gdb.lfm
114
src/u_gdb.lfm
|
|
@ -8,37 +8,36 @@ inherited GdbWidget: TGdbWidget
|
||||||
ClientWidth = 672
|
ClientWidth = 672
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 626
|
Height = 626
|
||||||
Top = 42
|
|
||||||
Width = 672
|
Width = 672
|
||||||
ClientHeight = 626
|
ClientHeight = 626
|
||||||
ClientWidth = 672
|
ClientWidth = 672
|
||||||
object Panel1: TPanel[0]
|
object Panel1: TPanel[0]
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 383
|
Height = 386
|
||||||
Top = 205
|
Top = 205
|
||||||
Width = 672
|
Width = 672
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 383
|
ClientHeight = 386
|
||||||
ClientWidth = 672
|
ClientWidth = 672
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object GroupBox3: TGroupBox
|
object GroupBox3: TGroupBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 177
|
Height = 180
|
||||||
Top = 206
|
Top = 206
|
||||||
Width = 672
|
Width = 672
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'CPU'
|
Caption = 'CPU'
|
||||||
ClientHeight = 158
|
ClientHeight = 161
|
||||||
ClientWidth = 670
|
ClientWidth = 668
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object cpuViewer: TTIPropertyGrid
|
object cpuViewer: TTIPropertyGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 158
|
Height = 161
|
||||||
Hint = 'cpu registers'
|
Hint = 'cpu registers'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 670
|
Width = 668
|
||||||
Align = alClient
|
Align = alClient
|
||||||
CheckboxForBoolean = True
|
CheckboxForBoolean = True
|
||||||
DefaultValueFont.Color = clWindowText
|
DefaultValueFont.Color = clWindowText
|
||||||
|
|
@ -71,25 +70,25 @@ inherited GdbWidget: TGdbWidget
|
||||||
OnChange = PageControl2Change
|
OnChange = PageControl2Change
|
||||||
object TabSheet3: TTabSheet
|
object TabSheet3: TTabSheet
|
||||||
Caption = 'Variables'
|
Caption = 'Variables'
|
||||||
ClientHeight = 168
|
ClientHeight = 173
|
||||||
ClientWidth = 662
|
ClientWidth = 670
|
||||||
object lstVariables: TListView
|
object lstVariables: TListView
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 132
|
Height = 140
|
||||||
Top = 34
|
Top = 31
|
||||||
Width = 658
|
Width = 666
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'name'
|
Caption = 'name'
|
||||||
Width = 52
|
Width = 43
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'value'
|
Caption = 'value'
|
||||||
Width = 604
|
Width = 621
|
||||||
end>
|
end>
|
||||||
GridLines = True
|
GridLines = True
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
|
|
@ -103,10 +102,10 @@ inherited GdbWidget: TGdbWidget
|
||||||
end
|
end
|
||||||
object varListFlt: TListViewFilterEdit
|
object varListFlt: TListViewFilterEdit
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 30
|
Height = 27
|
||||||
Hint = 'locate variables'
|
Hint = 'locate variables'
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 658
|
Width = 666
|
||||||
ButtonWidth = 24
|
ButtonWidth = 24
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
|
|
@ -118,13 +117,13 @@ inherited GdbWidget: TGdbWidget
|
||||||
end
|
end
|
||||||
object TabSheet4: TTabSheet
|
object TabSheet4: TTabSheet
|
||||||
Caption = 'Assembler'
|
Caption = 'Assembler'
|
||||||
ClientHeight = 168
|
ClientHeight = 173
|
||||||
ClientWidth = 662
|
ClientWidth = 670
|
||||||
object lstAsm: TListView
|
object lstAsm: TListView
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 164
|
Height = 169
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 658
|
Width = 666
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSort = False
|
AutoSort = False
|
||||||
AutoWidthLastColumn = True
|
AutoWidthLastColumn = True
|
||||||
|
|
@ -133,11 +132,11 @@ inherited GdbWidget: TGdbWidget
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'address'
|
Caption = 'address'
|
||||||
Width = 64
|
Width = 57
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Caption = 'instruction'
|
Caption = 'instruction'
|
||||||
Width = 592
|
Width = 607
|
||||||
end>
|
end>
|
||||||
GridLines = True
|
GridLines = True
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
|
|
@ -152,19 +151,19 @@ inherited GdbWidget: TGdbWidget
|
||||||
end
|
end
|
||||||
object Panel3: TPanel[1]
|
object Panel3: TPanel[1]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 30
|
Height = 27
|
||||||
Top = 592
|
Top = 595
|
||||||
Width = 664
|
Width = 664
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 30
|
ClientHeight = 27
|
||||||
ClientWidth = 664
|
ClientWidth = 664
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object btnSendCom: TSpeedButton
|
object btnSendCom: TSpeedButton
|
||||||
Left = 659
|
Left = 659
|
||||||
Height = 28
|
Height = 25
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 4
|
Width = 4
|
||||||
Align = alRight
|
Align = alRight
|
||||||
|
|
@ -174,7 +173,7 @@ inherited GdbWidget: TGdbWidget
|
||||||
end
|
end
|
||||||
object Edit1: TComboBox
|
object Edit1: TComboBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 30
|
Height = 27
|
||||||
Hint = 'enter a custom GDB command or the program input with ">"'
|
Hint = 'enter a custom GDB command or the program input with ">"'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 658
|
Width = 658
|
||||||
|
|
@ -210,14 +209,14 @@ inherited GdbWidget: TGdbWidget
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
Caption = 'Call stack'
|
Caption = 'Call stack'
|
||||||
ClientHeight = 168
|
ClientHeight = 173
|
||||||
ClientWidth = 662
|
ClientWidth = 670
|
||||||
object lstCallStack: TListView
|
object lstCallStack: TListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 168
|
Height = 173
|
||||||
Hint = 'call stack'
|
Hint = 'call stack'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 662
|
Width = 670
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSort = False
|
AutoSort = False
|
||||||
Columns = <
|
Columns = <
|
||||||
|
|
@ -247,14 +246,14 @@ inherited GdbWidget: TGdbWidget
|
||||||
end
|
end
|
||||||
object TabSheet2: TTabSheet
|
object TabSheet2: TTabSheet
|
||||||
Caption = 'Thread list'
|
Caption = 'Thread list'
|
||||||
ClientHeight = 168
|
ClientHeight = 173
|
||||||
ClientWidth = 662
|
ClientWidth = 670
|
||||||
object lstThreads: TListView
|
object lstThreads: TListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 168
|
Height = 173
|
||||||
Hint = 'call stack'
|
Hint = 'call stack'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 662
|
Width = 670
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSort = False
|
AutoSort = False
|
||||||
AutoWidthLastColumn = True
|
AutoWidthLastColumn = True
|
||||||
|
|
@ -262,36 +261,36 @@ inherited GdbWidget: TGdbWidget
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'id'
|
Caption = 'id'
|
||||||
Width = 26
|
Width = 18
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'state'
|
Caption = 'state'
|
||||||
Width = 48
|
Width = 39
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'core'
|
Caption = 'core'
|
||||||
Width = 43
|
Width = 34
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'function'
|
Caption = 'function'
|
||||||
Width = 71
|
Width = 59
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'address'
|
Caption = 'address'
|
||||||
Width = 64
|
Width = 57
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'filename'
|
Caption = 'filename'
|
||||||
Width = 73
|
Width = 64
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Caption = 'line'
|
Caption = 'line'
|
||||||
Width = 335
|
Width = 397
|
||||||
end>
|
end>
|
||||||
GridLines = True
|
GridLines = True
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
|
|
@ -303,13 +302,13 @@ inherited GdbWidget: TGdbWidget
|
||||||
end
|
end
|
||||||
object TabSheet5: TTabSheet
|
object TabSheet5: TTabSheet
|
||||||
Caption = 'Debugee options'
|
Caption = 'Debugee options'
|
||||||
ClientHeight = 168
|
ClientHeight = 173
|
||||||
ClientWidth = 662
|
ClientWidth = 670
|
||||||
object dbgeeOptsEd: TTIPropertyGrid
|
object dbgeeOptsEd: TTIPropertyGrid
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 164
|
Height = 169
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 658
|
Width = 666
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
CheckboxForBoolean = True
|
CheckboxForBoolean = True
|
||||||
|
|
@ -326,7 +325,7 @@ inherited GdbWidget: TGdbWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited toolbar: TDexedToolBar
|
inherited toolbar: TDexedToolBar
|
||||||
Top = 10
|
Height = 30
|
||||||
Width = 664
|
Width = 664
|
||||||
object btnStack: TDexedToolButton[0]
|
object btnStack: TDexedToolButton[0]
|
||||||
Left = 238
|
Left = 238
|
||||||
|
|
@ -458,7 +457,7 @@ inherited GdbWidget: TGdbWidget
|
||||||
scaledSeparator = False
|
scaledSeparator = False
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Splitter2: TSplitter[2]
|
object Splitter2: TSplitter[1]
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 6
|
Height = 6
|
||||||
|
|
@ -467,11 +466,11 @@ inherited GdbWidget: TGdbWidget
|
||||||
Align = alTop
|
Align = alTop
|
||||||
ResizeAnchor = akTop
|
ResizeAnchor = akTop
|
||||||
end
|
end
|
||||||
inherited contextMenu: TPopupMenu[3]
|
inherited contextMenu: TPopupMenu[2]
|
||||||
Left = 56
|
Left = 56
|
||||||
Top = 64
|
Top = 64
|
||||||
end
|
end
|
||||||
object mnuProjRunnable: TPopupMenu[4]
|
object mnuProjRunnable: TPopupMenu[3]
|
||||||
Left = 56
|
Left = 56
|
||||||
Top = 112
|
Top = 112
|
||||||
object mnuSelProj: TMenuItem
|
object mnuSelProj: TMenuItem
|
||||||
|
|
@ -490,11 +489,8 @@ inherited GdbWidget: TGdbWidget
|
||||||
Caption = 'Debug custom executable...'
|
Caption = 'Debug custom executable...'
|
||||||
OnClick = mnuSelCustomClick
|
OnClick = mnuSelCustomClick
|
||||||
end
|
end
|
||||||
object mnuDebugRecent: TMenuItem
|
|
||||||
Caption = 'Debug recent executable'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
object mnuWatch: TPopupMenu[5]
|
object mnuWatch: TPopupMenu[4]
|
||||||
Left = 56
|
Left = 56
|
||||||
Top = 160
|
Top = 160
|
||||||
object mnuReadW: TMenuItem
|
object mnuReadW: TMenuItem
|
||||||
|
|
@ -514,7 +510,7 @@ inherited GdbWidget: TGdbWidget
|
||||||
OnClick = mnuReadWriteWClick
|
OnClick = mnuReadWriteWClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object mnuNext: TPopupMenu[6]
|
object mnuNext: TPopupMenu[5]
|
||||||
Left = 152
|
Left = 152
|
||||||
Top = 112
|
Top = 112
|
||||||
object mnuNextMachine: TMenuItem
|
object mnuNextMachine: TMenuItem
|
||||||
|
|
@ -522,7 +518,7 @@ inherited GdbWidget: TGdbWidget
|
||||||
Caption = 'machine instruction'
|
Caption = 'machine instruction'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object mnuStep: TPopupMenu[7]
|
object mnuStep: TPopupMenu[6]
|
||||||
Left = 152
|
Left = 152
|
||||||
Top = 160
|
Top = 160
|
||||||
object mnuStepMachine: TMenuItem
|
object mnuStepMachine: TMenuItem
|
||||||
|
|
@ -530,7 +526,7 @@ inherited GdbWidget: TGdbWidget
|
||||||
Caption = 'machine instruction'
|
Caption = 'machine instruction'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object mnuEval: TPopupMenu[8]
|
object mnuEval: TPopupMenu[7]
|
||||||
Left = 216
|
Left = 216
|
||||||
Top = 168
|
Top = 168
|
||||||
object mnuEvalSelected: TMenuItem
|
object mnuEvalSelected: TMenuItem
|
||||||
|
|
@ -550,7 +546,7 @@ inherited GdbWidget: TGdbWidget
|
||||||
OnClick = mnuEvalCustomClick
|
OnClick = mnuEvalCustomClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object mnuEvalCompletion: TPopupMenu[9]
|
object mnuEvalCompletion: TPopupMenu[8]
|
||||||
Left = 288
|
Left = 288
|
||||||
Top = 168
|
Top = 168
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, RegExpr, ComCtrls,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, RegExpr, ComCtrls,
|
||||||
PropEdits, GraphPropEdits, RTTIGrids, Dialogs, ExtCtrls, Menus, Buttons,
|
PropEdits, GraphPropEdits, RTTIGrids, Dialogs, ExtCtrls, Menus, Buttons,
|
||||||
StdCtrls, process, fpjson, typinfo, {$IFDEF UNIX}Unix,{$ELSE} Windows,{$ENDIF}
|
StdCtrls, process, fpjson, typinfo, {$IFDEF UNIX}Unix,{$ELSE} Windows,{$ENDIF}
|
||||||
ListViewFilterEdit, SynEdit, ObjectInspector, math, u_mru,
|
ListViewFilterEdit, SynEdit, ObjectInspector, math,
|
||||||
u_common, u_interfaces, u_widget, u_processes, u_observer, u_synmemo,
|
u_common, u_interfaces, u_widget, u_processes, u_observer, u_synmemo,
|
||||||
u_sharedres, u_stringrange, u_dsgncontrols, u_dialogs, u_dbgitf,
|
u_sharedres, u_stringrange, u_dsgncontrols, u_dialogs, u_dbgitf,
|
||||||
u_ddemangle, u_writableComponent, EditBtn, strutils, u_controls;
|
u_ddemangle, u_writableComponent, EditBtn, strutils, u_controls;
|
||||||
|
|
@ -319,13 +319,11 @@ type
|
||||||
fGdbPath: TFilename;
|
fGdbPath: TFilename;
|
||||||
fUseCustomCommandsHistory: boolean;
|
fUseCustomCommandsHistory: boolean;
|
||||||
fAutoDotCompletion: boolean;
|
fAutoDotCompletion: boolean;
|
||||||
fDebugRecentMru: TMRUFileList;
|
|
||||||
procedure setIgnoredSignals(value: TStringList);
|
procedure setIgnoredSignals(value: TStringList);
|
||||||
procedure setCommandsHistory(value: TStringList);
|
procedure setCommandsHistory(value: TStringList);
|
||||||
procedure setCustomEvalHistory(value: TStringList);
|
procedure setCustomEvalHistory(value: TStringList);
|
||||||
procedure setShortcuts(value: TDebugShortcuts);
|
procedure setShortcuts(value: TDebugShortcuts);
|
||||||
procedure setMaxCallStackDepth(value: integer);
|
procedure setMaxCallStackDepth(value: integer);
|
||||||
procedure setDebugRecentMru(value: TMRUFileList);
|
|
||||||
procedure cleanInvalidHistoryEntries;
|
procedure cleanInvalidHistoryEntries;
|
||||||
published
|
published
|
||||||
property asmSyntax: TAsmSyntax read fAsmSyntax write fAsmSyntax;
|
property asmSyntax: TAsmSyntax read fAsmSyntax write fAsmSyntax;
|
||||||
|
|
@ -340,7 +338,6 @@ type
|
||||||
property coreBreakingSymbols: TDlangBreakpoints read fDlangBreakpoints write fDlangBreakpoints;
|
property coreBreakingSymbols: TDlangBreakpoints read fDlangBreakpoints write fDlangBreakpoints;
|
||||||
property currentEvalKind: TGdbEvalKind read fCurrentEvalKind write fCurrentEvalKind;
|
property currentEvalKind: TGdbEvalKind read fCurrentEvalKind write fCurrentEvalKind;
|
||||||
property customEvalHistory: TStringList read fCustomEvalHistory write setCustomEvalHistory;
|
property customEvalHistory: TStringList read fCustomEvalHistory write setCustomEvalHistory;
|
||||||
property debugRecentMru: TMRUFileList read fDebugRecentMru write setDebugRecentMru;
|
|
||||||
property gdbPath: TFilename read fGdbPath write fGdbPath;
|
property gdbPath: TFilename read fGdbPath write fGdbPath;
|
||||||
property hideCpuView: boolean read fHideCpuView write fHideCpuView default false;
|
property hideCpuView: boolean read fHideCpuView write fHideCpuView default false;
|
||||||
property ignoredSignals: TStringList read fIgnoredSignals write setIgnoredSignals;
|
property ignoredSignals: TStringList read fIgnoredSignals write setIgnoredSignals;
|
||||||
|
|
@ -440,7 +437,6 @@ type
|
||||||
Edit1: TComboBox;
|
Edit1: TComboBox;
|
||||||
GroupBox3: TGroupBox;
|
GroupBox3: TGroupBox;
|
||||||
lstThreads: TListView;
|
lstThreads: TListView;
|
||||||
mnuDebugRecent: TMenuItem;
|
|
||||||
mnuSelCustom: TMenuItem;
|
mnuSelCustom: TMenuItem;
|
||||||
mnuEvalDeref: TMenuItem;
|
mnuEvalDeref: TMenuItem;
|
||||||
mnuEvalSelected: TMenuItem;
|
mnuEvalSelected: TMenuItem;
|
||||||
|
|
@ -608,10 +604,6 @@ type
|
||||||
function evaluate(const exp: string): string;
|
function evaluate(const exp: string): string;
|
||||||
procedure executeFromShortcut(sender: TObject);
|
procedure executeFromShortcut(sender: TObject);
|
||||||
procedure itemCompletetionClick(sender: TObject);
|
procedure itemCompletetionClick(sender: TObject);
|
||||||
procedure mruDebugRecentChange(Sender: TObject);
|
|
||||||
procedure mruDebugRecentClick(Sender: TObject);
|
|
||||||
procedure mruDebugRecentClearClick(Sender: TObject);
|
|
||||||
procedure mruDebugRecentDeleteInvalidClick(Sender: TObject);
|
|
||||||
public
|
public
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
|
|
@ -725,7 +717,6 @@ begin
|
||||||
fCustomEvalHistory := TstringList.Create;
|
fCustomEvalHistory := TstringList.Create;
|
||||||
fCustomEvalHistory.Duplicates:= dupIgnore;
|
fCustomEvalHistory.Duplicates:= dupIgnore;
|
||||||
fCustomEvalHistory.Sorted:=true;
|
fCustomEvalHistory.Sorted:=true;
|
||||||
fDebugRecentMru := TMRUFileList.create;
|
|
||||||
for d in [low(TDlangBreakpoint) .. high(TDlangBreakpoint)] do
|
for d in [low(TDlangBreakpoint) .. high(TDlangBreakpoint)] do
|
||||||
include(fDlangBreakpoints, d);
|
include(fDlangBreakpoints, d);
|
||||||
end;
|
end;
|
||||||
|
|
@ -736,7 +727,6 @@ begin
|
||||||
fCommandsHistory.Free;
|
fCommandsHistory.Free;
|
||||||
fCustomEvalHistory.Free;
|
fCustomEvalHistory.Free;
|
||||||
fShortcuts.Free;
|
fShortcuts.Free;
|
||||||
fDebugRecentMru.free;
|
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -779,11 +769,6 @@ begin
|
||||||
fShortcuts.assign(value);
|
fShortcuts.assign(value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDebugOptionsBase.setDebugRecentMru(value: TMRUFileList);
|
|
||||||
begin
|
|
||||||
fDebugRecentMru.assign(value);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TDebugOptionsBase.setMaxCallStackDepth(value: integer);
|
procedure TDebugOptionsBase.setMaxCallStackDepth(value: integer);
|
||||||
begin
|
begin
|
||||||
value := max(1, value);
|
value := max(1, value);
|
||||||
|
|
@ -816,7 +801,6 @@ begin
|
||||||
fCurrentEvalKind := src.fCurrentEvalKind;
|
fCurrentEvalKind := src.fCurrentEvalKind;
|
||||||
fUseCustomCommandsHistory:= src.fUseCustomCommandsHistory;
|
fUseCustomCommandsHistory:= src.fUseCustomCommandsHistory;
|
||||||
fAutoDotCompletion:=src.fAutoDotCompletion;
|
fAutoDotCompletion:=src.fAutoDotCompletion;
|
||||||
fDebugRecentMru.assign(src.fDebugRecentMru);
|
|
||||||
end
|
end
|
||||||
else inherited;
|
else inherited;
|
||||||
end;
|
end;
|
||||||
|
|
@ -1294,7 +1278,6 @@ begin
|
||||||
fSubj:= TDebugObserverSubject.Create;
|
fSubj:= TDebugObserverSubject.Create;
|
||||||
fOptions:= TDebugOptions.create(self);
|
fOptions:= TDebugOptions.create(self);
|
||||||
fOptions.onChangesApplied:=@optionsChangesApplied;
|
fOptions.onChangesApplied:=@optionsChangesApplied;
|
||||||
fOptions.debugRecentMru.OnChange:=@mruDebugRecentChange;
|
|
||||||
fDebugeeOptions:= TDebugeeOptions.Create(self);
|
fDebugeeOptions:= TDebugeeOptions.Create(self);
|
||||||
Edit1.Items.Assign(fOptions.commandsHistory);
|
Edit1.Items.Assign(fOptions.commandsHistory);
|
||||||
fAddWatchPointKind := wpkWrite;
|
fAddWatchPointKind := wpkWrite;
|
||||||
|
|
@ -1341,7 +1324,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
mruDebugRecentChange(nil);
|
|
||||||
updateCpuViewVisibility;
|
updateCpuViewVisibility;
|
||||||
updateMenu;
|
updateMenu;
|
||||||
updateButtonsState;
|
updateButtonsState;
|
||||||
|
|
@ -2041,7 +2023,6 @@ begin
|
||||||
fLastFunction := '';
|
fLastFunction := '';
|
||||||
// gdb process
|
// gdb process
|
||||||
killGdb;
|
killGdb;
|
||||||
fOptions.debugRecentMru.Insert(0, fExe);
|
|
||||||
fGdb := TDexedProcess.create(nil);
|
fGdb := TDexedProcess.create(nil);
|
||||||
fGdb.Executable:= gdb;
|
fGdb.Executable:= gdb;
|
||||||
fgdb.Options:= [poUsePipes, poStderrToOutPut];
|
fgdb.Options:= [poUsePipes, poStderrToOutPut];
|
||||||
|
|
@ -3083,72 +3064,6 @@ begin
|
||||||
Edit1.Text := (sender as TMenuItem).Caption;
|
Edit1.Text := (sender as TMenuItem).Caption;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGdbWidget.mruDebugRecentChange(Sender: TObject);
|
|
||||||
var
|
|
||||||
srcLst: TMRUFileList;
|
|
||||||
itm: TMenuItem;
|
|
||||||
fname: string;
|
|
||||||
i: integer;
|
|
||||||
s: string;
|
|
||||||
begin
|
|
||||||
srcLst := fOptions.debugRecentMru;
|
|
||||||
mnuDebugRecent.Clear;
|
|
||||||
for i := 0 to srcLst.Count-1 do
|
|
||||||
begin
|
|
||||||
s := srcLst.Strings[i];
|
|
||||||
fname := s.extractFileName;
|
|
||||||
itm := TMenuItem.Create(mnuDebugRecent);
|
|
||||||
itm.Hint := s;
|
|
||||||
itm.Caption := fname + ' - (' + itm.Hint + ')';
|
|
||||||
itm.OnClick := @mruDebugRecentClick;
|
|
||||||
mnuDebugRecent.Add(itm);
|
|
||||||
end;
|
|
||||||
|
|
||||||
mnuDebugRecent.AddSeparator;
|
|
||||||
itm := TMenuItem.Create(mnuDebugRecent);
|
|
||||||
itm.Caption := 'Clear all';
|
|
||||||
itm.OnClick := @mruDebugRecentClearClick;
|
|
||||||
itm.Tag := PtrInt(srcLst);
|
|
||||||
mnuDebugRecent.Add(itm);
|
|
||||||
|
|
||||||
itm := TMenuItem.Create(mnuDebugRecent);
|
|
||||||
itm.Caption := 'Remove invalid entries';
|
|
||||||
itm.OnClick := @mruDebugRecentDeleteInvalidClick;
|
|
||||||
itm.Tag := PtrInt(srcLst);
|
|
||||||
mnuDebugRecent.Add(itm);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TGdbWidget.mruDebugRecentClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
fCustomTargetFile := TMenuItem(sender).Hint;
|
|
||||||
fDebugTargetKind := dtkCustom;
|
|
||||||
mnuSelProj.Checked:=false;
|
|
||||||
mnuSelRunnable.Checked:=false;
|
|
||||||
mnuSelCustom.Checked:=true;
|
|
||||||
updateDebugeeOptionsEditor;
|
|
||||||
btnStart.Click();
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TGdbWidget.mruDebugRecentClearClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
mnuDebugRecent.Clear;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TGdbWidget.mruDebugRecentDeleteInvalidClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
srcLst: TMRUFileList;
|
|
||||||
i: integer;
|
|
||||||
begin
|
|
||||||
srcLst := fOptions.debugRecentMru;
|
|
||||||
if srcLst.isNotAssigned then
|
|
||||||
exit;
|
|
||||||
srcLst.BeginUpdate;
|
|
||||||
for i := srcLst.Count-1 downto 0 do
|
|
||||||
if not srcLst.Strings[i].fileExists then
|
|
||||||
srcLst.Delete(i);
|
|
||||||
srcLst.EndUpdate;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TGdbWidget.btnSendComClick(Sender: TObject);
|
procedure TGdbWidget.btnSendComClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
sendCustomCommand;
|
sendCustomCommand;
|
||||||
|
|
|
||||||
|
|
@ -320,8 +320,6 @@ type
|
||||||
function closeDocument(doc: TDexedMemo; promptOnChanged: boolean = true): boolean;
|
function closeDocument(doc: TDexedMemo; promptOnChanged: boolean = true): boolean;
|
||||||
// conveniance property.
|
// conveniance property.
|
||||||
property document[index: integer]: TDexedMemo read getDocument;
|
property document[index: integer]: TDexedMemo read getDocument;
|
||||||
// force page caption
|
|
||||||
procedure forceCaption(doc: TDexedMemo; value: string);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ object MainForm: TMainForm
|
||||||
OnDropFiles = FormDropFiles
|
OnDropFiles = FormDropFiles
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
|
LCLVersion = '2.2.4.0'
|
||||||
object mainMenu: TMainMenu
|
object mainMenu: TMainMenu
|
||||||
Top = 1
|
Top = 1
|
||||||
object MenuItem1: TMenuItem
|
object MenuItem1: TMenuItem
|
||||||
|
|
@ -134,9 +135,6 @@ object MainForm: TMainForm
|
||||||
object MenuItem19: TMenuItem
|
object MenuItem19: TMenuItem
|
||||||
Action = actEdUndo
|
Action = actEdUndo
|
||||||
end
|
end
|
||||||
object MenuItem120: TMenuItem
|
|
||||||
Action = actEdUndoAll
|
|
||||||
end
|
|
||||||
object MenuItem20: TMenuItem
|
object MenuItem20: TMenuItem
|
||||||
Action = actEdRedo
|
Action = actEdRedo
|
||||||
end
|
end
|
||||||
|
|
@ -453,6 +451,13 @@ object MainForm: TMainForm
|
||||||
OnUpdate = updateDocEditBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 16474
|
ShortCut = 16474
|
||||||
end
|
end
|
||||||
|
object actEdRedo: TAction
|
||||||
|
Category = 'Edit'
|
||||||
|
Caption = 'Redo'
|
||||||
|
OnExecute = actEdRedoExecute
|
||||||
|
OnUpdate = updateDocEditBasedAction
|
||||||
|
ShortCut = 24666
|
||||||
|
end
|
||||||
object actFileSave: TAction
|
object actFileSave: TAction
|
||||||
Category = 'File'
|
Category = 'File'
|
||||||
Caption = 'Save file'
|
Caption = 'Save file'
|
||||||
|
|
@ -812,19 +817,6 @@ object MainForm: TMainForm
|
||||||
Caption = 'Check semantics'
|
Caption = 'Check semantics'
|
||||||
OnExecute = actProjCheckSemaExecute
|
OnExecute = actProjCheckSemaExecute
|
||||||
end
|
end
|
||||||
object actEdUndoAll: TAction
|
|
||||||
Category = 'Edit'
|
|
||||||
Caption = 'Undo all'
|
|
||||||
OnExecute = actEdUndoAllExecute
|
|
||||||
OnUpdate = updateDocEditBasedAction
|
|
||||||
end
|
|
||||||
object actEdRedo: TAction
|
|
||||||
Category = 'Edit'
|
|
||||||
Caption = 'Redo'
|
|
||||||
OnExecute = actEdRedoExecute
|
|
||||||
OnUpdate = updateDocEditBasedAction
|
|
||||||
ShortCut = 24666
|
|
||||||
end
|
|
||||||
object actEdRedoAll: TAction
|
object actEdRedoAll: TAction
|
||||||
Category = 'Edit'
|
Category = 'Edit'
|
||||||
Caption = 'Redo all'
|
Caption = 'Redo all'
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@ uses
|
||||||
u_toolseditor, u_procinput, u_optionseditor, u_symlist, u_mru, u_processes,
|
u_toolseditor, u_procinput, u_optionseditor, u_symlist, u_mru, u_processes,
|
||||||
u_infos, u_dubproject, u_dialogs, u_dubprojeditor, u_gdb, u_makeproject,
|
u_infos, u_dubproject, u_dialogs, u_dubprojeditor, u_gdb, u_makeproject,
|
||||||
u_dfmt, u_lcldragdrop, u_projgroup, u_projutils, u_stringrange, u_dexed_d,
|
u_dfmt, u_lcldragdrop, u_projgroup, u_projutils, u_stringrange, u_dexed_d,
|
||||||
u_halstead, u_profileviewer, u_semver, u_dsgncontrols, u_term, u_newdubproj,
|
u_halstead, u_profileviewer, u_semver, u_dsgncontrols, u_term, u_newdubproj;
|
||||||
u_blame;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
|
@ -119,7 +118,6 @@ type
|
||||||
actFileNewClip: TAction;
|
actFileNewClip: TAction;
|
||||||
actEdFormat: TAction;
|
actEdFormat: TAction;
|
||||||
actEdRedoAll: TAction;
|
actEdRedoAll: TAction;
|
||||||
actEdUndoAll: TAction;
|
|
||||||
actProjCheckSema: TAction;
|
actProjCheckSema: TAction;
|
||||||
actProjSetEnv: TAction;
|
actProjSetEnv: TAction;
|
||||||
actProjGitPull: TAction;
|
actProjGitPull: TAction;
|
||||||
|
|
@ -190,7 +188,6 @@ type
|
||||||
MenuItem117: TMenuItem;
|
MenuItem117: TMenuItem;
|
||||||
MenuItem118: TMenuItem;
|
MenuItem118: TMenuItem;
|
||||||
MenuItem119: TMenuItem;
|
MenuItem119: TMenuItem;
|
||||||
MenuItem120: TMenuItem;
|
|
||||||
mnuGitBranch: TMenuItem;
|
mnuGitBranch: TMenuItem;
|
||||||
mnuItemDubDialog: TMenuItem;
|
mnuItemDubDialog: TMenuItem;
|
||||||
mnuItemHelp: TMenuItem;
|
mnuItemHelp: TMenuItem;
|
||||||
|
|
@ -302,7 +299,6 @@ type
|
||||||
MenuItem8: TMenuItem;
|
MenuItem8: TMenuItem;
|
||||||
MenuItem9: TMenuItem;
|
MenuItem9: TMenuItem;
|
||||||
procedure actEdFormatExecute(Sender: TObject);
|
procedure actEdFormatExecute(Sender: TObject);
|
||||||
procedure actEdUndoAllExecute(Sender: TObject);
|
|
||||||
procedure actFileCloseAllExecute(Sender: TObject);
|
procedure actFileCloseAllExecute(Sender: TObject);
|
||||||
procedure actFileCloseAllOthersExecute(Sender: TObject);
|
procedure actFileCloseAllOthersExecute(Sender: TObject);
|
||||||
procedure actFileCompileExecute(Sender: TObject);
|
procedure actFileCompileExecute(Sender: TObject);
|
||||||
|
|
@ -438,9 +434,8 @@ type
|
||||||
fDubProjWidg: TDubProjectEditorWidget;
|
fDubProjWidg: TDubProjectEditorWidget;
|
||||||
fPrjGrpWidg: TProjectGroupWidget;
|
fPrjGrpWidg: TProjectGroupWidget;
|
||||||
fGdbWidg: TGdbWidget;
|
fGdbWidg: TGdbWidget;
|
||||||
fBlameWidg: TBlameWidget;
|
|
||||||
{$IFDEF UNIX}
|
{$IFDEF UNIX}
|
||||||
fTermWidg: TTermWidget;
|
fTermWWidg: TTermWidget;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
fDfmtWidg: TDfmtWidget;
|
fDfmtWidg: TDfmtWidget;
|
||||||
|
|
@ -1570,7 +1565,6 @@ begin
|
||||||
actFileNewClip.ImageIndex:= i;
|
actFileNewClip.ImageIndex:= i;
|
||||||
i := loadIcon('ARROW_UNDO');
|
i := loadIcon('ARROW_UNDO');
|
||||||
actEdUndo.ImageIndex:= i;
|
actEdUndo.ImageIndex:= i;
|
||||||
actEdUndoAll.ImageIndex:= i;
|
|
||||||
i := loadIcon('ARROW_REDO');
|
i := loadIcon('ARROW_REDO');
|
||||||
actEdRedo.ImageIndex:= i;
|
actEdRedo.ImageIndex:= i;
|
||||||
actEdRedoAll.ImageIndex:= i;
|
actEdRedoAll.ImageIndex:= i;
|
||||||
|
|
@ -1664,9 +1658,8 @@ begin
|
||||||
fPrjGrpWidg := TProjectGroupWidget.create(self);
|
fPrjGrpWidg := TProjectGroupWidget.create(self);
|
||||||
fProfWidg := TProfileViewerWidget.create(self);
|
fProfWidg := TProfileViewerWidget.create(self);
|
||||||
fGdbWidg := TGdbWidget.create(self);
|
fGdbWidg := TGdbWidget.create(self);
|
||||||
fBlameWidg := TBlameWidget.create(self);
|
|
||||||
{$IFDEF UNIX}
|
{$IFDEF UNIX}
|
||||||
fTermWidg := TTermWidget.create(self);
|
fTermWWidg := TTermWidget.create(self);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
getMessageDisplay(fMsgs);
|
getMessageDisplay(fMsgs);
|
||||||
|
|
@ -1690,9 +1683,8 @@ begin
|
||||||
fWidgList.addWidget(@fPrjGrpWidg);
|
fWidgList.addWidget(@fPrjGrpWidg);
|
||||||
fWidgList.addWidget(@fProfWidg);
|
fWidgList.addWidget(@fProfWidg);
|
||||||
fWidgList.addWidget(@fGdbWidg);
|
fWidgList.addWidget(@fGdbWidg);
|
||||||
fWidgList.addWidget(@fBlameWidg);
|
|
||||||
{$IFDEF UNIX}
|
{$IFDEF UNIX}
|
||||||
fWidgList.addWidget(@fTermWidg);
|
fWidgList.addWidget(@fTermWWidg);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
fWidgList.sort(@CompareWidgCaption);
|
fWidgList.sort(@CompareWidgCaption);
|
||||||
|
|
@ -1852,7 +1844,7 @@ begin
|
||||||
DockMaster.ManualDock(DockMaster.GetAnchorSite(fLibMWidg), DockMaster.GetSite(fMesgWidg), alClient, fMesgWidg);
|
DockMaster.ManualDock(DockMaster.GetAnchorSite(fLibMWidg), DockMaster.GetSite(fMesgWidg), alClient, fMesgWidg);
|
||||||
DockMaster.ManualDock(DockMaster.GetAnchorSite(fTodolWidg), DockMaster.GetSite(fMesgWidg), alClient, fMesgWidg);
|
DockMaster.ManualDock(DockMaster.GetAnchorSite(fTodolWidg), DockMaster.GetSite(fMesgWidg), alClient, fMesgWidg);
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
DockMaster.ManualDock(DockMaster.GetAnchorSite(fTermWidg), DockMaster.GetSite(fMesgWidg), alClient, fMesgWidg);
|
DockMaster.ManualDock(DockMaster.GetAnchorSite(fTermWWidg), DockMaster.GetSite(fMesgWidg), alClient, fMesgWidg);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
fMesgWidg.showWidget;
|
fMesgWidg.showWidget;
|
||||||
// left
|
// left
|
||||||
|
|
@ -2924,12 +2916,6 @@ begin
|
||||||
fDoc.redoAll();
|
fDoc.redoAll();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.actEdUndoAllExecute(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if fDoc.isAssigned then
|
|
||||||
fDoc.undoAll();
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TMainForm.actEdMacPlayExecute(Sender: TObject);
|
procedure TMainForm.actEdMacPlayExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if fDoc.isAssigned then
|
if fDoc.isAssigned then
|
||||||
|
|
@ -2969,7 +2955,7 @@ begin
|
||||||
if fDoc.SelAvail then
|
if fDoc.SelAvail then
|
||||||
str := fDoc.SelText
|
str := fDoc.SelText
|
||||||
else
|
else
|
||||||
str := fDoc.HighlightedIdent;
|
str := fDoc.Identifier;
|
||||||
ffindwidg.cbToFind.Text := str;
|
ffindwidg.cbToFind.Text := str;
|
||||||
ffindwidg.cbToFindChange(nil);
|
ffindwidg.cbToFindChange(nil);
|
||||||
ffindwidg.cbToFind.SetFocus;
|
ffindwidg.cbToFind.SetFocus;
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ type
|
||||||
function optionedOptionsModified: boolean;
|
function optionedOptionsModified: boolean;
|
||||||
//
|
//
|
||||||
function openFileFromDmdMessage(const aMessage: string): boolean;
|
function openFileFromDmdMessage(const aMessage: string): boolean;
|
||||||
class function getLineFromMessage(const aMessage: string): TPoint;
|
function getLineFromMessage(const aMessage: string): TPoint;
|
||||||
function guessMessageKind(const aMessg: string): TAppMessageKind;
|
function guessMessageKind(const aMessg: string): TAppMessageKind;
|
||||||
//
|
//
|
||||||
function singleServiceName: string;
|
function singleServiceName: string;
|
||||||
|
|
@ -811,7 +811,6 @@ var
|
||||||
i: integer;
|
i: integer;
|
||||||
n: TTreeNode;
|
n: TTreeNode;
|
||||||
begin
|
begin
|
||||||
List.ClearSelection();
|
|
||||||
List.BeginUpdate;
|
List.BeginUpdate;
|
||||||
for i := 0 to List.Items.Count-1 do
|
for i := 0 to List.Items.Count-1 do
|
||||||
begin
|
begin
|
||||||
|
|
@ -1239,7 +1238,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TMessagesWidget.getLineFromMessage(const aMessage: string): TPoint;
|
function TMessagesWidget.getLineFromMessage(const aMessage: string): TPoint;
|
||||||
var
|
var
|
||||||
rng: TStringRange = (ptr:nil; pos:0; len: 0);
|
rng: TStringRange = (ptr:nil; pos:0; len: 0);
|
||||||
lne: string;
|
lne: string;
|
||||||
|
|
@ -1259,11 +1258,8 @@ begin
|
||||||
if gnuStyle then
|
if gnuStyle then
|
||||||
begin
|
begin
|
||||||
lne := rng.takeUntil([':', ' ']).yield;
|
lne := rng.takeUntil([':', ' ']).yield;
|
||||||
//lne := rng.takeWhile(['1'..'9']).yield;
|
|
||||||
//rng.popWhile(' ');
|
|
||||||
if rng.front = ':' then
|
if rng.front = ':' then
|
||||||
//col := rng.popFront()^.takeUntil([' ', ':']).yield;
|
col := rng.popWhile(':')^.takeUntil(' ').yield;
|
||||||
col := rng.popFront()^.takeUntil([' ', ':']).yield;
|
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
rng.popWhile(['(', ':']);
|
rng.popWhile(['(', ':']);
|
||||||
|
|
@ -1353,13 +1349,4 @@ begin
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
{$IFDEF DEBUG}
|
|
||||||
begin
|
|
||||||
//assert(TMessagesWidget.getLineFromMessage('home/xxx/temp/temp.sx:8 : erreur : référence à « BAD » non définie') = Point(-1,8));
|
|
||||||
assert(TMessagesWidget.getLineFromMessage('home/xxx/temp/temp.sx:8: erreur : référence à « BAD » non définie') = Point(-1,8));
|
|
||||||
assert(TMessagesWidget.getLineFromMessage('home/xxx/temp/temp.sx:18:12: erreur : référence à « BAD » non définie') = Point(12,18));
|
|
||||||
assert(TMessagesWidget.getLineFromMessage('home/xxx/temp/temp.sx(8,12): erreur : référence à « BAD » non définie') = Point(12,8));
|
|
||||||
assert(TMessagesWidget.getLineFromMessage('home/xxx/temp/temp.sx(8): erreur : référence à « BAD » non définie') = Point(-1,8));
|
|
||||||
assert(TMessagesWidget.getLineFromMessage('/home/basile/Bureau/temp/temp.sx:10:12: warning, variable `c` is never used') = Point(12,10));
|
|
||||||
{$ENDIF}
|
|
||||||
end.
|
end.
|
||||||
|
|
|
||||||
|
|
@ -84,51 +84,23 @@ inherited MiniExplorerWidget: TMiniExplorerWidget
|
||||||
ObjectTypes = [otFolders]
|
ObjectTypes = [otFolders]
|
||||||
ShellListView = lstFiles
|
ShellListView = lstFiles
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object lstFiles: TShellListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 162
|
Height = 162
|
||||||
Top = 224
|
Top = 224
|
||||||
Width = 527
|
Width = 527
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'Panel1'
|
Color = clDefault
|
||||||
ClientHeight = 162
|
DragMode = dmAutomatic
|
||||||
ClientWidth = 527
|
ReadOnly = True
|
||||||
|
ScrollBars = ssAutoBoth
|
||||||
|
SortType = stText
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object lstFilter: TListViewFilterEdit
|
OnColumnClick = lstFilesColumnClick
|
||||||
Left = 3
|
OnDblClick = lstFilesDblClick
|
||||||
Height = 30
|
OnFileAdded = lstFilesFileAdded
|
||||||
Top = 3
|
ObjectTypes = [otNonFolders, otHidden]
|
||||||
Width = 521
|
ShellTreeView = treeFolders
|
||||||
ButtonWidth = 23
|
|
||||||
Flat = True
|
|
||||||
Align = alTop
|
|
||||||
BorderSpacing.Around = 2
|
|
||||||
NumGlyphs = 1
|
|
||||||
MaxLength = 0
|
|
||||||
TabOrder = 0
|
|
||||||
OnButtonClick = lstFilterButtonClick
|
|
||||||
OnKeyUp = lstFilterKeyUp
|
|
||||||
end
|
|
||||||
object lstFiles: TShellListView
|
|
||||||
Left = 1
|
|
||||||
Height = 126
|
|
||||||
Top = 35
|
|
||||||
Width = 525
|
|
||||||
Align = alClient
|
|
||||||
Color = clDefault
|
|
||||||
DragMode = dmAutomatic
|
|
||||||
ReadOnly = True
|
|
||||||
ScrollBars = ssAutoBoth
|
|
||||||
SortColumn = 0
|
|
||||||
SortType = stText
|
|
||||||
TabOrder = 1
|
|
||||||
OnColumnClick = lstFilesColumnClick
|
|
||||||
OnDblClick = lstFilesDblClick
|
|
||||||
OnMouseMove = lstFilesMouseMove
|
|
||||||
OnFileAdded = lstFilesFileAdded
|
|
||||||
ObjectTypes = [otNonFolders, otHidden]
|
|
||||||
ShellTreeView = treeFolders
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -197,12 +169,28 @@ inherited MiniExplorerWidget: TMiniExplorerWidget
|
||||||
resourceName = 'GO_PREVIOUS'
|
resourceName = 'GO_PREVIOUS'
|
||||||
scaledSeparator = False
|
scaledSeparator = False
|
||||||
end
|
end
|
||||||
|
object lstFilter: TListViewFilterEdit[6]
|
||||||
|
Left = 191
|
||||||
|
Height = 26
|
||||||
|
Top = 2
|
||||||
|
Width = 329
|
||||||
|
ButtonWidth = 23
|
||||||
|
Flat = True
|
||||||
|
Align = alClient
|
||||||
|
BorderSpacing.Left = 180
|
||||||
|
BorderSpacing.Around = 2
|
||||||
|
NumGlyphs = 1
|
||||||
|
MaxLength = 0
|
||||||
|
TabOrder = 0
|
||||||
|
OnButtonClick = lstFilterButtonClick
|
||||||
|
OnKeyUp = lstFilterKeyUp
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited contextMenu: TPopupMenu
|
inherited contextMenu: TPopupMenu
|
||||||
Left = 40
|
Left = 40
|
||||||
Top = 48
|
Top = 48
|
||||||
end
|
end
|
||||||
object mnuDrives: TPopupMenu[3]
|
object mnuDrives: TPopupMenu[2]
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 48
|
Top = 48
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,6 @@ type
|
||||||
fDblClick: TExplorerDoubleClick;
|
fDblClick: TExplorerDoubleClick;
|
||||||
fContextExpand: boolean;
|
fContextExpand: boolean;
|
||||||
fShowHidden: boolean;
|
fShowHidden: boolean;
|
||||||
fShowSize: boolean;
|
|
||||||
fShowType: boolean;
|
|
||||||
fExplorer: TMiniExplorerWidget;
|
fExplorer: TMiniExplorerWidget;
|
||||||
function optionedWantCategory(): string;
|
function optionedWantCategory(): string;
|
||||||
function optionedWantEditorKind: TOptionEditorKind;
|
function optionedWantEditorKind: TOptionEditorKind;
|
||||||
|
|
@ -35,8 +33,6 @@ type
|
||||||
property doubleClick: TExplorerDoubleClick read fDblClick write fDblClick;
|
property doubleClick: TExplorerDoubleClick read fDblClick write fDblClick;
|
||||||
property contextExpand: boolean read fContextExpand write fContextExpand;
|
property contextExpand: boolean read fContextExpand write fContextExpand;
|
||||||
property showHidden: boolean read fShowHidden write fShowHidden default true;
|
property showHidden: boolean read fShowHidden write fShowHidden default true;
|
||||||
property showSize: boolean read fShowSize write fShowSize default true;
|
|
||||||
property showType: boolean read fShowType write fShowType default true;
|
|
||||||
public
|
public
|
||||||
constructor create(miniexpl: TMiniExplorerWidget);
|
constructor create(miniexpl: TMiniExplorerWidget);
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
|
|
@ -48,24 +44,18 @@ type
|
||||||
fSplitter1Position: integer;
|
fSplitter1Position: integer;
|
||||||
fSplitter2Position: integer;
|
fSplitter2Position: integer;
|
||||||
fLastFolder: string;
|
fLastFolder: string;
|
||||||
fRootFolder: string;
|
|
||||||
fDblClick: TExplorerDoubleClick;
|
fDblClick: TExplorerDoubleClick;
|
||||||
fContextExpand: boolean;
|
fContextExpand: boolean;
|
||||||
fShowHidden: boolean;
|
fShowHidden: boolean;
|
||||||
fShowSize: boolean;
|
|
||||||
fShowType: boolean;
|
|
||||||
procedure setFavoriteFolders(value: TStringList);
|
procedure setFavoriteFolders(value: TStringList);
|
||||||
published
|
published
|
||||||
property splitter1Position: integer read fSplitter1Position write fSplitter1Position;
|
property splitter1Position: integer read fSplitter1Position write fSplitter1Position;
|
||||||
property splitter2Position: integer read fSplitter2Position write fSplitter2Position;
|
property splitter2Position: integer read fSplitter2Position write fSplitter2Position;
|
||||||
property lastFolder: string read fLastFolder;
|
property lastFolder: string read fLastFolder write fLastFolder;
|
||||||
property rootFolder: string read fRootFolder write fRootFolder;
|
|
||||||
property favoriteFolders: TStringList read fFavoriteFolders write setFavoriteFolders;
|
property favoriteFolders: TStringList read fFavoriteFolders write setFavoriteFolders;
|
||||||
property doubleClick: TExplorerDoubleClick read fDblClick write fDblClick;
|
property doubleClick: TExplorerDoubleClick read fDblClick write fDblClick;
|
||||||
property contextExpand: boolean read fContextExpand write fContextExpand;
|
property contextExpand: boolean read fContextExpand write fContextExpand;
|
||||||
property showHidden: boolean read fShowHidden write fShowHidden default true;
|
property showHidden: boolean read fShowHidden write fShowHidden default true;
|
||||||
property showSize: boolean read fShowSize write fShowSize default true;
|
|
||||||
property showType: boolean read fShowType write fShowType default true;
|
|
||||||
public
|
public
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
|
|
@ -84,7 +74,6 @@ type
|
||||||
btnShellOpen: TDexedToolButton;
|
btnShellOpen: TDexedToolButton;
|
||||||
lstFilter: TListViewFilterEdit;
|
lstFilter: TListViewFilterEdit;
|
||||||
lstFav: TListView;
|
lstFav: TListView;
|
||||||
Panel1: TPanel;
|
|
||||||
Panel2: TPanel;
|
Panel2: TPanel;
|
||||||
lstFiles: TShellListView;
|
lstFiles: TShellListView;
|
||||||
mnuDrives: TPopupMenu;
|
mnuDrives: TPopupMenu;
|
||||||
|
|
@ -104,8 +93,6 @@ type
|
||||||
procedure lstFilesDblClick(Sender: TObject);
|
procedure lstFilesDblClick(Sender: TObject);
|
||||||
procedure lstFilesEnter(Sender: TObject);
|
procedure lstFilesEnter(Sender: TObject);
|
||||||
procedure lstFilesFileAdded(Sender: TObject; Item: TListItem);
|
procedure lstFilesFileAdded(Sender: TObject; Item: TListItem);
|
||||||
procedure lstFilesMouseMove(Sender: TObject; Shift: TShiftState; X,
|
|
||||||
Y: Integer);
|
|
||||||
procedure lstFilterButtonClick(Sender: TObject);
|
procedure lstFilterButtonClick(Sender: TObject);
|
||||||
procedure lstFilterKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure lstFilterKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure Splitter2MouseWheel(Sender: TObject; Shift: TShiftState;
|
procedure Splitter2MouseWheel(Sender: TObject; Shift: TShiftState;
|
||||||
|
|
@ -175,8 +162,6 @@ constructor TMiniExplorerEditableOptions.create(miniexpl: TMiniExplorerWidget);
|
||||||
begin
|
begin
|
||||||
fExplorer := miniexpl;
|
fExplorer := miniexpl;
|
||||||
fShowHidden:=true;
|
fShowHidden:=true;
|
||||||
fShowSize:=true;
|
|
||||||
fShowType:=true;
|
|
||||||
EntitiesConnector.addObserver(self);
|
EntitiesConnector.addObserver(self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -200,8 +185,6 @@ begin
|
||||||
fExplorer.treeFolders.ObjectTypes := fExplorer.treeFolders.ObjectTypes - [otHidden];
|
fExplorer.treeFolders.ObjectTypes := fExplorer.treeFolders.ObjectTypes - [otHidden];
|
||||||
fExplorer.lstFiles.ObjectTypes := fExplorer.lstFiles.ObjectTypes - [otHidden];
|
fExplorer.lstFiles.ObjectTypes := fExplorer.lstFiles.ObjectTypes - [otHidden];
|
||||||
end;
|
end;
|
||||||
fExplorer.lstFiles.Columns[1].Visible := fShowSize;
|
|
||||||
fExplorer.lstFiles.Columns[2].Visible := fShowType;
|
|
||||||
fExplorer.treeFolders.Refresh;
|
fExplorer.treeFolders.Refresh;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -237,8 +220,6 @@ begin
|
||||||
inherited;
|
inherited;
|
||||||
fFavoriteFolders := TStringList.Create;
|
fFavoriteFolders := TStringList.Create;
|
||||||
fShowHidden:=true;
|
fShowHidden:=true;
|
||||||
fShowType:=true;
|
|
||||||
fShowSize:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TMiniExplorerOptions.destroy;
|
destructor TMiniExplorerOptions.destroy;
|
||||||
|
|
@ -256,14 +237,11 @@ begin
|
||||||
widg := TMiniExplorerWidget(source);
|
widg := TMiniExplorerWidget(source);
|
||||||
fFavoriteFolders.Assign(widg.fFavorites);
|
fFavoriteFolders.Assign(widg.fFavorites);
|
||||||
fLastFolder := widg.fLastFold;
|
fLastFolder := widg.fLastFold;
|
||||||
fRootFolder := widg.treeFolders.Root;
|
|
||||||
fSplitter1Position := widg.Splitter1.GetSplitterPosition;
|
fSplitter1Position := widg.Splitter1.GetSplitterPosition;
|
||||||
fSplitter2Position := widg.Splitter2.GetSplitterPosition;
|
fSplitter2Position := widg.Splitter2.GetSplitterPosition;
|
||||||
fDblClick:= widg.fDblClick;
|
fDblClick:= widg.fDblClick;
|
||||||
fContextExpand:=widg.fContextExpand;
|
fContextExpand:=widg.fContextExpand;
|
||||||
fShowHidden:= otHidden in widg.lstFiles.ObjectTypes;
|
fShowHidden:= otHidden in widg.lstFiles.ObjectTypes;
|
||||||
fShowSize := widg.lstFiles.Columns[1].Visible;
|
|
||||||
fShowType := widg.lstFiles.Columns[2].Visible;
|
|
||||||
end
|
end
|
||||||
else inherited;
|
else inherited;
|
||||||
end;
|
end;
|
||||||
|
|
@ -294,11 +272,7 @@ begin
|
||||||
widg.treeFolders.ObjectTypes := widg.treeFolders.ObjectTypes - [otHidden];
|
widg.treeFolders.ObjectTypes := widg.treeFolders.ObjectTypes - [otHidden];
|
||||||
widg.lstFiles.ObjectTypes := widg.lstFiles.ObjectTypes -[otHidden];
|
widg.lstFiles.ObjectTypes := widg.lstFiles.ObjectTypes -[otHidden];
|
||||||
end;
|
end;
|
||||||
widg.lstFiles.Columns[1].Visible := fShowSize;
|
if widg.fLastFold.dirExists then
|
||||||
widg.lstFiles.Columns[2].Visible := fShowType;
|
|
||||||
if fRootFolder.isNotEmpty and fRootFolder.dirExists then
|
|
||||||
widg.browse(fRootFolder)
|
|
||||||
else if fLastFolder.isNotEmpty and fLastFolder.dirExists then
|
|
||||||
widg.browse(fLastFolder);
|
widg.browse(fLastFolder);
|
||||||
end
|
end
|
||||||
else inherited;
|
else inherited;
|
||||||
|
|
@ -378,6 +352,8 @@ begin
|
||||||
lstFav.OnSelectItem := @lstFavSelect;
|
lstFav.OnSelectItem := @lstFavSelect;
|
||||||
lstFav.OnDblClick := @lstFavDblClick;
|
lstFav.OnDblClick := @lstFavDblClick;
|
||||||
|
|
||||||
|
lstFilter.BorderSpacing.Left := ScaleX(182, 96);
|
||||||
|
|
||||||
treeSetRoots;
|
treeSetRoots;
|
||||||
|
|
||||||
fname := getDocPath + OptsFname;
|
fname := getDocPath + OptsFname;
|
||||||
|
|
@ -759,20 +735,13 @@ begin
|
||||||
lstFiles.Sort;
|
lstFiles.Sort;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMiniExplorerWidget.lstFilesMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
|
||||||
var
|
|
||||||
i: TListItem;
|
|
||||||
begin
|
|
||||||
i := lstFiles.GetItemAt(x,y);
|
|
||||||
if i.isAssigned() then
|
|
||||||
begin
|
|
||||||
lstFiles.Hint := i.Caption;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TMiniExplorerWidget.lstFilterButtonClick(Sender: TObject);
|
procedure TMiniExplorerWidget.lstFilterButtonClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
s: string;
|
||||||
begin
|
begin
|
||||||
filterFiles;
|
s := treeFolders.Root;
|
||||||
|
treeFolders.Root:= '';
|
||||||
|
treeFolders.Root:= s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMiniExplorerWidget.lstFilterKeyUp(Sender: TObject; var Key: Word;
|
procedure TMiniExplorerWidget.lstFilterKeyUp(Sender: TObject; var Key: Word;
|
||||||
|
|
@ -800,6 +769,7 @@ end;
|
||||||
|
|
||||||
procedure TMiniExplorerWidget.toolbarResize(Sender: TObject);
|
procedure TMiniExplorerWidget.toolbarResize(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
lstFilter.Width := toolbar.Width - lstFilter.Left - lstFilter.BorderSpacing.Around;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMiniExplorerWidget.shellOpenSelected;
|
procedure TMiniExplorerWidget.shellOpenSelected;
|
||||||
|
|
|
||||||
109
src/u_search.lfm
109
src/u_search.lfm
|
|
@ -8,13 +8,12 @@ inherited SearchWidget: TSearchWidget
|
||||||
ClientWidth = 422
|
ClientWidth = 422
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 293
|
Height = 293
|
||||||
Top = 36
|
|
||||||
Width = 422
|
Width = 422
|
||||||
ClientHeight = 293
|
ClientHeight = 293
|
||||||
ClientWidth = 422
|
ClientWidth = 422
|
||||||
object cbToFind: TComboBox[0]
|
object cbToFind: TComboBox[0]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 30
|
Height = 27
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 414
|
Width = 414
|
||||||
Align = alTop
|
Align = alTop
|
||||||
|
|
@ -23,15 +22,15 @@ inherited SearchWidget: TSearchWidget
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
MaxLength = 128
|
MaxLength = 128
|
||||||
TabOrder = 0
|
|
||||||
OnChange = cbToFindChange
|
OnChange = cbToFindChange
|
||||||
OnKeyDown = cbToFindKeyDown
|
OnKeyDown = cbToFindKeyDown
|
||||||
OnSelect = cbToFindChange
|
OnSelect = cbToFindChange
|
||||||
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object btnFind: TBitBtn[1]
|
object btnFind: TBitBtn[1]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 32
|
Height = 27
|
||||||
Top = 149
|
Top = 169
|
||||||
Width = 414
|
Width = 414
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
|
|
@ -41,8 +40,8 @@ inherited SearchWidget: TSearchWidget
|
||||||
end
|
end
|
||||||
object btnReplace: TBitBtn[2]
|
object btnReplace: TBitBtn[2]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 32
|
Height = 27
|
||||||
Top = 221
|
Top = 231
|
||||||
Width = 414
|
Width = 414
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
|
|
@ -52,21 +51,21 @@ inherited SearchWidget: TSearchWidget
|
||||||
end
|
end
|
||||||
object grpOpts: TGroupBox[3]
|
object grpOpts: TGroupBox[3]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 73
|
Height = 99
|
||||||
Top = 72
|
Top = 66
|
||||||
Width = 414
|
Width = 414
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
Caption = 'Options'
|
Caption = 'Options'
|
||||||
ClientHeight = 54
|
ClientHeight = 80
|
||||||
ClientWidth = 412
|
ClientWidth = 410
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object FlowPanel1: TFlowPanel
|
object FlowPanel1: TFlowPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 54
|
Height = 80
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 412
|
Width = 410
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
|
|
@ -106,9 +105,9 @@ inherited SearchWidget: TSearchWidget
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object chkRegex: TCheckBox
|
object chkRegex: TCheckBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 22
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 94
|
Width = 100
|
||||||
Anchors = []
|
Anchors = []
|
||||||
Caption = 'allow regex'
|
Caption = 'allow regex'
|
||||||
Checked = True
|
Checked = True
|
||||||
|
|
@ -117,27 +116,27 @@ inherited SearchWidget: TSearchWidget
|
||||||
end
|
end
|
||||||
object chkPrompt: TCheckBox
|
object chkPrompt: TCheckBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 22
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 72
|
Width = 71
|
||||||
Anchors = []
|
Anchors = []
|
||||||
Caption = 'prompt'
|
Caption = 'prompt'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object chkCaseSens: TCheckBox
|
object chkCaseSens: TCheckBox
|
||||||
Left = 94
|
Left = 0
|
||||||
Height = 23
|
Height = 22
|
||||||
Top = 0
|
Top = 46
|
||||||
Width = 107
|
Width = 117
|
||||||
Anchors = []
|
Anchors = []
|
||||||
Caption = 'case sensitive'
|
Caption = 'case sensitive'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object chkFromCur: TCheckBox
|
object chkFromCur: TCheckBox
|
||||||
Left = 94
|
Left = 117
|
||||||
Height = 23
|
Height = 22
|
||||||
Top = 24
|
Top = 0
|
||||||
Width = 96
|
Width = 99
|
||||||
Anchors = []
|
Anchors = []
|
||||||
Caption = 'from cursor'
|
Caption = 'from cursor'
|
||||||
Checked = True
|
Checked = True
|
||||||
|
|
@ -145,19 +144,19 @@ inherited SearchWidget: TSearchWidget
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object chkBack: TCheckBox
|
object chkBack: TCheckBox
|
||||||
Left = 201
|
Left = 117
|
||||||
Height = 23
|
Height = 22
|
||||||
Top = 0
|
Top = 23
|
||||||
Width = 84
|
Width = 87
|
||||||
Anchors = []
|
Anchors = []
|
||||||
Caption = 'backward'
|
Caption = 'backward'
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object chkWWord: TCheckBox
|
object chkWWord: TCheckBox
|
||||||
Left = 201
|
Left = 117
|
||||||
Height = 23
|
Height = 22
|
||||||
Top = 24
|
Top = 46
|
||||||
Width = 96
|
Width = 99
|
||||||
Anchors = []
|
Anchors = []
|
||||||
Caption = 'whole word'
|
Caption = 'whole word'
|
||||||
Checked = True
|
Checked = True
|
||||||
|
|
@ -168,8 +167,8 @@ inherited SearchWidget: TSearchWidget
|
||||||
end
|
end
|
||||||
object btnReplaceAll: TBitBtn[4]
|
object btnReplaceAll: TBitBtn[4]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 32
|
Height = 27
|
||||||
Top = 257
|
Top = 262
|
||||||
Width = 414
|
Width = 414
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
|
|
@ -179,69 +178,69 @@ inherited SearchWidget: TSearchWidget
|
||||||
end
|
end
|
||||||
object Panel1: TPanel[5]
|
object Panel1: TPanel[5]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 30
|
Height = 27
|
||||||
Top = 38
|
Top = 35
|
||||||
Width = 414
|
Width = 414
|
||||||
Align = alTop
|
Align = alTop
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 30
|
ClientHeight = 27
|
||||||
ClientWidth = 414
|
ClientWidth = 414
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
object cbReplaceWth: TComboBox
|
object cbReplaceWth: TComboBox
|
||||||
Left = 104
|
Left = 111
|
||||||
Height = 30
|
Height = 27
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 310
|
Width = 303
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoComplete = True
|
AutoComplete = True
|
||||||
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchCaseSensitive, cbactSearchAscending]
|
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchCaseSensitive, cbactSearchAscending]
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
MaxLength = 128
|
MaxLength = 128
|
||||||
TabOrder = 1
|
|
||||||
OnChange = cbReplaceWthChange
|
OnChange = cbReplaceWthChange
|
||||||
OnKeyDown = cbReplaceWthKeyDown
|
OnKeyDown = cbReplaceWthKeyDown
|
||||||
OnSelect = cbReplaceWthChange
|
OnSelect = cbReplaceWthChange
|
||||||
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object chkEnableRep: TCheckBox
|
object chkEnableRep: TCheckBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 30
|
Height = 27
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 104
|
Width = 111
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
Caption = 'Replace with '
|
Caption = 'Replace with '
|
||||||
TabOrder = 0
|
|
||||||
OnChange = chkEnableRepChange
|
OnChange = chkEnableRepChange
|
||||||
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Panel2: TPanel[6]
|
object Panel2: TPanel[6]
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 32
|
Height = 27
|
||||||
Top = 185
|
Top = 200
|
||||||
Width = 414
|
Width = 414
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 32
|
ClientHeight = 27
|
||||||
ClientWidth = 414
|
ClientWidth = 414
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
object btnFindAll: TBitBtn
|
object btnFindAll: TBitBtn
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 32
|
Height = 27
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 398
|
Width = 402
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'btnFindAll'
|
Caption = 'btnFindAll'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object btnAllScope: TBitBtn
|
object btnAllScope: TBitBtn
|
||||||
Left = 400
|
Left = 404
|
||||||
Height = 32
|
Height = 27
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 14
|
Width = 10
|
||||||
Align = alRight
|
Align = alRight
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 2
|
BorderSpacing.Left = 2
|
||||||
|
|
@ -257,7 +256,7 @@ inherited SearchWidget: TSearchWidget
|
||||||
Left = 216
|
Left = 216
|
||||||
Top = 16
|
Top = 16
|
||||||
end
|
end
|
||||||
object imgList: TImageList[3]
|
object imgList: TImageList[2]
|
||||||
Left = 248
|
Left = 248
|
||||||
Top = 16
|
Top = 16
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||||
Menus, StdCtrls, actnList, Buttons, SynEdit, SynEditSearch, SynEditTypes,
|
Menus, StdCtrls, actnList, Buttons, SynEdit, SynEditSearch, SynEditTypes,
|
||||||
RegExpr, SynEditTextBuffer, strutils, LCLType,
|
RegExpr, SynEditTextBuffer, strutils,
|
||||||
u_common, u_mru, u_widget, u_synmemo, u_interfaces, u_observer,
|
u_common, u_mru, u_widget, u_synmemo, u_interfaces, u_observer,
|
||||||
u_writableComponent, u_dialogs, u_sharedres, u_dsgncontrols;
|
u_writableComponent, u_dialogs, u_sharedres, u_dsgncontrols;
|
||||||
|
|
||||||
|
|
@ -762,16 +762,13 @@ begin
|
||||||
fToFind := cbToFind.Text;
|
fToFind := cbToFind.Text;
|
||||||
fHasSearched := false;
|
fHasSearched := false;
|
||||||
updateImperative;
|
updateImperative;
|
||||||
if fDoc.isAssigned and (not chkRegex.Checked) then
|
|
||||||
fDoc.HighlightedIdent := fToFind;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSearchWidget.cbToFindKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure TSearchWidget.cbToFindKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
if Key = 13 then
|
if Key <> 13 then
|
||||||
actFindNextExecute(nil)
|
exit;
|
||||||
else if (key = VK_ESCAPE) and fDoc.isAssigned then
|
actFindNextExecute(nil);
|
||||||
fDoc.setFocus;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSearchWidget.chkEnableRepChange(Sender: TObject);
|
procedure TSearchWidget.chkEnableRepChange(Sender: TObject);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ type
|
||||||
public
|
public
|
||||||
// Initializes with the semVer text.
|
// Initializes with the semVer text.
|
||||||
// When throw is set to true an Exception is raised if the format is not compliant.
|
// When throw is set to true an Exception is raised if the format is not compliant.
|
||||||
procedure init(const text: string; throw: boolean);
|
procedure init(const text: string; throw: boolean = true);
|
||||||
|
|
||||||
// Indicates wether the version is not a final release.
|
// Indicates wether the version is not a final release.
|
||||||
function isPreRelease: boolean;
|
function isPreRelease: boolean;
|
||||||
|
|
@ -58,7 +58,7 @@ implementation
|
||||||
var v1, v2: TSemVer;
|
var v1, v2: TSemVer;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
procedure TSemVer.init(const text: string; throw: boolean);
|
procedure TSemVer.init(const text: string; throw: boolean = true);
|
||||||
|
|
||||||
procedure resetFields();
|
procedure resetFields();
|
||||||
begin
|
begin
|
||||||
|
|
@ -84,12 +84,12 @@ begin
|
||||||
if throw and (r.front <> 'v') then
|
if throw and (r.front <> 'v') then
|
||||||
error('Invalid semVer format, the text must start with "v"');
|
error('Invalid semVer format, the text must start with "v"');
|
||||||
r.popFront;
|
r.popFront;
|
||||||
fMajor := StrToInt64Def(r.takeUntil('.').yield, 0);
|
fMajor := r.takeUntil('.').yield.ToInteger;
|
||||||
if throw and r.empty then
|
if throw and r.empty then
|
||||||
error('Invalid semVer format, minor and patch miss');
|
error('Invalid semVer format, minor and patch miss');
|
||||||
fMinor := StrToInt64Def(r.popFront^.takeUntil('.').yield, 0);
|
fMinor := r.popFront^.takeUntil('.').yield.ToInteger;
|
||||||
if not r.empty then
|
if not r.empty then
|
||||||
fPatch := StrToInt64Def(r.popFront^.takeWhile(['0'..'9']).yield, 0);
|
fPatch := r.popFront^.takeWhile(['0'..'9']).yield.ToInteger;
|
||||||
if not r.empty then
|
if not r.empty then
|
||||||
fAdditional := r.popFront^.takeUntil(#0).yield;
|
fAdditional := r.popFront^.takeUntil(#0).yield;
|
||||||
fValid := true;
|
fValid := true;
|
||||||
|
|
@ -146,46 +146,46 @@ end;
|
||||||
|
|
||||||
{$IFDEF DEBUG}
|
{$IFDEF DEBUG}
|
||||||
begin
|
begin
|
||||||
v1.init('v1.0.0', true);
|
v1.init('v1.0.0');
|
||||||
v2.init('v1.0.0', true);
|
v2.init('v1.0.0');
|
||||||
assert(v1 = v2);
|
assert(v1 = v2);
|
||||||
|
|
||||||
v1.init('v2.0.0', true);
|
v1.init('v2.0.0');
|
||||||
v2.init('v1.0.0', true);
|
v2.init('v1.0.0');
|
||||||
assert(v1 > v2);
|
assert(v1 > v2);
|
||||||
assert(v2 < v1);
|
assert(v2 < v1);
|
||||||
|
|
||||||
v1.init('v1.1.0', true);
|
v1.init('v1.1.0');
|
||||||
v2.init('v1.0.0', true);
|
v2.init('v1.0.0');
|
||||||
assert(v1 > v2);
|
assert(v1 > v2);
|
||||||
assert(v2 < v1);
|
assert(v2 < v1);
|
||||||
|
|
||||||
v1.init('v1.1.1', true);
|
v1.init('v1.1.1');
|
||||||
v2.init('v1.1.0', true);
|
v2.init('v1.1.0');
|
||||||
assert(v1 > v2);
|
assert(v1 > v2);
|
||||||
assert(v2 < v1);
|
assert(v2 < v1);
|
||||||
|
|
||||||
v1.init('v1.1.1', true);
|
v1.init('v1.1.1');
|
||||||
v2.init('v1.0.1', true);
|
v2.init('v1.0.1');
|
||||||
assert(v1 > v2);
|
assert(v1 > v2);
|
||||||
assert(v2 < v1);
|
assert(v2 < v1);
|
||||||
|
|
||||||
v1.init('v1.1.1-alpha.2', true);
|
v1.init('v1.1.1-alpha.2');
|
||||||
v2.init('v1.1.1-alpha.1', true);
|
v2.init('v1.1.1-alpha.1');
|
||||||
assert(v1 > v2);
|
assert(v1 > v2);
|
||||||
assert(v1.isAlpha);
|
assert(v1.isAlpha);
|
||||||
assert(v2.isAlpha);
|
assert(v2.isAlpha);
|
||||||
assert(v2.asString = '1.1.1-alpha.1');
|
assert(v2.asString = '1.1.1-alpha.1');
|
||||||
|
|
||||||
v1.init('v1.1.1-beta.1', true);
|
v1.init('v1.1.1-beta.1');
|
||||||
v2.init('v1.1.1-alpha.8', true);
|
v2.init('v1.1.1-alpha.8');
|
||||||
assert(v1 > v2);
|
assert(v1 > v2);
|
||||||
assert(v1.isBeta);
|
assert(v1.isBeta);
|
||||||
assert(v2.isAlpha);
|
assert(v2.isAlpha);
|
||||||
assert(v1.isPreRelease);
|
assert(v1.isPreRelease);
|
||||||
|
|
||||||
v1.init('v1.2.3', true);
|
v1.init('v1.2.3');
|
||||||
v2.init('v1.22.33', true);
|
v2.init('v1.22.33');
|
||||||
assert(v1.major = 1);
|
assert(v1.major = 1);
|
||||||
assert(v1.minor = 2);
|
assert(v1.minor = 2);
|
||||||
assert(v1.patch = 3);
|
assert(v1.patch = 3);
|
||||||
|
|
@ -194,7 +194,7 @@ begin
|
||||||
assert(v2.patch = 33);
|
assert(v2.patch = 33);
|
||||||
assert(v2.asString = '1.22.33');
|
assert(v2.asString = '1.22.33');
|
||||||
|
|
||||||
v1.init('v0.0.2060', true);
|
v1.init('v0.0.2060');
|
||||||
assert(v1.major = 0);
|
assert(v1.major = 0);
|
||||||
assert(v1.minor = 0);
|
assert(v1.minor = 0);
|
||||||
assert(v1.patch = 2060);
|
assert(v1.patch = 2060);
|
||||||
|
|
@ -204,7 +204,7 @@ begin
|
||||||
assert(v2.minor = 0);
|
assert(v2.minor = 0);
|
||||||
assert(v2.patch = 2060);
|
assert(v2.patch = 2060);
|
||||||
|
|
||||||
v1.init('v0.6.0', true);
|
v1.init('v0.6.0');
|
||||||
assert(v1.major = 0);
|
assert(v1.major = 0);
|
||||||
assert(v1.minor = 6);
|
assert(v1.minor = 6);
|
||||||
assert(v1.patch = 0);
|
assert(v1.patch = 0);
|
||||||
|
|
|
||||||
|
|
@ -14,21 +14,21 @@ type
|
||||||
KeywordMatch = record
|
KeywordMatch = record
|
||||||
private
|
private
|
||||||
|
|
||||||
{
|
{
|
||||||
rendered on 2024-Feb-21 05:21:19.9635608 by IsItThere.
|
rendered on 2022-Jul-14 15:02:46.845477 by IsItThere.
|
||||||
- PRNG seed: 6574
|
- PRNG seed: 6574
|
||||||
- map length: 128
|
- map length: 128
|
||||||
- case sensitive: true
|
- case sensitive: true
|
||||||
}
|
}
|
||||||
|
|
||||||
const fWords: array [0..127] of string =
|
const fWords: array [0..127] of string =
|
||||||
('label', 'switch', '', 'goto', '', '', '', 'char', 'delete', 'var', '', '', '', '', '', 'apply', '', '', 'on', '', '', 'from', 'alias', '', '', '', 'static', 'super', 'overload', 'usize', '', 'false', '', 'template', 'continue', '', '', 'this', 'new', 'in', 'foreach', 'throw', 'u8', '', '', '', '', 'const', 'break', 'union', '', 'ssize', 'true', '', 'class', '', 'unit', 'version', '', '', '', '', 'asm', '', 's8', 'echo', '', '', '', '', '', 'u16', '', '', '', 'function', 'protection', 'enum', '', 'while', 'defer', '', '', 'return', 'if', '', '', 'u32', '', '', '', 'else', '', 's16', 'import', '', 'auto', 'try', 'bool', '', '', '', 'finally', '', 'null', 'u64', 'f32', '', '', 's32', '', 'struct', '', '', '', 'assert', 'do', '', '', '', '', '', '', '', 'f64', 'with', '', 's64');
|
('label', 'switch', '', 'goto', '', '', '', '', 'delete', 'var', '', '', '', '', '', 'apply', '', '', 'on', '', '', '', 'alias', '', '', '', 'static', 'super', 'overload', 'usize', '', 'false', '', 'template', 'continue', '', '', 'this', 'new', 'in', 'foreach', 'throw', 'u8', '', '', '', '', 'const', 'break', 'union', '', 'ssize', 'true', '', 'class', '', 'unit', 'version', '', '', '', '', 'asm', '', 's8', 'echo', '', '', '', '', '', 'u16', '', '', '', 'function', 'protection', 'enum', '', 'while', '', '', '', 'return', 'if', '', '', 'u32', '', '', '', 'else', '', 's16', 'import', '', 'auto', 'try', 'bool', '', '', '', 'finally', '', 'null', 'u64', 'f32', '', '', 's32', '', 'struct', '', '', '', 'assert', 'do', '', '', '', '', '', '', '', 'f64', 'with', '', 's64');
|
||||||
|
|
||||||
const fFilled: array [0..127] of boolean =
|
const fFilled: array [0..127] of boolean =
|
||||||
(true, true, false, true, false, false, false, true, true, true, false, false, false, false, false, true, false, false, true, false, false, true, true, false, false, false, true, true, true, true, false, true, false, true, true, false, false, true, true, true, true, true, true, false, false, false, false, true, true, true, false, true, true, false, true, false, true, true, false, false, false, false, true, false, true, true, false, false, false, false, false, true, false, false, false, true, true, true, false, true, true, false, false, true, true, false, false, true, false, false, false, true, false, true, true, false, true, true, true, false, false, false, true, false, true, true, true, false, false, true, false, true, false, false, false, true, true, false, false, false, false, false, false, false, true, true, false, true);
|
(true, true, false, true, false, false, false, false, true, true, false, false, false, false, false, true, false, false, true, false, false, false, true, false, false, false, true, true, true, true, false, true, false, true, true, false, false, true, true, true, true, true, true, false, false, false, false, true, true, true, false, true, true, false, true, false, true, true, false, false, false, false, true, false, true, true, false, false, false, false, false, true, false, false, false, true, true, true, false, true, false, false, false, true, true, false, false, true, false, false, false, true, false, true, true, false, true, true, true, false, false, false, true, false, true, true, true, false, false, true, false, true, false, false, false, true, true, false, false, false, false, false, false, false, true, true, false, true);
|
||||||
|
|
||||||
const fCoefficients: array [0..255] of Byte =
|
const fCoefficients: array [0..255] of Byte =
|
||||||
(37, 236, 86, 118, 73, 206, 4, 48, 111, 209, 73, 137, 75, 157, 197, 152, 28, 40, 164, 170, 89, 179, 110, 152, 34, 12, 168, 23, 76, 66, 91, 217, 64, 82, 153, 12, 185, 137, 120, 56, 55, 132, 75, 141, 42, 119, 214, 156, 103, 102, 23, 72, 8, 181, 233, 248, 50, 191, 134, 63, 153, 91, 211, 31, 248, 110, 52, 135, 183, 250, 187, 30, 201, 228, 26, 255, 211, 174, 96, 188, 196, 206, 170, 218, 210, 19, 147, 137, 85, 186, 122, 214, 221, 218, 67, 147, 91, 27, 241, 246, 192, 226, 11, 2, 53, 201, 105, 1, 137, 149, 94, 180, 242, 169, 65, 14, 25, 248, 173, 230, 80, 135, 108, 41, 129, 206, 58, 41, 231, 66, 9, 230, 66, 181, 237, 77, 132, 143, 61, 65, 125, 248, 77, 147, 107, 74, 69, 83, 82, 217, 61, 119, 70, 229, 222, 170, 236, 100, 226, 92, 167, 163, 84, 207, 175, 75, 43, 27, 105, 100, 137, 0, 50, 34, 66, 135, 19, 75, 41, 113, 105, 88, 81, 86, 255, 235, 167, 229, 20, 181, 28, 233, 251, 234, 32, 117, 113, 48, 178, 193, 180, 111, 116, 38, 1, 16, 93, 108, 26, 83, 202, 163, 49, 177, 142, 229, 120, 149, 99, 182, 110, 136, 118, 198, 153, 237, 92, 131, 160, 58, 248, 253, 183, 192, 200, 200, 172, 192, 213, 137, 2, 208, 24, 94, 17, 41, 66, 9, 196, 119, 30, 99, 11, 28, 148, 180);
|
(37, 236, 86, 118, 73, 206, 4, 48, 111, 209, 73, 137, 75, 157, 197, 152, 28, 40, 164, 170, 89, 179, 110, 152, 34, 12, 168, 23, 76, 66, 91, 217, 64, 82, 153, 12, 185, 137, 120, 56, 55, 132, 75, 141, 42, 119, 214, 156, 103, 102, 23, 72, 8, 181, 233, 248, 50, 191, 134, 63, 153, 91, 211, 31, 248, 110, 52, 135, 183, 250, 187, 30, 201, 228, 26, 255, 211, 174, 96, 188, 196, 206, 170, 218, 210, 19, 147, 137, 85, 186, 122, 214, 221, 218, 67, 147, 91, 27, 241, 246, 192, 226, 11, 2, 53, 201, 105, 1, 137, 149, 94, 180, 242, 169, 65, 14, 25, 248, 173, 230, 80, 135, 108, 41, 129, 206, 58, 41, 231, 66, 9, 230, 66, 181, 237, 77, 132, 143, 61, 65, 125, 248, 77, 147, 107, 74, 69, 83, 82, 217, 61, 119, 70, 229, 222, 170, 236, 100, 226, 92, 167, 163, 84, 207, 175, 75, 43, 27, 105, 100, 137, 0, 50, 34, 66, 135, 19, 75, 41, 113, 105, 88, 81, 86, 255, 235, 167, 229, 20, 181, 28, 233, 251, 234, 32, 117, 113, 48, 178, 193, 180, 111, 116, 38, 1, 16, 93, 108, 26, 83, 202, 163, 49, 177, 142, 229, 120, 149, 99, 182, 110, 136, 118, 198, 153, 237, 92, 131, 160, 58, 248, 253, 183, 192, 200, 200, 172, 192, 213, 137, 2, 208, 24, 94, 17, 41, 66, 9, 196, 119, 30, 99, 11, 28, 148, 180);
|
||||||
|
|
||||||
class function hash(const w: string): Word; static;
|
class function hash(const w: string): Word; static;
|
||||||
public
|
public
|
||||||
|
|
@ -91,7 +91,6 @@ type
|
||||||
procedure lexFloatingLiteralFractionalPart();
|
procedure lexFloatingLiteralFractionalPart();
|
||||||
procedure lexExponent();
|
procedure lexExponent();
|
||||||
procedure lexStringLiteral();
|
procedure lexStringLiteral();
|
||||||
procedure lexCharLiteral();
|
|
||||||
procedure lexRawStringLiteral();
|
procedure lexRawStringLiteral();
|
||||||
procedure lexLineComment();
|
procedure lexLineComment();
|
||||||
procedure lexStarComment();
|
procedure lexStarComment();
|
||||||
|
|
@ -578,25 +577,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynSxSyn.lexCharLiteral();
|
|
||||||
begin
|
|
||||||
fTokKind := TTokenKind.tkStrng;
|
|
||||||
fTokStop += 1;
|
|
||||||
while fTokStop <= fLineBuf.length do
|
|
||||||
begin
|
|
||||||
case fLineBuf[fTokStop] of
|
|
||||||
'\' : fTokStop += 2;
|
|
||||||
#39 :
|
|
||||||
begin
|
|
||||||
fTokStop += 1;
|
|
||||||
exit;
|
|
||||||
end
|
|
||||||
else fTokStop += 1;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
fTokKind := TTokenKind.tkError;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TSynSxSyn.lexStringLiteral();
|
procedure TSynSxSyn.lexStringLiteral();
|
||||||
var
|
var
|
||||||
firstLine: Boolean;
|
firstLine: Boolean;
|
||||||
|
|
@ -695,12 +675,21 @@ begin
|
||||||
while fTokStop <= fLineBuf.length do
|
while fTokStop <= fLineBuf.length do
|
||||||
begin
|
begin
|
||||||
case fLineBuf[fTokStop] of
|
case fLineBuf[fTokStop] of
|
||||||
'_', 'a'..'z', 'A'..'Z', '0'..'9':
|
'_', 'a'..'z', 'A'..'Z':
|
||||||
begin
|
begin
|
||||||
oneChr := true;
|
oneChr := true;
|
||||||
fTokStop += 1;
|
fTokStop += 1;
|
||||||
continue;
|
continue;
|
||||||
end;
|
end;
|
||||||
|
'0' .. '9':
|
||||||
|
begin
|
||||||
|
if oneChr then
|
||||||
|
begin
|
||||||
|
fTokStop += 1;
|
||||||
|
continue;
|
||||||
|
end
|
||||||
|
else break; // e.g $0
|
||||||
|
end
|
||||||
else break;
|
else break;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -790,8 +779,6 @@ begin
|
||||||
end;
|
end;
|
||||||
// number
|
// number
|
||||||
'1' .. '9' : lexIntLiteral();
|
'1' .. '9' : lexIntLiteral();
|
||||||
// char
|
|
||||||
#39 : lexCharLiteral();
|
|
||||||
// "string"
|
// "string"
|
||||||
'"': lexStringLiteral();
|
'"': lexStringLiteral();
|
||||||
// `string`
|
// `string`
|
||||||
|
|
@ -811,16 +798,7 @@ begin
|
||||||
'>': lexOpAndOpOpAndOpEqualAndOpOpEqual('>');
|
'>': lexOpAndOpOpAndOpEqualAndOpOpEqual('>');
|
||||||
// `=`, `==`, `=>`
|
// `=`, `==`, `=>`
|
||||||
'=': lexAssEquOrLambda();
|
'=': lexAssEquOrLambda();
|
||||||
'.':
|
'.', '(', ')', ',', ':' , '[', ']', ';' :
|
||||||
begin
|
|
||||||
nextPChar := safeLookupChar();
|
|
||||||
fTokKind := TTokenKind.tkSymbl;
|
|
||||||
if (nextPChar <> nil) and (nextPChar^ = '=') then
|
|
||||||
fTokStop += 2
|
|
||||||
else
|
|
||||||
fTokStop += 1;
|
|
||||||
end;
|
|
||||||
'(', ')', ',', ':' , '[', ']', ';' :
|
|
||||||
begin
|
begin
|
||||||
fTokKind := TTokenKind.tkSymbl;
|
fTokKind := TTokenKind.tkSymbl;
|
||||||
fTokStop += 1;
|
fTokStop += 1;
|
||||||
|
|
|
||||||
|
|
@ -209,8 +209,8 @@ begin
|
||||||
fSymbols[CFF] := fDoc.fileName;
|
fSymbols[CFF] := fDoc.fileName;
|
||||||
fSymbols[CFR] := fSymbols[CFF].stripFileExt + exeExt;
|
fSymbols[CFR] := fSymbols[CFF].stripFileExt + exeExt;
|
||||||
fSymbols[CFP] := fSymbols[CFF].extractFilePath;
|
fSymbols[CFP] := fSymbols[CFF].extractFilePath;
|
||||||
if fDoc.HighlightedIdent.isNotEmpty then
|
if fDoc.Identifier.isNotEmpty then
|
||||||
fSymbols[CI] := fDoc.HighlightedIdent;
|
fSymbols[CI] := fDoc.Identifier;
|
||||||
fSymbols[CL] := fDoc.LineText;
|
fSymbols[CL] := fDoc.LineText;
|
||||||
fSymbols[CS] := fDoc.SelText;
|
fSymbols[CS] := fDoc.SelText;
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,9 @@ uses
|
||||||
SynEdit, SynPluginSyncroEdit, SynCompletion, SynEditKeyCmds, LazSynEditText,
|
SynEdit, SynPluginSyncroEdit, SynCompletion, SynEditKeyCmds, LazSynEditText,
|
||||||
SynHighlighterLFM, SynEditHighlighter, SynEditMouseCmds, SynEditFoldedView,
|
SynHighlighterLFM, SynEditHighlighter, SynEditMouseCmds, SynEditFoldedView,
|
||||||
SynEditMarks, SynEditTypes, SynHighlighterJScript, SynBeautifier, dialogs,
|
SynEditMarks, SynEditTypes, SynHighlighterJScript, SynBeautifier, dialogs,
|
||||||
md5, Spin, LCLIntf, LazFileUtils, LMessages, SynHighlighterCpp,
|
md5, Spin, LCLIntf, LazFileUtils, LMessages, SynHighlighterCpp, math,
|
||||||
SynGutterBase, LCLVersion, SynEditMiscProcs,
|
SynGutterBase, LCLVersion, SynEditMiscProcs,
|
||||||
|
//SynEditMarkupFoldColoring,
|
||||||
Clipbrd, fpjson, jsonparser, LazUTF8, Buttons, StdCtrls,
|
Clipbrd, fpjson, jsonparser, LazUTF8, Buttons, StdCtrls,
|
||||||
u_common, u_writableComponent, u_d2syn, u_txtsyn, u_dialogs, u_sxsyn,
|
u_common, u_writableComponent, u_d2syn, u_txtsyn, u_dialogs, u_sxsyn,
|
||||||
u_sharedres, u_dlang, u_stringrange, u_dbgitf, u_observer, u_diff,
|
u_sharedres, u_dlang, u_stringrange, u_dbgitf, u_observer, u_diff,
|
||||||
|
|
@ -97,7 +98,6 @@ type
|
||||||
fCaretPosition: Integer;
|
fCaretPosition: Integer;
|
||||||
fSelectionEnd: Integer;
|
fSelectionEnd: Integer;
|
||||||
fFontSize: Integer;
|
fFontSize: Integer;
|
||||||
fFontHeight: Integer;
|
|
||||||
fSourceFilename: string;
|
fSourceFilename: string;
|
||||||
procedure setFolds(someFolds: TCollection);
|
procedure setFolds(someFolds: TCollection);
|
||||||
published
|
published
|
||||||
|
|
@ -106,7 +106,6 @@ type
|
||||||
property folds: TCollection read fFolds write setFolds;
|
property folds: TCollection read fFolds write setFolds;
|
||||||
property selectionEnd: Integer read fSelectionEnd write fSelectionEnd;
|
property selectionEnd: Integer read fSelectionEnd write fSelectionEnd;
|
||||||
property fontSize: Integer read fFontSize write fFontSize;
|
property fontSize: Integer read fFontSize write fFontSize;
|
||||||
property fontHeight: Integer read fFontHeight write fFontHeight;
|
|
||||||
public
|
public
|
||||||
constructor create(aComponent: TComponent); override;
|
constructor create(aComponent: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
|
|
@ -190,6 +189,7 @@ type
|
||||||
|
|
||||||
TDexedMemo = class(TSynEdit, IDebugObserver)
|
TDexedMemo = class(TSynEdit, IDebugObserver)
|
||||||
private
|
private
|
||||||
|
//fIndentGuideMarkup: TSynEditMarkupFoldColors;
|
||||||
fLifeTimeManager: TObject;
|
fLifeTimeManager: TObject;
|
||||||
fIdentDialShown: boolean;
|
fIdentDialShown: boolean;
|
||||||
fScrollMemo: TScrollMemo;
|
fScrollMemo: TScrollMemo;
|
||||||
|
|
@ -199,7 +199,7 @@ type
|
||||||
fCacheLoaded: boolean;
|
fCacheLoaded: boolean;
|
||||||
fIsDSource: boolean;
|
fIsDSource: boolean;
|
||||||
fFocusForInput: boolean;
|
fFocusForInput: boolean;
|
||||||
fHighlightedIdent: string;
|
fIdentifier: string;
|
||||||
fTempFileName: string;
|
fTempFileName: string;
|
||||||
fMultiDocSubject: TObject;
|
fMultiDocSubject: TObject;
|
||||||
fDefaultFontSize: Integer;
|
fDefaultFontSize: Integer;
|
||||||
|
|
@ -265,7 +265,7 @@ type
|
||||||
procedure setMatchOpts(value: TIdentifierMatchOptions);
|
procedure setMatchOpts(value: TIdentifierMatchOptions);
|
||||||
function getMouseBytePosition: Integer;
|
function getMouseBytePosition: Integer;
|
||||||
procedure changeNotify(Sender: TObject);
|
procedure changeNotify(Sender: TObject);
|
||||||
procedure highlightCurrentIdentifier(fromEditor: boolean = true);
|
procedure highlightCurrentIdentifier;
|
||||||
procedure saveCache;
|
procedure saveCache;
|
||||||
procedure loadCache;
|
procedure loadCache;
|
||||||
class procedure cleanCache; static;
|
class procedure cleanCache; static;
|
||||||
|
|
@ -319,7 +319,6 @@ type
|
||||||
procedure debugBreak(const fname: string; line: integer; reason: TDebugBreakReason);
|
procedure debugBreak(const fname: string; line: integer; reason: TDebugBreakReason);
|
||||||
function breakPointsCount: integer;
|
function breakPointsCount: integer;
|
||||||
procedure tryToPatchMixedIndentation;
|
procedure tryToPatchMixedIndentation;
|
||||||
procedure setHighligthedIdent(value: string);
|
|
||||||
protected
|
protected
|
||||||
procedure DoEnter; override;
|
procedure DoEnter; override;
|
||||||
procedure DoExit; override;
|
procedure DoExit; override;
|
||||||
|
|
@ -383,12 +382,10 @@ type
|
||||||
procedure setDscannerOptions(dsEnabled: boolean; dsDelay: integer);
|
procedure setDscannerOptions(dsEnabled: boolean; dsDelay: integer);
|
||||||
procedure centerCursor();
|
procedure centerCursor();
|
||||||
procedure redoAll();
|
procedure redoAll();
|
||||||
procedure undoAll();
|
|
||||||
procedure scrollCentered(down: boolean);
|
procedure scrollCentered(down: boolean);
|
||||||
procedure setHighligtherFrom(other: TDexedMemo);
|
|
||||||
//
|
//
|
||||||
property IdentifierMatchOptions: TIdentifierMatchOptions read fMatchOpts write setMatchOpts;
|
property IdentifierMatchOptions: TIdentifierMatchOptions read fMatchOpts write setMatchOpts;
|
||||||
property HighlightedIdent: string read fHighlightedIdent write setHighligthedIdent;
|
property Identifier: string read fIdentifier;
|
||||||
property fileName: string read fFilename;
|
property fileName: string read fFilename;
|
||||||
property modified: boolean read fModified;
|
property modified: boolean read fModified;
|
||||||
property tempFilename: string read fTempFileName;
|
property tempFilename: string read fTempFileName;
|
||||||
|
|
@ -487,9 +484,8 @@ const
|
||||||
ecSelLeftWordEdge = ecUserFirst + 32;
|
ecSelLeftWordEdge = ecUserFirst + 32;
|
||||||
ecSelRightWordEdge = ecUserFirst + 33;
|
ecSelRightWordEdge = ecUserFirst + 33;
|
||||||
ecRedoAll = ecUserFirst + 34;
|
ecRedoAll = ecUserFirst + 34;
|
||||||
ecUndoAll = ecUserFirst + 35;
|
ecScrollCenteredUp = ecUserFirst + 35;
|
||||||
ecScrollCenteredUp = ecUserFirst + 36;
|
ecScrollCenteredDown = ecUserFirst + 36;
|
||||||
ecScrollCenteredDown = ecUserFirst + 37;
|
|
||||||
var
|
var
|
||||||
D2Syn: TSynD2Syn; // used as model to set the options when no editor exists.
|
D2Syn: TSynD2Syn; // used as model to set the options when no editor exists.
|
||||||
TxtSyn: TSynTxtSyn; // used as model to set the options when no editor exists.
|
TxtSyn: TSynTxtSyn; // used as model to set the options when no editor exists.
|
||||||
|
|
@ -848,7 +844,6 @@ begin
|
||||||
fSourceFilename := fMemo.fileName;
|
fSourceFilename := fMemo.fileName;
|
||||||
fSelectionEnd := fMemo.SelEnd;
|
fSelectionEnd := fMemo.SelEnd;
|
||||||
fFontSize := fMemo.Font.Size;
|
fFontSize := fMemo.Font.Size;
|
||||||
fFontHeight := fMemo.Font.Height;
|
|
||||||
TEditorHintWindow.FontSize := fMemo.Font.Size;
|
TEditorHintWindow.FontSize := fMemo.Font.Size;
|
||||||
|
|
||||||
prev := fMemo.Lines.Count-1;
|
prev := fMemo.Lines.Count-1;
|
||||||
|
|
@ -876,10 +871,8 @@ begin
|
||||||
if fMemo.isNotAssigned then
|
if fMemo.isNotAssigned then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
if fFontSize <> 0 then
|
if fFontSize > 0 then
|
||||||
fMemo.Font.Size := fFontSize;
|
fMemo.Font.Size := fFontSize;
|
||||||
if fFontHeight <> 0 then
|
|
||||||
fMemo.Font.Height := fFontHeight;
|
|
||||||
|
|
||||||
// Currently collisions are not handled.
|
// Currently collisions are not handled.
|
||||||
if fMemo.fileName <> fSourceFilename then
|
if fMemo.fileName <> fSourceFilename then
|
||||||
|
|
@ -1246,6 +1239,9 @@ begin
|
||||||
LineHighlightColor.Background := color - $080808;
|
LineHighlightColor.Background := color - $080808;
|
||||||
LineHighlightColor.Foreground := clNone;
|
LineHighlightColor.Foreground := clNone;
|
||||||
|
|
||||||
|
//fIndentGuideMarkup:= TSynEditMarkupFoldColors.Create(self);
|
||||||
|
//MarkupManager.AddMarkUp(fIndentGuideMarkup);
|
||||||
|
|
||||||
fAutoCloseCurlyBrace:= autoCloseOnNewLineLexically;
|
fAutoCloseCurlyBrace:= autoCloseOnNewLineLexically;
|
||||||
fAutoClosedPairs:= [autoCloseSquareBracket];
|
fAutoClosedPairs:= [autoCloseSquareBracket];
|
||||||
|
|
||||||
|
|
@ -1265,6 +1261,7 @@ destructor TDexedMemo.destroy;
|
||||||
begin
|
begin
|
||||||
saveCache;
|
saveCache;
|
||||||
|
|
||||||
|
//fIndentGuideMarkup.Free;
|
||||||
EntitiesConnector.removeObserver(self);
|
EntitiesConnector.removeObserver(self);
|
||||||
subjDocClosing(TMultiDocSubject(fMultiDocSubject), self);
|
subjDocClosing(TMultiDocSubject(fMultiDocSubject), self);
|
||||||
fMultiDocSubject.Free;
|
fMultiDocSubject.Free;
|
||||||
|
|
@ -1490,7 +1487,6 @@ begin
|
||||||
AddKey(ecSmartWordLeft, 0, [], 0, []);
|
AddKey(ecSmartWordLeft, 0, [], 0, []);
|
||||||
AddKey(ecSmartWordRight, 0, [], 0, []);
|
AddKey(ecSmartWordRight, 0, [], 0, []);
|
||||||
AddKey(ecRedoAll, 0, [], 0, []);
|
AddKey(ecRedoAll, 0, [], 0, []);
|
||||||
AddKey(ecUndoAll, 0, [], 0, []);
|
|
||||||
AddKey(ecScrollCenteredDown, VK_DOWN, [ssCtrl, ssAlt], 0, []);
|
AddKey(ecScrollCenteredDown, VK_DOWN, [ssCtrl, ssAlt], 0, []);
|
||||||
AddKey(ecScrollCenteredUp, VK_UP, [ssCtrl, ssAlt], 0, []);
|
AddKey(ecScrollCenteredUp, VK_UP, [ssCtrl, ssAlt], 0, []);
|
||||||
end;
|
end;
|
||||||
|
|
@ -1533,7 +1529,6 @@ begin
|
||||||
'ecSelLeftWordEdge': begin Int := ecSelLeftWordEdge; exit(true); end;
|
'ecSelLeftWordEdge': begin Int := ecSelLeftWordEdge; exit(true); end;
|
||||||
'ecSelRightWordEdge': begin Int := ecSelRightWordEdge; exit(true); end;
|
'ecSelRightWordEdge': begin Int := ecSelRightWordEdge; exit(true); end;
|
||||||
'ecRedoAll': begin Int := ecRedoAll; exit(true); end;
|
'ecRedoAll': begin Int := ecRedoAll; exit(true); end;
|
||||||
'ecUndoAll': begin Int := ecUndoAll; exit(true); end;
|
|
||||||
'ecScrollCenteredUp': begin Int := ecScrollCenteredUp; exit(true); end;
|
'ecScrollCenteredUp': begin Int := ecScrollCenteredUp; exit(true); end;
|
||||||
'ecScrollCenteredDown': begin Int := ecScrollCenteredDown; exit(true); end;
|
'ecScrollCenteredDown': begin Int := ecScrollCenteredDown; exit(true); end;
|
||||||
else exit(false);
|
else exit(false);
|
||||||
|
|
@ -1577,7 +1572,6 @@ begin
|
||||||
ecSelLeftWordEdge: begin Ident := 'ecSelLeftWordEdge'; exit(true); end;
|
ecSelLeftWordEdge: begin Ident := 'ecSelLeftWordEdge'; exit(true); end;
|
||||||
ecSelRightWordEdge: begin Ident := 'ecSelRightWordEdge'; exit(true); end;
|
ecSelRightWordEdge: begin Ident := 'ecSelRightWordEdge'; exit(true); end;
|
||||||
ecRedoAll: begin Ident := 'ecRedoAll'; exit(true); end;
|
ecRedoAll: begin Ident := 'ecRedoAll'; exit(true); end;
|
||||||
ecUndoAll: begin Ident := 'ecUndoAll'; exit(true); end;
|
|
||||||
ecScrollCenteredUp: begin Ident := 'ecScrollCenteredUp'; exit(true); end;
|
ecScrollCenteredUp: begin Ident := 'ecScrollCenteredUp'; exit(true); end;
|
||||||
ecScrollCenteredDown: begin Ident := 'ecScrollCenteredDown'; exit(true); end;
|
ecScrollCenteredDown: begin Ident := 'ecScrollCenteredDown'; exit(true); end;
|
||||||
else exit(false);
|
else exit(false);
|
||||||
|
|
@ -1714,8 +1708,6 @@ begin
|
||||||
gotoWordEdge(true);
|
gotoWordEdge(true);
|
||||||
ecRedoAll:
|
ecRedoAll:
|
||||||
redoAll();
|
redoAll();
|
||||||
ecUndoAll:
|
|
||||||
undoAll();
|
|
||||||
ecScrollCenteredUp:
|
ecScrollCenteredUp:
|
||||||
scrollCentered(false);
|
scrollCentered(false);
|
||||||
ecScrollCenteredDown:
|
ecScrollCenteredDown:
|
||||||
|
|
@ -2146,9 +2138,10 @@ end;
|
||||||
|
|
||||||
procedure TDexedMemo.centerCursor();
|
procedure TDexedMemo.centerCursor();
|
||||||
var
|
var
|
||||||
Y, LinesInWin, NewTopLine: Integer;
|
Y, LinesInWin, CurTopLine, NewTopLine: Integer;
|
||||||
begin
|
begin
|
||||||
LinesInWin := LinesInWindow;
|
LinesInWin := LinesInWindow;
|
||||||
|
CurTopLine := TopView;
|
||||||
Y := ToPos(TextView.TextToViewIndex(ToIdx(CaretY)));
|
Y := ToPos(TextView.TextToViewIndex(ToIdx(CaretY)));
|
||||||
NewTopLine := Max(1, Y - (LinesInWin div 2));
|
NewTopLine := Max(1, Y - (LinesInWin div 2));
|
||||||
if NewTopLine < 1 then NewTopLine := 1;
|
if NewTopLine < 1 then NewTopLine := 1;
|
||||||
|
|
@ -2169,21 +2162,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDexedMemo.setHighligtherFrom(other: TDexedMemo);
|
|
||||||
begin
|
|
||||||
if other.Highlighter = other.TxtHighlighter then
|
|
||||||
Highlighter := TxtHighlighter
|
|
||||||
else if other.Highlighter = other.D2Highlighter then
|
|
||||||
Highlighter := D2Highlighter
|
|
||||||
else if other.Highlighter = other.SxHighlighter then
|
|
||||||
Highlighter := SxHighlighter
|
|
||||||
else if other.Highlighter = other.CppHighlighter then
|
|
||||||
Highlighter := CppHighlighter
|
|
||||||
// LFM, JSON, etc. are shared instances
|
|
||||||
else
|
|
||||||
Highlighter := other.Highlighter;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TDexedMemo.ShowPhobosDoc;
|
procedure TDexedMemo.ShowPhobosDoc;
|
||||||
var
|
var
|
||||||
str: string;
|
str: string;
|
||||||
|
|
@ -2737,14 +2715,6 @@ begin
|
||||||
EndUpdate();
|
EndUpdate();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDexedMemo.undoAll();
|
|
||||||
begin
|
|
||||||
BeginUpdate(false);
|
|
||||||
while CanUndo do
|
|
||||||
Undo;
|
|
||||||
EndUpdate();
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TDexedMemo.gotoWordEdge(right: boolean);
|
procedure TDexedMemo.gotoWordEdge(right: boolean);
|
||||||
var
|
var
|
||||||
s: string;
|
s: string;
|
||||||
|
|
@ -2961,7 +2931,6 @@ var
|
||||||
h: TStringHashSet;
|
h: TStringHashSet;
|
||||||
const
|
const
|
||||||
c: TSysCharSet = ['A'..'Z', 'a'..'z', '_'];
|
c: TSysCharSet = ['A'..'Z', 'a'..'z', '_'];
|
||||||
a: TSysCharSet = ['A'..'Z', 'a'..'z', '_', '0' .. '9'];
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
fCompletion.Position := 0;
|
fCompletion.Position := 0;
|
||||||
|
|
@ -2993,16 +2962,7 @@ begin
|
||||||
r := TStringRange.create(lines[i]);
|
r := TStringRange.create(lines[i]);
|
||||||
while not r.empty do
|
while not r.empty do
|
||||||
begin
|
begin
|
||||||
r.popWhile([' ', #9]);
|
w := r.popUntil(c)^.takeWhile(c).yield;
|
||||||
if r.startsWith('//') then
|
|
||||||
r.popUntil(#0);
|
|
||||||
if r.startsWith('/*') then
|
|
||||||
begin
|
|
||||||
r.popFrontN(2);
|
|
||||||
r.popUntil('/');
|
|
||||||
r.popFront();
|
|
||||||
end;
|
|
||||||
w := r.popUntil(c)^.takeWhile(a).yield;
|
|
||||||
if (w.length >= fTextCompletionMinLength) and not h.contains(w) then
|
if (w.length >= fTextCompletionMinLength) and not h.contains(w) then
|
||||||
begin
|
begin
|
||||||
h.insert(w);
|
h.insert(w);
|
||||||
|
|
@ -3022,11 +2982,6 @@ procedure TDexedMemo.completionCodeCompletion(var value: string;
|
||||||
begin
|
begin
|
||||||
if KeyChar = '' then
|
if KeyChar = '' then
|
||||||
exit;
|
exit;
|
||||||
if (KeyChar = '.') and (SourceValue <> value) then
|
|
||||||
begin
|
|
||||||
value := SourceValue + '.';
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
if KeyChar[1] = ' ' then
|
if KeyChar[1] = ' ' then
|
||||||
value := sourceValue + KeyChar[1]
|
value := sourceValue + KeyChar[1]
|
||||||
else
|
else
|
||||||
|
|
@ -3396,23 +3351,14 @@ begin
|
||||||
fIsDSource := Highlighter = fD2Highlighter;
|
fIsDSource := Highlighter = fD2Highlighter;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDexedMemo.setHighligthedIdent(value: string);
|
procedure TDexedMemo.highlightCurrentIdentifier;
|
||||||
begin
|
|
||||||
if fHighlightedIdent = value then
|
|
||||||
exit;
|
|
||||||
fHighlightedIdent := value;
|
|
||||||
highlightCurrentIdentifier(false);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TDexedMemo.highlightCurrentIdentifier(fromEditor: boolean = true);
|
|
||||||
var
|
var
|
||||||
s: string;
|
s: string;
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
if fromEditor then
|
fIdentifier := GetWordAtRowCol(LogicalCaretXY);
|
||||||
fHighlightedIdent := GetWordAtRowCol(LogicalCaretXY);
|
if (fIdentifier.length > 2) and (not SelAvail) then
|
||||||
if (fHighlightedIdent.length > 2) and (not SelAvail) then
|
SetHighlightSearch(fIdentifier, fMatchIdentOpts)
|
||||||
SetHighlightSearch(fHighlightedIdent, fMatchIdentOpts)
|
|
||||||
else if SelAvail and (BlockBegin.Y = BlockEnd.Y) then
|
else if SelAvail and (BlockBegin.Y = BlockEnd.Y) then
|
||||||
begin
|
begin
|
||||||
s := SelText;
|
s := SelText;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ inherited TodoListWidget: TTodoListWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited toolbar: TDexedToolBar
|
inherited toolbar: TDexedToolBar
|
||||||
Height = 30
|
|
||||||
Width = 576
|
Width = 576
|
||||||
OnResize = toolbarResize
|
OnResize = toolbarResize
|
||||||
object btnGo: TDexedToolButton[0]
|
object btnGo: TDexedToolButton[0]
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ inherited ToolsEditorWidget: TToolsEditorWidget
|
||||||
ClientWidth = 441
|
ClientWidth = 441
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 244
|
Height = 244
|
||||||
Top = 36
|
|
||||||
Width = 441
|
Width = 441
|
||||||
ClientHeight = 244
|
ClientHeight = 244
|
||||||
ClientWidth = 441
|
ClientWidth = 441
|
||||||
|
|
@ -30,11 +29,9 @@ inherited ToolsEditorWidget: TToolsEditorWidget
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 160
|
Width = 160
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
ExtendedSelect = False
|
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnDblClick = lstToolsDblClick
|
OnDblClick = lstToolsDblClick
|
||||||
OnDrawItem = lstToolsDrawItem
|
OnDrawItem = lstToolsDrawItem
|
||||||
OnKeyPress = lstToolsKeyPress
|
|
||||||
OnSelectionChange = lstToolsSelectionChange
|
OnSelectionChange = lstToolsSelectionChange
|
||||||
ScrollWidth = 158
|
ScrollWidth = 158
|
||||||
Style = lbOwnerDrawFixed
|
Style = lbOwnerDrawFixed
|
||||||
|
|
@ -67,7 +64,6 @@ inherited ToolsEditorWidget: TToolsEditorWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited toolbar: TDexedToolBar
|
inherited toolbar: TDexedToolBar
|
||||||
Height = 30
|
|
||||||
Width = 433
|
Width = 433
|
||||||
object btnRun: TDexedToolButton[0]
|
object btnRun: TDexedToolButton[0]
|
||||||
Left = 174
|
Left = 174
|
||||||
|
|
@ -160,7 +156,7 @@ inherited ToolsEditorWidget: TToolsEditorWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited contextMenu: TPopupMenu
|
inherited contextMenu: TPopupMenu
|
||||||
Left = 16
|
left = 16
|
||||||
Top = 40
|
top = 40
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ type
|
||||||
procedure lstToolsDblClick(Sender: TObject);
|
procedure lstToolsDblClick(Sender: TObject);
|
||||||
procedure lstToolsDrawItem(Control: TWinControl; Index: Integer;
|
procedure lstToolsDrawItem(Control: TWinControl; Index: Integer;
|
||||||
ARect: TRect; State: TOwnerDrawState);
|
ARect: TRect; State: TOwnerDrawState);
|
||||||
procedure lstToolsKeyPress(Sender: TObject; var Key: char);
|
|
||||||
procedure lstToolsSelectionChange(Sender: TObject; User: boolean);
|
procedure lstToolsSelectionChange(Sender: TObject; User: boolean);
|
||||||
procedure propsEdModified(Sender: TObject);
|
procedure propsEdModified(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
|
@ -262,10 +261,5 @@ begin
|
||||||
lstTools.Canvas.TextOut(rc.Left, rc.Top , CustomTools.tool[Index].toolAlias);
|
lstTools.Canvas.TextOut(rc.Left, rc.Top , CustomTools.tool[Index].toolAlias);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TToolsEditorWidget.lstToolsKeyPress(Sender: TObject; var Key: char);
|
|
||||||
begin
|
|
||||||
key := #0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue