Compare commits

..

74 Commits

Author SHA1 Message Date
Basile Burg 129d83d568 fix #145- add __rvalue keyword 2025-03-10 11:27:51 +01:00
Basile Burg 3a6a20c466 fix #144 - highlight D IES 2025-03-10 10:46:57 +01:00
Basile Burg 685242ae65 fix debug build after HEAD~1 2025-03-03 14:18:52 +01:00
Basile Burg 647daa96c8 fix #141- DCD causes dexed to crash violently
- remove old code that was used to determine if DCD is able to upagete cache
  and that was based on `dcd-client --version` + internal SemVar handling
- default to 0 for bad SemVer component
2025-03-03 14:00:05 +01:00
Basile Burg d4766a2d2a text completions, tweaks to partially ignore comments 2025-01-08 08:47:18 +01:00
Basile Burg a45e590521 fix #139 - explorer, add options to control whether the size and the ext columns are visible 2025-01-08 08:09:19 +01:00
Basile Burg 340c099fe9 fix #138 - The filter of the mini-explorer is too small 2025-01-08 08:08:38 +01:00
Basile Burg be699bd9bc completions, better behavior with `..` and when "auto-dot" is enabled (_autoDotDelay_ > 0). 2024-04-29 07:49:06 +02:00
Basile Burg 7fea8c5e4d blame widget, force lower case hash
a741032bd1 did not fix the problem,
the problem is in the input text
2024-04-29 07:18:42 +02:00
Basile Burg e16a751495 explorer, more filter fixes 2024-04-29 07:15:00 +02:00
Basile Burg a741032bd1 blame view, keep hashes lowcased
otherwise copy button will copy something that's not always handled,
xref https://gitlab.com/gitlab-org/gitlab/-/issues/453996
2024-04-02 21:51:08 +02:00
Basile Burg ccbc12a16c blame, add early exit for when the initial data are not yet collected 2024-03-30 11:25:28 +01:00
Basile Burg 877072dc48 Add initial support for git blame 2024-03-30 06:21:27 +01:00
Basile Burg ad9f8ca2d4 sxsyn, add support the `defer` keyword 2024-02-21 05:25:44 +01:00
Basile Burg 503196e999 editor cleanup commented code
that stuff, i.e indent lines, was designed for Lazarus and has
never really worked with the D HL.
2024-01-29 06:49:15 +01:00
Basile Burg 488301ac2c ESC while typing in the input field of the search & replace widg. to give the editor the focus back 2024-01-29 06:47:29 +01:00
Basile Burg 200e197b95 update changelog
impliclty fixed from Laz 3.0
2024-01-29 06:46:25 +01:00
Basile Burg 129c3c4d2c more related to #130 2024-01-22 06:49:21 +01:00
Basile Burg 0160c52b61 dftm commander, output a warning if the tool is missing
xref #125
2024-01-22 06:38:15 +01:00
Basile Burg f349dee6a4 search & replace widg, add visual feedback will typing in the input field 2024-01-21 20:52:10 +01:00
Basile Burg 58332062d1 fix, debugging or running from Laz3 did not work anymore 2024-01-21 20:50:21 +01:00
Basile Burg 61c2d132df fix #130 - mini-explorer, on startup selected folder becomes the root, instead of the previous root 2024-01-21 20:17:40 +01:00
Basile Burg bd3625a63f fix #129 - mini-explorer, clearing the filter has for effect to scan the explorer root folder instead of the selected one 2024-01-21 20:16:50 +01:00
Basile Burg 5f0cb4a3f4 sxsyn, adjust lexing to make dot equal ligature working 2023-12-18 12:06:17 +01:00
Basile Burg 6e2209e3b0 sxsyn, add support for char literals 2023-11-26 03:24:33 +01:00
Basile Burg 1d6442917e styx syntax, add the `char` keyword 2023-11-13 01:20:30 +01:00
Basile Burg 4c85af2cc4 sxsyn, allow $1 as identifier 2023-09-23 17:29:28 +02:00
Basile Burg 22f0a5cf39 rlz 2023-09-18 08:41:22 +02:00
Basile Burg af68051ba8 fixup HEAD~1, missing lfm changes 2023-09-18 08:40:46 +02:00
Basile Burg f1c6b38c38 add a MRU for the customized executable used in gdb commander 2023-09-17 13:03:13 +02:00
Basile Burg e576ad1702 fix, font size of reloaded document not always correct 2023-09-17 11:52:18 +02:00
Basile Burg 68f2d53b5c styx syntax, add support for the `from` keyword 2023-09-10 22:04:38 +02:00
Basile Burg 47e00a6a9b editor, add the "undo all" action 2023-08-28 10:39:21 +02:00
Basile Burg 011907d934 fix, diff viewer, unmodified text not visible with dark themes 2023-08-28 10:17:12 +02:00
Basile Burg 263f2a1121 patch use of deprecated API property 2023-08-24 12:12:45 +02:00
Basile Burg 052e49aa35 fix #116 - libdexed-d can only be build with ldc 1.30.0
1.31.0 or newer required now
2023-07-27 15:36:38 +02:00
Basile Burg 73513b3512 rlz 2023-07-07 09:42:54 +02:00
Basile.B 6aea36e65a Merge branch 'rlz-image-upd' into 'master'
change the image used to build the releases

See merge request basile.b/dexed!21
2023-07-07 00:01:07 +00:00
Basile Burg 2478e6dd03 change the image used to build the releases 2023-07-07 01:49:50 +02:00
Basile Burg 700d2c6fd8 update changelog 2023-07-06 22:03:45 +02:00
Basile Burg 1eeeaccdf0 add Arc Dark HL preset 2023-07-06 22:03:39 +02:00
Basile Burg cd19075e38 remove obsolete patch 2023-07-06 21:45:37 +02:00
Basile Burg 1d2ac14225 update release build script 2023-07-06 21:45:25 +02:00
Basile Burg 985b8b073d fix #120 - "select all" in the messages can hang dexed for a while 2023-07-06 20:48:00 +02:00
Basile Burg c2c987cdda fix #121 - Words completions dont not fully take idents containing digits 2023-07-06 20:26:09 +02:00
Basile Burg 75ed028f58 fix, completion broken if dependency specified using a path DUB property 2023-07-06 20:16:48 +02:00
Basile Burg f06ad0ad8c update dparse 2023-07-06 20:08:48 +02:00
Basile Burg bd2a5d16df fix #118 - add support for the new DUB package naming scheme 2023-06-26 01:09:33 +02:00
Basile Burg 63fff3f001 fix appveyor broken
note that ldc 1.30 + matching dub is the last that
can build libdexed-d. That start failing from 1.31
again.
2023-02-28 10:55:17 +01:00
Basile Burg 468a3a6656 rename field w/ typo 2023-02-27 23:40:30 +01:00
Basile Burg 8622a7039a tools widget, prevent the input box on keypress
on gtk2 a small input box is displayed by default, which is annoying and of not usefulness
2023-02-27 23:37:38 +01:00
Basile Burg 81c336c3bb tools widget, disable extended selection
of no usefulness here
2023-02-27 23:15:07 +01:00
Basile Burg 78cb98640f update readme for version 3.9.24 2023-02-25 14:54:44 +01:00
Basile Burg 5044e0d1fc rlz 2023-02-25 14:30:43 +01:00
Basile Burg b4ae83569f docking, initialize a `var` parameter used as result
it's not `out` so there is no guarantee that the caller
has initialized it.
2023-02-25 13:32:55 +01:00
Basile Burg 7398bf9609 dont load docking in the OnFirstShow handler
This caused random cycles while auto-sizing, making dexed impossible
to start without deleting docking.xml
2023-02-15 09:34:46 +01:00
Basile Burg 390ec7777e fix, possible AV when trying to quit and if the FSP just got closed while a group also present 2023-01-05 16:12:48 +01:00
Basile Burg 3dfad53fe3 update year 2023-01-02 10:59:31 +01:00
Basile Burg 9f56a74e54 remove widget back panel 2022-12-26 15:41:01 +01:00
Basile Burg 0c5932e0cf fix, color selector problem when using dark themes 2022-09-10 19:29:37 +02:00
Basile Burg 9b58fe161e fix, scrollCentered inverted 2022-08-14 20:27:47 +02:00
Basile Burg 0c5b0b101e editor, add the ecScrollCenteredDown and ecScrollCenteredUp actions 2022-08-14 14:33:57 +02:00
Basile Burg 5966e03425 add the redoAll action 2022-08-08 15:07:19 +02:00
Basile Burg 1c03f6175a fix, wrong diagnostic output when a makefile rule is already geing processed 2022-08-05 18:43:48 +02:00
Basile Burg 2fb9dfda94 sxsyn, add the `apply` keyword 2022-07-24 10:13:19 +02:00
Basile Burg 10ce57f723 rlz 2022-07-15 05:29:07 +02:00
Basile Burg accb025ac7 fixup HEAD^1, importPaths must be used for DCD
module names can mismatch with sourcePaths
2022-07-15 05:15:00 +02:00
Basile Burg e73d226dba better dcd completion if receipt us subpackage-oriented 2022-07-15 05:04:45 +02:00
Basile Burg 60f9e4e984 fix, dub projects, "sourcePath" not tried in subPackages objects 2022-07-15 04:54:46 +02:00
Basile Burg cf93e0d9e6 gdb commander, center view after click on call stack view 2022-07-12 17:22:32 +02:00
Basile Burg cdde8fe37f rlz 2022-07-03 14:27:55 +02:00
Basile Burg d60a2cceee fix #50, "Reset default layout" did not work properly
very old regression
2022-07-03 14:23:49 +02:00
Basile Burg e0b599aea9 make project, add an option to filter out by ext files located in the sourceDirectories 2022-07-03 12:57:00 +02:00
Basile Burg 093ffa54b3 fix #113 - regression, setting a breakpoint vertically centers the matching line 2022-06-29 15:37:37 +02:00
66 changed files with 4435 additions and 3176 deletions

View File

@ -16,30 +16,9 @@ pages:
- merge_requests - merge_requests
release: release:
image: dlang2/ldc-ubuntu image: registry.gitlab.com/basile.b/dexed/rlz-image.fedora.x86_64:1.3
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:

View File

@ -1,3 +1,84 @@
# 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
## Enhancements
- Editor, added the _Redo All_ action.
- Editor, added the _ecScrollCenteredDown_ and _ecScrollCenteredUp_ actions. Only available using shortcuts and
binded by default to <kbd>UP/DOWN</kbd>+<kbd>CTRL</kbd>+<kbd>ALT</kbd>, they allow to maintain the caret at the center
of the text view while scrolling.
## Bugs fixed
- dexed did not, or was slow, to start on Plasma. (7398bf960958)
- make projects, DUB was wrongly mentioned when trying to compile while previous build not finished.
- possible access violation related to project groups (390ec7777e63)
# v3.9.23
## Enhancements
- GDB Commander, center editor view after double click on the call stack.
## Fixes
- fix, dub projects, "sourcePath" not tried in the "subPackages".
- fix, dub projects, completion not working well if project is organized as sub packages. (#65)
# v3.9.22
## Enhancements
- Make projects, added the _excludedSourceExtensions_ options. It allows to filter out files that are in the
_sourceDirectories_ from the project inspector or from the list of files used to perform project wide searches.
## Regressions fixed
- Editor, line clicked when adding a breakpoint unexpectedly vertically centered.
- Window menu, "Reset default layout", did not work anymore. (#50)
# v3.9.21 # v3.9.21
## Bugs fixed ## Bugs fixed

View File

@ -24,16 +24,16 @@ Dexed, the _D Extended EDitor_, is an IDE for the [D programming language](https
## Project information ## Project information
- :bookmark: latest release: version 3.9.21, Sun 19 June 2022. - :bookmark: latest release: version 3.9.26, Mon 18 Sep. 2023.
- :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). - :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.21 ## Download version 3.9.26
- :package: [setup program for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.21/downloads/binaries/dexed.3.9.21.linux64.setup.zip) - :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: [binaries for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.21/downloads/binaries/dexed.3.9.21.linux64.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: [rpm for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.21/downloads/binaries/dexed-3.9.21-0.x86_64.rpm) - :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: [deb for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.21/downloads/binaries/dexed-3.9.21.amd64.deb) - :package: [deb for Linux 64 bit](https://gitlab.com/basile.b/dexed/-/releases/v3.9.26/downloads/binaries/dexed-3.9.26.amd64.deb)
The _zip_ archives allow to move freely the files. 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 _setup.zip_ archives contain a command line program that installs to predefined locations so that the software can be run without additional intervention.

View File

@ -19,14 +19,14 @@ branches:
install: install:
- ps: | - ps: |
$LDC_URL = "https://github.com/ldc-developers/ldc/releases/download/v1.27.1/ldc2-1.27.1-windows-x64.7z" $LDC_URL = "https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-windows-multilib.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.27.1-windows-x64" "C:\ldc" Rename-Item "C:\ldc2-1.33.0-windows-multilib" "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"

View File

@ -8,7 +8,12 @@
"path" : "../etc/libdparse" "path" : "../etc/libdparse"
} }
}, },
"dflags" : [ "dflags-linux" : [
"-link-defaultlib-shared=false" "-link-defaultlib-shared=false"
] ],
} "dflags-windows" : [
"-link-defaultlib-shared=false",
"-fvisibility=public",
"-dllimport=none",
],
}

View File

@ -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 visit(const ExpressionNode) {} override void dynamicDispatch(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) {}

View File

@ -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, 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 (>= 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.
## Build ## Build

@ -1 +1 @@
Subproject commit b94a1573acc5c5c6b21794970af5907f2a21822d Subproject commit fe6d1e38fb4fc04323170389cfec67ed7fd4e24a

View File

@ -125,3 +125,4 @@ __gshared
__traits __traits
__vector __vector
__parameters __parameters
__rvalue

2
isitthere/sxkeywords.sh Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/sh
isitthere --if=sxkeywords.txt --ml=128 --is=6574 --fk=pascal --of=sxkw.pas --fn=KeywordMatch

61
isitthere/sxkeywords.txt Normal file
View File

@ -0,0 +1,61 @@
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

View File

@ -434,6 +434,7 @@
</CodeGeneration> </CodeGeneration>
<Linking> <Linking>
<Debugging> <Debugging>
<DebugInfoType Value="dsDwarf2"/>
<UseHeaptrc Value="True"/> <UseHeaptrc Value="True"/>
</Debugging> </Debugging>
<Options> <Options>
@ -487,6 +488,7 @@
</CodeGeneration> </CodeGeneration>
<Linking> <Linking>
<Debugging> <Debugging>
<DebugInfoType Value="dsDwarf2"/>
<UseHeaptrc Value="True"/> <UseHeaptrc Value="True"/>
</Debugging> </Debugging>
<Options> <Options>
@ -511,7 +513,7 @@
<RunParams> <RunParams>
<environment> <environment>
<UserOverrides Count="1"> <UserOverrides Count="1">
<Variable0 Name="LD_LIBRARY_PATH" Value="./"/> <Variable0 Name="LD_LIBRARY_PATH" Value="$(ProjPath)/../bin"/>
</UserOverrides> </UserOverrides>
</environment> </environment>
<FormatVersion Value="2"/> <FormatVersion Value="2"/>
@ -519,7 +521,7 @@
<Mode0 Name="default"> <Mode0 Name="default">
<environment> <environment>
<UserOverrides Count="1"> <UserOverrides Count="1">
<Variable0 Name="LD_LIBRARY_PATH" Value="./"/> <Variable0 Name="LD_LIBRARY_PATH" Value="$(ProjPath)/../bin"/>
</UserOverrides> </UserOverrides>
</environment> </environment>
</Mode0> </Mode0>
@ -551,7 +553,7 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item8> </Item8>
</RequiredPackages> </RequiredPackages>
<Units Count="64"> <Units Count="65">
<Unit0> <Unit0>
<Filename Value="dexed.lpr"/> <Filename Value="dexed.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -884,6 +886,13 @@
<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>
@ -907,6 +916,7 @@
<Linking> <Linking>
<Debugging> <Debugging>
<GenerateDebugInfo Value="False"/> <GenerateDebugInfo Value="False"/>
<DebugInfoType Value="dsDwarf2"/>
</Debugging> </Debugging>
<LinkSmart Value="True"/> <LinkSmart Value="True"/>
<Options> <Options>

View File

@ -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_makeproject, u_blame;
{$if lcl_fullversion < 2020000} {$if lcl_fullversion < 2020000}
{$ERROR Lazarus version >= 2.2 required} {$ERROR Lazarus version >= 2.2 required}

View File

@ -1,23 +0,0 @@
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)

10
setup/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
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"

View File

@ -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 make ldc -j5
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 make ldc -j5
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'" , "filepath" : "/binaries/'$RPM_NAME'" }' ASSET_RPM='{ "name" : "'$RPM_NAME'" , "url" : "'$LNK_BASE$RPM_NAME'" , "direct_asset_path" : "/binaries/'$RPM_NAME'" }'
ASSET_DEB='{ "name" : "'$DEB_NAME'" , "url" : "'$LNK_BASE$DEB_NAME'" , "filepath" : "/binaries/'$DEB_NAME'" }' ASSET_DEB='{ "name" : "'$DEB_NAME'" , "url" : "'$LNK_BASE$DEB_NAME'" , "direct_asset_path" : "/binaries/'$DEB_NAME'" }'
ASSET_ZP1='{ "name" : "'$ZP1_NAME'" , "url" : "'$LNK_BASE$ZP1_NAME'" , "filepath" : "/binaries/'$ZP1_NAME'" }' ASSET_ZP1='{ "name" : "'$ZP1_NAME'" , "url" : "'$LNK_BASE$ZP1_NAME'" , "direct_asset_path" : "/binaries/'$ZP1_NAME'" }'
ASSET_ZP2='{ "name" : "'$ZP2_NAME'" , "url" : "'$LNK_BASE$ZP2_NAME'" , "filepath" : "/binaries/'$ZP2_NAME'" }' ASSET_ZP2='{ "name" : "'$ZP2_NAME'" , "url" : "'$LNK_BASE$ZP2_NAME'" , "direct_asset_path" : "/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
setup/build-rlz-image.sh Normal file
View File

@ -0,0 +1 @@
sudo docker build $(realpath ".") -t "registry.gitlab.com/basile.b/dexed/rlz-image.fedora.x86_64:1.3"

View File

@ -1 +1 @@
v3.9.21 v3.9.26

241
src/u_blame.lfm Normal file
View File

@ -0,0 +1,241 @@
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 Normal file
View File

@ -0,0 +1,504 @@
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.

View File

@ -6,262 +6,256 @@ inherited CECdbWidget: TCECdbWidget
Caption = 'CDB commander' Caption = 'CDB commander'
ClientHeight = 589 ClientHeight = 589
ClientWidth = 496 ClientWidth = 496
inherited Back: TPanel inherited Content: TPanel
Height = 589 Height = 589
Width = 496 Width = 496
ClientHeight = 589 ClientHeight = 589
ClientWidth = 496 ClientWidth = 496
inherited Content: TPanel object txtCdbCmd: TEdit[0]
Height = 589 Left = 4
Width = 496 Height = 23
ClientHeight = 589 Hint = 'CDB command field'
ClientWidth = 496 Top = 562
object txtCdbCmd: TEdit[0] Width = 488
Left = 4 Align = alBottom
Height = 23 BorderSpacing.Around = 4
Hint = 'CDB command field' OnKeyPress = txtCdbCmdKeyPress
Top = 562 TabOrder = 0
Width = 488 end
Align = alBottom object Panel1: TPanel[1]
BorderSpacing.Around = 4 Left = 4
OnKeyPress = txtCdbCmdKeyPress Height = 24
TabOrder = 0 Top = 4
end Width = 488
object Panel1: TPanel[1] Align = alTop
Left = 4 BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 24
ClientWidth = 488
TabOrder = 1
object btnGo: TSpeedButton
Left = 56
Height = 24 Height = 24
Top = 4 Hint = 'resume execution'
Width = 488 Top = 0
Align = alTop Width = 28
BorderSpacing.Around = 4 Align = alLeft
BevelOuter = bvNone Glyph.Data = {
ClientHeight = 24 36040000424D3604000000000000360000002800000010000000100000000100
ClientWidth = 488 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
TabOrder = 1 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
object btnGo: TSpeedButton FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
Left = 56 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
Height = 24 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
Hint = 'resume execution' FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
Top = 0 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
Width = 28 FF00FFFFFF000000000000000000000000000000000000000024000000330000
Align = alLeft 002F000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
Glyph.Data = { FF00FFFFFF0000000000000000000000000000000000007D41C100C684FF0086
36040000424D3604000000000000360000002800000010000000100000000100 46ED000000290000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF FF00FFFFFF0000000024000000330000003300000033008847FF00E4A6FF00BE
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 80FF008345D90000002100000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00007D41C1008A48FF008847FF008746FF008847FF00D9A1FF00D8
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF A0FF00BC80FF007C41B900000022FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00008947FF43E8C2FF00D7A0FF00D7A0FF00D59FFF00D09CFF00D0
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 9CFF00D39FFF00B981FF007E43BDFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00008845FF6FE8D0FF00C899FF00C899FF00C899FF00C797FF00C8
FF00FFFFFF000000000000000000000000000000000000000024000000330000 98FF00CA9AFF63E6CDFF008A47FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
002F000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00008946FF99F0E4FF4FE9D5FF51E8D4FF4DE6D1FF94E8D8FF00C3
FF00FFFFFF0000000000000000000000000000000000007D41C100C684FF0086 97FF60E0C7FF00B281FF008B49ACFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
46ED000000290000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00008847B2008946FF008744FF008642FF008847FF82E4D6FF5ADA
FF00FFFFFF0000000024000000330000003300000033008847FF00E4A6FF00BE C4FF00AD7FFF008947A700000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
80FF008345D90000002100000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF0000000000000000000000000000000000008847FF7AE4D8FF00AA
FF00FFFFFF00007D41C1008A48FF008847FF008746FF008847FF00D9A1FF00D8 7FFF008946CF0000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
A0FF00BC80FF007C41B900000022FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF0000000000000000000000000000000000008847B200AA85FF008A
FF00FFFFFF00008947FF43E8C2FF00D7A0FF00D7A0FF00D59FFF00D09CFF00D0 46E9000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
9CFF00D39FFF00B981FF007E43BDFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00008845FF6FE8D0FF00C899FF00C899FF00C899FF00C797FF00C8 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
98FF00CA9AFF63E6CDFF008A47FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00008946FF99F0E4FF4FE9D5FF51E8D4FF4DE6D1FF94E8D8FF00C3 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
97FF60E0C7FF00B281FF008B49ACFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00008847B2008946FF008744FF008642FF008847FF82E4D6FF5ADA FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
C4FF00AD7FFF008947A700000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF }
FF00FFFFFF0000000000000000000000000000000000008847FF7AE4D8FF00AA OnClick = btnGoClick
7FFF008946CF0000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF ShowCaption = False
FF00FFFFFF0000000000000000000000000000000000008847B200AA85FF008A
46E9000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = btnGoClick
ShowCaption = False
end
object btnStop: TSpeedButton
Left = 28
Height = 24
Hint = 'stop debugging'
Top = 0
Width = 28
Align = alLeft
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF003941D64C444BD9D2474FDAF0434BD9E94048D7E93E47
D8F0353ED5D2252ED254232BD206FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004148D74C636CE4E48997FAFF8495FFFF7F90FCFF7D8EFAFF7D8D
F7FF7D8BF2FF5159DDFF222AD173FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF004E56DA4D6C75E4DF96A5FAFF5A74FFFF3250FFFF304FFFFF2C49FEFF2542
FAFF4860F9FF8694F4FF5159DDDC252ED14DFFFFFF00FFFFFF00FFFFFF005E65
DE4B7981E7E59FADFBFF6781FFFF405EFFFF405EFFFF3C59FFFF3755FFFF3350
FFFF2846FDFF4A65FDFF8996F6FF545EDEE52C34D44BFFFFFF00FFFFFF007178
E3D5A2B2FCFF738FFFFF4F70FFFF4F6EFFFF4B69FFFF4664FFFF415EFFFF3C5A
FFFF3755FFFF2C4BFFFF4E67FFFF8493FAFF4048D8D5FFFFFF00FFFFFF007D84
E5F2A6BBFFFF5F7FFFFF5F7EFFFF5A79FFFF5573FFFF506EFFFF4B69FFFF4664
FFFF415EFFFF3B59FFFF314FFFFF8799FFFF4D55DBF2FFFFFF00FFFFFF00858A
E6E9ABBEFFFF6D8DFFFF6989FFFF6583FFFF5F7EFFFF5A79FFFF5574FFFF506F
FFFF4B69FFFF4663FFFF3F5CFFFF8A9BFFFF535BDCE9FFFFFF00FFFFFF008B91
E7EAB1C4FFFF7698FFFF7393FFFF6E8EFFFF6989FFFF6583FFFF5F7EFFFF5A79
FFFF5573FFFF4F6EFFFF4867FFFF90A1FFFF5A62DEEAFFFFFF00FFFFFF009298
E9F2B8CDFFFF7DA0FFFF7C9DFFFF7899FFFF7393FFFF6E8EFFFF6989FFFF6583
FFFF607EFFFF5978FFFF4F70FFFF98AAFFFF636AE0F2FFFFFF00FFFFFF00959A
EAD4BCCDFCFF9CBBFFFF81A5FFFF81A2FFFF7C9EFFFF7899FFFF7493FFFF6F8E
FFFF6989FFFF6080FFFF7893FFFF9EADFBFF656CE0D4FFFFFF00FFFFFF009297
E84AA5ACEFE4C1D1FCFFA0BFFFFF86AAFFFF85A7FFFF81A2FFFF7C9DFFFF7898
FFFF6F90FFFF85A1FFFFACBAFBFF838BE8E46369DF4AFFFFFF00FFFFFF00FFFF
FF009396E849A6ADEEDFC4D4FCFFA3C2FFFF8BAFFFFF89ABFFFF84A7FFFF7EA0
FFFF91AEFFFFB4C3FBFF8C93EADB6D71E04AFFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF009498E84AA9B1F0E4C2D3FCFFC1D6FFFFBDD1FFFFBBCFFFFFB9CE
FFFFB7C8FCFF989FEDFF797EE272FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00999DEA4B9EA3EBD2A0A5ECF09DA2EBE99BA0EBE9989E
EAF09297E9D2868BE6538388E506FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = btnStopClick
ShowCaption = False
end
object btnStart: TSpeedButton
Left = 0
Height = 24
Hint = 'start debuggin'
Top = 0
Width = 28
Align = alLeft
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00000000000000003300000030000000000000000000000000000000000000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000329EDEFF319CDBF10000002D0000000000000000000000000000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000329AD8C4329DDEFF2F98D7E90000003300000006000000000000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000339EDE5A329BDDFF67C6EEFF369FDEFF133D574A000000050000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF000000000000000000319ADBFF83D7F3FF89E4FAFF349CDCFF133951490000
001200000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000000000003196D7BA57BEEAFFA9F5FFFF7BDEF8FF369CDCFF2772
A17B00000011000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00000000330000003321648F6B42A9E2FFBDF5FEFF81E7FBFF76DBF6FF379B
DCFF276F9E790000001A0000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00389BDCFF48ACE4FF45A9E2FF3FA5E1FFBDF3FDFF7FE4F8FF7AE3FAFF70D9
F5FF42A5E0FF2E81B7990000002200000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF003799DBFF9EF1FDFF80E5F9FF73E0F9FF6FDEF7FF6DDCF7FF6EDDF7FF71E0
F9FF70DFF8FF40A6E0FF358DC8B900000023FFFFFF00FFFFFF00FFFFFF00FFFF
FF003794D6D285DCF5FF89E5F8FF68DAF6FF68DAF6FFB9F0FCFFB8F2FDFFB4F2
FCFFA9F1FDFFABF1FCFF44A9E2FF3890CBBFFFFFFF00FFFFFF00FFFFFF00FFFF
FF003993D2856DC5ECFF9CE8FAFF5FD6F4FF61D7F4FF46B4E6FF3191D8FF3595
DAFF3797DAFF3A99DBFF3E9CDCFF409EDDFFFFFFFF00FFFFFF00FFFFFF00FFFF
FF003E9BDC324CAEE4FFB0EEFBFF66D8F4FF57D3F3FFACEDFBFF63B4E5FF2D77
AB8900000001000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00000000003B9ADAFFACEEFBFF82DDF5FF4CCEF1FF82DFF6FFABE6F8FF3996
D9FF0711182D000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00000000003C94D5D28BDAF3FFACEAF9FF3FCBF0FF45CDF0FFBBF0FBFF6DBA
E7FF3B93D0D90000000E0000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00000000003E93D1876CC5EBFFD7FAFFFFCDF6FDFFC3F3FDFFD2F8FFFFC6F1
FBFF409ADAFF2D67916D0000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000479CDC3A439ADAFF3F97D9FF3E96D9FF3E96D9FF3E97D9FF4099
DAFF459CDBFF489EDCFF0000000000000000FFFFFF00FFFFFF00
}
OnClick = btnStartClick
ShowCaption = False
end
object btnStep: TSpeedButton
Left = 84
Height = 24
Hint = 'next instruction'
Top = 0
Width = 28
Align = alLeft
Glyph.Data = {
42020000424D4202000000000000420000002800000010000000100000000100
100003000000000200006400000064000000000000000000000000F80000E007
00001F000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAE73EF7B0000000000004D6B9294FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B18C6CF7B000000006D6B14A5FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B9AD6FBDECF7B00008E7334A5FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B18C6F7BD5DEFEF7BAE7355ADFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B96B575AD7DEFEF7BCF7B55ADFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B14A51CE7CF7B0000EF7B75ADFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B1CE7CF7B00000000108496B5FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1084EF7B0000000000003084B6B5FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFF
}
OnClick = btnStepClick
ShowCaption = False
end
object btnDisasm: TSpeedButton
Left = 112
Height = 24
Hint = 'disasm'
Top = 0
Width = 28
Align = alLeft
Glyph.Data = {
42020000424D4202000000000000420000002800000010000000100000000100
100003000000000200006400000064000000000000000000000000F80000E007
00001F0000000000000000000000000000000000000000000000000000000000
00000000FFFFCF7BD39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39C
D39C3084FFFFD39CDFFFBEF7BEF7BEF7BEF7BEF7BEF7BEF7BEF7BEF7BEF7BEF7
DFFFD39CFFFFD39C9EF75DEF5DEF5DEF7DEF9EF79EF79EF77DEF5DEF5DEF5DEF
9EF7D39CFFFFD39C7DEF3CE73CE75DEFEB5A0C632C630C63EB5A5DEF3CE73CE7
7DEFD39CFFFFD39C7DEFFBDEFBDE1CE7DFFFFFFFFFFFFFFFDFFF3CE71CE7FBDE
7DEFD39CFFFFD39C5DEFDBDEDBDE1CE78A52AA52AA52AA52AA528A521CE7FBDE
5DEFD39CFFFFD39C5DEFBAD6BAD6DBDEDFFFFFFFFFFFFFFFFFFFBEF7FBDEDBDE
7DEFD39CFFFFD39C5DEF9AD6BAD6DBDE2842494A494A494A494A28420842BAD6
5DEFD39CFFFFD39C5DEF79CEBAD6DBDEDFFFFFFFFFFFDFFFBEF79EF75DEF79CE
5DEFD39CFFFFD39C7DEF79CEA631C739C739C739C739A63179CE59CE59CE38C6
5DEFD39CFFFFD39C7DEF38C69EF79EF79EF79EF79EF75DEF38C638C638C618C6
7DEFD39CFFFFD39C7DEFF7BDF7BDF7BDF7BDF7BDF7BDF7BDF7BDF7BDF7BDF7BD
7DEFD39CFFFFD39C9EF7B6B5D7BDD7BDD7BDD7BDD7BDD7BDD7BDD7BDD7BDB6B5
9EF7D39CFFFFD39CDFFFFBDEFBDE1CE71CE71CE71CE71CE71CE71CE7FBDEFBDE
DFFFD39CFFFFF39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39C
D39CF39CFFFF
}
OnClick = btnDisasmClick
ShowCaption = False
end
end end
object lstCdbOut: TListView[2] object btnStop: TSpeedButton
Left = 4 Left = 28
Height = 526 Height = 24
Hint = 'CDB output' Hint = 'stop debugging'
Top = 32 Top = 0
Width = 488 Width = 28
Align = alClient Align = alLeft
AutoWidthLastColumn = True Glyph.Data = {
BorderSpacing.Left = 4 36040000424D3604000000000000360000002800000010000000100000000100
BorderSpacing.Top = 4 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
BorderSpacing.Right = 4 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
BorderSpacing.Bottom = 4 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
Columns = < FF00FFFFFF00FFFFFF003941D64C444BD9D2474FDAF0434BD9E94048D7E93E47
item D8F0353ED5D2252ED254232BD206FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
Caption = 'CDB output' FF00FFFFFF004148D74C636CE4E48997FAFF8495FFFF7F90FCFF7D8EFAFF7D8D
Width = 484 F7FF7D8BF2FF5159DDFF222AD173FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
end> FF004E56DA4D6C75E4DF96A5FAFF5A74FFFF3250FFFF304FFFFF2C49FEFF2542
Font.Height = -11 FAFF4860F9FF8694F4FF5159DDDC252ED14DFFFFFF00FFFFFF00FFFFFF005E65
Font.Name = 'Lucida Console' DE4B7981E7E59FADFBFF6781FFFF405EFFFF405EFFFF3C59FFFF3755FFFF3350
ParentFont = False FFFF2846FDFF4A65FDFF8996F6FF545EDEE52C34D44BFFFFFF00FFFFFF007178
TabOrder = 2 E3D5A2B2FCFF738FFFFF4F70FFFF4F6EFFFF4B69FFFF4664FFFF415EFFFF3C5A
ViewStyle = vsReport FFFF3755FFFF2C4BFFFF4E67FFFF8493FAFF4048D8D5FFFFFF00FFFFFF007D84
E5F2A6BBFFFF5F7FFFFF5F7EFFFF5A79FFFF5573FFFF506EFFFF4B69FFFF4664
FFFF415EFFFF3B59FFFF314FFFFF8799FFFF4D55DBF2FFFFFF00FFFFFF00858A
E6E9ABBEFFFF6D8DFFFF6989FFFF6583FFFF5F7EFFFF5A79FFFF5574FFFF506F
FFFF4B69FFFF4663FFFF3F5CFFFF8A9BFFFF535BDCE9FFFFFF00FFFFFF008B91
E7EAB1C4FFFF7698FFFF7393FFFF6E8EFFFF6989FFFF6583FFFF5F7EFFFF5A79
FFFF5573FFFF4F6EFFFF4867FFFF90A1FFFF5A62DEEAFFFFFF00FFFFFF009298
E9F2B8CDFFFF7DA0FFFF7C9DFFFF7899FFFF7393FFFF6E8EFFFF6989FFFF6583
FFFF607EFFFF5978FFFF4F70FFFF98AAFFFF636AE0F2FFFFFF00FFFFFF00959A
EAD4BCCDFCFF9CBBFFFF81A5FFFF81A2FFFF7C9EFFFF7899FFFF7493FFFF6F8E
FFFF6989FFFF6080FFFF7893FFFF9EADFBFF656CE0D4FFFFFF00FFFFFF009297
E84AA5ACEFE4C1D1FCFFA0BFFFFF86AAFFFF85A7FFFF81A2FFFF7C9DFFFF7898
FFFF6F90FFFF85A1FFFFACBAFBFF838BE8E46369DF4AFFFFFF00FFFFFF00FFFF
FF009396E849A6ADEEDFC4D4FCFFA3C2FFFF8BAFFFFF89ABFFFF84A7FFFF7EA0
FFFF91AEFFFFB4C3FBFF8C93EADB6D71E04AFFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF009498E84AA9B1F0E4C2D3FCFFC1D6FFFFBDD1FFFFBBCFFFFFB9CE
FFFFB7C8FCFF989FEDFF797EE272FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00999DEA4B9EA3EBD2A0A5ECF09DA2EBE99BA0EBE9989E
EAF09297E9D2868BE6538388E506FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = btnStopClick
ShowCaption = False
end end
object btnStart: TSpeedButton
Left = 0
Height = 24
Hint = 'start debuggin'
Top = 0
Width = 28
Align = alLeft
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00000000000000003300000030000000000000000000000000000000000000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000329EDEFF319CDBF10000002D0000000000000000000000000000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000329AD8C4329DDEFF2F98D7E90000003300000006000000000000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000339EDE5A329BDDFF67C6EEFF369FDEFF133D574A000000050000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF000000000000000000319ADBFF83D7F3FF89E4FAFF349CDCFF133951490000
001200000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000000000003196D7BA57BEEAFFA9F5FFFF7BDEF8FF369CDCFF2772
A17B00000011000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00000000330000003321648F6B42A9E2FFBDF5FEFF81E7FBFF76DBF6FF379B
DCFF276F9E790000001A0000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00389BDCFF48ACE4FF45A9E2FF3FA5E1FFBDF3FDFF7FE4F8FF7AE3FAFF70D9
F5FF42A5E0FF2E81B7990000002200000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF003799DBFF9EF1FDFF80E5F9FF73E0F9FF6FDEF7FF6DDCF7FF6EDDF7FF71E0
F9FF70DFF8FF40A6E0FF358DC8B900000023FFFFFF00FFFFFF00FFFFFF00FFFF
FF003794D6D285DCF5FF89E5F8FF68DAF6FF68DAF6FFB9F0FCFFB8F2FDFFB4F2
FCFFA9F1FDFFABF1FCFF44A9E2FF3890CBBFFFFFFF00FFFFFF00FFFFFF00FFFF
FF003993D2856DC5ECFF9CE8FAFF5FD6F4FF61D7F4FF46B4E6FF3191D8FF3595
DAFF3797DAFF3A99DBFF3E9CDCFF409EDDFFFFFFFF00FFFFFF00FFFFFF00FFFF
FF003E9BDC324CAEE4FFB0EEFBFF66D8F4FF57D3F3FFACEDFBFF63B4E5FF2D77
AB8900000001000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00000000003B9ADAFFACEEFBFF82DDF5FF4CCEF1FF82DFF6FFABE6F8FF3996
D9FF0711182D000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00000000003C94D5D28BDAF3FFACEAF9FF3FCBF0FF45CDF0FFBBF0FBFF6DBA
E7FF3B93D0D90000000E0000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00000000003E93D1876CC5EBFFD7FAFFFFCDF6FDFFC3F3FDFFD2F8FFFFC6F1
FBFF409ADAFF2D67916D0000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000479CDC3A439ADAFF3F97D9FF3E96D9FF3E96D9FF3E97D9FF4099
DAFF459CDBFF489EDCFF0000000000000000FFFFFF00FFFFFF00
}
OnClick = btnStartClick
ShowCaption = False
end
object btnStep: TSpeedButton
Left = 84
Height = 24
Hint = 'next instruction'
Top = 0
Width = 28
Align = alLeft
Glyph.Data = {
42020000424D4202000000000000420000002800000010000000100000000100
100003000000000200006400000064000000000000000000000000F80000E007
00001F000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAE73EF7B0000000000004D6B9294FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B18C6CF7B000000006D6B14A5FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B9AD6FBDECF7B00008E7334A5FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B18C6F7BD5DEFEF7BAE7355ADFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B96B575AD7DEFEF7BCF7B55ADFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B14A51CE7CF7B0000EF7B75ADFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF7B1CE7CF7B00000000108496B5FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1084EF7B0000000000003084B6B5FFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFF
}
OnClick = btnStepClick
ShowCaption = False
end
object btnDisasm: TSpeedButton
Left = 112
Height = 24
Hint = 'disasm'
Top = 0
Width = 28
Align = alLeft
Glyph.Data = {
42020000424D4202000000000000420000002800000010000000100000000100
100003000000000200006400000064000000000000000000000000F80000E007
00001F0000000000000000000000000000000000000000000000000000000000
00000000FFFFCF7BD39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39C
D39C3084FFFFD39CDFFFBEF7BEF7BEF7BEF7BEF7BEF7BEF7BEF7BEF7BEF7BEF7
DFFFD39CFFFFD39C9EF75DEF5DEF5DEF7DEF9EF79EF79EF77DEF5DEF5DEF5DEF
9EF7D39CFFFFD39C7DEF3CE73CE75DEFEB5A0C632C630C63EB5A5DEF3CE73CE7
7DEFD39CFFFFD39C7DEFFBDEFBDE1CE7DFFFFFFFFFFFFFFFDFFF3CE71CE7FBDE
7DEFD39CFFFFD39C5DEFDBDEDBDE1CE78A52AA52AA52AA52AA528A521CE7FBDE
5DEFD39CFFFFD39C5DEFBAD6BAD6DBDEDFFFFFFFFFFFFFFFFFFFBEF7FBDEDBDE
7DEFD39CFFFFD39C5DEF9AD6BAD6DBDE2842494A494A494A494A28420842BAD6
5DEFD39CFFFFD39C5DEF79CEBAD6DBDEDFFFFFFFFFFFDFFFBEF79EF75DEF79CE
5DEFD39CFFFFD39C7DEF79CEA631C739C739C739C739A63179CE59CE59CE38C6
5DEFD39CFFFFD39C7DEF38C69EF79EF79EF79EF79EF75DEF38C638C638C618C6
7DEFD39CFFFFD39C7DEFF7BDF7BDF7BDF7BDF7BDF7BDF7BDF7BDF7BDF7BDF7BD
7DEFD39CFFFFD39C9EF7B6B5D7BDD7BDD7BDD7BDD7BDD7BDD7BDD7BDD7BDB6B5
9EF7D39CFFFFD39CDFFFFBDEFBDE1CE71CE71CE71CE71CE71CE71CE7FBDEFBDE
DFFFD39CFFFFF39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39CD39C
D39CF39CFFFF
}
OnClick = btnDisasmClick
ShowCaption = False
end
end
object lstCdbOut: TListView[2]
Left = 4
Height = 526
Hint = 'CDB output'
Top = 32
Width = 488
Align = alClient
AutoWidthLastColumn = True
BorderSpacing.Left = 4
BorderSpacing.Top = 4
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
Columns = <
item
Caption = 'CDB output'
Width = 484
end>
Font.Height = -11
Font.Name = 'Lucida Console'
ParentFont = False
TabOrder = 2
ViewStyle = vsReport
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -6,144 +6,137 @@ inherited ProjectConfigurationWidget: TProjectConfigurationWidget
Caption = 'DEXED project editor' Caption = 'DEXED project editor'
ClientHeight = 315 ClientHeight = 315
ClientWidth = 445 ClientWidth = 445
inherited Back: TPanel inherited Content: TPanel
Height = 315 Height = 279
Width = 445 Width = 445
AutoSize = True ClientHeight = 279
ClientHeight = 315
ClientWidth = 445 ClientWidth = 445
inherited Content: TPanel object Panel2: TPanel[0]
Height = 279 Left = 4
Width = 445 Height = 271
ClientHeight = 279 Top = 4
ClientWidth = 445 Width = 437
object Panel2: TPanel[0] Align = alClient
Left = 4 AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 271
ClientWidth = 437
TabOrder = 0
object Tree: TTreeView
Left = 0
Height = 271 Height = 271
Top = 4 Hint = 'filter configuration elements'
Width = 437 Top = 0
Align = alClient Width = 160
AutoSize = True Align = alLeft
BorderSpacing.Around = 4 AutoExpand = True
BevelOuter = bvNone HideSelection = False
ClientHeight = 271 ReadOnly = True
ClientWidth = 437 ScrollBars = ssAutoBoth
ShowRoot = False
TabOrder = 0 TabOrder = 0
object Tree: TTreeView OnChange = TreeChange
Left = 0 Options = [tvoAutoExpand, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoToolTips, tvoThemedDraw]
Height = 271 Items.Data = {
Hint = 'filter configuration elements' F9FFFFFF020003000000FFFFFFFFFFFFFFFF01000000FFFFFFFF000000000000
Top = 0 0000000700000047656E6572616CFFFFFFFFFFFFFFFF02000000FFFFFFFF0900
Width = 160 000000000000010A00000043617465676F72696573FFFFFFFFFFFFFFFF020000
Align = alLeft 00FFFFFFFF000000000000000000080000004D65737361676573FFFFFFFFFFFF
AutoExpand = True FFFF03000000FFFFFFFF00000000000000000009000000446562756767696E67
HideSelection = False FFFFFFFFFFFFFFFF04000000FFFFFFFF0000000000000000000D000000446F63
ReadOnly = True 756D656E746174696F6EFFFFFFFFFFFFFFFF05000000FFFFFFFF000000000000
ScrollBars = ssAutoBoth 000000060000004F7574707574FFFFFFFFFFFFFFFF06000000FFFFFFFF000000
ShowRoot = False 000000000000060000004F7468657273FFFFFFFFFFFFFFFF07000000FFFFFFFF
TabOrder = 0 000000000000000000050000005061746873FFFFFFFFFFFFFFFF08000000FFFF
OnChange = TreeChange FFFF000000000000000000110000005072652D6275696C642070726F63657373
Options = [tvoAutoExpand, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoToolTips, tvoThemedDraw] FFFFFFFFFFFFFFFF09000000FFFFFFFF00000000000000000012000000506F73
Items.Data = { 742D6275696C642070726F63657373FFFFFFFFFFFFFFFF0A000000FFFFFFFF00
F9FFFFFF020003000000FFFFFFFFFFFFFFFF01000000FFFFFFFF000000000000 00000000000000000B00000052756E206F7074696F6E73FFFFFFFFFFFFFFFF0B
0000000700000047656E6572616CFFFFFFFFFFFFFFFF02000000FFFFFFFF0900 000000FFFFFFFF0000000000000000000E000000416C6C2063617465676F7269
000000000000010A00000043617465676F72696573FFFFFFFFFFFFFFFF020000 6573
00FFFFFFFF000000000000000000080000004D65737361676573FFFFFFFFFFFF }
FFFF03000000FFFFFFFF00000000000000000009000000446562756767696E67 end
FFFFFFFFFFFFFFFF04000000FFFFFFFF0000000000000000000D000000446F63 object Splitter1: TSplitter
756D656E746174696F6EFFFFFFFFFFFFFFFF05000000FFFFFFFF000000000000 Left = 160
000000060000004F7574707574FFFFFFFFFFFFFFFF06000000FFFFFFFF000000 Height = 271
000000000000060000004F7468657273FFFFFFFFFFFFFFFF07000000FFFFFFFF Top = 0
000000000000000000050000005061746873FFFFFFFFFFFFFFFF08000000FFFF Width = 5
FFFF000000000000000000110000005072652D6275696C642070726F63657373 AutoSnap = False
FFFFFFFFFFFFFFFF09000000FFFFFFFF00000000000000000012000000506F73 end
742D6275696C642070726F63657373FFFFFFFFFFFFFFFF0A000000FFFFFFFF00 object inspector: TTIPropertyGrid
00000000000000000B00000052756E206F7074696F6E73FFFFFFFFFFFFFFFF0B Left = 165
000000FFFFFFFF0000000000000000000E000000416C6C2063617465676F7269 Height = 271
6573 Top = 0
} Width = 272
end Align = alClient
object Splitter1: TSplitter CheckboxForBoolean = False
Left = 160 DefaultValueFont.Color = clWindowText
Height = 271 Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Top = 0 Indent = 16
Width = 5 NameFont.Color = clWindowText
AutoSnap = False OnModified = inspectorModified
end PreferredSplitterX = 150
object inspector: TTIPropertyGrid SplitterX = 150
Left = 165 ValueFont.Color = clGreen
Height = 271
Top = 0
Width = 272
Align = alClient
CheckboxForBoolean = False
DefaultValueFont.Color = clWindowText
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Indent = 16
NameFont.Color = clWindowText
OnModified = inspectorModified
PreferredSplitterX = 150
SplitterX = 150
ValueFont.Color = clGreen
end
end end
end end
inherited toolbar: TDexedToolBar end
Width = 437 inherited toolbar: TDexedToolBar
object btnSyncEdit: TDexedToolButton[0] Width = 437
Left = 85 object btnSyncEdit: TDexedToolButton[0]
Hint = 'activate or deactivate the synchronized edition' Left = 85
Top = 0 Hint = 'activate or deactivate the synchronized edition'
AutoSize = True Top = 0
Caption = 'btnSyncEdit' AutoSize = True
OnClick = btnSyncEditClick Caption = 'btnSyncEdit'
resourceName = 'LINK_BREAK' OnClick = btnSyncEditClick
scaledSeparator = False resourceName = 'LINK_BREAK'
end scaledSeparator = False
object btnCloneConf: TDexedToolButton[1] end
Left = 57 object btnCloneConf: TDexedToolButton[1]
Hint = 'clone the selected configuration' Left = 57
Top = 0 Hint = 'clone the selected configuration'
AutoSize = True Top = 0
Caption = 'btnCloneConf' AutoSize = True
OnClick = btnCloneCurrClick Caption = 'btnCloneConf'
resourceName = 'COG_GO' OnClick = btnCloneCurrClick
scaledSeparator = False resourceName = 'COG_GO'
end scaledSeparator = False
object btnDelConf: TDexedToolButton[2] end
Left = 29 object btnDelConf: TDexedToolButton[2]
Hint = 'delete selected configuration' Left = 29
Top = 0 Hint = 'delete selected configuration'
AutoSize = True Top = 0
Caption = 'btnDelConf' AutoSize = True
OnClick = btnDelConfClick Caption = 'btnDelConf'
resourceName = 'COG_DELETE' OnClick = btnDelConfClick
scaledSeparator = False resourceName = 'COG_DELETE'
end scaledSeparator = False
object btnAddConf: TDexedToolButton[3] end
Left = 1 object btnAddConf: TDexedToolButton[3]
Hint = 'add a new configuration' Left = 1
Top = 0 Hint = 'add a new configuration'
AutoSize = True Top = 0
Caption = 'btnAddConf' AutoSize = True
OnClick = btnAddConfClick Caption = 'btnAddConf'
resourceName = 'COG_ADD' OnClick = btnAddConfClick
scaledSeparator = False resourceName = 'COG_ADD'
end scaledSeparator = False
object selConf: TComboBox[4] end
Left = 116 object selConf: TComboBox[4]
Height = 26 Left = 116
Hint = 'select a configuration' Height = 26
Top = 1 Hint = 'select a configuration'
Width = 320 Top = 1
Align = alClient Width = 320
BorderSpacing.Left = 114 Align = alClient
BorderSpacing.Around = 1 BorderSpacing.Left = 114
ItemHeight = 0 BorderSpacing.Around = 1
OnChange = selConfChange ItemHeight = 0
Style = csDropDownList OnChange = selConfChange
TabOrder = 0 Style = csDropDownList
end TabOrder = 0
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -351,6 +351,9 @@ 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.
*) *)
@ -1562,6 +1565,11 @@ 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

View File

@ -22,9 +22,12 @@ 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);
@ -171,16 +174,26 @@ procedure TDexedPage.RealSetText(const Value: TCaption);
var var
i: integer; i: integer;
ctrl: TDexedPageControl; ctrl: TDexedPageControl;
v : string;
begin begin
inherited; v := value;
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] := value; ctrl.fTabs.Tabs[i] := v;
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;

View File

@ -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'] then if readerPrev^ in ['r','x','i'] 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{') then if readDelim(reader, fTokStop, 'q{') or readDelim(reader, fTokStop, 'iq{') then
begin begin
fTokKind := tkSymbl; fTokKind := tkSymbl;
StartCodeFoldBlock(nil, fkBrackets in fFoldKinds); StartCodeFoldBlock(nil, fkBrackets in fFoldKinds);

View File

@ -595,6 +595,70 @@ 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;

View File

@ -38,7 +38,6 @@ 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}
@ -105,7 +104,7 @@ var
begin begin
inherited; inherited;
fVersion.init('v0.0.0'); fVersion.init('v0.0.0', false);
fname := getDocPath + optsname; fname := getDocPath + optsname;
if fname.fileExists then if fname.fileExists then
loadFromFile(fname); loadFromFile(fname);
@ -137,16 +136,6 @@ 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;
@ -442,8 +431,6 @@ 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;
@ -460,8 +447,6 @@ 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;

View File

@ -6,77 +6,67 @@ inherited DfmtWidget: TDfmtWidget
Caption = 'Dfmt commander' Caption = 'Dfmt commander'
ClientHeight = 365 ClientHeight = 365
ClientWidth = 458 ClientWidth = 458
inherited Back: TPanel inherited Content: TPanel
Left = 4 Height = 321
Height = 357
Top = 4
Width = 450 Width = 450
AutoSize = True ClientHeight = 321
BorderSpacing.Around = 4
ClientHeight = 357
ClientWidth = 450 ClientWidth = 450
inherited Content: TPanel object dfmtOptionEditor: TTIPropertyGrid[0]
Height = 321 Left = 4
Width = 450 Height = 299
ClientHeight = 321 Top = 4
ClientWidth = 450
object dfmtOptionEditor: TTIPropertyGrid[0]
Left = 4
Height = 299
Top = 4
Width = 442
Align = alClient
BorderSpacing.Around = 4
CheckboxForBoolean = True
DefaultValueFont.Color = clWindowText
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Indent = 10
NameFont.Color = clWindowText
OnEditorFilter = dfmtOptionEditorEditorFilter
PreferredSplitterX = 220
SplitterX = 220
ValueFont.Color = clGreen
end
object pnlFooter: TPanel[1]
Left = 4
Height = 10
Top = 307
Width = 442
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvLowered
ClientHeight = 10
ClientWidth = 442
TabOrder = 1
object btnCancel: TSpeedButton
Left = 427
Height = 4
Hint = 'restore previous format'
Top = 3
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Left = 2
BorderSpacing.Around = 2
Flat = True
end
object btnApply: TSpeedButton
Left = 435
Height = 4
Hint = 'apply formating'
Top = 3
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Left = 2
BorderSpacing.Around = 2
Flat = True
end
end
end
inherited toolbar: TDexedToolBar
Width = 442 Width = 442
Align = alClient
BorderSpacing.Around = 4
CheckboxForBoolean = True
DefaultValueFont.Color = clWindowText
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Indent = 10
NameFont.Color = clWindowText
OnEditorFilter = dfmtOptionEditorEditorFilter
PreferredSplitterX = 220
SplitterX = 220
ValueFont.Color = clGreen
end
object pnlFooter: TPanel[1]
Left = 4
Height = 10
Top = 307
Width = 442
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvLowered
ClientHeight = 10
ClientWidth = 442
TabOrder = 1
object btnCancel: TSpeedButton
Left = 427
Height = 4
Hint = 'restore previous format'
Top = 3
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Left = 2
BorderSpacing.Around = 2
Flat = True
end
object btnApply: TSpeedButton
Left = 435
Height = 4
Hint = 'apply formating'
Top = 3
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Left = 2
BorderSpacing.Around = 2
Flat = True
end
end end
end end
inherited toolbar: TDexedToolBar
Width = 442
end
end end

View File

@ -308,7 +308,10 @@ 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);

View File

@ -41,7 +41,10 @@ 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

View File

@ -55,20 +55,20 @@ type
keywordsMap = record keywordsMap = record
private private
{ {
rendered on 2021-Apr-14 18:49:17.621124 by IsItThere. rendered on 2025-Mar-10 11:20:03.8930671 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 =
('', '', '', '', '', '', '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', '', '', '', '', '', '', '', ''); ('', '', '', '', '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', '', '', '');
const fHasEntry: array [0..511] of boolean = const fHasEntry: array [0..511] of boolean =
(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); (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);
const fCoeffs: array [0..255] of Byte = const fCoeffs: array [0..255] of Byte =
(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); (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);
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}

View File

@ -12,7 +12,7 @@ type
const const
stringPostfixes: TCharSet = ['c', 'w', 'd']; stringPostfixes: TCharSet = ['c', 'w', 'd'];
stringPrefixes: TCharSet = ['r', 'x', '"']; stringPrefixes: TCharSet = ['r', 'x', 'i', '"'];
stringStopChecks: TCharSet = ['\', '"']; stringStopChecks: TCharSet = ['\', '"'];
charStopChecks: TCharSet = ['\', #39]; charStopChecks: TCharSet = ['\', #39];
symbChars: TCharSet = [';', '{', '}', '(', ')', '[', ']', ',', '.', ':', '?', '$', '"', #39]; symbChars: TCharSet = [';', '{', '}', '(', ')', '[', ']', ',', '.', ':', '?', '$', '"', #39];

View File

@ -30,6 +30,7 @@ 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;
@ -38,6 +39,7 @@ 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
@ -324,9 +326,9 @@ var
begin begin
v := new(PSemVer); v := new(PSemVer);
if value = 'vmaster' then if value = 'vmaster' then
v^.init('v0.0.0-master') v^.init('v0.0.0-master', false)
else try else try
v^.init(value); v^.init(value, true);
except except
dispose(v); dispose(v);
exit; exit;
@ -359,10 +361,12 @@ begin
begin begin
v := fVersions[i]^; v := fVersions[i]^;
if v < lo then if v < lo then
continue; continue
if v < hi then else if (v > lo) or (v = lo) then
result := fVersions[i]; result := fVersions[i]
if v > hi then else if (v < hi) and ((assigned(result) and (v > result^)) or (not assigned(result))) then
result := fVersions[i]
else if v > hi then
break; break;
end; end;
end; end;
@ -395,6 +399,23 @@ 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;
@ -404,9 +425,10 @@ 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
@ -441,33 +463,42 @@ begin
j := 0; j := 0;
s := p[i]; s := p[i];
h.init(s); h.init(s);
while true do // after 2.104 <cachePath>/<package>/<version>/<package>
// 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
h.popUntil('-'); u := TStringList.Create;
if h.empty then try
break; listFolders(u, s + DirectorySeparator);
if (h.popFront^.front in ['0'..'9']) or for g in u do
h.endsWith('master') then addPackageOrVersion(v, 'v' + g.extractFileName, true);
finally
u.free;
end;
end
// before 2.104 <cachePath>/<package>-<version>/<package>
else
begin
while true do
begin begin
j := h.position; h.popUntil('-');
break; if h.empty then
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;
@ -509,7 +540,6 @@ 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
@ -1379,6 +1409,31 @@ begin
fSrcs.Add(patchPlateformPath(ExtractRelativepath(fBasePath, abs))); fSrcs.Add(patchPlateformPath(ExtractRelativepath(fBasePath, abs)));
end; end;
end; end;
procedure tryFromCustomPath(o: TJSONObject);
var
i: integer;
a: TJSONArray;
p: string;
begin
if o.findArray('sourcePaths', a) then
for i := 0 to a.Count-1 do
begin
p := TrimRightSet(a.Strings[i], ['/','\']);
if p.dirExists and FilenameIsAbsolute(p) then
tryAddFromFolder(p)
else
tryAddFromFolder(expandFilenameEx(fBasePath, p));
end;
if o.findArray('importPaths', a) then
for i := 0 to a.Count-1 do
begin
p := TrimRightSet(a.Strings[i], ['/','\']);
if p.dirExists and FilenameIsAbsolute(p) then
fImportPaths.Add(p)
else
fImportPaths.Add(expandFilenameEx(fBasePath, p));
end;
end;
procedure trySubpPackages(a: TJSONArray); procedure trySubpPackages(a: TJSONArray);
var var
n: TJSONData; n: TJSONData;
@ -1396,6 +1451,7 @@ begin
o := a.Objects[i]; o := a.Objects[i];
if o.findAny('name', n) then if o.findAny('name', n) then
tryAddFromFolder(fBasePath + n.AsString); tryAddFromFolder(fBasePath + n.AsString);
tryFromCustomPath(o);
end; end;
end; end;
end; end;
@ -1449,15 +1505,7 @@ begin
fSrcs.Add(patchPlateformPath(pth)); fSrcs.Add(patchPlateformPath(pth));
end; end;
// custom folders in current config // custom folders in current config
if conf.findArray('sourcePaths', arr) then tryFromCustomPath(conf);
for i := 0 to arr.Count-1 do
begin
pth := TrimRightSet(arr.Strings[i], ['/','\']);
if pth.dirExists and FilenameIsAbsolute(pth) then
tryAddFromFolder(pth)
else
tryAddFromFolder(expandFilenameEx(fBasePath, pth));
end;
// subpackages // subpackages
if conf.findArray('subPackages', arr) then if conf.findArray('subPackages', arr) then
trySubpPackages(arr); trySubpPackages(arr);
@ -1630,9 +1678,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) fImportPaths.Add(s + 'source')
else if (s + 'src').dirExists then else if (s + 'src').dirExists then
fImportPaths.Add(s) fImportPaths.Add(s + 'src')
// 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);
@ -1678,18 +1726,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') q.init('v0.0.0-master', false)
else else
begin begin
try try
q.init('v' + p); q.init('v' + p, true);
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'); q.init('v0.0.0', false);
end; end;
end; end;
@ -1724,15 +1772,19 @@ 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;
// e.g vibe-d:http -> <registrypath>/vibed-<sember>/http // new naming scheme
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 += w; p += strutils.ReplaceText(w, '-', DirectorySeparator);
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
@ -1875,9 +1927,9 @@ procedure TDubProject.updateFields;
begin begin
updatePackageNameFromJson; updatePackageNameFromJson;
udpateConfigsFromJson; udpateConfigsFromJson;
updateImportPathsFromJson;
updateSourcesFromJson; updateSourcesFromJson;
updateTargetKindFromJson; updateTargetKindFromJson;
updateImportPathsFromJson;
updateOutputNameFromJson; updateOutputNameFromJson;
end; end;

View File

@ -6,135 +6,128 @@ inherited DubProjectEditorWidget: TDubProjectEditorWidget
Caption = 'DUB project editor' Caption = 'DUB project editor'
ClientHeight = 424 ClientHeight = 424
ClientWidth = 407 ClientWidth = 407
inherited Back: TPanel inherited Content: TPanel
Height = 424 Height = 388
Width = 407 Width = 407
AutoSize = True ClientHeight = 388
ClientHeight = 424
ClientWidth = 407 ClientWidth = 407
inherited Content: TPanel object propTree: TTreeView[0]
Height = 388 Left = 4
Width = 407 Height = 347
ClientHeight = 388 Top = 4
ClientWidth = 407 Width = 399
object propTree: TTreeView[0] Align = alClient
Left = 4 BorderSpacing.Around = 4
Height = 347 HideSelection = False
Top = 4 ReadOnly = True
Width = 399 ScrollBars = ssAutoBoth
Align = alClient TabOrder = 0
BorderSpacing.Around = 4 ToolTips = False
HideSelection = False OnSelectionChanged = propTreeSelectionChanged
ReadOnly = True Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoThemedDraw]
ScrollBars = ssAutoBoth TreeLinePenStyle = psClear
TabOrder = 0 end
ToolTips = False object Panel1: TPanel[1]
OnSelectionChanged = propTreeSelectionChanged Left = 2
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoThemedDraw] Height = 31
TreeLinePenStyle = psClear Top = 355
end Width = 403
object Panel1: TPanel[1] Align = alBottom
AutoSize = True
BorderSpacing.Around = 2
BevelOuter = bvNone
ClientHeight = 31
ClientWidth = 403
TabOrder = 1
object edProp: TEdit
Left = 2 Left = 2
Height = 31 Height = 27
Top = 355 Top = 2
Width = 403 Width = 395
Align = alBottom Align = alClient
AutoSize = True
BorderSpacing.Around = 2 BorderSpacing.Around = 2
BevelOuter = bvNone TabOrder = 0
ClientHeight = 31 end
ClientWidth = 403 object btnAcceptProp: TSpeedButton
TabOrder = 1 Left = 399
object edProp: TEdit Height = 31
Left = 2 Hint = 'accept property value'
Height = 27 Top = 0
Top = 2 Width = 4
Width = 395 Align = alRight
Align = alClient AutoSize = True
BorderSpacing.Around = 2 Layout = blGlyphBottom
TabOrder = 0 OnClick = btnAcceptPropClick
end ShowCaption = False
object btnAcceptProp: TSpeedButton
Left = 399
Height = 31
Hint = 'accept property value'
Top = 0
Width = 4
Align = alRight
AutoSize = True
Layout = blGlyphBottom
OnClick = btnAcceptPropClick
ShowCaption = False
end
end end
end end
inherited toolbar: TDexedToolBar end
Width = 399 inherited toolbar: TDexedToolBar
OnResize = toolbarResize Width = 399
object btnReload: TDexedToolButton[0] OnResize = toolbarResize
Left = 85 object btnReload: TDexedToolButton[0]
Hint = 'reload the project, useful to fetch new dependencies or detect new source files' Left = 85
Top = 0 Hint = 'reload the project, useful to fetch new dependencies or detect new source files'
AutoSize = True Top = 0
Caption = 'btnReload' AutoSize = True
OnClick = btnRefreshClick Caption = 'btnReload'
resourceName = 'ARROW_UPDATE' OnClick = btnRefreshClick
scaledSeparator = False resourceName = 'ARROW_UPDATE'
end scaledSeparator = False
object btnDelProp: TDexedToolButton[1] end
Left = 29 object btnDelProp: TDexedToolButton[1]
Hint = 'delete property' Left = 29
Top = 0 Hint = 'delete property'
AutoSize = True Top = 0
Caption = 'btnDelProp' AutoSize = True
OnClick = btnDelPropClick Caption = 'btnDelProp'
resourceName = 'TEXTFIELD_DELETE' OnClick = btnDelPropClick
scaledSeparator = False resourceName = 'TEXTFIELD_DELETE'
end scaledSeparator = False
object btnAddProp: TDexedToolButton[2] end
Left = 1 object btnAddProp: TDexedToolButton[2]
Hint = 'add a property' Left = 1
Top = 0 Hint = 'add a property'
AutoSize = True Top = 0
Caption = 'btnAddProp' AutoSize = True
OnClick = btnAddPropClick Caption = 'btnAddProp'
resourceName = 'TEXTFIELD_ADD' OnClick = btnAddPropClick
scaledSeparator = False resourceName = 'TEXTFIELD_ADD'
end scaledSeparator = False
object fltEdit: TTreeFilterEdit[3] end
Left = 120 object fltEdit: TTreeFilterEdit[3]
Height = 26 Left = 120
Hint = 'filter properties' Height = 26
Top = 2 Hint = 'filter properties'
Width = 277 Top = 2
ButtonWidth = 23 Width = 277
Align = alRight ButtonWidth = 23
Anchors = [akTop, akLeft, akRight, akBottom] Align = alRight
BorderSpacing.Around = 2 Anchors = [akTop, akLeft, akRight, akBottom]
NumGlyphs = 1 BorderSpacing.Around = 2
MaxLength = 0 NumGlyphs = 1
TabOrder = 0 MaxLength = 0
FilteredTreeview = propTree TabOrder = 0
end FilteredTreeview = propTree
object btnCloneObject: TDexedToolButton[4] end
Left = 57 object btnCloneObject: TDexedToolButton[4]
Hint = 'clone selected object' Left = 57
Top = 0 Hint = 'clone selected object'
AutoSize = True Top = 0
Caption = 'btnCloneObject' AutoSize = True
OnClick = btnCloneObjectClick Caption = 'btnCloneObject'
resourceName = 'COPY' OnClick = btnCloneObjectClick
scaledSeparator = False resourceName = 'COPY'
end scaledSeparator = False
object button1: TDexedToolButton[5] end
Left = 113 object button1: TDexedToolButton[5]
Height = 5 Left = 113
Top = 0 Height = 5
AutoSize = True Top = 0
Caption = 'button1' AutoSize = True
Style = tbsDivider Caption = 'button1'
scaledSeparator = False Style = tbsDivider
end scaledSeparator = False
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -8,63 +8,57 @@ inherited EditorWidget: TEditorWidget
ClientWidth = 465 ClientWidth = 465
OnShortCut = FormShortCut OnShortCut = FormShortCut
OnShow = FormShow OnShow = FormShow
inherited Back: TPanel inherited Content: TPanel
Height = 434 Height = 398
Top = 36
Width = 465 Width = 465
ClientHeight = 434 ClientHeight = 398
ClientWidth = 465 ClientWidth = 465
inherited Content: TPanel object editorStatus: TStatusBar[0]
Height = 398 Left = 0
Height = 20
Top = 376
Width = 465 Width = 465
ClientHeight = 398 BorderSpacing.Bottom = 2
ClientWidth = 465 Panels = <
object editorStatus: TStatusBar[0] item
Left = 0 Width = 110
Height = 19 end
Top = 377 item
Width = 465 Width = 80
BorderSpacing.Bottom = 2 end
Panels = < item
item Width = 120
Width = 110 end
end item
item Alignment = taCenter
Width = 80 Width = 100
end end
item item
Width = 120 Width = 2000
end end
item item
Alignment = taCenter Width = 50
Width = 100 end>
end SimplePanel = False
item SizeGrip = False
Width = 2000 UseSystemFont = False
end
item
Width = 50
end>
SimplePanel = False
SizeGrip = False
UseSystemFont = False
end
end
inherited toolbar: TDexedToolBar
Height = 30
Width = 457
end end
end end
inherited toolbar: TDexedToolBar
Width = 457
end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu
Left = 24 Left = 24
Top = 16 Top = 16
end end
object macRecorder: TSynMacroRecorder[2] object macRecorder: TSynMacroRecorder[3]
RecordShortCut = 0 RecordShortCut = 0
PlaybackShortCut = 0 PlaybackShortCut = 0
Left = 80 Left = 80
Top = 16 Top = 16
end end
object mnuEditor: TPopupMenu[3] object mnuEditor: TPopupMenu[4]
OnPopup = mnuEditorPopup OnPopup = mnuEditorPopup
Left = 152 Left = 152
Top = 16 Top = 16
@ -87,10 +81,18 @@ 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
Caption = 'Redo all'
OnClick = mnuedRedoAllClick
end
object MenuItem11: TMenuItem object MenuItem11: TMenuItem
Caption = '-' Caption = '-'
end end
@ -282,7 +284,7 @@ inherited EditorWidget: TEditorWidget
OnClick = MenuItem8Click OnClick = MenuItem8Click
end end
end end
object mnuCurFile: TPopupMenu[4] object mnuCurFile: TPopupMenu[5]
Left = 216 Left = 216
Top = 16 Top = 16
object mnuCurFileShowInMiniExpl: TMenuItem object mnuCurFileShowInMiniExpl: TMenuItem

View File

@ -62,6 +62,8 @@ type
MenuItem14: TMenuItem; MenuItem14: TMenuItem;
MenuItem15: TMenuItem; MenuItem15: TMenuItem;
MenuItem16: TMenuItem; MenuItem16: TMenuItem;
mnuedRedoAll: TMenuItem;
mnuedUndoAll: TMenuItem;
mnuCurFileCopyName: TMenuItem; mnuCurFileCopyName: TMenuItem;
mnuCurFileShowInMiniExpl: TMenuItem; mnuCurFileShowInMiniExpl: TMenuItem;
mnuCurFileShellOpen: TMenuItem; mnuCurFileShellOpen: TMenuItem;
@ -112,6 +114,7 @@ type
editorStatus: TStatusBar; editorStatus: TStatusBar;
mnuEditor: TPopupMenu; mnuEditor: TPopupMenu;
mnuCurFile: TPopupMenu; mnuCurFile: TPopupMenu;
procedure mnuedRedoAllClick(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);
@ -132,6 +135,7 @@ 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);
@ -201,6 +205,7 @@ 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;
@ -358,7 +363,9 @@ 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');
@ -386,7 +393,9 @@ 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');
@ -414,7 +423,9 @@ 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');
@ -659,6 +670,11 @@ 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 ---------------------------------------------}
@ -1041,6 +1057,12 @@ 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
@ -1090,6 +1112,12 @@ begin
end; end;
end; end;
procedure TEditorWidget.mnuedRedoAllClick(Sender: TObject);
begin
if fDoc.isAssigned then
fDoc.redoAll();
end;
procedure TEditorWidget.FormShow(Sender: TObject); procedure TEditorWidget.FormShow(Sender: TObject);
begin begin
if fDoc.isAssigned then if fDoc.isAssigned then
@ -1251,7 +1279,9 @@ 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;

View File

@ -6,466 +6,459 @@ inherited GdbWidget: TGdbWidget
Caption = 'GDB commander' Caption = 'GDB commander'
ClientHeight = 668 ClientHeight = 668
ClientWidth = 672 ClientWidth = 672
inherited Back: TPanel inherited Content: TPanel
Height = 662 Height = 626
Top = 6 Top = 42
Width = 672 Width = 672
AutoSize = True ClientHeight = 626
ClientHeight = 662
ClientWidth = 672 ClientWidth = 672
inherited Content: TPanel object Panel1: TPanel[0]
Height = 626 Left = 0
Height = 383
Top = 205
Width = 672 Width = 672
ClientHeight = 626 Align = alClient
AutoSize = True
BevelOuter = bvNone
ClientHeight = 383
ClientWidth = 672 ClientWidth = 672
object Panel1: TPanel[0] TabOrder = 0
object GroupBox3: TGroupBox
Left = 0 Left = 0
Height = 386 Height = 177
Top = 205 Top = 206
Width = 672 Width = 672
Align = alClient Align = alClient
AutoSize = True Caption = 'CPU'
BevelOuter = bvNone ClientHeight = 158
ClientHeight = 386 ClientWidth = 670
ClientWidth = 672
TabOrder = 0 TabOrder = 0
object GroupBox3: TGroupBox object cpuViewer: TTIPropertyGrid
Left = 0 Left = 0
Height = 180 Height = 158
Top = 206 Hint = 'cpu registers'
Width = 672
Align = alClient
Caption = 'CPU'
ClientHeight = 161
ClientWidth = 668
TabOrder = 0
object cpuViewer: TTIPropertyGrid
Left = 0
Height = 161
Hint = 'cpu registers'
Top = 0
Width = 668
Align = alClient
CheckboxForBoolean = True
DefaultValueFont.Color = clWindowText
Filter = [tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper, tkFile, tkClassRef, tkPointer]
Indent = 10
NameFont.Color = clWindowText
PreferredSplitterX = 200
SplitterX = 200
ValueFont.Color = clMaroon
end
end
object Splitter4: TSplitter
Cursor = crVSplit
Left = 0
Height = 6
Top = 200
Width = 672
Align = alTop
ResizeAnchor = akTop
end
object PageControl2: TPageControl
Left = 0
Height = 200
Top = 0 Top = 0
Width = 672 Width = 670
ActivePage = TabSheet3 Align = alClient
Align = alTop CheckboxForBoolean = True
TabIndex = 0 DefaultValueFont.Color = clWindowText
TabOrder = 2 Filter = [tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper, tkFile, tkClassRef, tkPointer]
OnChange = PageControl2Change Indent = 10
object TabSheet3: TTabSheet NameFont.Color = clWindowText
Caption = 'Variables' PreferredSplitterX = 200
ClientHeight = 173 SplitterX = 200
ClientWidth = 670 ValueFont.Color = clMaroon
object lstVariables: TListView
Left = 2
Height = 140
Top = 31
Width = 666
Align = alClient
BorderSpacing.Around = 2
Columns = <
item
AutoSize = True
Caption = 'name'
Width = 43
end
item
AutoSize = True
Caption = 'value'
Width = 621
end>
GridLines = True
HideSelection = False
ReadOnly = True
ScrollBars = ssAutoBoth
SortColumn = 0
SortType = stText
TabOrder = 0
ViewStyle = vsReport
OnShowHint = lstVariablesShowHint
end
object varListFlt: TListViewFilterEdit
Left = 2
Height = 27
Hint = 'locate variables'
Top = 2
Width = 666
ButtonWidth = 24
Align = alTop
BorderSpacing.Around = 2
NumGlyphs = 1
MaxLength = 0
TabOrder = 1
OnChange = varListFltChange
end
end
object TabSheet4: TTabSheet
Caption = 'Assembler'
ClientHeight = 173
ClientWidth = 670
object lstAsm: TListView
Left = 2
Height = 169
Top = 2
Width = 666
Align = alClient
AutoSort = False
AutoWidthLastColumn = True
BorderSpacing.Around = 2
Columns = <
item
AutoSize = True
Caption = 'address'
Width = 57
end
item
Caption = 'instruction'
Width = 607
end>
GridLines = True
HideSelection = False
ReadOnly = True
ScrollBars = ssAutoBoth
SortColumn = 0
TabOrder = 0
ViewStyle = vsReport
end
end
end end
end end
object Panel3: TPanel[1] object Splitter4: TSplitter
Left = 4
Height = 27
Top = 595
Width = 664
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 27
ClientWidth = 664
TabOrder = 1
object btnSendCom: TSpeedButton
Left = 659
Height = 25
Top = 1
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Around = 1
OnClick = btnSendComClick
end
object Edit1: TComboBox
Left = 0
Height = 27
Hint = 'enter a custom GDB command or the program input with ">"'
Top = 0
Width = 658
Align = alClient
AutoComplete = True
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
ItemHeight = 0
MaxLength = 128
OnKeyDown = Edit1KeyDown
OnKeyUp = Edit1KeyUp
TabOrder = 0
TabStop = False
end
end
object Splitter3: TSplitter[2]
Cursor = crVSplit Cursor = crVSplit
Left = 0 Left = 0
Height = 5 Height = 6
Top = 200 Top = 200
Width = 672 Width = 672
Align = alTop Align = alTop
ResizeAnchor = akTop ResizeAnchor = akTop
end end
object PageControl1: TPageControl[3] object PageControl2: TPageControl
Left = 0 Left = 0
Height = 200 Height = 200
Hint = 'edit the command line and the environment of the debuger target'
Top = 0 Top = 0
Width = 672 Width = 672
ActivePage = TabSheet1 ActivePage = TabSheet3
Align = alTop Align = alTop
TabIndex = 0 TabIndex = 0
TabOrder = 3 TabOrder = 2
object TabSheet1: TTabSheet OnChange = PageControl2Change
Caption = 'Call stack' object TabSheet3: TTabSheet
ClientHeight = 173 Caption = 'Variables'
ClientWidth = 670 ClientHeight = 168
object lstCallStack: TListView ClientWidth = 662
Left = 0 object lstVariables: TListView
Height = 173 Left = 2
Hint = 'call stack' Height = 132
Top = 0 Top = 34
Width = 670 Width = 658
Align = alClient Align = alClient
AutoSort = False BorderSpacing.Around = 2
Columns = < Columns = <
item item
Caption = 'function' AutoSize = True
Width = 200 Caption = 'name'
Width = 52
end end
item item
Caption = 'address' AutoSize = True
Width = 40 Caption = 'value'
end Width = 604
item
Caption = 'filename'
Width = 100
end
item
Caption = 'line'
Width = 328
end> end>
GridLines = True GridLines = True
HideSelection = False
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
SortColumn = 0
SortType = stText
TabOrder = 0 TabOrder = 0
ViewStyle = vsReport ViewStyle = vsReport
OnDblClick = lstCallStackDblClick OnShowHint = lstVariablesShowHint
end
object varListFlt: TListViewFilterEdit
Left = 2
Height = 30
Hint = 'locate variables'
Top = 2
Width = 658
ButtonWidth = 24
Align = alTop
BorderSpacing.Around = 2
NumGlyphs = 1
MaxLength = 0
TabOrder = 1
OnChange = varListFltChange
end end
end end
object TabSheet2: TTabSheet object TabSheet4: TTabSheet
Caption = 'Thread list' Caption = 'Assembler'
ClientHeight = 173 ClientHeight = 168
ClientWidth = 670 ClientWidth = 662
object lstThreads: TListView object lstAsm: TListView
Left = 0 Left = 2
Height = 173 Height = 164
Hint = 'call stack' Top = 2
Top = 0 Width = 658
Width = 670
Align = alClient Align = alClient
AutoSort = False AutoSort = False
AutoWidthLastColumn = True AutoWidthLastColumn = True
BorderSpacing.Around = 2
Columns = < Columns = <
item
AutoSize = True
Caption = 'id'
Width = 18
end
item
AutoSize = True
Caption = 'state'
Width = 39
end
item
AutoSize = True
Caption = 'core'
Width = 34
end
item
AutoSize = True
Caption = 'function'
Width = 59
end
item item
AutoSize = True AutoSize = True
Caption = 'address' Caption = 'address'
Width = 57
end
item
AutoSize = True
Caption = 'filename'
Width = 64 Width = 64
end end
item item
Caption = 'line' Caption = 'instruction'
Width = 397 Width = 592
end> end>
GridLines = True GridLines = True
HideSelection = False
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
SortColumn = 0
TabOrder = 0 TabOrder = 0
ViewStyle = vsReport ViewStyle = vsReport
OnDblClick = lstThreadsDblClick
end
end
object TabSheet5: TTabSheet
Caption = 'Debugee options'
ClientHeight = 173
ClientWidth = 670
object dbgeeOptsEd: TTIPropertyGrid
Left = 2
Height = 169
Top = 2
Width = 666
Align = alClient
BorderSpacing.Around = 2
CheckboxForBoolean = True
DefaultValueFont.Color = clWindowText
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper, tkFile, tkClassRef, tkPointer]
Indent = 10
NameFont.Color = clWindowText
OnEditorFilter = dbgeeOptsEdEditorFilter
PreferredSplitterX = 190
SplitterX = 190
ValueFont.Color = clGreen
end end
end end
end end
end end
inherited toolbar: TDexedToolBar object Panel3: TPanel[1]
Left = 4
Height = 30 Height = 30
Top = 592
Width = 664 Width = 664
object btnStack: TDexedToolButton[0] Align = alBottom
Left = 238 AutoSize = True
Hint = 'view call stack' BorderSpacing.Around = 4
Top = 0 BevelOuter = bvNone
AutoSize = True ClientHeight = 30
Caption = 'btnStack' ClientWidth = 664
OnClick = btnStackClick TabOrder = 1
resourceName = 'LIST' object btnSendCom: TSpeedButton
scaledSeparator = False Left = 659
end
object btnReg: TDexedToolButton[1]
Left = 210
Hint = 'update CPU registers values'
Top = 0
AutoSize = True
Caption = 'btnReg'
OnClick = btnRegClick
resourceName = 'PROCESSOR'
scaledSeparator = False
end
object button4: TDexedToolButton[2]
Left = 205
Height = 28 Height = 28
Top = 0 Top = 1
Width = 4
Align = alRight
AutoSize = True AutoSize = True
Caption = 'button4' BorderSpacing.Around = 1
Style = tbsDivider OnClick = btnSendComClick
scaledSeparator = False
end end
object btnPause: TDexedToolButton[3] object Edit1: TComboBox
Left = 97 Left = 0
Hint = 'pause debugging' Height = 30
Hint = 'enter a custom GDB command or the program input with ">"'
Top = 0 Top = 0
AutoSize = True Width = 658
Caption = 'btnPause' Align = alClient
OnClick = btnPauseClick AutoComplete = True
resourceName = 'PAUSE' AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
scaledSeparator = False ItemHeight = 0
MaxLength = 128
OnKeyDown = Edit1KeyDown
OnKeyUp = Edit1KeyUp
TabOrder = 0
TabStop = False
end end
object btnStop: TDexedToolButton[4] end
Left = 41 object Splitter3: TSplitter[2]
Hint = 'stop debugging' Cursor = crVSplit
Top = 0 Left = 0
AutoSize = True Height = 5
Caption = 'btnStop' Top = 200
OnClick = btnStopClick Width = 672
resourceName = 'STOP' Align = alTop
scaledSeparator = False ResizeAnchor = akTop
end
object PageControl1: TPageControl[3]
Left = 0
Height = 200
Hint = 'edit the command line and the environment of the debuger target'
Top = 0
Width = 672
ActivePage = TabSheet1
Align = alTop
TabIndex = 0
TabOrder = 3
object TabSheet1: TTabSheet
Caption = 'Call stack'
ClientHeight = 168
ClientWidth = 662
object lstCallStack: TListView
Left = 0
Height = 168
Hint = 'call stack'
Top = 0
Width = 662
Align = alClient
AutoSort = False
Columns = <
item
Caption = 'function'
Width = 200
end
item
Caption = 'address'
Width = 40
end
item
Caption = 'filename'
Width = 100
end
item
Caption = 'line'
Width = 328
end>
GridLines = True
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 0
ViewStyle = vsReport
OnDblClick = lstCallStackDblClick
end
end end
object btnContinue: TDexedToolButton[5] object TabSheet2: TTabSheet
Left = 69 Caption = 'Thread list'
Hint = 'continue debugging' ClientHeight = 168
Top = 0 ClientWidth = 662
AutoSize = True object lstThreads: TListView
Caption = 'btnContinue' Left = 0
OnClick = btnContClick Height = 168
resourceName = 'PLAY' Hint = 'call stack'
scaledSeparator = False Top = 0
Width = 662
Align = alClient
AutoSort = False
AutoWidthLastColumn = True
Columns = <
item
AutoSize = True
Caption = 'id'
Width = 26
end
item
AutoSize = True
Caption = 'state'
Width = 48
end
item
AutoSize = True
Caption = 'core'
Width = 43
end
item
AutoSize = True
Caption = 'function'
Width = 71
end
item
AutoSize = True
Caption = 'address'
Width = 64
end
item
AutoSize = True
Caption = 'filename'
Width = 73
end
item
Caption = 'line'
Width = 335
end>
GridLines = True
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 0
ViewStyle = vsReport
OnDblClick = lstThreadsDblClick
end
end end
object btnNext: TDexedToolButton[6] object TabSheet5: TTabSheet
Left = 125 Caption = 'Debugee options'
Hint = 'step to next instruction, including in calls' ClientHeight = 168
Top = 0 ClientWidth = 662
AutoSize = True object dbgeeOptsEd: TTIPropertyGrid
Caption = 'btnNext' Left = 2
DropdownMenu = mnuNext Height = 164
OnClick = btnNextClick Top = 2
Style = tbsDropDown Width = 658
resourceName = 'GO_DOWN' Align = alClient
scaledSeparator = False BorderSpacing.Around = 2
end CheckboxForBoolean = True
object btnOver: TDexedToolButton[7] DefaultValueFont.Color = clWindowText
Left = 165 Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper, tkFile, tkClassRef, tkPointer]
Hint = 'step to the next instruction, excluding calls' Indent = 10
Top = 0 NameFont.Color = clWindowText
AutoSize = True OnEditorFilter = dbgeeOptsEdEditorFilter
Caption = 'btnOver' PreferredSplitterX = 190
DropdownMenu = mnuStep SplitterX = 190
OnClick = btnOverClick ValueFont.Color = clGreen
Style = tbsDropDown end
resourceName = 'GO_JUMP'
scaledSeparator = False
end
object btnVariables: TDexedToolButton[8]
Left = 266
Hint = 'update variables list'
Top = 0
AutoSize = True
Caption = 'btnVariables'
OnClick = btnVariablesClick
resourceName = 'WATCH_WINDOW'
scaledSeparator = False
end
object btnStart: TDexedToolButton[9]
Left = 1
Hint = 'start debugging'
Top = 0
AutoSize = True
Caption = 'btnStart'
DropdownMenu = mnuProjRunnable
OnClick = btnStartClick
Style = tbsDropDown
resourceName = 'POWER'
scaledSeparator = False
end
object btnWatch: TDexedToolButton[10]
Left = 294
Hint = 'add a watchpoint for the variable selected in the list'
Top = 0
AutoSize = True
Caption = 'btnWatch'
DropdownMenu = mnuWatch
OnClick = btnWatchClick
Style = tbsDropDown
resourceName = 'CAMERA_ADD'
scaledSeparator = False
end
object btnEval: TDexedToolButton[11]
Left = 334
Hint = 'evaluate either a variable from the list or a custom expression'
Top = 0
AutoSize = True
Caption = 'btnEval'
DropdownMenu = mnuEval
OnClick = btnEvalClick
Style = tbsDropDown
resourceName = 'EVALUATE_FORMULA'
scaledSeparator = False
end end
end end
end end
object Splitter2: TSplitter[1] inherited toolbar: TDexedToolBar
Top = 10
Width = 664
object btnStack: TDexedToolButton[0]
Left = 238
Hint = 'view call stack'
Top = 0
AutoSize = True
Caption = 'btnStack'
OnClick = btnStackClick
resourceName = 'LIST'
scaledSeparator = False
end
object btnReg: TDexedToolButton[1]
Left = 210
Hint = 'update CPU registers values'
Top = 0
AutoSize = True
Caption = 'btnReg'
OnClick = btnRegClick
resourceName = 'PROCESSOR'
scaledSeparator = False
end
object button4: TDexedToolButton[2]
Left = 205
Height = 28
Top = 0
AutoSize = True
Caption = 'button4'
Style = tbsDivider
scaledSeparator = False
end
object btnPause: TDexedToolButton[3]
Left = 97
Hint = 'pause debugging'
Top = 0
AutoSize = True
Caption = 'btnPause'
OnClick = btnPauseClick
resourceName = 'PAUSE'
scaledSeparator = False
end
object btnStop: TDexedToolButton[4]
Left = 41
Hint = 'stop debugging'
Top = 0
AutoSize = True
Caption = 'btnStop'
OnClick = btnStopClick
resourceName = 'STOP'
scaledSeparator = False
end
object btnContinue: TDexedToolButton[5]
Left = 69
Hint = 'continue debugging'
Top = 0
AutoSize = True
Caption = 'btnContinue'
OnClick = btnContClick
resourceName = 'PLAY'
scaledSeparator = False
end
object btnNext: TDexedToolButton[6]
Left = 125
Hint = 'step to next instruction, including in calls'
Top = 0
AutoSize = True
Caption = 'btnNext'
DropdownMenu = mnuNext
OnClick = btnNextClick
Style = tbsDropDown
resourceName = 'GO_DOWN'
scaledSeparator = False
end
object btnOver: TDexedToolButton[7]
Left = 165
Hint = 'step to the next instruction, excluding calls'
Top = 0
AutoSize = True
Caption = 'btnOver'
DropdownMenu = mnuStep
OnClick = btnOverClick
Style = tbsDropDown
resourceName = 'GO_JUMP'
scaledSeparator = False
end
object btnVariables: TDexedToolButton[8]
Left = 266
Hint = 'update variables list'
Top = 0
AutoSize = True
Caption = 'btnVariables'
OnClick = btnVariablesClick
resourceName = 'WATCH_WINDOW'
scaledSeparator = False
end
object btnStart: TDexedToolButton[9]
Left = 1
Hint = 'start debugging'
Top = 0
AutoSize = True
Caption = 'btnStart'
DropdownMenu = mnuProjRunnable
OnClick = btnStartClick
Style = tbsDropDown
resourceName = 'POWER'
scaledSeparator = False
end
object btnWatch: TDexedToolButton[10]
Left = 294
Hint = 'add a watchpoint for the variable selected in the list'
Top = 0
AutoSize = True
Caption = 'btnWatch'
DropdownMenu = mnuWatch
OnClick = btnWatchClick
Style = tbsDropDown
resourceName = 'CAMERA_ADD'
scaledSeparator = False
end
object btnEval: TDexedToolButton[11]
Left = 334
Hint = 'evaluate either a variable from the list or a custom expression'
Top = 0
AutoSize = True
Caption = 'btnEval'
DropdownMenu = mnuEval
OnClick = btnEvalClick
Style = tbsDropDown
resourceName = 'EVALUATE_FORMULA'
scaledSeparator = False
end
end
object Splitter2: TSplitter[2]
Cursor = crVSplit Cursor = crVSplit
Left = 0 Left = 0
Height = 6 Height = 6
@ -474,11 +467,11 @@ inherited GdbWidget: TGdbWidget
Align = alTop Align = alTop
ResizeAnchor = akTop ResizeAnchor = akTop
end end
inherited contextMenu: TPopupMenu[2] inherited contextMenu: TPopupMenu[3]
Left = 56 Left = 56
Top = 64 Top = 64
end end
object mnuProjRunnable: TPopupMenu[3] object mnuProjRunnable: TPopupMenu[4]
Left = 56 Left = 56
Top = 112 Top = 112
object mnuSelProj: TMenuItem object mnuSelProj: TMenuItem
@ -497,8 +490,11 @@ 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[4] object mnuWatch: TPopupMenu[5]
Left = 56 Left = 56
Top = 160 Top = 160
object mnuReadW: TMenuItem object mnuReadW: TMenuItem
@ -518,7 +514,7 @@ inherited GdbWidget: TGdbWidget
OnClick = mnuReadWriteWClick OnClick = mnuReadWriteWClick
end end
end end
object mnuNext: TPopupMenu[5] object mnuNext: TPopupMenu[6]
Left = 152 Left = 152
Top = 112 Top = 112
object mnuNextMachine: TMenuItem object mnuNextMachine: TMenuItem
@ -526,7 +522,7 @@ inherited GdbWidget: TGdbWidget
Caption = 'machine instruction' Caption = 'machine instruction'
end end
end end
object mnuStep: TPopupMenu[6] object mnuStep: TPopupMenu[7]
Left = 152 Left = 152
Top = 160 Top = 160
object mnuStepMachine: TMenuItem object mnuStepMachine: TMenuItem
@ -534,7 +530,7 @@ inherited GdbWidget: TGdbWidget
Caption = 'machine instruction' Caption = 'machine instruction'
end end
end end
object mnuEval: TPopupMenu[7] object mnuEval: TPopupMenu[8]
Left = 216 Left = 216
Top = 168 Top = 168
object mnuEvalSelected: TMenuItem object mnuEvalSelected: TMenuItem
@ -554,7 +550,7 @@ inherited GdbWidget: TGdbWidget
OnClick = mnuEvalCustomClick OnClick = mnuEvalCustomClick
end end
end end
object mnuEvalCompletion: TPopupMenu[8] object mnuEvalCompletion: TPopupMenu[9]
Left = 288 Left = 288
Top = 168 Top = 168
end end

View File

@ -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, ListViewFilterEdit, SynEdit, ObjectInspector, math, u_mru,
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,11 +319,13 @@ 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;
@ -338,6 +340,7 @@ 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;
@ -437,6 +440,7 @@ 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;
@ -604,6 +608,10 @@ 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;
@ -717,6 +725,7 @@ 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;
@ -727,6 +736,7 @@ begin
fCommandsHistory.Free; fCommandsHistory.Free;
fCustomEvalHistory.Free; fCustomEvalHistory.Free;
fShortcuts.Free; fShortcuts.Free;
fDebugRecentMru.free;
inherited; inherited;
end; end;
@ -769,6 +779,11 @@ 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);
@ -801,6 +816,7 @@ 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;
@ -1278,6 +1294,7 @@ 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;
@ -1324,6 +1341,7 @@ begin
end; end;
end; end;
mruDebugRecentChange(nil);
updateCpuViewVisibility; updateCpuViewVisibility;
updateMenu; updateMenu;
updateButtonsState; updateButtonsState;
@ -2023,6 +2041,7 @@ 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];
@ -3064,6 +3083,72 @@ 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;
@ -3084,7 +3169,10 @@ begin
fDocHandler.openDocument(nme); fDocHandler.openDocument(nme);
doc := fDocHandler.findDocument(nme); doc := fDocHandler.findDocument(nme);
if doc.isAssigned then if doc.isAssigned then
begin
doc.CaretY:= itm.line; doc.CaretY:= itm.line;
doc.centerCursor();
end;
gdbCommand('-stack-select-frame ' + intToStr(lstCallStack.ItemIndex)); gdbCommand('-stack-select-frame ' + intToStr(lstCallStack.ItemIndex));
if fOptions.autoGetVariables then if fOptions.autoGetVariables then
infoVariables; infoVariables;

View File

@ -1,92 +1,87 @@
inherited InfoWidget: TInfoWidget inherited InfoWidget: TInfoWidget
Left = 713 Left = 713
Height = 299 Height = 302
Top = 245 Top = 245
Width = 287 Width = 255
AutoSize = True AutoSize = True
BorderIcons = [biSystemMenu, biMinimize, biMaximize] BorderIcons = [biSystemMenu, biMinimize, biMaximize]
Caption = 'About' Caption = 'About'
ClientHeight = 299 ClientHeight = 302
ClientWidth = 287 ClientWidth = 255
inherited Back: TPanel inherited Content: TPanel
Height = 299 Height = 266
Width = 287 Top = 36
AutoSize = True Width = 255
ClientHeight = 299 ClientHeight = 266
ClientWidth = 287 ClientWidth = 255
inherited Content: TPanel object GroupBox1: TGroupBox[0]
Height = 263 Left = 4
Width = 287 Height = 80
ClientHeight = 263 Top = 4
ClientWidth = 287 Width = 247
object GroupBox1: TGroupBox[0] Align = alTop
Left = 4 AutoSize = True
Height = 74 BorderSpacing.Around = 4
Top = 4 Caption = 'about'
Width = 279 ClientHeight = 61
ClientWidth = 245
TabOrder = 0
object Label1: TLabel
Left = 8
Height = 1
Top = 8
Width = 229
Align = alTop Align = alTop
AutoSize = True Alignment = taCenter
BorderSpacing.Around = 4 BorderSpacing.Around = 8
Caption = 'about' Font.Style = [fsBold]
ClientHeight = 55 Layout = tlCenter
ClientWidth = 275 ParentColor = False
TabOrder = 0 ParentFont = False
object Label1: TLabel
Left = 8
Height = 1
Top = 8
Width = 259
Align = alTop
Alignment = taCenter
BorderSpacing.Around = 8
Font.Style = [fsBold]
Layout = tlCenter
ParentFont = False
end
object Label2: TLabel
Left = 8
Height = 30
Top = 17
Width = 259
Align = alClient
Alignment = taCenter
BorderSpacing.Around = 8
Caption = 'Licensed under the terms of the BSL-1.0'#10'©Basile Burg, 2014-2022'
Font.Style = [fsItalic]
Layout = tlCenter
ParentFont = False
end
end end
object GroupBox2: TGroupBox[1] object Label2: TLabel
Left = 8
Height = 36
Top = 17
Width = 229
Align = alClient
Alignment = taCenter
BorderSpacing.Around = 8
Caption = 'Licensed under the terms of the BSL-1.0'#10'©Basile Burg, 2014-2023'
Font.Style = [fsItalic]
Layout = tlCenter
ParentColor = False
ParentFont = False
end
end
object GroupBox2: TGroupBox[1]
Left = 4
Height = 174
Top = 88
Width = 247
Align = alClient
AutoSize = True
BorderSpacing.Around = 4
Caption = 'tools status'
ClientHeight = 155
ClientWidth = 245
TabOrder = 1
object boxTools: TScrollBox
Left = 4 Left = 4
Height = 177 Height = 147
Top = 82 Top = 4
Width = 279 Width = 237
HorzScrollBar.Page = 1
VertScrollBar.Page = 1
Align = alClient Align = alClient
AutoSize = True AutoSize = True
BorderSpacing.Around = 4 BorderSpacing.Around = 4
Caption = 'tools status' BorderStyle = bsNone
ClientHeight = 158 TabOrder = 0
ClientWidth = 275
TabOrder = 1
object boxTools: TScrollBox
Left = 4
Height = 150
Top = 4
Width = 267
HorzScrollBar.Page = 1
VertScrollBar.Page = 1
Align = alClient
AutoSize = True
BorderSpacing.Around = 4
BorderStyle = bsNone
TabOrder = 0
end
end end
end end
inherited toolbar: TDexedToolBar end
Height = 30 inherited toolbar: TDexedToolBar
Width = 279 Width = 247
end
end end
end end

View File

@ -122,7 +122,7 @@ begin
// set things up and do the work // set things up and do the work
noFill := CurValue = 'clNone'; noFill := CurValue = 'clNone';
if noFill then if noFill then
Brush.Color := clWindow Brush.Color := clBackground
else else
Brush.Color := StringToColorDef(CurValue,clNone); Brush.Color := StringToColorDef(CurValue,clNone);
Pen.Color := ColorToBorderColor(ColorToRGB(Brush.Color)); Pen.Color := ColorToBorderColor(ColorToRGB(Brush.Color));
@ -167,7 +167,7 @@ begin
ACanvas.Font.Color := clHighlightText; ACanvas.Font.Color := clHighlightText;
end end
else begin else begin
ACanvas.Brush.Color := clwhite{clWindow}; ACanvas.Brush.Color := clWindow;
ACanvas.Font.Color := clWindowText; ACanvas.Font.Color := clWindowText;
end; end;
ACanvas.FillRect(rc); ACanvas.FillRect(rc);

View File

@ -320,6 +320,8 @@ 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;

View File

@ -6,197 +6,190 @@ inherited LibManEditorWidget: TLibManEditorWidget
Caption = 'Library manager' Caption = 'Library manager'
ClientHeight = 297 ClientHeight = 297
ClientWidth = 641 ClientWidth = 641
inherited Back: TPanel inherited Content: TPanel
Height = 297 Height = 261
Width = 641 Width = 641
AutoSize = True ClientHeight = 261
ClientHeight = 297
ClientWidth = 641 ClientWidth = 641
inherited Content: TPanel object List: TListView[0]
Height = 261 Left = 4
Width = 641 Height = 253
ClientHeight = 261 Top = 4
ClientWidth = 641
object List: TListView[0]
Left = 4
Height = 253
Top = 4
Width = 633
Align = alClient
BorderSpacing.Around = 4
Columns = <
item
Caption = 'Alias'
Width = 100
end
item
Caption = 'Library file or folder of sources'
Width = 230
end
item
Caption = 'Sources root'
Width = 230
end
item
Caption = 'project'
Width = 230
end
item
Caption = 'enabled'
Width = 30
end>
GridLines = True
HideSelection = False
ReadOnly = True
RowSelect = True
SortType = stText
TabOrder = 0
ViewStyle = vsReport
OnEdited = ListEdited
OnSelectItem = ListSelectItem
end
end
inherited toolbar: TDexedToolBar
Width = 633 Width = 633
object btnSelProj: TDexedToolButton[0] Align = alClient
Left = 342 BorderSpacing.Around = 4
Hint = 'set the project that compiles the selected entry' Columns = <
Top = 0 item
AutoSize = True Caption = 'Alias'
Caption = 'button3' Width = 100
OnClick = btnSelProjClick end
resourceName = 'SCRIPT_BRICKS' item
scaledSeparator = False Caption = 'Library file or folder of sources'
end Width = 230
object btnSelRoot: TDexedToolButton[1] end
Left = 314 item
Hint = 'set the root of the library sources' Caption = 'Sources root'
Top = 0 Width = 230
AutoSize = True end
Caption = 'button4' item
OnClick = btnSelRootClick Caption = 'project'
resourceName = 'FOLDER_ADD' Width = 230
scaledSeparator = False end
end item
object btnSelfoldOfFiles: TDexedToolButton[2] Caption = 'enabled'
Left = 286 Width = 30
Hint = 'select a folder containing several d sources (optional trick)' end>
Top = 0 GridLines = True
AutoSize = True HideSelection = False
Caption = 'button5' ReadOnly = True
OnClick = btnSelfoldOfFilesClick RowSelect = True
resourceName = 'BRICKS' SortType = stText
scaledSeparator = False TabOrder = 0
end ViewStyle = vsReport
object btnSelFile: TDexedToolButton[3] OnEdited = ListEdited
Left = 258 OnSelectItem = ListSelectItem
Hint = 'selected the static library file' end
Top = 0 end
AutoSize = True inherited toolbar: TDexedToolBar
Caption = 'button6' Width = 633
OnClick = btnSelFileClick object btnSelProj: TDexedToolButton[0]
resourceName = 'FOLDER_BRICK' Left = 342
scaledSeparator = False Hint = 'set the project that compiles the selected entry'
end Top = 0
object btnEditAlias: TDexedToolButton[4] AutoSize = True
Left = 230 Caption = 'button3'
Hint = 'set the entry alias' OnClick = btnSelProjClick
Top = 0 resourceName = 'SCRIPT_BRICKS'
AutoSize = True scaledSeparator = False
Caption = 'button7' end
OnClick = btnEditAliasClick object btnSelRoot: TDexedToolButton[1]
resourceName = 'BOOK_EDIT' Left = 314
scaledSeparator = False Hint = 'set the root of the library sources'
end Top = 0
object button5: TDexedToolButton[5] AutoSize = True
Left = 225 Caption = 'button4'
Height = 5 OnClick = btnSelRootClick
Top = 0 resourceName = 'FOLDER_ADD'
AutoSize = True scaledSeparator = False
Caption = 'button8' end
Style = tbsDivider object btnSelfoldOfFiles: TDexedToolButton[2]
scaledSeparator = False Left = 286
end Hint = 'select a folder containing several d sources (optional trick)'
object btnEnabled: TDexedToolButton[6] Top = 0
Left = 197 AutoSize = True
Hint = 'activate or deactivate the selected entry' Caption = 'button5'
Top = 0 OnClick = btnSelfoldOfFilesClick
AutoSize = True resourceName = 'BRICKS'
Caption = 'btnEnabled' scaledSeparator = False
OnClick = btnEnabledClick end
resourceName = 'BOOK' object btnSelFile: TDexedToolButton[3]
scaledSeparator = False Left = 258
end Hint = 'selected the static library file'
object btnDubFetch: TDexedToolButton[7] Top = 0
Left = 169 AutoSize = True
Hint = 'setup a new entry using an online DUB package' Caption = 'button6'
Top = 0 OnClick = btnSelFileClick
AutoSize = True resourceName = 'FOLDER_BRICK'
Caption = 'btnDubFetch' scaledSeparator = False
OnClick = btnDubFetchClick end
resourceName = 'DUB' object btnEditAlias: TDexedToolButton[4]
scaledSeparator = False Left = 230
end Hint = 'set the entry alias'
object btnOpenProj: TDexedToolButton[8] Top = 0
Left = 141 AutoSize = True
Hint = 'open the project that matches to the selected entry' Caption = 'button7'
Top = 0 OnClick = btnEditAliasClick
AutoSize = True resourceName = 'BOOK_EDIT'
Caption = 'btnOpenProj' scaledSeparator = False
OnClick = btnOpenProjClick end
resourceName = 'BOOK_OPEN' object button5: TDexedToolButton[5]
scaledSeparator = False Left = 225
end Height = 5
object btnReg: TDexedToolButton[9] Top = 0
Left = 113 AutoSize = True
Hint = 'register a new entry using the active project' Caption = 'button8'
Top = 0 Style = tbsDivider
AutoSize = True scaledSeparator = False
Caption = 'btnReg' end
OnClick = btnRegClick object btnEnabled: TDexedToolButton[6]
resourceName = 'BOOK_LINK' Left = 197
scaledSeparator = False Hint = 'activate or deactivate the selected entry'
end Top = 0
object btnMoveUp: TDexedToolButton[10] AutoSize = True
Left = 85 Caption = 'btnEnabled'
Hint = 'move entry up' OnClick = btnEnabledClick
Top = 0 resourceName = 'BOOK'
AutoSize = True scaledSeparator = False
Caption = 'btnMoveUp' end
OnClick = btnMoveUpClick object btnDubFetch: TDexedToolButton[7]
resourceName = 'ARROW_UP' Left = 169
scaledSeparator = False Hint = 'setup a new entry using an online DUB package'
end Top = 0
object btnMoveDown: TDexedToolButton[11] AutoSize = True
Left = 57 Caption = 'btnDubFetch'
Hint = 'move entry down' OnClick = btnDubFetchClick
Top = 0 resourceName = 'DUB'
AutoSize = True scaledSeparator = False
Caption = 'btnMoveDown' end
OnClick = btnMoveDownClick object btnOpenProj: TDexedToolButton[8]
resourceName = 'ARROW_DOWN' Left = 141
scaledSeparator = False Hint = 'open the project that matches to the selected entry'
end Top = 0
object btnRemLib: TDexedToolButton[12] AutoSize = True
Left = 29 Caption = 'btnOpenProj'
Hint = 'remove selected entry' OnClick = btnOpenProjClick
Top = 0 resourceName = 'BOOK_OPEN'
AutoSize = True scaledSeparator = False
Caption = 'btnRemLib' end
OnClick = btnRemLibClick object btnReg: TDexedToolButton[9]
resourceName = 'BOOK_DELETE' Left = 113
scaledSeparator = False Hint = 'register a new entry using the active project'
end Top = 0
object btnAddLib: TDexedToolButton[13] AutoSize = True
Left = 1 Caption = 'btnReg'
Hint = 'add a new empty entry' OnClick = btnRegClick
Top = 0 resourceName = 'BOOK_LINK'
AutoSize = True scaledSeparator = False
Caption = 'btnAddLib' end
OnClick = btnAddLibClick object btnMoveUp: TDexedToolButton[10]
resourceName = 'BOOK_ADD' Left = 85
scaledSeparator = False Hint = 'move entry up'
end Top = 0
AutoSize = True
Caption = 'btnMoveUp'
OnClick = btnMoveUpClick
resourceName = 'ARROW_UP'
scaledSeparator = False
end
object btnMoveDown: TDexedToolButton[11]
Left = 57
Hint = 'move entry down'
Top = 0
AutoSize = True
Caption = 'btnMoveDown'
OnClick = btnMoveDownClick
resourceName = 'ARROW_DOWN'
scaledSeparator = False
end
object btnRemLib: TDexedToolButton[12]
Left = 29
Hint = 'remove selected entry'
Top = 0
AutoSize = True
Caption = 'btnRemLib'
OnClick = btnRemLibClick
resourceName = 'BOOK_DELETE'
scaledSeparator = False
end
object btnAddLib: TDexedToolButton[13]
Left = 1
Hint = 'add a new empty entry'
Top = 0
AutoSize = True
Caption = 'btnAddLib'
OnClick = btnAddLibClick
resourceName = 'BOOK_ADD'
scaledSeparator = False
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -12,7 +12,6 @@ object MainForm: TMainForm
OnDropFiles = FormDropFiles OnDropFiles = FormDropFiles
OnResize = FormResize OnResize = FormResize
ShowHint = True ShowHint = True
LCLVersion = '2.2.0.4'
object mainMenu: TMainMenu object mainMenu: TMainMenu
Top = 1 Top = 1
object MenuItem1: TMenuItem object MenuItem1: TMenuItem
@ -135,9 +134,15 @@ 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
object MenuItem119: TMenuItem
Action = actEdRedoAll
end
object MenuItem21: TMenuItem object MenuItem21: TMenuItem
Caption = '-' Caption = '-'
end end
@ -418,7 +423,7 @@ object MainForm: TMainForm
end end
end end
object Actions: TActionList object Actions: TActionList
Left = 31 Left = 32
object actEdCopy: TAction object actEdCopy: TAction
Category = 'Edit' Category = 'Edit'
Caption = 'Copy' Caption = 'Copy'
@ -448,27 +453,6 @@ 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 actEdMacStartStop: TAction
Category = 'Edit'
Caption = 'Start/stop macro recording'
OnExecute = actEdMacStartStopExecute
OnUpdate = updateDocEditBasedAction
ShortCut = 24658
end
object actEdMacPlay: TAction
Category = 'Edit'
Caption = 'Play macro'
OnExecute = actEdMacPlayExecute
OnUpdate = updateDocEditBasedAction
ShortCut = 24656
end
object actFileSave: TAction object actFileSave: TAction
Category = 'File' Category = 'File'
Caption = 'Save file' Caption = 'Save file'
@ -530,20 +514,6 @@ object MainForm: TMainForm
OnExecute = actProjSourceExecute OnExecute = actProjSourceExecute
OnUpdate = updateProjectBasedAction OnUpdate = updateProjectBasedAction
end end
object actEdIndent: TAction
Category = 'Edit'
Caption = 'Indent'
OnExecute = actEdIndentExecute
OnUpdate = updateDocEditBasedAction
ShortCut = 24649
end
object actEdUnIndent: TAction
Category = 'Edit'
Caption = 'Unindent'
OnExecute = actEdUnIndentExecute
OnUpdate = updateDocEditBasedAction
ShortCut = 24661
end
object actProjOptView: TAction object actProjOptView: TAction
Category = 'Project' Category = 'Project'
Caption = 'View project command line' Caption = 'View project command line'
@ -583,20 +553,6 @@ object MainForm: TMainForm
OnExecute = actProjRunWithArgsExecute OnExecute = actProjRunWithArgsExecute
OnUpdate = updateProjectBasedAction OnUpdate = updateProjectBasedAction
end end
object actEdFind: TAction
Category = 'Edit'
Caption = 'Find...'
OnExecute = actEdFindExecute
OnUpdate = updateDocumentBasedAction
ShortCut = 16454
end
object actEdFindNext: TAction
Category = 'Edit'
Caption = 'Find next'
OnExecute = actEdFindNextExecute
OnUpdate = updateDocumentBasedAction
ShortCut = 114
end
object actProjOpenContFold: TAction object actProjOpenContFold: TAction
Category = 'Project' Category = 'Project'
Caption = 'View in mini explorer' Caption = 'View in mini explorer'
@ -819,12 +775,6 @@ object MainForm: TMainForm
OnExecute = actFileCloseAllExecute OnExecute = actFileCloseAllExecute
OnUpdate = updateDocumentBasedAction OnUpdate = updateDocumentBasedAction
end end
object actEdFormat: TAction
Category = 'Edit'
Caption = 'Apply code formatting'
OnExecute = actEdFormatExecute
OnUpdate = updateDocumentBasedAction
end
object actProjTest: TAction object actProjTest: TAction
Category = 'Project' Category = 'Project'
Caption = 'Test project' Caption = 'Test project'
@ -862,6 +812,74 @@ 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
Category = 'Edit'
Caption = 'Redo all'
OnExecute = actEdRedoAllExecute
OnUpdate = updateDocEditBasedAction
ShortCut = 49242
end
object actEdMacStartStop: TAction
Category = 'Edit'
Caption = 'Start/stop macro recording'
OnExecute = actEdMacStartStopExecute
OnUpdate = updateDocEditBasedAction
ShortCut = 24658
end
object actEdMacPlay: TAction
Category = 'Edit'
Caption = 'Play macro'
OnExecute = actEdMacPlayExecute
OnUpdate = updateDocEditBasedAction
ShortCut = 24656
end
object actEdIndent: TAction
Category = 'Edit'
Caption = 'Indent'
OnExecute = actEdIndentExecute
OnUpdate = updateDocEditBasedAction
ShortCut = 24649
end
object actEdUnIndent: TAction
Category = 'Edit'
Caption = 'Unindent'
OnExecute = actEdUnIndentExecute
OnUpdate = updateDocEditBasedAction
ShortCut = 24661
end
object actEdFind: TAction
Category = 'Edit'
Caption = 'Find...'
OnExecute = actEdFindExecute
OnUpdate = updateDocumentBasedAction
ShortCut = 16454
end
object actEdFindNext: TAction
Category = 'Edit'
Caption = 'Find next'
OnExecute = actEdFindNextExecute
OnUpdate = updateDocumentBasedAction
ShortCut = 114
end
object actEdFormat: TAction
Category = 'Edit'
Caption = 'Apply code formatting'
OnExecute = actEdFormatExecute
OnUpdate = updateDocumentBasedAction
end
end end
object ApplicationProperties1: TApplicationProperties object ApplicationProperties1: TApplicationProperties
OnActivate = ApplicationProperties1Activate OnActivate = ApplicationProperties1Activate

View File

@ -16,7 +16,8 @@ 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
@ -117,6 +118,8 @@ type
actFileCloseAll: TAction; actFileCloseAll: TAction;
actFileNewClip: TAction; actFileNewClip: TAction;
actEdFormat: TAction; actEdFormat: TAction;
actEdRedoAll: TAction;
actEdUndoAll: TAction;
actProjCheckSema: TAction; actProjCheckSema: TAction;
actProjSetEnv: TAction; actProjSetEnv: TAction;
actProjGitPull: TAction; actProjGitPull: TAction;
@ -186,6 +189,8 @@ type
MenuItem116: TMenuItem; MenuItem116: TMenuItem;
MenuItem117: TMenuItem; MenuItem117: TMenuItem;
MenuItem118: TMenuItem; MenuItem118: TMenuItem;
MenuItem119: TMenuItem;
MenuItem120: TMenuItem;
mnuGitBranch: TMenuItem; mnuGitBranch: TMenuItem;
mnuItemDubDialog: TMenuItem; mnuItemDubDialog: TMenuItem;
mnuItemHelp: TMenuItem; mnuItemHelp: TMenuItem;
@ -297,6 +302,7 @@ 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);
@ -330,6 +336,7 @@ type
procedure actProjSetEnvExecute(Sender: TObject); procedure actProjSetEnvExecute(Sender: TObject);
procedure actProjStopCompExecute(Sender: TObject); procedure actProjStopCompExecute(Sender: TObject);
procedure actProjTestExecute(Sender: TObject); procedure actProjTestExecute(Sender: TObject);
procedure actEdRedoAllExecute(Sender: TObject);
procedure actSetRunnableSwExecute(Sender: TObject); procedure actSetRunnableSwExecute(Sender: TObject);
procedure ApplicationProperties1Activate(Sender: TObject); procedure ApplicationProperties1Activate(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
@ -431,8 +438,9 @@ type
fDubProjWidg: TDubProjectEditorWidget; fDubProjWidg: TDubProjectEditorWidget;
fPrjGrpWidg: TProjectGroupWidget; fPrjGrpWidg: TProjectGroupWidget;
fGdbWidg: TGdbWidget; fGdbWidg: TGdbWidget;
fBlameWidg: TBlameWidget;
{$IFDEF UNIX} {$IFDEF UNIX}
fTermWWidg: TTermWidget; fTermWidg: TTermWidget;
{$ENDIF} {$ENDIF}
fDfmtWidg: TDfmtWidget; fDfmtWidg: TDfmtWidget;
@ -454,6 +462,8 @@ type
procedure updateFloatingWidgetOnTop(onTop: boolean); procedure updateFloatingWidgetOnTop(onTop: boolean);
procedure widgetDockingChanged(sender: TDexedWidget; newState: TWidgetDockingState); procedure widgetDockingChanged(sender: TDexedWidget; newState: TWidgetDockingState);
procedure mnuOptsItemClick(sender: TObject); procedure mnuOptsItemClick(sender: TObject);
procedure anchorDockingAddControlEvent(Sender: TObject; aName: string;
var AControl: TControl; DoDisableAutoSizing: boolean);
// IMainMenu // IMainMenu
function singleServiceName: string; function singleServiceName: string;
@ -1079,7 +1089,7 @@ begin
// group, group item has the focus // group, group item has the focus
grp := getProjectGroup(); grp := getProjectGroup();
fProjectGroup := grp.groupFilename(); fProjectGroup := grp.groupFilename();
if fProjectGroup.isNotEmpty() and MainForm.fProj.inGroup() then if fProjectGroup.isNotEmpty() and assigned(MainForm.fProj) and MainForm.fProj.inGroup() then
begin begin
fProjectIndex := grp.getProjectIndex(); fProjectIndex := grp.getProjectIndex();
fProjectConfigIndex := MainForm.fProj.getActiveConfigurationIndex(); fProjectConfigIndex := MainForm.fProj.getActiveConfigurationIndex();
@ -1353,6 +1363,10 @@ begin
fProcInputHandler := getprocInputHandler; fProcInputHandler := getprocInputHandler;
InitDocking;
if FileExists(getDocPath + 'docking.xml') then
LoadDocking();
fInitialized := true; fInitialized := true;
end; end;
@ -1556,8 +1570,10 @@ 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;
i := loadIcon('FIND'); i := loadIcon('FIND');
actEdFind.ImageIndex:= i; actEdFind.ImageIndex:= i;
actEdFindNext.ImageIndex:= i; actEdFindNext.ImageIndex:= i;
@ -1606,6 +1622,19 @@ begin
fCleanIconIndex := loadIcon('CLEAN'); fCleanIconIndex := loadIcon('CLEAN');
end; end;
procedure TMainForm.anchorDockingAddControlEvent(Sender: TObject; aName: string;
var AControl: TControl; DoDisableAutoSizing: boolean);
var w : TDexedWidget;
begin
AControl := nil;
for w in fWidgList do
if w.name = aName then
begin
AControl := w;
break;
end;
end;
procedure TMainForm.InitWidgets; procedure TMainForm.InitWidgets;
var var
widg: TDexedWidget; widg: TDexedWidget;
@ -1613,6 +1642,9 @@ var
itm: TMenuItem; itm: TMenuItem;
idx: integer; idx: integer;
begin begin
DockMaster.OnCreateControl := @anchorDockingAddControlEvent;
fWidgList := TWidgetList.Create; fWidgList := TWidgetList.Create;
fMesgWidg := TMessagesWidget.create(self); fMesgWidg := TMessagesWidget.create(self);
fEditWidg := TEditorWidget.create(self); fEditWidg := TEditorWidget.create(self);
@ -1632,8 +1664,9 @@ 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}
fTermWWidg := TTermWidget.create(self); fTermWidg := TTermWidget.create(self);
{$ENDIF} {$ENDIF}
getMessageDisplay(fMsgs); getMessageDisplay(fMsgs);
@ -1657,8 +1690,9 @@ 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(@fTermWWidg); fWidgList.addWidget(@fTermWidg);
{$ENDIF} {$ENDIF}
fWidgList.sort(@CompareWidgCaption); fWidgList.sort(@CompareWidgCaption);
@ -1780,14 +1814,21 @@ begin
begin begin
w := fWidgList.widget[i]; w := fWidgList.widget[i];
if not w.isDockable then if not w.isDockable then
begin
if not w.isModal then
w.showWidget;
continue; continue;
if not w.Visible then end;
continue; w.showWidget;
w.Show;
if w = fEditWidg then if w = fEditWidg then
continue; continue;
h := DockMaster.GetAnchorSite(w); h := DockMaster.GetAnchorSite(w);
if h.isAssigned then if h.isAssigned then
h.ManualFloat(w.ClientRect, false); h.ManualFloat(w.ClientRect, false);
// this should be made automatically but fixes
// https://gitlab.com/basile.b/dexed/-/issues/50
h.pages.Free;
end; end;
end; end;
@ -1811,7 +1852,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(fTermWWidg), DockMaster.GetSite(fMesgWidg), alClient, fMesgWidg); DockMaster.ManualDock(DockMaster.GetAnchorSite(fTermWidg), DockMaster.GetSite(fMesgWidg), alClient, fMesgWidg);
{$ENDIF} {$ENDIF}
fMesgWidg.showWidget; fMesgWidg.showWidget;
// left // left
@ -2099,8 +2140,6 @@ var
begin begin
inherited; inherited;
InitDocking;
// TODO-cbetterfix: clipboard doesn't work first time it's used on a reloaded doc. // TODO-cbetterfix: clipboard doesn't work first time it's used on a reloaded doc.
// see: http://forum.lazarus.freepascal.org/index.php/topic,30616.0.htm // see: http://forum.lazarus.freepascal.org/index.php/topic,30616.0.htm
if fAppliOpts.reloadLastDocuments then if fAppliOpts.reloadLastDocuments then
@ -2118,11 +2157,6 @@ begin
fInfoWidg.showWidget; fInfoWidg.showWidget;
end; end;
// see https://bugs.freepascal.org/view.php?id=29475
// reloading must be done here otherwise there are "jumps"
if FileExists(getDocPath + 'docking.xml') then
LoadDocking();
if fAppliOpts.autoCheckUpdates then if fAppliOpts.autoCheckUpdates then
begin begin
url := checkForUpdate; url := checkForUpdate;
@ -2884,6 +2918,18 @@ begin
fDoc.Redo; fDoc.Redo;
end; end;
procedure TMainForm.actEdRedoAllExecute(Sender: TObject);
begin
if fDoc.isAssigned then
fDoc.redoAll();
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
@ -2923,7 +2969,7 @@ begin
if fDoc.SelAvail then if fDoc.SelAvail then
str := fDoc.SelText str := fDoc.SelText
else else
str := fDoc.Identifier; str := fDoc.HighlightedIdent;
ffindwidg.cbToFind.Text := str; ffindwidg.cbToFind.Text := str;
ffindwidg.cbToFindChange(nil); ffindwidg.cbToFindChange(nil);
ffindwidg.cbToFind.SetFocus; ffindwidg.cbToFind.SetFocus;
@ -4077,6 +4123,8 @@ begin
fProj.test; fProj.test;
end; end;
procedure TMainForm.actProjStopCompExecute(Sender: TObject); procedure TMainForm.actProjStopCompExecute(Sender: TObject);
begin begin
if fProj.isAssigned then if fProj.isAssigned then

View File

@ -16,14 +16,17 @@ TMakeProjectOptionsBase = class(TWritableLfmTextComponent)
strict private strict private
fNumThreads: integer; fNumThreads: integer;
fSourceDirectories: TStringList; fSourceDirectories: TStringList;
fExcludedSourceExtensions: TStringList;
fQuiet: boolean; fQuiet: boolean;
fKeepGoing: boolean; fKeepGoing: boolean;
procedure setSourceDirectories(value: TStringList); procedure setSourceDirectories(value: TStringList);
procedure setExcludedSourceExtensions(value: TStringList);
published published
property keepGoing: boolean read fKeepGoing write fKeepGoing default false; property keepGoing: boolean read fKeepGoing write fKeepGoing default false;
property quiet: boolean read fQuiet write fQuiet default false; property quiet: boolean read fQuiet write fQuiet default false;
property numThreads: integer read fNumThreads write fNumThreads default 1; property numThreads: integer read fNumThreads write fNumThreads default 1;
property sourceDirectories: TStringList read fSourceDirectories write setSourceDirectories; property sourceDirectories: TStringList read fSourceDirectories write setSourceDirectories;
property excludedSourceExtensions: TStringList read fExcludedSourceExtensions write setExcludedSourceExtensions;
public public
constructor create(aOwner: TComponent); override; constructor create(aOwner: TComponent); override;
destructor destroy(); override; destructor destroy(); override;
@ -152,11 +155,14 @@ begin
fNumThreads := 1; fNumThreads := 1;
fSourceDirectories := TStringList.Create; fSourceDirectories := TStringList.Create;
fSourceDirectories.AddStrings(['src', 'import', 'include']); fSourceDirectories.AddStrings(['src', 'import', 'include']);
fExcludedSourceExtensions := TStringList.Create;
fExcludedSourceExtensions.AddStrings(['.txt', '.md', '.gcov']);
end; end;
destructor TMakeProjectOptionsBase.destroy(); destructor TMakeProjectOptionsBase.destroy();
begin begin
fSourceDirectories.Free; fSourceDirectories.Free;
fExcludedSourceExtensions.Free;
inherited; inherited;
end; end;
@ -165,6 +171,11 @@ begin
fSourceDirectories.Assign(value); fSourceDirectories.Assign(value);
end; end;
procedure TMakeProjectOptionsBase.setExcludedSourceExtensions(value: TStringList);
begin
fExcludedSourceExtensions.Assign(value);
end;
procedure TMakeProjectOptionsBase.assign(other: TPersistent); procedure TMakeProjectOptionsBase.assign(other: TPersistent);
var var
src: TMakeProjectOptionsBase; src: TMakeProjectOptionsBase;
@ -173,6 +184,7 @@ begin
begin begin
src := TMakeProjectOptionsBase(other); src := TMakeProjectOptionsBase(other);
fSourceDirectories.Assign(src.sourceDirectories); fSourceDirectories.Assign(src.sourceDirectories);
fExcludedSourceExtensions.Assign(src.excludedSourceExtensions);
fQuiet:= src.fQuiet; fQuiet:= src.fQuiet;
fKeepGoing:= src.fKeepGoing; fKeepGoing:= src.fKeepGoing;
fNumThreads:= src.fNumThreads; fNumThreads:= src.fNumThreads;
@ -291,8 +303,11 @@ var
hidden: string = DirectorySeparator + '.'; hidden: string = DirectorySeparator + '.';
f: string; f: string;
p: string; p: string;
e: string;
s: string;
colPos: integer; colPos: integer;
i: integer; i: integer;
badExt: boolean;
begin begin
fRules.Clear; fRules.Clear;
fRules.add('default'); fRules.add('default');
@ -330,8 +345,21 @@ begin
begin begin
listFiles(srcs, fBasePath + p, true); listFiles(srcs, fBasePath + p, true);
for f in srcs do for f in srcs do
begin
if pos(hidden, f) = 0 then if pos(hidden, f) = 0 then
fSrcs.Add(f[fBasePath.length + 1 .. f.length]); begin
badExt := false;
s := f.extractFileExt();
for e in makeProjectOptions.excludedSourceExtensions do
if SameText(e, s) then
begin
badExt := true;
break;
end;
if not badExt then
fSrcs.Add(f[fBasePath.length + 1 .. f.length]);
end;
end;
srcs.Clear; srcs.Clear;
end; end;
finally finally
@ -501,7 +529,7 @@ var
begin begin
if fMakeProc.isAssigned and fMakeProc.Active then if fMakeProc.isAssigned and fMakeProc.Active then
begin begin
fMsgs.message('the project is already being processed by DUB', fAsProjectItf, amcProj, amkWarn); fMsgs.message('the project is already being compiled by make', fAsProjectItf, amcProj, amkWarn);
exit; exit;
end; end;
killProcess(fMakeProc); killProcess(fMakeProc);

View File

@ -6,181 +6,174 @@ inherited MessagesWidget: TMessagesWidget
Caption = 'Messages' Caption = 'Messages'
ClientHeight = 159 ClientHeight = 159
ClientWidth = 844 ClientWidth = 844
inherited Back: TPanel inherited Content: TPanel
Height = 159 Height = 123
Width = 844 Width = 844
AutoSize = True ClientHeight = 123
ClientHeight = 159
ClientWidth = 844 ClientWidth = 844
inherited Content: TPanel PopupMenu = nil
Height = 123 object List: TTreeView[0]
Width = 844 Left = 2
ClientHeight = 123 Height = 119
ClientWidth = 844 Top = 2
PopupMenu = nil Width = 840
object List: TTreeView[0] Align = alClient
Left = 2 BorderSpacing.Around = 2
Height = 119 Font.Style = [fsBold]
Top = 2 HideSelection = False
Width = 840 MultiSelect = True
Align = alClient ParentFont = False
BorderSpacing.Around = 2 ParentShowHint = False
Font.Style = [fsBold] ReadOnly = True
HideSelection = False ShowHint = True
MultiSelect = True ShowLines = False
ParentFont = False ShowRoot = False
ParentShowHint = False TabOrder = 0
ReadOnly = True ToolTips = False
ShowHint = True OnCustomDrawItem = ListCustomDrawItem
ShowLines = False OnKeyDown = ListKeyDown
ShowRoot = False Options = [tvoAllowMultiselect, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoThemedDraw]
TabOrder = 0
ToolTips = False
OnCustomDrawItem = ListCustomDrawItem
OnKeyDown = ListKeyDown
Options = [tvoAllowMultiselect, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoThemedDraw]
end
end end
inherited toolbar: TDexedToolBar end
Width = 836 inherited toolbar: TDexedToolBar
ShowCaptions = True Width = 836
Wrapable = False ShowCaptions = True
OnResize = toolbarResize Wrapable = False
object sep: TDexedToolButton[0] OnResize = toolbarResize
Left = 405 object sep: TDexedToolButton[0]
Height = 28 Left = 405
Hint = 'Clean filtered messages' Height = 28
Top = 0 Hint = 'Clean filtered messages'
AutoSize = True Top = 0
Style = tbsDivider AutoSize = True
scaledSeparator = False Style = tbsDivider
end scaledSeparator = False
object btnSelMisc: TDexedToolButton[1] end
Left = 367 object btnSelMisc: TDexedToolButton[1]
Hint = 'filter the other messages' Left = 367
Top = 0 Hint = 'filter the other messages'
AutoSize = True Top = 0
Caption = 'Misc' AutoSize = True
scaledSeparator = False Caption = 'Misc'
end scaledSeparator = False
object button2: TDexedToolButton[2] end
Left = 257 object button2: TDexedToolButton[2]
Height = 28 Left = 257
Top = 0 Height = 28
AutoSize = True Top = 0
Caption = 'button2' AutoSize = True
Style = tbsDivider Caption = 'button2'
scaledSeparator = False Style = tbsDivider
end scaledSeparator = False
object btnSelApp: TDexedToolButton[3] end
Left = 176 object btnSelApp: TDexedToolButton[3]
Hint = 'filter the messages related to Coedit' Left = 176
Top = 0 Hint = 'filter the messages related to Coedit'
AutoSize = True Top = 0
Caption = 'Application' AutoSize = True
scaledSeparator = False Caption = 'Application'
end scaledSeparator = False
object button4: TDexedToolButton[4] end
Left = 171 object button4: TDexedToolButton[4]
Height = 28 Left = 171
Top = 0 Height = 28
AutoSize = True Top = 0
Caption = 'button4' AutoSize = True
Style = tbsDivider Caption = 'button4'
scaledSeparator = False Style = tbsDivider
end scaledSeparator = False
object btnSelProj: TDexedToolButton[5] end
Left = 118 object btnSelProj: TDexedToolButton[5]
Hint = 'filter the messages related to the active project' Left = 118
Top = 0 Hint = 'filter the messages related to the active project'
AutoSize = True Top = 0
Caption = 'Project' AutoSize = True
scaledSeparator = False Caption = 'Project'
end scaledSeparator = False
object button6: TDexedToolButton[6] end
Left = 113 object button6: TDexedToolButton[6]
Height = 28 Left = 113
Top = 0 Height = 28
AutoSize = True Top = 0
Caption = 'button6' AutoSize = True
Style = tbsDivider Caption = 'button6'
scaledSeparator = False Style = tbsDivider
end scaledSeparator = False
object btnSelEdit: TDexedToolButton[7] end
Left = 67 object btnSelEdit: TDexedToolButton[7]
Hint = 'filter the messages related to the active editor' Left = 67
Top = 0 Hint = 'filter the messages related to the active editor'
AutoSize = True Top = 0
Caption = 'Editor' AutoSize = True
scaledSeparator = False Caption = 'Editor'
end scaledSeparator = False
object button8: TDexedToolButton[8] end
Left = 62 object button8: TDexedToolButton[8]
Height = 28 Left = 62
Top = 0 Height = 28
AutoSize = True Top = 0
Caption = 'button8' AutoSize = True
Style = tbsDivider Caption = 'button8'
scaledSeparator = False Style = tbsDivider
end scaledSeparator = False
object btnSelAll: TDexedToolButton[9] end
Left = 34 object btnSelAll: TDexedToolButton[9]
Hint = 'don''t filter the messages' Left = 34
Top = 0 Hint = 'don''t filter the messages'
AutoSize = True Top = 0
Caption = 'All' AutoSize = True
Down = True Caption = 'All'
scaledSeparator = False Down = True
end scaledSeparator = False
object TreeFilterEdit1: TTreeFilterEdit[10] end
Left = 416 object TreeFilterEdit1: TTreeFilterEdit[10]
Height = 28 Left = 416
Hint = 'in the selected category, filter the messages that contain the text typed here' Height = 28
Top = 1 Hint = 'in the selected category, filter the messages that contain the text typed here'
Width = 416 Top = 1
OnAfterFilter = TreeFilterEdit1AfterFilter Width = 416
ButtonWidth = 23 OnAfterFilter = TreeFilterEdit1AfterFilter
Align = alRight ButtonWidth = 23
Anchors = [akTop, akLeft, akRight, akBottom] Align = alRight
BorderSpacing.Around = 1 Anchors = [akTop, akLeft, akRight, akBottom]
NumGlyphs = 1 BorderSpacing.Around = 1
MaxLength = 0 NumGlyphs = 1
TabOrder = 0 MaxLength = 0
OnButtonClick = TreeFilterEdit1ButtonClick TabOrder = 0
end OnButtonClick = TreeFilterEdit1ButtonClick
object btnClearCat: TDexedToolButton[11] end
Left = 1 object btnClearCat: TDexedToolButton[11]
Hint = 'Delete the messages stored for the selected category' Left = 1
Top = 0 Hint = 'Delete the messages stored for the selected category'
AutoSize = True Top = 0
resourceName = 'CLEAN' AutoSize = True
scaledSeparator = False resourceName = 'CLEAN'
end scaledSeparator = False
object sepCat: TDexedToolButton[12] end
Left = 29 object sepCat: TDexedToolButton[12]
Height = 28 Left = 29
Top = 0 Height = 28
AutoSize = True Top = 0
Caption = 'sepCat' AutoSize = True
Style = tbsDivider Caption = 'sepCat'
scaledSeparator = False Style = tbsDivider
end scaledSeparator = False
object btnSelSearches: TDexedToolButton[13] end
Left = 262 object btnSelSearches: TDexedToolButton[13]
Top = 0 Left = 262
AutoSize = True Top = 0
Caption = 'Search results' AutoSize = True
scaledSeparator = False Caption = 'Search results'
end scaledSeparator = False
object button3: TDexedToolButton[14] end
Left = 362 object button3: TDexedToolButton[14]
Height = 28 Left = 362
Top = 0 Height = 28
AutoSize = True Top = 0
Caption = 'button3' AutoSize = True
Style = tbsDivider Caption = 'button3'
scaledSeparator = False Style = tbsDivider
end scaledSeparator = False
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -811,6 +811,7 @@ 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

View File

@ -7,197 +7,202 @@ inherited MiniExplorerWidget: TMiniExplorerWidget
Caption = 'Mini explorer' Caption = 'Mini explorer'
ClientHeight = 565 ClientHeight = 565
ClientWidth = 535 ClientWidth = 535
inherited Back: TPanel inherited Content: TPanel
Height = 565 Left = 4
Width = 535 Height = 523
AutoSize = True Top = 38
ClientHeight = 565 Width = 527
ClientWidth = 535 BorderSpacing.Around = 4
inherited Content: TPanel ClientHeight = 523
Left = 4 ClientWidth = 527
Height = 523 object lstFav: TListView[0]
Top = 38 Left = 0
Height = 131
Top = 0
Width = 527 Width = 527
BorderSpacing.Around = 4 Align = alTop
ClientHeight = 523 Columns = <
item
Width = 525
end>
ReadOnly = True
ScrollBars = ssAutoBoth
ShowColumnHeaders = False
TabOrder = 0
ViewStyle = vsReport
OnClick = lstFavClick
OnDeletion = lstFavDeletion
OnEnter = lstFavEnter
end
object Splitter1: TSplitter[1]
Cursor = crVSplit
Left = 0
Height = 6
Top = 131
Width = 527
Align = alTop
OnMouseWheel = Splitter2MouseWheel
ResizeAnchor = akTop
end
object Panel2: TPanel[2]
Left = 0
Height = 386
Top = 137
Width = 527
Align = alClient
AutoSize = True
BevelOuter = bvNone
ClientHeight = 386
ClientWidth = 527 ClientWidth = 527
object lstFav: TListView[0] TabOrder = 2
Left = 0 object Splitter2: TSplitter
Height = 131
Top = 0
Width = 527
Align = alTop
Columns = <
item
Width = 525
end>
ReadOnly = True
ScrollBars = ssAutoBoth
ShowColumnHeaders = False
TabOrder = 0
ViewStyle = vsReport
OnClick = lstFavClick
OnDeletion = lstFavDeletion
OnEnter = lstFavEnter
end
object Splitter1: TSplitter[1]
Cursor = crVSplit Cursor = crVSplit
Left = 0 Left = 0
Height = 6 Height = 6
Top = 131 Top = 218
Width = 527 Width = 527
Align = alTop Align = alTop
OnMouseWheel = Splitter2MouseWheel OnMouseWheel = Splitter2MouseWheel
ResizeAnchor = akTop ResizeAnchor = akTop
end end
object Panel2: TPanel[2] object treeFolders: TShellTreeView
Left = 0 Left = 0
Height = 386 Height = 218
Top = 137 Top = 0
Width = 527
Align = alTop
FileSortType = fstAlphabet
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 1
OnChange = treeFoldersChange
OnDblClick = treeFoldersDblClick
OnEnter = TreeEnter
OnGetImageIndex = treeFoldersGetImageIndex
OnGetSelectedIndex = treeFoldersGetSelectedIndex
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
ObjectTypes = [otFolders]
ShellListView = lstFiles
end
object Panel1: TPanel
Left = 0
Height = 162
Top = 224
Width = 527 Width = 527
Align = alClient Align = alClient
AutoSize = True Caption = 'Panel1'
BevelOuter = bvNone ClientHeight = 162
ClientHeight = 386
ClientWidth = 527 ClientWidth = 527
TabOrder = 2 TabOrder = 2
object Splitter2: TSplitter object lstFilter: TListViewFilterEdit
Cursor = crVSplit Left = 3
Left = 0 Height = 30
Height = 6 Top = 3
Top = 218 Width = 521
Width = 527 ButtonWidth = 23
Flat = True
Align = alTop Align = alTop
OnMouseWheel = Splitter2MouseWheel BorderSpacing.Around = 2
ResizeAnchor = akTop NumGlyphs = 1
end MaxLength = 0
object treeFolders: TShellTreeView TabOrder = 0
Left = 0 OnButtonClick = lstFilterButtonClick
Height = 218 OnKeyUp = lstFilterKeyUp
Top = 0
Width = 527
Align = alTop
FileSortType = fstAlphabet
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 1
OnChange = treeFoldersChange
OnDblClick = treeFoldersDblClick
OnEnter = TreeEnter
OnGetImageIndex = treeFoldersGetImageIndex
OnGetSelectedIndex = treeFoldersGetSelectedIndex
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
ObjectTypes = [otFolders]
ShellListView = lstFiles
end end
object lstFiles: TShellListView object lstFiles: TShellListView
Left = 0 Left = 1
Height = 162 Height = 126
Top = 224 Top = 35
Width = 527 Width = 525
Align = alClient Align = alClient
Color = clDefault Color = clDefault
DragMode = dmAutomatic DragMode = dmAutomatic
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
SortColumn = 0
SortType = stText SortType = stText
TabOrder = 2 TabOrder = 1
OnColumnClick = lstFilesColumnClick OnColumnClick = lstFilesColumnClick
OnDblClick = lstFilesDblClick OnDblClick = lstFilesDblClick
OnMouseMove = lstFilesMouseMove
OnFileAdded = lstFilesFileAdded OnFileAdded = lstFilesFileAdded
ObjectTypes = [otNonFolders, otHidden] ObjectTypes = [otNonFolders, otHidden]
ShellTreeView = treeFolders ShellTreeView = treeFolders
end end
end end
end end
inherited toolbar: TDexedToolBar end
Width = 527 inherited toolbar: TDexedToolBar
OnResize = toolbarResize Width = 527
object btnEdit: TDexedToolButton[0] OnResize = toolbarResize
Left = 153 object btnEdit: TDexedToolButton[0]
Hint = 'open the selected file in an editor or as a new project' Left = 153
Top = 0 Hint = 'open the selected file in an editor or as a new project'
AutoSize = True Top = 0
Caption = 'btnEdit' AutoSize = True
OnClick = btnEditClick Caption = 'btnEdit'
resourceName = 'PENCIL' OnClick = btnEditClick
scaledSeparator = False resourceName = 'PENCIL'
end scaledSeparator = False
object btnShellOpen: TDexedToolButton[1] end
Left = 125 object btnShellOpen: TDexedToolButton[1]
Hint = 'open the selected folder or the selected file using the shell' Left = 125
Top = 0 Hint = 'open the selected folder or the selected file using the shell'
AutoSize = True Top = 0
Caption = 'btnShellOpen' AutoSize = True
OnClick = btnShellOpenClick Caption = 'btnShellOpen'
resourceName = 'FLASH' OnClick = btnShellOpenClick
scaledSeparator = False resourceName = 'FLASH'
end scaledSeparator = False
object btnRemFav: TDexedToolButton[2] end
Left = 97 object btnRemFav: TDexedToolButton[2]
Hint = 'remove selected favorite folder' Left = 97
Top = 0 Hint = 'remove selected favorite folder'
AutoSize = True Top = 0
Caption = 'btnRemFav' AutoSize = True
OnClick = btnRemFavClick Caption = 'btnRemFav'
resourceName = 'FOLDER_DELETE' OnClick = btnRemFavClick
scaledSeparator = False resourceName = 'FOLDER_DELETE'
end scaledSeparator = False
object btnAddFav: TDexedToolButton[3] end
Left = 69 object btnAddFav: TDexedToolButton[3]
Hint = 'add selected folder to the favorites' Left = 69
Top = 0 Hint = 'add selected folder to the favorites'
AutoSize = True Top = 0
Caption = 'btnAddFav' AutoSize = True
OnClick = btnAddFavClick Caption = 'btnAddFav'
resourceName = 'FOLDER_ADD' OnClick = btnAddFavClick
scaledSeparator = False resourceName = 'FOLDER_ADD'
end scaledSeparator = False
object btnDrive: TDexedToolButton[4] end
Left = 1 object btnDrive: TDexedToolButton[4]
Hint = 'select a drive or a custom folder' Left = 1
Top = 0 Hint = 'select a drive or a custom folder'
AutoSize = True Top = 0
Caption = 'btnDrive' AutoSize = True
DropdownMenu = mnuDrives Caption = 'btnDrive'
OnClick = btnDriveClick DropdownMenu = mnuDrives
Style = tbsDropDown OnClick = btnDriveClick
resourceName = 'FOLDER_GO' Style = tbsDropDown
scaledSeparator = False resourceName = 'FOLDER_GO'
end scaledSeparator = False
object btnParentFolder: TDexedToolButton[5] end
Left = 41 object btnParentFolder: TDexedToolButton[5]
Hint = 'select parent folder' Left = 41
Top = 0 Hint = 'select parent folder'
AutoSize = True Top = 0
Caption = 'btnParentFolder' AutoSize = True
OnClick = btnParentFolderClick Caption = 'btnParentFolder'
resourceName = 'GO_PREVIOUS' OnClick = btnParentFolderClick
scaledSeparator = False resourceName = 'GO_PREVIOUS'
end scaledSeparator = False
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
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu
Left = 40 Left = 40
Top = 48 Top = 48
end end
object mnuDrives: TPopupMenu[2] object mnuDrives: TPopupMenu[3]
Left = 8 Left = 8
Top = 48 Top = 48
end end

View File

@ -22,6 +22,8 @@ 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;
@ -33,6 +35,8 @@ 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;
@ -44,18 +48,24 @@ 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 write fLastFolder; property lastFolder: string read 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;
@ -74,6 +84,7 @@ 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;
@ -93,6 +104,8 @@ 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;
@ -162,6 +175,8 @@ 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;
@ -185,6 +200,8 @@ 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;
@ -220,6 +237,8 @@ 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;
@ -237,11 +256,14 @@ 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;
@ -272,7 +294,11 @@ 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;
if widg.fLastFold.dirExists then widg.lstFiles.Columns[1].Visible := fShowSize;
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;
@ -352,8 +378,6 @@ 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;
@ -735,13 +759,20 @@ begin
lstFiles.Sort; lstFiles.Sort;
end; end;
procedure TMiniExplorerWidget.lstFilterButtonClick(Sender: TObject); procedure TMiniExplorerWidget.lstFilesMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var var
s: string; i: TListItem;
begin begin
s := treeFolders.Root; i := lstFiles.GetItemAt(x,y);
treeFolders.Root:= ''; if i.isAssigned() then
treeFolders.Root:= s; begin
lstFiles.Hint := i.Caption;
end;
end;
procedure TMiniExplorerWidget.lstFilterButtonClick(Sender: TObject);
begin
filterFiles;
end; end;
procedure TMiniExplorerWidget.lstFilterKeyUp(Sender: TObject; var Key: Word; procedure TMiniExplorerWidget.lstFilterKeyUp(Sender: TObject; var Key: Word;
@ -769,7 +800,6 @@ 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;

View File

@ -8,123 +8,117 @@ inherited OptionEditorWidget: TOptionEditorWidget
ClientHeight = 514 ClientHeight = 514
ClientWidth = 637 ClientWidth = 637
OnCloseQuery = FormCloseQuery OnCloseQuery = FormCloseQuery
inherited Back: TPanel inherited Content: TPanel
Height = 514 Height = 478
Width = 637 Width = 637
ClientHeight = 514 ClientHeight = 478
ClientWidth = 637 ClientWidth = 637
inherited Content: TPanel object pnlBody: TPanel[0]
Height = 478 Left = 4
Width = 637 Height = 452
ClientHeight = 478 Top = 4
ClientWidth = 637 Width = 629
object pnlBody: TPanel[0] Align = alClient
Left = 4 BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 452
ClientWidth = 629
TabOrder = 0
object selCat: TTreeView
Left = 0
Height = 452 Height = 452
Top = 4 Top = 0
Width = 629 Width = 182
Align = alLeft
AutoExpand = True
HideSelection = False
ReadOnly = True
ScrollBars = ssAutoBoth
SortType = stText
TabOrder = 0
OnChanging = selCatChanging
OnDeletion = selCatDeletion
OnSelectionChanged = selCatSelectionChanged
Options = [tvoAutoExpand, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
end
object pnlEd: TPanel
Left = 188
Height = 452
Top = 0
Width = 441
Align = alClient Align = alClient
BorderSpacing.Around = 4
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 452 ClientHeight = 452
ClientWidth = 629 ClientWidth = 441
TabOrder = 0 TabOrder = 1
object selCat: TTreeView object inspector: TTIPropertyGrid
Left = 0 Left = 0
Height = 452 Height = 452
Top = 0 Top = 0
Width = 182
Align = alLeft
AutoExpand = True
HideSelection = False
ReadOnly = True
ScrollBars = ssAutoBoth
SortType = stText
TabOrder = 0
OnChanging = selCatChanging
OnDeletion = selCatDeletion
OnSelectionChanged = selCatSelectionChanged
Options = [tvoAutoExpand, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
end
object pnlEd: TPanel
Left = 188
Height = 452
Top = 0
Width = 441 Width = 441
Align = alClient Align = alClient
BevelOuter = bvNone CheckboxForBoolean = False
ClientHeight = 452 DefaultValueFont.Color = clWindowText
ClientWidth = 441 Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
TabOrder = 1 Indent = 16
object inspector: TTIPropertyGrid NameFont.Color = clWindowText
Left = 0 OnEditorFilter = inspectorEditorFilter
Height = 452 OnModified = inspectorModified
Top = 0 PreferredSplitterX = 170
Width = 441 SplitterX = 170
Align = alClient ValueFont.Color = clGreen
CheckboxForBoolean = False
DefaultValueFont.Color = clWindowText
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Indent = 16
NameFont.Color = clWindowText
OnEditorFilter = inspectorEditorFilter
OnModified = inspectorModified
PreferredSplitterX = 170
SplitterX = 170
ValueFont.Color = clGreen
end
end
object Splitter1: TSplitter
Left = 182
Height = 452
Top = 0
Width = 6
end end
end end
object pnlFooter: TPanel[1] object Splitter1: TSplitter
Left = 4 Left = 182
Height = 14 Height = 452
Top = 460 Top = 0
Width = 629 Width = 6
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvLowered
ClientHeight = 14
ClientWidth = 629
TabOrder = 1
object btnCancel: TSpeedButton
Left = 610
Height = 4
Hint = 'cancel and revert the modifications of the category'
Top = 5
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Left = 2
BorderSpacing.Around = 4
Flat = True
OnClick = btnCancelClick
end
object btnAccept: TSpeedButton
Left = 620
Height = 4
Hint = 'accept the modifications of the category'
Top = 5
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Left = 2
BorderSpacing.Around = 4
Flat = True
OnClick = btnAcceptClick
end
end end
end end
inherited toolbar: TDexedToolBar object pnlFooter: TPanel[1]
Left = 4
Height = 14
Top = 460
Width = 629 Width = 629
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvLowered
ClientHeight = 14
ClientWidth = 629
TabOrder = 1
object btnCancel: TSpeedButton
Left = 610
Height = 4
Hint = 'cancel and revert the modifications of the category'
Top = 5
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Left = 2
BorderSpacing.Around = 4
Flat = True
OnClick = btnCancelClick
end
object btnAccept: TSpeedButton
Left = 620
Height = 4
Hint = 'accept the modifications of the category'
Top = 5
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Left = 2
BorderSpacing.Around = 4
Flat = True
OnClick = btnAcceptClick
end
end end
end end
inherited toolbar: TDexedToolBar
Width = 629
end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu
Left = 144 Left = 144
Top = 24 Top = 24

View File

@ -6,91 +6,85 @@ inherited ProcInputWidget: TProcInputWidget
Caption = 'Process input' Caption = 'Process input'
ClientHeight = 107 ClientHeight = 107
ClientWidth = 558 ClientWidth = 558
inherited Back: TPanel inherited Content: TPanel
Height = 107 Height = 71
Width = 558 Width = 558
ClientHeight = 107 ClientHeight = 71
ClientWidth = 558 ClientWidth = 558
inherited Content: TPanel object txtExeName: TStaticText[0]
Height = 71 Left = 4
Width = 558 Height = 21
ClientHeight = 71 Top = 4
ClientWidth = 558
object txtExeName: TStaticText[0]
Left = 4
Height = 21
Top = 4
Width = 550
Align = alTop
AutoSize = True
BorderSpacing.Around = 4
BorderStyle = sbsSunken
Caption = 'no process'
TabOrder = 0
Transparent = False
end
object Panel1: TPanel[1]
Left = 4
Height = 33
Top = 29
Width = 550
Align = alTop
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 33
ClientWidth = 550
Enabled = False
TabOrder = 1
object txtInp: TEdit
Left = 0
Height = 27
Top = 3
Width = 530
Align = alClient
BorderSpacing.Top = 3
BorderSpacing.Bottom = 3
OnKeyDown = txtInpKeyDown
TabOrder = 0
end
object btnClose: TSpeedButton
Left = 538
Height = 29
Hint = 'close standard input'
Top = 2
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Around = 2
OnClick = btnCloseClick
end
object btnKill: TSpeedButton
Left = 544
Height = 29
Hint = 'kill process'
Top = 2
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Around = 2
OnClick = btnKillClick
end
object btnSend: TSpeedButton
Left = 532
Height = 29
Hint = 'write content to standard input'
Top = 2
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Around = 2
OnClick = btnSendClick
end
end
end
inherited toolbar: TDexedToolBar
Width = 550 Width = 550
Align = alTop
AutoSize = True
BorderSpacing.Around = 4
BorderStyle = sbsSunken
Caption = 'no process'
TabOrder = 0
Transparent = False
end end
object Panel1: TPanel[1]
Left = 4
Height = 33
Top = 29
Width = 550
Align = alTop
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 33
ClientWidth = 550
Enabled = False
TabOrder = 1
object txtInp: TEdit
Left = 0
Height = 27
Top = 3
Width = 530
Align = alClient
BorderSpacing.Top = 3
BorderSpacing.Bottom = 3
OnKeyDown = txtInpKeyDown
TabOrder = 0
end
object btnClose: TSpeedButton
Left = 538
Height = 29
Hint = 'close standard input'
Top = 2
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Around = 2
OnClick = btnCloseClick
end
object btnKill: TSpeedButton
Left = 544
Height = 29
Hint = 'kill process'
Top = 2
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Around = 2
OnClick = btnKillClick
end
object btnSend: TSpeedButton
Left = 532
Height = 29
Hint = 'write content to standard input'
Top = 2
Width = 4
Align = alRight
AutoSize = True
BorderSpacing.Around = 2
OnClick = btnSendClick
end
end
end
inherited toolbar: TDexedToolBar
Width = 550
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu
left = 16 left = 16

View File

@ -6,202 +6,195 @@ inherited ProfileViewerWidget: TProfileViewerWidget
Caption = 'Profile viewer' Caption = 'Profile viewer'
ClientHeight = 537 ClientHeight = 537
ClientWidth = 551 ClientWidth = 551
inherited Back: TPanel inherited Content: TPanel
Height = 537 Height = 501
Width = 551 Width = 551
AutoSize = True ClientHeight = 501
ClientHeight = 537
ClientWidth = 551 ClientWidth = 551
inherited Content: TPanel object list: TListView[0]
Height = 501 Left = 4
Width = 551 Height = 283
ClientHeight = 501 Top = 214
ClientWidth = 551 Width = 543
object list: TListView[0] Align = alClient
Left = 4 BorderSpacing.Around = 4
Height = 283 Columns = <
Top = 214 item
Width = 543 AutoSize = True
Align = alClient MaxWidth = 18
BorderSpacing.Around = 4 MinWidth = 18
Columns = < Width = 18
item end
AutoSize = True item
MaxWidth = 18 AutoSize = True
MinWidth = 18 Caption = 'Num calls'
Width = 18 Width = 75
end end
item item
AutoSize = True AutoSize = True
Caption = 'Num calls' Caption = 'Tree time'
Width = 75 Width = 71
end end
item item
AutoSize = True AutoSize = True
Caption = 'Tree time' Caption = 'Func time'
Width = 71 Width = 73
end end
item item
AutoSize = True AutoSize = True
Caption = 'Func time' Caption = 'Per call'
Width = 73 Width = 58
end end
item item
AutoSize = True AutoSize = True
Caption = 'Per call' Caption = 'function'
Width = 58 Width = 246
end end>
item HideSelection = False
AutoSize = True ReadOnly = True
Caption = 'function' RowSelect = True
Width = 246 ScrollBars = ssAutoBoth
end> SmallImages = ImageList1
HideSelection = False SortType = stText
ReadOnly = True TabOrder = 0
RowSelect = True ViewStyle = vsReport
ScrollBars = ssAutoBoth end
SmallImages = ImageList1 object Panel1: TPanel[1]
SortType = stText Left = 2
TabOrder = 0 Height = 200
ViewStyle = vsReport Top = 2
end Width = 547
object Panel1: TPanel[1] Align = alTop
BorderSpacing.Around = 2
BevelOuter = bvNone
ClientHeight = 200
ClientWidth = 547
TabOrder = 1
object pie: TChart
Left = 2 Left = 2
Height = 200 Height = 196
Top = 2 Top = 2
Width = 547 Width = 543
Align = alTop AxisList = <
BorderSpacing.Around = 2 item
BevelOuter = bvNone
ClientHeight = 200
ClientWidth = 547
TabOrder = 1
object pie: TChart
Left = 2
Height = 196
Top = 2
Width = 543
AxisList = <
item
Marks.Clipped = False
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelBrush.Style = bsClear
end
item
Alignment = calBottom
Marks.Clipped = False
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelBrush.Style = bsClear
end>
AxisVisible = False
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Frame.Style = psClear
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
Toolset = ChartToolset1
Align = alClient
BorderSpacing.Around = 2
object pieSeries: TPieSeries
Legend.Visible = False
Marks.Clipped = False Marks.Clipped = False
Marks.Distance = 10 Marks.LabelBrush.Style = bsClear
Marks.Shape = clsRoundRect Minors = <>
Marks.Format = '%2:s %1:.2f%%' Title.LabelBrush.Style = bsClear
Marks.Style = smsLabelPercent end
Exploded = True item
MarkPositions = pmpLeftRight Alignment = calBottom
end Marks.Clipped = False
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelBrush.Style = bsClear
end>
AxisVisible = False
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Frame.Style = psClear
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
Toolset = ChartToolset1
Align = alClient
BorderSpacing.Around = 2
object pieSeries: TPieSeries
Legend.Visible = False
Marks.Clipped = False
Marks.Distance = 10
Marks.Shape = clsRoundRect
Marks.Format = '%2:s %1:.2f%%'
Marks.Style = smsLabelPercent
Exploded = True
MarkPositions = pmpLeftRight
end end
end end
object Splitter1: TSplitter[2]
Cursor = crVSplit
Left = 0
Height = 6
Top = 204
Width = 551
Align = alTop
OnCanResize = Splitter1CanResize
OnMoved = Splitter1Moved
ResizeAnchor = akTop
end
end end
inherited toolbar: TDexedToolBar object Splitter1: TSplitter[2]
Width = 543 Cursor = crVSplit
object btnRefresh: TDexedToolButton[0] Left = 0
Left = 57 Height = 6
Hint = 'reload current trace log file or auto load from the current directory' Top = 204
Top = 0 Width = 551
AutoSize = True Align = alTop
Caption = 'btnRefresh' OnCanResize = Splitter1CanResize
OnClick = btnRefreshClick OnMoved = Splitter1Moved
resourceName = 'ARROW_UPDATE' ResizeAnchor = akTop
scaledSeparator = False end
end end
object btnOpen: TDexedToolButton[1] inherited toolbar: TDexedToolBar
Left = 29 Width = 543
Hint = 'open a trace log file' object btnRefresh: TDexedToolButton[0]
Top = 0 Left = 57
AutoSize = True Hint = 'reload current trace log file or auto load from the current directory'
Caption = 'btnOpen' Top = 0
OnClick = btnOpenClick AutoSize = True
resourceName = 'FOLDER' Caption = 'btnRefresh'
scaledSeparator = False OnClick = btnRefreshClick
end resourceName = 'ARROW_UPDATE'
object button0: TDexedToolButton[2] scaledSeparator = False
Left = 113 end
Height = 5 object btnOpen: TDexedToolButton[1]
Top = 0 Left = 29
AutoSize = True Hint = 'open a trace log file'
Caption = 'button0' Top = 0
Style = tbsDivider AutoSize = True
scaledSeparator = False Caption = 'btnOpen'
end OnClick = btnOpenClick
object selPieSource: TComboBox[3] resourceName = 'FOLDER'
Left = 118 scaledSeparator = False
Height = 31 end
Hint = 'select the pie representation' object button0: TDexedToolButton[2]
Top = 0 Left = 113
Width = 282 Height = 5
BorderSpacing.InnerBorder = 3 Top = 0
ItemHeight = 0 AutoSize = True
ItemIndex = 0 Caption = 'button0'
Items.Strings = ( Style = tbsDivider
'Number of calls' scaledSeparator = False
'Tree time' end
'Function time' object selPieSource: TComboBox[3]
'Time per call' Left = 118
) Height = 31
OnSelect = selPieSourceSelect Hint = 'select the pie representation'
Style = csDropDownList Top = 0
TabOrder = 0 Width = 282
Text = 'Number of calls' BorderSpacing.InnerBorder = 3
end ItemHeight = 0
object btnOpts: TDexedToolButton[4] ItemIndex = 0
Left = 85 Items.Strings = (
Hint = 'edit profile viewer options' 'Number of calls'
Top = 0 'Tree time'
AutoSize = True 'Function time'
Caption = 'btnOpts' 'Time per call'
OnClick = btnOptsClick )
resourceName = 'WRENCH' OnSelect = selPieSourceSelect
scaledSeparator = False Style = csDropDownList
end TabOrder = 0
object btnProj: TDexedToolButton[5] Text = 'Number of calls'
Left = 1 end
Hint = 'Try to load using the project output path' object btnOpts: TDexedToolButton[4]
Top = 0 Left = 85
AutoSize = True Hint = 'edit profile viewer options'
Caption = 'btnProj' Top = 0
OnClick = btnProjClick AutoSize = True
resourceName = 'LIST' Caption = 'btnOpts'
scaledSeparator = False OnClick = btnOptsClick
end resourceName = 'WRENCH'
scaledSeparator = False
end
object btnProj: TDexedToolButton[5]
Left = 1
Hint = 'Try to load using the project output path'
Top = 0
AutoSize = True
Caption = 'btnProj'
OnClick = btnProjClick
resourceName = 'LIST'
scaledSeparator = False
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -7,166 +7,160 @@ inherited ProjectGroupWidget: TProjectGroupWidget
Caption = 'Project group' Caption = 'Project group'
ClientHeight = 195 ClientHeight = 195
ClientWidth = 328 ClientWidth = 328
inherited Back: TPanel inherited Content: TPanel
Height = 195 Height = 159
Width = 328 Width = 328
ClientHeight = 195 ClientHeight = 159
ClientWidth = 328 ClientWidth = 328
inherited Content: TPanel object lstProj: TListView[0]
Height = 159 Left = 4
Width = 328 Height = 122
ClientHeight = 159 Top = 4
ClientWidth = 328 Width = 320
object lstProj: TListView[0] Align = alClient
Left = 4 AutoSort = False
Height = 122 BorderSpacing.Around = 4
Top = 4 Columns = <
Width = 320 item
Align = alClient AutoSize = True
AutoSort = False Caption = 'Name'
BorderSpacing.Around = 4 Width = 49
Columns = < end
item item
AutoSize = True AutoSize = True
Caption = 'Name' Caption = 'Type'
Width = 49 Width = 40
end end
item item
AutoSize = True AutoSize = True
Caption = 'Type' Caption = 'Async'
Width = 40 Width = 49
end end
item item
AutoSize = True AutoSize = True
Caption = 'Async' Caption = 'Configuration'
Width = 49 Width = 180
end end>
item GridLines = True
AutoSize = True HideSelection = False
Caption = 'Configuration' ReadOnly = True
Width = 180 RowSelect = True
end> ScrollBars = ssAutoBoth
GridLines = True TabOrder = 0
HideSelection = False ViewStyle = vsReport
ReadOnly = True OnDblClick = lstProjDblClick
RowSelect = True OnSelectItem = slstProjSelectItem
ScrollBars = ssAutoBoth end
TabOrder = 0 object Panel2: TPanel[1]
ViewStyle = vsReport Left = 4
OnDblClick = lstProjDblClick Height = 25
OnSelectItem = slstProjSelectItem Top = 130
end Width = 320
object Panel2: TPanel[1] Align = alBottom
Left = 4 AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 25
ClientWidth = 320
TabOrder = 1
object btnFreeFocus: TSpeedButton
Left = 312
Height = 25 Height = 25
Top = 130 Hint = 'Put the focus on the ungrouped project'
Width = 320 Top = 0
Align = alBottom Width = 4
Align = alRight
AutoSize = True AutoSize = True
BorderSpacing.Around = 4 Layout = blGlyphBottom
BevelOuter = bvNone Spacing = 0
ClientHeight = 25 OnClick = btnFreeFocusClick
ClientWidth = 320 end
TabOrder = 1 object StaticText1: TStaticText
object btnFreeFocus: TSpeedButton Left = 2
Left = 312 Height = 21
Height = 25 Top = 2
Hint = 'Put the focus on the ungrouped project' Width = 308
Top = 0 Align = alClient
Width = 4 AutoSize = True
Align = alRight BorderSpacing.Around = 2
AutoSize = True BorderStyle = sbsSunken
Layout = blGlyphBottom TabOrder = 0
Spacing = 0 end
OnClick = btnFreeFocusClick object btnAddUnfocused: TSpeedButton
end Left = 316
object StaticText1: TStaticText Height = 25
Left = 2 Hint = 'Put the ungrouped project in the group'
Height = 21 Top = 0
Top = 2 Width = 4
Width = 308 Align = alRight
Align = alClient AutoSize = True
AutoSize = True Layout = blGlyphBottom
BorderSpacing.Around = 2 Spacing = 0
BorderStyle = sbsSunken OnClick = btnAddUnfocusedClick
TabOrder = 0
end
object btnAddUnfocused: TSpeedButton
Left = 316
Height = 25
Hint = 'Put the ungrouped project in the group'
Top = 0
Width = 4
Align = alRight
AutoSize = True
Layout = blGlyphBottom
Spacing = 0
OnClick = btnAddUnfocusedClick
end
end end
end end
inherited toolbar: TDexedToolBar end
Height = 30 inherited toolbar: TDexedToolBar
Width = 320 Height = 30
object BtnAddProj: TDexedToolButton[0] Width = 320
Left = 1 object BtnAddProj: TDexedToolButton[0]
Hint = 'add a project to the group' Left = 1
Top = 0 Hint = 'add a project to the group'
AutoSize = True Top = 0
Caption = 'BtnAddProj' AutoSize = True
OnClick = BtnAddProjClick Caption = 'BtnAddProj'
resourceName = 'DOCUMENT_ADD' OnClick = BtnAddProjClick
scaledSeparator = False resourceName = 'DOCUMENT_ADD'
end scaledSeparator = False
object btnRemProj: TDexedToolButton[1] end
Left = 29 object btnRemProj: TDexedToolButton[1]
Hint = 'remove the selected project from the group' Left = 29
Top = 0 Hint = 'remove the selected project from the group'
AutoSize = True Top = 0
Caption = 'btnRemProj' AutoSize = True
OnClick = btnRemProjClick Caption = 'btnRemProj'
resourceName = 'DOCUMENT_DELETE' OnClick = btnRemProjClick
scaledSeparator = False resourceName = 'DOCUMENT_DELETE'
end scaledSeparator = False
object btnMoveDown: TDexedToolButton[2] end
Left = 57 object btnMoveDown: TDexedToolButton[2]
Hint = 'move the selected project down' Left = 57
Top = 0 Hint = 'move the selected project down'
AutoSize = True Top = 0
Caption = 'btnMoveDown' AutoSize = True
OnClick = btnMoveDownClick Caption = 'btnMoveDown'
resourceName = 'GO_DOWN' OnClick = btnMoveDownClick
scaledSeparator = False resourceName = 'GO_DOWN'
end scaledSeparator = False
object btnMoveUp: TDexedToolButton[3] end
Left = 85 object btnMoveUp: TDexedToolButton[3]
Hint = 'move the selected project up' Left = 85
Top = 0 Hint = 'move the selected project up'
AutoSize = True Top = 0
Caption = 'btnMoveUp' AutoSize = True
OnClick = btnMoveUpClick Caption = 'btnMoveUp'
resourceName = 'GO_UP' OnClick = btnMoveUpClick
scaledSeparator = False resourceName = 'GO_UP'
end scaledSeparator = False
object btnAsync: TDexedToolButton[4] end
Left = 118 object btnAsync: TDexedToolButton[4]
Hint = 'async compilation mode' Left = 118
Top = 0 Hint = 'async compilation mode'
AutoSize = True Top = 0
Caption = 'btnAsync' AutoSize = True
OnClick = btnAsyncClick Caption = 'btnAsync'
resourceName = 'ARROW_DIVIDE' OnClick = btnAsyncClick
scaledSeparator = False resourceName = 'ARROW_DIVIDE'
end scaledSeparator = False
object button0: TDexedToolButton[5] end
Left = 113 object button0: TDexedToolButton[5]
Height = 5 Left = 113
Top = 0 Height = 5
AutoSize = True Top = 0
Caption = 'button0' AutoSize = True
Style = tbsDivider Caption = 'button0'
scaledSeparator = False Style = tbsDivider
end scaledSeparator = False
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -9,140 +9,133 @@ inherited ProjectInspectWidget: TProjectInspectWidget
ClientHeight = 258 ClientHeight = 258
ClientWidth = 424 ClientWidth = 424
OnDropFiles = FormDropFiles OnDropFiles = FormDropFiles
inherited Back: TPanel inherited Content: TPanel
Height = 258 Height = 222
Width = 424 Width = 424
AutoSize = True ClientHeight = 222
ClientHeight = 258
ClientWidth = 424 ClientWidth = 424
inherited Content: TPanel PopupMenu = nil
Height = 222 object Tree: TTreeView[0]
Width = 424 Left = 2
ClientHeight = 222 Height = 184
ClientWidth = 424 Top = 36
PopupMenu = nil Width = 420
object Tree: TTreeView[0] Align = alClient
Left = 2 AutoExpand = True
Height = 184 BorderSpacing.Around = 2
Top = 36 DragMode = dmAutomatic
Width = 420 HideSelection = False
Align = alClient ReadOnly = True
AutoExpand = True RightClickSelect = True
BorderSpacing.Around = 2 ScrollBars = ssAutoBoth
DragMode = dmAutomatic ShowRoot = False
HideSelection = False TabOrder = 0
ReadOnly = True ToolTips = False
RightClickSelect = True OnClick = TreeClick
ScrollBars = ssAutoBoth OnDeletion = TreeDeletion
ShowRoot = False OnKeyDown = TreeKeyDown
TabOrder = 0 OnSelectionChanged = TreeSelectionChanged
ToolTips = False Options = [tvoAutoExpand, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoThemedDraw]
OnClick = TreeClick Items.Data = {
OnDeletion = TreeDeletion F9FFFFFF020001000000000000000000000000000000FFFFFFFF000000000000
OnKeyDown = TreeKeyDown 0000000C000000536F757263652066696C6573
OnSelectionChanged = TreeSelectionChanged }
Options = [tvoAutoExpand, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoThemedDraw]
Items.Data = {
F9FFFFFF020001000000000000000000000000000000FFFFFFFF000000000000
0000000C000000536F757263652066696C6573
}
end
object selConf: TComboBox[1]
Left = 4
Height = 30
Hint = 'select the active configuaration'
Top = 2
Width = 416
Align = alTop
BorderSpacing.Left = 4
BorderSpacing.Top = 2
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
ItemHeight = 0
OnChange = selConfChange
Style = csDropDownList
TabOrder = 1
end
end end
inherited toolbar: TDexedToolBar object selConf: TComboBox[1]
Left = 4
Height = 30
Hint = 'select the active configuaration'
Top = 2
Width = 416 Width = 416
OnResize = toolbarResize Align = alTop
object btnRemFold: TDexedToolButton[0] BorderSpacing.Left = 4
Left = 141 BorderSpacing.Top = 2
Hint = 'remove the selected source parent folder from the project' BorderSpacing.Right = 4
Top = 0 BorderSpacing.Bottom = 4
AutoSize = True ItemHeight = 0
Caption = 'btnRemFold' OnChange = selConfChange
OnClick = btnRemFoldClick Style = csDropDownList
resourceName = 'FOLDER_DELETE' TabOrder = 1
scaledSeparator = False end
end end
object btnAddFold: TDexedToolButton[1] inherited toolbar: TDexedToolBar
Left = 113 Width = 416
Hint = 'add a folder of sources to the project' OnResize = toolbarResize
Top = 0 object btnRemFold: TDexedToolButton[0]
AutoSize = True Left = 141
Caption = 'btnAddFold' Hint = 'remove the selected source parent folder from the project'
OnClick = btnAddFoldClick Top = 0
resourceName = 'FOLDER_ADD' AutoSize = True
scaledSeparator = False Caption = 'btnRemFold'
end OnClick = btnRemFoldClick
object btnRemFile: TDexedToolButton[2] resourceName = 'FOLDER_DELETE'
Left = 85 scaledSeparator = False
Hint = 'remove selected source from the project' end
Top = 0 object btnAddFold: TDexedToolButton[1]
AutoSize = True Left = 113
Caption = 'btnRemFile' Hint = 'add a folder of sources to the project'
OnClick = btnRemFileClick Top = 0
resourceName = 'DOCUMENT_DELETE' AutoSize = True
scaledSeparator = False Caption = 'btnAddFold'
end OnClick = btnAddFoldClick
object btnAddFile: TDexedToolButton[3] resourceName = 'FOLDER_ADD'
Left = 57 scaledSeparator = False
Hint = 'add a source to the project' end
Top = 0 object btnRemFile: TDexedToolButton[2]
AutoSize = True Left = 85
Caption = 'btnAddFile' Hint = 'remove selected source from the project'
OnClick = btnAddFileClick Top = 0
resourceName = 'DOCUMENT_ADD' AutoSize = True
scaledSeparator = False Caption = 'btnRemFile'
end OnClick = btnRemFileClick
object TreeFilterEdit1: TTreeFilterEdit[4] resourceName = 'DOCUMENT_DELETE'
Left = 176 scaledSeparator = False
Height = 26 end
Hint = 'filter the source names that contain the text typed here' object btnAddFile: TDexedToolButton[3]
Top = 2 Left = 57
Width = 232 Hint = 'add a source to the project'
ButtonWidth = 28 Top = 0
Align = alClient AutoSize = True
BorderSpacing.Around = 2 Caption = 'btnAddFile'
NumGlyphs = 1 OnClick = btnAddFileClick
MaxLength = 0 resourceName = 'DOCUMENT_ADD'
TabOrder = 0 scaledSeparator = False
FilteredTreeview = Tree end
ExpandAllInitially = True object TreeFilterEdit1: TTreeFilterEdit[4]
end Left = 176
object btnTree: TDexedToolButton[5] Height = 26
Left = 29 Hint = 'filter the source names that contain the text typed here'
Hint = 'display the file list as a tree' Top = 2
Top = 0 Width = 232
AutoSize = True ButtonWidth = 28
Caption = 'btnTree' Align = alClient
OnClick = btnTreeClick BorderSpacing.Around = 2
Style = tbsCheck NumGlyphs = 1
resourceName = 'FOLDERS_EXPLORER' MaxLength = 0
scaledSeparator = False TabOrder = 0
end FilteredTreeview = Tree
object btnReload: TDexedToolButton[6] ExpandAllInitially = True
Left = 1 end
Hint = 'reload the project, useful to fetch new dependencies or detect new source files' object btnTree: TDexedToolButton[5]
Top = 0 Left = 29
AutoSize = True Hint = 'display the file list as a tree'
Caption = 'btnReload' Top = 0
OnClick = btnReloadClick AutoSize = True
resourceName = 'ARROW_UPDATE' Caption = 'btnTree'
scaledSeparator = False OnClick = btnTreeClick
end Style = tbsCheck
resourceName = 'FOLDERS_EXPLORER'
scaledSeparator = False
end
object btnReload: TDexedToolButton[6]
Left = 1
Hint = 'reload the project, useful to fetch new dependencies or detect new source files'
Top = 0
AutoSize = True
Caption = 'btnReload'
OnClick = btnReloadClick
resourceName = 'ARROW_UPDATE'
scaledSeparator = False
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -6,263 +6,258 @@ inherited SearchWidget: TSearchWidget
Caption = 'Search & replace' Caption = 'Search & replace'
ClientHeight = 329 ClientHeight = 329
ClientWidth = 422 ClientWidth = 422
inherited Back: TPanel inherited Content: TPanel
Height = 329 Height = 293
Top = 36
Width = 422 Width = 422
ClientHeight = 329 ClientHeight = 293
ClientWidth = 422 ClientWidth = 422
inherited Content: TPanel object cbToFind: TComboBox[0]
Height = 293 Left = 4
Width = 422 Height = 30
ClientHeight = 293 Top = 4
ClientWidth = 422 Width = 414
object cbToFind: TComboBox[0] Align = alTop
Left = 4 AutoComplete = True
Height = 27 AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchCaseSensitive, cbactSearchAscending]
Top = 4 BorderSpacing.Around = 4
Width = 414 ItemHeight = 0
Align = alTop MaxLength = 128
AutoComplete = True TabOrder = 0
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchCaseSensitive, cbactSearchAscending] OnChange = cbToFindChange
BorderSpacing.Around = 4 OnKeyDown = cbToFindKeyDown
ItemHeight = 0 OnSelect = cbToFindChange
MaxLength = 128 end
OnChange = cbToFindChange object btnFind: TBitBtn[1]
OnKeyDown = cbToFindKeyDown Left = 4
OnSelect = cbToFindChange Height = 32
TabOrder = 0 Top = 149
end Width = 414
object btnFind: TBitBtn[1] Align = alBottom
Left = 4 AutoSize = True
Height = 27 BorderSpacing.Around = 4
Top = 169 Caption = 'btnFind'
Width = 414 TabOrder = 1
Align = alBottom end
AutoSize = True object btnReplace: TBitBtn[2]
BorderSpacing.Around = 4 Left = 4
Caption = 'btnFind' Height = 32
TabOrder = 1 Top = 221
end Width = 414
object btnReplace: TBitBtn[2] Align = alBottom
Left = 4 AutoSize = True
Height = 27 BorderSpacing.Around = 4
Top = 231 Caption = 'btnReplace'
Width = 414 TabOrder = 2
Align = alBottom end
AutoSize = True object grpOpts: TGroupBox[3]
BorderSpacing.Around = 4 Left = 4
Caption = 'btnReplace' Height = 73
TabOrder = 2 Top = 72
end Width = 414
object grpOpts: TGroupBox[3] Align = alClient
Left = 4 AutoSize = True
Height = 99 BorderSpacing.Around = 4
Top = 66 Caption = 'Options'
Width = 414 ClientHeight = 54
ClientWidth = 412
TabOrder = 4
object FlowPanel1: TFlowPanel
Left = 0
Height = 54
Top = 0
Width = 412
Align = alClient Align = alClient
AutoSize = True AutoSize = True
BorderSpacing.Around = 4
Caption = 'Options'
ClientHeight = 80
ClientWidth = 410
TabOrder = 4
object FlowPanel1: TFlowPanel
Left = 0
Height = 80
Top = 0
Width = 410
Align = alClient
AutoSize = True
BevelOuter = bvNone
ControlList = <
item
Control = chkRegex
WrapAfter = waAuto
Index = 0
end
item
Control = chkPrompt
WrapAfter = waAuto
Index = 1
end
item
Control = chkCaseSens
WrapAfter = waAuto
Index = 2
end
item
Control = chkFromCur
WrapAfter = waAuto
Index = 3
end
item
Control = chkBack
WrapAfter = waAuto
Index = 4
end
item
Control = chkWWord
WrapAfter = waAuto
Index = 5
end>
FlowLayout = tlTop
FlowStyle = fsTopBottomLeftRight
TabOrder = 0
object chkRegex: TCheckBox
Left = 0
Height = 22
Top = 0
Width = 100
Anchors = []
Caption = 'allow regex'
Checked = True
State = cbChecked
TabOrder = 0
end
object chkPrompt: TCheckBox
Left = 0
Height = 22
Top = 23
Width = 71
Anchors = []
Caption = 'prompt'
TabOrder = 1
end
object chkCaseSens: TCheckBox
Left = 0
Height = 22
Top = 46
Width = 117
Anchors = []
Caption = 'case sensitive'
TabOrder = 2
end
object chkFromCur: TCheckBox
Left = 117
Height = 22
Top = 0
Width = 99
Anchors = []
Caption = 'from cursor'
Checked = True
State = cbChecked
TabOrder = 3
end
object chkBack: TCheckBox
Left = 117
Height = 22
Top = 23
Width = 87
Anchors = []
Caption = 'backward'
TabOrder = 4
end
object chkWWord: TCheckBox
Left = 117
Height = 22
Top = 46
Width = 99
Anchors = []
Caption = 'whole word'
Checked = True
State = cbChecked
TabOrder = 5
end
end
end
object btnReplaceAll: TBitBtn[4]
Left = 4
Height = 27
Top = 262
Width = 414
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
Caption = 'btnReplaceAll'
TabOrder = 3
end
object Panel1: TPanel[5]
Left = 4
Height = 27
Top = 35
Width = 414
Align = alTop
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 27 ControlList = <
ClientWidth = 414 item
TabOrder = 5 Control = chkRegex
object cbReplaceWth: TComboBox WrapAfter = waAuto
Left = 111 Index = 0
Height = 27 end
item
Control = chkPrompt
WrapAfter = waAuto
Index = 1
end
item
Control = chkCaseSens
WrapAfter = waAuto
Index = 2
end
item
Control = chkFromCur
WrapAfter = waAuto
Index = 3
end
item
Control = chkBack
WrapAfter = waAuto
Index = 4
end
item
Control = chkWWord
WrapAfter = waAuto
Index = 5
end>
FlowLayout = tlTop
FlowStyle = fsTopBottomLeftRight
TabOrder = 0
object chkRegex: TCheckBox
Left = 0
Height = 23
Top = 0 Top = 0
Width = 303 Width = 94
Align = alClient Anchors = []
AutoComplete = True Caption = 'allow regex'
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchCaseSensitive, cbactSearchAscending] Checked = True
ItemHeight = 0 State = cbChecked
MaxLength = 128 TabOrder = 0
OnChange = cbReplaceWthChange end
OnKeyDown = cbReplaceWthKeyDown object chkPrompt: TCheckBox
OnSelect = cbReplaceWthChange Left = 0
Height = 23
Top = 24
Width = 72
Anchors = []
Caption = 'prompt'
TabOrder = 1 TabOrder = 1
end end
object chkEnableRep: TCheckBox object chkCaseSens: TCheckBox
Left = 0 Left = 94
Height = 27 Height = 23
Top = 0 Top = 0
Width = 111 Width = 107
Align = alLeft Anchors = []
Caption = 'Replace with ' Caption = 'case sensitive'
OnChange = chkEnableRepChange TabOrder = 2
TabOrder = 0
end end
end object chkFromCur: TCheckBox
object Panel2: TPanel[6] Left = 94
Left = 4 Height = 23
Height = 27 Top = 24
Top = 200 Width = 96
Width = 414 Anchors = []
Align = alBottom Caption = 'from cursor'
AutoSize = True Checked = True
BorderSpacing.Around = 4 State = cbChecked
BevelOuter = bvNone TabOrder = 3
ClientHeight = 27
ClientWidth = 414
TabOrder = 6
object btnFindAll: TBitBtn
Left = 0
Height = 27
Top = 0
Width = 402
Align = alClient
AutoSize = True
Caption = 'btnFindAll'
TabOrder = 0
end end
object btnAllScope: TBitBtn object chkBack: TCheckBox
Left = 404 Left = 201
Height = 27 Height = 23
Top = 0 Top = 0
Width = 10 Width = 84
Align = alRight Anchors = []
AutoSize = True Caption = 'backward'
BorderSpacing.Left = 2 TabOrder = 4
OnClick = btnAllScopeClick end
TabOrder = 1 object chkWWord: TCheckBox
Left = 201
Height = 23
Top = 24
Width = 96
Anchors = []
Caption = 'whole word'
Checked = True
State = cbChecked
TabOrder = 5
end end
end end
end end
inherited toolbar: TDexedToolBar object btnReplaceAll: TBitBtn[4]
Left = 4
Height = 32
Top = 257
Width = 414 Width = 414
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
Caption = 'btnReplaceAll'
TabOrder = 3
end end
object Panel1: TPanel[5]
Left = 4
Height = 30
Top = 38
Width = 414
Align = alTop
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 30
ClientWidth = 414
TabOrder = 5
object cbReplaceWth: TComboBox
Left = 104
Height = 30
Top = 0
Width = 310
Align = alClient
AutoComplete = True
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchCaseSensitive, cbactSearchAscending]
ItemHeight = 0
MaxLength = 128
TabOrder = 1
OnChange = cbReplaceWthChange
OnKeyDown = cbReplaceWthKeyDown
OnSelect = cbReplaceWthChange
end
object chkEnableRep: TCheckBox
Left = 0
Height = 30
Top = 0
Width = 104
Align = alLeft
Caption = 'Replace with '
TabOrder = 0
OnChange = chkEnableRepChange
end
end
object Panel2: TPanel[6]
Left = 4
Height = 32
Top = 185
Width = 414
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 32
ClientWidth = 414
TabOrder = 6
object btnFindAll: TBitBtn
Left = 0
Height = 32
Top = 0
Width = 398
Align = alClient
AutoSize = True
Caption = 'btnFindAll'
TabOrder = 0
end
object btnAllScope: TBitBtn
Left = 400
Height = 32
Top = 0
Width = 14
Align = alRight
AutoSize = True
BorderSpacing.Left = 2
OnClick = btnAllScopeClick
TabOrder = 1
end
end
end
inherited toolbar: TDexedToolBar
Width = 414
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu
Left = 216 Left = 216
Top = 16 Top = 16
end end
object imgList: TImageList[2] object imgList: TImageList[3]
Left = 248 Left = 248
Top = 16 Top = 16
Bitmap = { Bitmap = {

View File

@ -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, RegExpr, SynEditTextBuffer, strutils, LCLType,
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,13 +762,16 @@ 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
exit; actFindNextExecute(nil)
actFindNextExecute(nil); else if (key = VK_ESCAPE) and fDoc.isAssigned then
fDoc.setFocus;
end; end;
procedure TSearchWidget.chkEnableRepChange(Sender: TObject); procedure TSearchWidget.chkEnableRepChange(Sender: TObject);

View File

@ -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 = true); procedure init(const text: string; throw: boolean);
// 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 = true); procedure TSemVer.init(const text: string; throw: boolean);
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 := r.takeUntil('.').yield.ToInteger; fMajor := StrToInt64Def(r.takeUntil('.').yield, 0);
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 := r.popFront^.takeUntil('.').yield.ToInteger; fMinor := StrToInt64Def(r.popFront^.takeUntil('.').yield, 0);
if not r.empty then if not r.empty then
fPatch := r.popFront^.takeWhile(['0'..'9']).yield.ToInteger; fPatch := StrToInt64Def(r.popFront^.takeWhile(['0'..'9']).yield, 0);
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'); v1.init('v1.0.0', true);
v2.init('v1.0.0'); v2.init('v1.0.0', true);
assert(v1 = v2); assert(v1 = v2);
v1.init('v2.0.0'); v1.init('v2.0.0', true);
v2.init('v1.0.0'); v2.init('v1.0.0', true);
assert(v1 > v2); assert(v1 > v2);
assert(v2 < v1); assert(v2 < v1);
v1.init('v1.1.0'); v1.init('v1.1.0', true);
v2.init('v1.0.0'); v2.init('v1.0.0', true);
assert(v1 > v2); assert(v1 > v2);
assert(v2 < v1); assert(v2 < v1);
v1.init('v1.1.1'); v1.init('v1.1.1', true);
v2.init('v1.1.0'); v2.init('v1.1.0', true);
assert(v1 > v2); assert(v1 > v2);
assert(v2 < v1); assert(v2 < v1);
v1.init('v1.1.1'); v1.init('v1.1.1', true);
v2.init('v1.0.1'); v2.init('v1.0.1', true);
assert(v1 > v2); assert(v1 > v2);
assert(v2 < v1); assert(v2 < v1);
v1.init('v1.1.1-alpha.2'); v1.init('v1.1.1-alpha.2', true);
v2.init('v1.1.1-alpha.1'); v2.init('v1.1.1-alpha.1', true);
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'); v1.init('v1.1.1-beta.1', true);
v2.init('v1.1.1-alpha.8'); v2.init('v1.1.1-alpha.8', true);
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'); v1.init('v1.2.3', true);
v2.init('v1.22.33'); v2.init('v1.22.33', true);
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'); v1.init('v0.0.2060', true);
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'); v1.init('v0.6.0', true);
assert(v1.major = 0); assert(v1.major = 0);
assert(v1.minor = 6); assert(v1.minor = 6);
assert(v1.patch = 0); assert(v1.patch = 0);

View File

@ -14,21 +14,21 @@ type
KeywordMatch = record KeywordMatch = record
private private
{ {
rendered on 2021-Nov-28 21:12:13.8852083 by IsItThere. rendered on 2024-Feb-21 05:21:19.9635608 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 =
('', '', 'alias', 'this', 'f32', '', 's32', 's8', 'throw', 'f64', 'switch', 's64', '', '', '', '', '', '', 'finally', '', '', '', 'if', '', '', '', '', '', '', '', '', '', '', '', '', '', 'protection', 's16', '', '', 'goto', 'usize', '', '', 'in', '', 'static', '', 'try', '', '', '', 'enum', 'do', '', '', '', 'super', 'const', 'union', '', '', 'else', '', 'version', '', '', '', '', 'u32', 'u8', 'echo', '', 'true', 'u64', 'asm', '', 'struct', '', 'auto', 'bool', '', '', '', '', '', 'false', 'null', 'class', '', '', 'overload', '', '', '', '', 'label', '', 'assert', 'continue', 'u16', 'foreach', 'break', '', '', '', 'ssize', '', '', '', '', 'unit', 'while', '', 'var', 'new', 'with', 'template', '', 'import', 'on', 'delete', '', 'function', '', 'return', '', ''); ('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');
const fFilled: array [0..127] of boolean = const fFilled: array [0..127] of boolean =
(false, false, true, true, true, false, true, true, true, true, true, true, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, false, true, true, false, false, true, false, true, false, true, false, false, false, true, true, false, false, false, true, true, true, false, false, true, false, true, false, false, false, false, true, true, true, false, true, true, true, false, true, false, true, true, false, false, false, false, false, true, true, true, false, false, true, false, false, false, false, true, false, true, true, true, true, true, false, false, false, true, false, false, false, false, true, true, false, true, true, true, true, false, true, true, true, false, true, false, true, false, false); (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);
const fCoefficients: array [0..255] of Byte = const fCoefficients: array [0..255] of Byte =
(251, 141, 241, 229, 153, 224, 69, 154, 183, 60, 181, 128, 168, 190, 25, 39, 142, 116, 172, 48, 49, 203, 195, 46, 229, 38, 232, 88, 114, 147, 97, 185, 242, 43, 34, 75, 89, 228, 21, 156, 254, 129, 186, 74, 224, 78, 146, 25, 49, 118, 232, 70, 92, 34, 215, 44, 47, 48, 153, 28, 19, 111, 146, 97, 159, 224, 143, 72, 212, 194, 30, 104, 134, 217, 123, 30, 68, 206, 208, 50, 96, 3, 30, 30, 90, 245, 234, 93, 191, 97, 112, 45, 103, 11, 225, 255, 132, 128, 78, 62, 41, 62, 214, 100, 191, 64, 95, 146, 234, 243, 236, 12, 68, 60, 72, 216, 44, 23, 42, 201, 206, 188, 188, 190, 114, 193, 20, 143, 119, 31, 235, 96, 72, 92, 146, 146, 227, 33, 253, 76, 142, 189, 58, 38, 203, 68, 19, 35, 82, 49, 150, 78, 157, 199, 33, 210, 223, 133, 237, 56, 89, 123, 20, 177, 68, 205, 21, 128, 142, 35, 222, 180, 138, 141, 10, 160, 212, 166, 255, 166, 75, 212, 216, 239, 76, 119, 45, 62, 130, 21, 116, 119, 253, 50, 241, 160, 208, 225, 244, 55, 57, 238, 239, 107, 190, 143, 165, 125, 217, 80, 18, 244, 72, 210, 28, 77, 138, 40, 239, 124, 75, 87, 92, 121, 107, 222, 0, 23, 215, 213, 133, 144, 208, 216, 191, 170, 75, 182, 75, 230, 218, 136, 44, 134, 191, 183, 126, 108, 58, 29, 52, 163, 111, 131, 198, 230); (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,6 +91,7 @@ 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();
@ -577,6 +578,25 @@ 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;
@ -675,21 +695,12 @@ 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': '_', 'a'..'z', 'A'..'Z', '0'..'9':
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;
@ -779,6 +790,8 @@ begin
end; end;
// number // number
'1' .. '9' : lexIntLiteral(); '1' .. '9' : lexIntLiteral();
// char
#39 : lexCharLiteral();
// "string" // "string"
'"': lexStringLiteral(); '"': lexStringLiteral();
// `string` // `string`
@ -798,7 +811,16 @@ 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;

View File

@ -6,86 +6,84 @@ inherited SymbolListWidget: TSymbolListWidget
Caption = 'Symbol list' Caption = 'Symbol list'
ClientHeight = 430 ClientHeight = 430
ClientWidth = 308 ClientWidth = 308
inherited Back: TPanel Height = 430
Height = 430 Width = 308
AutoSize = True
ClientHeight = 430
ClientWidth = 308
inherited Content: TPanel
Height = 394
Width = 308 Width = 308
AutoSize = True ClientHeight = 394
ClientHeight = 430
ClientWidth = 308 ClientWidth = 308
inherited Content: TPanel PopupMenu = nil
Height = 394 object Tree: TTreeView[0]
Width = 308 Left = 4
ClientHeight = 394 Height = 386
ClientWidth = 308 Top = 4
PopupMenu = nil
object Tree: TTreeView[0]
Left = 4
Height = 386
Top = 4
Width = 300
Align = alClient
BorderSpacing.Around = 4
HideSelection = False
ReadOnly = True
RightClickSelect = True
ScrollBars = ssAutoBoth
SelectionColor = clActiveBorder
TabOrder = 0
OnCompare = TreeCompare
OnKeyPress = TreeKeyPress
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
Items.Data = {
F9FFFFFF02000E000000090000000900000009000000FFFFFFFF000000000000
000000060000004572726F7273080000000800000008000000FFFFFFFF000000
000000000000080000005761726E696E6773000000000000000000000000FFFF
FFFF00000000000000000005000000416C696173010000000100000001000000
FFFFFFFF00000000000000000005000000436C61737302000000020000000200
0000FFFFFFFF00000000000000000004000000456E756D030000000300000003
000000FFFFFFFF0000000000000000000800000046756E6374696F6E04000000
0400000004000000FFFFFFFF00000000000000000006000000496D706F727405
0000000500000005000000FFFFFFFF00000000000000000009000000496E7465
7266616365060000000600000006000000FFFFFFFF0000000000000000000500
00004D6978696E070000000700000007000000FFFFFFFF000000000000000000
06000000537472756374000000000000000000000000FFFFFFFF000000000000
0000000800000054656D706C617465010000000100000001000000FFFFFFFF00
000000000000000005000000556E696F6E020000000200000002000000FFFFFF
FF00000000000000000008000000556E69747465737403000000030000000300
0000FFFFFFFF000000000000000000080000005661726961626C65
}
TreeLineColor = clDefault
end
end
inherited toolbar: TDexedToolBar
Width = 300 Width = 300
OnResize = toolbarResize Align = alClient
object btnRefresh: TDexedToolButton[0] BorderSpacing.Around = 4
Left = 1 HideSelection = False
Hint = 'refresh the symbol list' ReadOnly = True
Top = 0 RightClickSelect = True
AutoSize = True ScrollBars = ssAutoBoth
Caption = 'btnRefresh' SelectionColor = clActiveBorder
OnClick = btnRefreshClick TabOrder = 0
resourceName = 'ARROW_UPDATE' OnCompare = TreeCompare
scaledSeparator = False OnKeyPress = TreeKeyPress
end Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
object TreeFilterEdit1: TTreeFilterEdit[1] Items.Data = {
Left = 32 F9FFFFFF02000E000000090000000900000009000000FFFFFFFF000000000000
Height = 26 000000060000004572726F7273080000000800000008000000FFFFFFFF000000
Hint = 'filter the symbols that contain the text typed here' 000000000000080000005761726E696E6773000000000000000000000000FFFF
Top = 2 FFFF00000000000000000005000000416C696173010000000100000001000000
Width = 264 FFFFFFFF00000000000000000005000000436C61737302000000020000000200
OnAfterFilter = TreeFilterEdit1AfterFilter 0000FFFFFFFF00000000000000000004000000456E756D030000000300000003
OnFilterItem = TreeFilterEdit1FilterItem 000000FFFFFFFF0000000000000000000800000046756E6374696F6E04000000
ButtonWidth = 28 0400000004000000FFFFFFFF00000000000000000006000000496D706F727405
Align = alClient 0000000500000005000000FFFFFFFF00000000000000000009000000496E7465
BorderSpacing.Left = 30 7266616365060000000600000006000000FFFFFFFF0000000000000000000500
BorderSpacing.Around = 2 00004D6978696E070000000700000007000000FFFFFFFF000000000000000000
NumGlyphs = 1 06000000537472756374000000000000000000000000FFFFFFFF000000000000
MaxLength = 0 0000000800000054656D706C617465010000000100000001000000FFFFFFFF00
TabOrder = 0 000000000000000005000000556E696F6E020000000200000002000000FFFFFF
OnMouseEnter = TreeFilterEdit1MouseEnter FF00000000000000000008000000556E69747465737403000000030000000300
FilteredTreeview = Tree 0000FFFFFFFF000000000000000000080000005661726961626C65
end }
TreeLineColor = clDefault
end
end
inherited toolbar: TDexedToolBar
Width = 300
OnResize = toolbarResize
object btnRefresh: TDexedToolButton[0]
Left = 1
Hint = 'refresh the symbol list'
Top = 0
AutoSize = True
Caption = 'btnRefresh'
OnClick = btnRefreshClick
resourceName = 'ARROW_UPDATE'
scaledSeparator = False
end
object TreeFilterEdit1: TTreeFilterEdit[1]
Left = 32
Height = 26
Hint = 'filter the symbols that contain the text typed here'
Top = 2
Width = 264
OnAfterFilter = TreeFilterEdit1AfterFilter
OnFilterItem = TreeFilterEdit1FilterItem
ButtonWidth = 28
Align = alClient
BorderSpacing.Left = 30
BorderSpacing.Around = 2
NumGlyphs = 1
MaxLength = 0
TabOrder = 0
OnMouseEnter = TreeFilterEdit1MouseEnter
FilteredTreeview = Tree
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -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.Identifier.isNotEmpty then if fDoc.HighlightedIdent.isNotEmpty then
fSymbols[CI] := fDoc.Identifier; fSymbols[CI] := fDoc.HighlightedIdent;
fSymbols[CL] := fDoc.LineText; fSymbols[CL] := fDoc.LineText;
fSymbols[CS] := fDoc.SelText; fSymbols[CS] := fDoc.SelText;
end; end;

View File

@ -11,7 +11,6 @@ uses
SynEditMarks, SynEditTypes, SynHighlighterJScript, SynBeautifier, dialogs, SynEditMarks, SynEditTypes, SynHighlighterJScript, SynBeautifier, dialogs,
md5, Spin, LCLIntf, LazFileUtils, LMessages, SynHighlighterCpp, math, 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,
@ -98,6 +97,7 @@ 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,6 +106,7 @@ 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;
@ -189,7 +190,6 @@ 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;
fIdentifier: string; fHighlightedIdent: 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; procedure highlightCurrentIdentifier(fromEditor: boolean = true);
procedure saveCache; procedure saveCache;
procedure loadCache; procedure loadCache;
class procedure cleanCache; static; class procedure cleanCache; static;
@ -319,6 +319,7 @@ 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;
@ -381,9 +382,13 @@ type
procedure replaceUndoableContent(const value: string); procedure replaceUndoableContent(const value: string);
procedure setDscannerOptions(dsEnabled: boolean; dsDelay: integer); procedure setDscannerOptions(dsEnabled: boolean; dsDelay: integer);
procedure centerCursor(); procedure centerCursor();
procedure redoAll();
procedure undoAll();
procedure scrollCentered(down: boolean);
procedure setHighligtherFrom(other: TDexedMemo);
// //
property IdentifierMatchOptions: TIdentifierMatchOptions read fMatchOpts write setMatchOpts; property IdentifierMatchOptions: TIdentifierMatchOptions read fMatchOpts write setMatchOpts;
property Identifier: string read fIdentifier; property HighlightedIdent: string read fHighlightedIdent write setHighligthedIdent;
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;
@ -481,6 +486,10 @@ const
ecRightWordEdge = ecUserFirst + 31; ecRightWordEdge = ecUserFirst + 31;
ecSelLeftWordEdge = ecUserFirst + 32; ecSelLeftWordEdge = ecUserFirst + 32;
ecSelRightWordEdge = ecUserFirst + 33; ecSelRightWordEdge = ecUserFirst + 33;
ecRedoAll = ecUserFirst + 34;
ecUndoAll = ecUserFirst + 35;
ecScrollCenteredUp = 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.
@ -839,6 +848,7 @@ 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;
@ -866,8 +876,10 @@ 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
@ -1234,9 +1246,6 @@ 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];
@ -1256,7 +1265,6 @@ 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;
@ -1481,6 +1489,10 @@ begin
AddKey(ecSelRightWordEdge, 0, [], 0, []); AddKey(ecSelRightWordEdge, 0, [], 0, []);
AddKey(ecSmartWordLeft, 0, [], 0, []); AddKey(ecSmartWordLeft, 0, [], 0, []);
AddKey(ecSmartWordRight, 0, [], 0, []); AddKey(ecSmartWordRight, 0, [], 0, []);
AddKey(ecRedoAll, 0, [], 0, []);
AddKey(ecUndoAll, 0, [], 0, []);
AddKey(ecScrollCenteredDown, VK_DOWN, [ssCtrl, ssAlt], 0, []);
AddKey(ecScrollCenteredUp, VK_UP, [ssCtrl, ssAlt], 0, []);
end; end;
end; end;
@ -1520,6 +1532,10 @@ begin
'ecRightWordEdge': begin Int := ecRightWordEdge; exit(true); end; 'ecRightWordEdge': begin Int := ecRightWordEdge; exit(true); end;
'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;
'ecUndoAll': begin Int := ecUndoAll; exit(true); end;
'ecScrollCenteredUp': begin Int := ecScrollCenteredUp; exit(true); end;
'ecScrollCenteredDown': begin Int := ecScrollCenteredDown; exit(true); end;
else exit(false); else exit(false);
end; end;
end; end;
@ -1560,6 +1576,10 @@ begin
ecRightWordEdge: begin Ident := 'ecRightWordEdge'; exit(true); end; ecRightWordEdge: begin Ident := 'ecRightWordEdge'; exit(true); end;
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;
ecUndoAll: begin Ident := 'ecUndoAll'; exit(true); end;
ecScrollCenteredUp: begin Ident := 'ecScrollCenteredUp'; exit(true); end;
ecScrollCenteredDown: begin Ident := 'ecScrollCenteredDown'; exit(true); end;
else exit(false); else exit(false);
end; end;
end; end;
@ -1692,6 +1712,14 @@ begin
gotoWordEdge(false); gotoWordEdge(false);
ecRightWordEdge, ecSelRightWordEdge: ecRightWordEdge, ecSelRightWordEdge:
gotoWordEdge(true); gotoWordEdge(true);
ecRedoAll:
redoAll();
ecUndoAll:
undoAll();
ecScrollCenteredUp:
scrollCentered(false);
ecScrollCenteredDown:
scrollCentered(true);
end; end;
if fOverrideColMode and not SelAvail then if fOverrideColMode and not SelAvail then
begin begin
@ -2128,6 +2156,35 @@ begin
TopView := NewTopLine; TopView := NewTopLine;
end; end;
procedure TDexedMemo.scrollCentered(down: boolean);
begin
centerCursor();
if not down then
begin
ExecuteCommand(ecScrollDown, #0, nil);
CaretY := CaretY - 1;
end else
begin
ExecuteCommand(ecScrollUp, #0, nil);
CaretY := CaretY + 1;
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;
@ -2673,6 +2730,22 @@ begin
end; end;
end; end;
procedure TDexedMemo.redoAll();
begin
BeginUpdate(false);
while CanRedo do
Redo;
EndUpdate();
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;
@ -2889,6 +2962,7 @@ 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;
@ -2920,7 +2994,16 @@ begin
r := TStringRange.create(lines[i]); r := TStringRange.create(lines[i]);
while not r.empty do while not r.empty do
begin begin
w := r.popUntil(c)^.takeWhile(c).yield; r.popWhile([' ', #9]);
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);
@ -2940,6 +3023,11 @@ 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
@ -3309,14 +3397,23 @@ begin
fIsDSource := Highlighter = fD2Highlighter; fIsDSource := Highlighter = fD2Highlighter;
end; end;
procedure TDexedMemo.highlightCurrentIdentifier; procedure TDexedMemo.setHighligthedIdent(value: string);
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
fIdentifier := GetWordAtRowCol(LogicalCaretXY); if fromEditor then
if (fIdentifier.length > 2) and (not SelAvail) then fHighlightedIdent := GetWordAtRowCol(LogicalCaretXY);
SetHighlightSearch(fIdentifier, fMatchIdentOpts) if (fHighlightedIdent.length > 2) and (not SelAvail) then
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;
@ -4032,7 +4129,6 @@ begin
else else
addBreakPoint(line); addBreakPoint(line);
CaretY := Line; CaretY := Line;
centerCursor;
end; end;
procedure TDexedMemo.addGutterIcon(line: integer; value: TGutterIcon); procedure TDexedMemo.addGutterIcon(line: integer; value: TGutterIcon);

View File

@ -6,41 +6,35 @@ inherited TermWidget: TTermWidget
ClientHeight = 296 ClientHeight = 296
ClientWidth = 674 ClientWidth = 674
OnShortCut = FormShortCut OnShortCut = FormShortCut
inherited Back: TPanel inherited Content: TPanel
Height = 296 Height = 260
Width = 674 Width = 674
ClientHeight = 296 ClientHeight = 260
ClientWidth = 674 ClientWidth = 674
inherited Content: TPanel OnPaint = ContentPaint
object ScrollBar1: TScrollBar[0]
Left = 661
Height = 260 Height = 260
Width = 674 Top = 0
ClientHeight = 260 Width = 13
ClientWidth = 674 Align = alRight
OnPaint = ContentPaint Kind = sbVertical
object ScrollBar1: TScrollBar[0] PageSize = 0
Left = 661 TabOrder = 0
Height = 260 OnScroll = ScrollBar1Scroll
Top = 0
Width = 13
Align = alRight
Kind = sbVertical
PageSize = 0
TabOrder = 0
OnScroll = ScrollBar1Scroll
end
object Panel1: TPanel[1]
Left = 0
Height = 260
Top = 0
Width = 661
Align = alClient
BevelOuter = bvNone
TabOrder = 1
end
end end
inherited toolbar: TDexedToolBar object Panel1: TPanel[1]
Height = 30 Left = 0
Width = 666 Height = 260
Top = 0
Width = 661
Align = alClient
BevelOuter = bvNone
TabOrder = 1
end end
end end
inherited toolbar: TDexedToolBar
Height = 30
Width = 666
end
end end

View File

@ -6,96 +6,89 @@ inherited TodoListWidget: TTodoListWidget
Caption = 'Todo list' Caption = 'Todo list'
ClientHeight = 337 ClientHeight = 337
ClientWidth = 584 ClientWidth = 584
inherited Back: TPanel inherited Content: TPanel
Height = 337 Height = 301
Width = 584 Width = 584
AutoSize = True ClientHeight = 301
ClientHeight = 337
ClientWidth = 584 ClientWidth = 584
inherited Content: TPanel object lstItems: TListView[0]
Height = 301 Left = 4
Width = 584 Height = 293
ClientHeight = 301 Top = 4
ClientWidth = 584
object lstItems: TListView[0]
Left = 4
Height = 293
Top = 4
Width = 576
Align = alClient
BorderSpacing.Around = 4
Columns = <
item
AutoSize = True
Caption = 'text'
Width = 36
end
item
AutoSize = True
Caption = 'category'
Width = 67
end
item
AutoSize = True
Caption = 'assignee'
Width = 68
end
item
AutoSize = True
Caption = 'status'
end
item
AutoSize = True
Caption = 'priority'
Width = 57
end
item
AutoSize = True
Caption = 'file'
Width = 284
end>
ReadOnly = True
SortType = stText
TabOrder = 0
ViewStyle = vsReport
end
end
inherited toolbar: TDexedToolBar
Width = 576 Width = 576
OnResize = toolbarResize Align = alClient
object btnGo: TDexedToolButton[0] BorderSpacing.Around = 4
Left = 29 Columns = <
Hint = 'go the TODO item definition' item
Top = 0 AutoSize = True
AutoSize = True Caption = 'text'
Caption = 'btnGo' Width = 36
resourceName = 'PENCIL_GO' end
scaledSeparator = False item
end AutoSize = True
object btnRefresh: TDexedToolButton[1] Caption = 'category'
Left = 1 Width = 67
Hint = 'refresh the TODO items' end
Top = 0 item
AutoSize = True AutoSize = True
Caption = 'btnRefresh' Caption = 'assignee'
resourceName = 'ARROW_UPDATE' Width = 68
scaledSeparator = False end
end item
object lstfilter: TListFilterEdit[2] AutoSize = True
Left = 61 Caption = 'status'
Height = 26 end
Hint = 'filter the TODO items that contain the text typed here' item
Top = 2 AutoSize = True
Width = 513 Caption = 'priority'
ButtonWidth = 28 Width = 57
Align = alClient end
Anchors = [akTop, akLeft, akRight] item
BorderSpacing.Left = 58 AutoSize = True
BorderSpacing.Around = 2 Caption = 'file'
NumGlyphs = 1 Width = 284
MaxLength = 0 end>
TabOrder = 0 ReadOnly = True
end SortType = stText
TabOrder = 0
ViewStyle = vsReport
end
end
inherited toolbar: TDexedToolBar
Width = 576
OnResize = toolbarResize
object btnGo: TDexedToolButton[0]
Left = 29
Hint = 'go the TODO item definition'
Top = 0
AutoSize = True
Caption = 'btnGo'
resourceName = 'PENCIL_GO'
scaledSeparator = False
end
object btnRefresh: TDexedToolButton[1]
Left = 1
Hint = 'refresh the TODO items'
Top = 0
AutoSize = True
Caption = 'btnRefresh'
resourceName = 'ARROW_UPDATE'
scaledSeparator = False
end
object lstfilter: TListFilterEdit[2]
Left = 61
Height = 26
Hint = 'filter the TODO items that contain the text typed here'
Top = 2
Width = 513
ButtonWidth = 28
Align = alClient
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 58
BorderSpacing.Around = 2
NumGlyphs = 1
MaxLength = 0
TabOrder = 0
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu

View File

@ -6,164 +6,161 @@ inherited ToolsEditorWidget: TToolsEditorWidget
Caption = 'Tools editor' Caption = 'Tools editor'
ClientHeight = 280 ClientHeight = 280
ClientWidth = 441 ClientWidth = 441
inherited Back: TPanel inherited Content: TPanel
Height = 280 Height = 244
Top = 36
Width = 441 Width = 441
AutoSize = True ClientHeight = 244
ClientHeight = 280
ClientWidth = 441 ClientWidth = 441
inherited Content: TPanel object Panel2: TPanel[0]
Height = 244 Left = 4
Width = 441 Height = 236
ClientHeight = 244 Top = 4
ClientWidth = 441 Width = 433
object Panel2: TPanel[0] Align = alClient
Left = 4 AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 236
ClientWidth = 433
TabOrder = 0
object lstTools: TListBox
Left = 0
Height = 236 Height = 236
Top = 4 Top = 0
Width = 433 Width = 160
Align = alClient Align = alLeft
AutoSize = True ExtendedSelect = False
BorderSpacing.Around = 4 ItemHeight = 0
BevelOuter = bvNone OnDblClick = lstToolsDblClick
ClientHeight = 236 OnDrawItem = lstToolsDrawItem
ClientWidth = 433 OnKeyPress = lstToolsKeyPress
OnSelectionChange = lstToolsSelectionChange
ScrollWidth = 158
Style = lbOwnerDrawFixed
TabOrder = 0 TabOrder = 0
object lstTools: TListBox TopIndex = -1
Left = 0 end
Height = 236 object Splitter1: TSplitter
Top = 0 Left = 160
Width = 160 Height = 236
Align = alLeft Top = 0
ItemHeight = 0 Width = 5
OnDblClick = lstToolsDblClick AutoSnap = False
OnDrawItem = lstToolsDrawItem end
OnSelectionChange = lstToolsSelectionChange object propsEd: TTIPropertyGrid
ScrollWidth = 158 Left = 165
Style = lbOwnerDrawFixed Height = 236
TabOrder = 0 Top = 0
TopIndex = -1 Width = 268
end Align = alClient
object Splitter1: TSplitter CheckboxForBoolean = False
Left = 160 DefaultValueFont.Color = clWindowText
Height = 236 Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Top = 0 Indent = 16
Width = 5 NameFont.Color = clWindowText
AutoSnap = False OnModified = propsEdModified
end PreferredSplitterX = 150
object propsEd: TTIPropertyGrid SplitterX = 150
Left = 165 ValueFont.Color = clGreen
Height = 236
Top = 0
Width = 268
Align = alClient
CheckboxForBoolean = False
DefaultValueFont.Color = clWindowText
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Indent = 16
NameFont.Color = clWindowText
OnModified = propsEdModified
PreferredSplitterX = 150
SplitterX = 150
ValueFont.Color = clGreen
end
end end
end end
inherited toolbar: TDexedToolBar end
Width = 433 inherited toolbar: TDexedToolBar
object btnRun: TDexedToolButton[0] Height = 30
Left = 174 Width = 433
Hint = 'execute selected tool' object btnRun: TDexedToolButton[0]
Top = 0 Left = 174
AutoSize = True Hint = 'execute selected tool'
Caption = 'btnRun' Top = 0
OnClick = btnRunClick AutoSize = True
resourceName = 'APPLICATION_FLASH' Caption = 'btnRun'
scaledSeparator = False OnClick = btnRunClick
end resourceName = 'APPLICATION_FLASH'
object button1: TDexedToolButton[1] scaledSeparator = False
Left = 169 end
Height = 28 object button1: TDexedToolButton[1]
Top = 0 Left = 169
AutoSize = True Height = 28
Caption = 'button1' Top = 0
Style = tbsDivider AutoSize = True
scaledSeparator = False Caption = 'button1'
end Style = tbsDivider
object btnClone: TDexedToolButton[2] scaledSeparator = False
Left = 141 end
Hint = 'clone selected tool' object btnClone: TDexedToolButton[2]
Top = 0 Left = 141
AutoSize = True Hint = 'clone selected tool'
Caption = 'btnClone' Top = 0
OnClick = btnCloneClick AutoSize = True
resourceName = 'APPLICATION_DOUBLE' Caption = 'btnClone'
scaledSeparator = False OnClick = btnCloneClick
end resourceName = 'APPLICATION_DOUBLE'
object btnMoveUp: TDexedToolButton[3] scaledSeparator = False
Left = 113 end
Hint = 'move selected tool up' object btnMoveUp: TDexedToolButton[3]
Top = 0 Left = 113
AutoSize = True Hint = 'move selected tool up'
Caption = 'btnMoveUp' Top = 0
OnClick = btnMoveUpClick AutoSize = True
resourceName = 'ARROW_UP' Caption = 'btnMoveUp'
scaledSeparator = False OnClick = btnMoveUpClick
end resourceName = 'ARROW_UP'
object btnMoveDown: TDexedToolButton[4] scaledSeparator = False
Left = 85 end
Hint = 'move selected tool down' object btnMoveDown: TDexedToolButton[4]
Top = 0 Left = 85
AutoSize = True Hint = 'move selected tool down'
Caption = 'btnMoveDown' Top = 0
OnClick = btnMoveDownClick AutoSize = True
resourceName = 'ARROW_DOWN' Caption = 'btnMoveDown'
scaledSeparator = False OnClick = btnMoveDownClick
end resourceName = 'ARROW_DOWN'
object btnRemTool: TDexedToolButton[5] scaledSeparator = False
Left = 57 end
Hint = 'remove selected tool' object btnRemTool: TDexedToolButton[5]
Top = 0 Left = 57
AutoSize = True Hint = 'remove selected tool'
Caption = 'btnRemTool' Top = 0
OnClick = btnRemToolClick AutoSize = True
resourceName = 'APPLICATION_DELETE' Caption = 'btnRemTool'
scaledSeparator = False OnClick = btnRemToolClick
end resourceName = 'APPLICATION_DELETE'
object btnAddTool: TDexedToolButton[6] scaledSeparator = False
Left = 29 end
Hint = 'add a new empty tool' object btnAddTool: TDexedToolButton[6]
Top = 0 Left = 29
AutoSize = True Hint = 'add a new empty tool'
Caption = 'btnAddTool' Top = 0
OnClick = BtnAddToolClick AutoSize = True
resourceName = 'APPLICATION_ADD' Caption = 'btnAddTool'
scaledSeparator = False OnClick = BtnAddToolClick
end resourceName = 'APPLICATION_ADD'
object btnEdit: TDexedToolButton[7] scaledSeparator = False
Left = 1 end
Hint = 'enable or disable edition' object btnEdit: TDexedToolButton[7]
Top = 0 Left = 1
AutoSize = True Hint = 'enable or disable edition'
Caption = 'btnEdit' Top = 0
OnClick = btnEditClick AutoSize = True
resourceName = 'APPLICATION_EDIT' Caption = 'btnEdit'
scaledSeparator = False OnClick = btnEditClick
end resourceName = 'APPLICATION_EDIT'
object btnKill: TDexedToolButton[8] scaledSeparator = False
Left = 202 end
Hint = 'if running, kills the process matching to the selected tool' object btnKill: TDexedToolButton[8]
Top = 0 Left = 202
AutoSize = True Hint = 'if running, kills the process matching to the selected tool'
Caption = 'btnKill' Top = 0
OnClick = btnKillClick AutoSize = True
resourceName = 'CANCEL' Caption = 'btnKill'
scaledSeparator = False OnClick = btnKillClick
end resourceName = 'CANCEL'
scaledSeparator = False
end end
end end
inherited contextMenu: TPopupMenu inherited contextMenu: TPopupMenu
left = 16 Left = 16
top = 40 Top = 40
end end
end end

View File

@ -36,6 +36,7 @@ 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
@ -261,5 +262,10 @@ 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.

View File

@ -1,54 +1,42 @@
object DexedWidget: TDexedWidget object DexedWidget: TDexedWidget
Left = 1360 Left = 1360
Height = 121 Height = 118
Top = 144 Top = 144
Width = 332 Width = 325
BorderIcons = [biMinimize, biMaximize] BorderIcons = [biMinimize, biMaximize]
Caption = 'DexedWidget' Caption = 'DexedWidget'
ClientHeight = 121 ClientHeight = 118
ClientWidth = 332 ClientWidth = 325
DesignTimePPI = 94
ShowHint = True ShowHint = True
ShowInTaskBar = stNever ShowInTaskBar = stNever
LCLVersion = '2.2.0.1' object Content: TPanel
object Back: TPanel
Left = 0 Left = 0
Height = 121 Height = 83
Top = 0 Top = 35
Width = 332 Width = 325
Align = alClient Align = alClient
AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 121 PopupMenu = contextMenu
ClientWidth = 332 TabOrder = 1
FullRepaint = False end
TabOrder = 0 object toolbar: TDexedToolBar
object Content: TPanel Left = 4
Left = 0 Height = 29
Height = 85 Top = 4
Top = 36 Width = 317
Width = 332 BorderSpacing.Left = 2
Align = alClient BorderSpacing.Top = 2
AutoSize = True BorderSpacing.Right = 2
BevelOuter = bvNone BorderSpacing.Around = 2
PopupMenu = contextMenu Caption = 'toolbar'
TabOrder = 0 EdgeBorders = []
end EdgeInner = esNone
object toolbar: TDexedToolBar EdgeOuter = esNone
Left = 4 Flat = False
Height = 30 TabOrder = 2
Top = 4 Transparent = True
Width = 324
BorderSpacing.Left = 2
BorderSpacing.Top = 2
BorderSpacing.Right = 2
BorderSpacing.Around = 2
Caption = 'toolbar'
EdgeBorders = []
EdgeInner = esNone
EdgeOuter = esNone
Flat = False
TabOrder = 1
Transparent = True
end
end end
object contextMenu: TPopupMenu object contextMenu: TPopupMenu
end end