Compare commits
265 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7d43416cd | ||
|
|
6459b4ab05 | ||
|
|
3a3adf4d04 | ||
|
|
9ca4cf822c | ||
|
|
a6ca8f5ffc | ||
|
|
eb5dc5048a | ||
|
|
a9b0fcdf02 | ||
|
|
f252317c9e | ||
|
|
338ba9a139 | ||
|
|
10025ed2c0 | ||
|
|
e52164ec98 | ||
|
|
51868dd862 | ||
|
|
67e5628b61 | ||
|
|
7f4a06cc7c | ||
|
|
04f2dbba8f | ||
|
|
4bd2dc8d20 | ||
|
|
e84f01f690 | ||
|
|
b3d85bf15a | ||
|
|
d090daab37 | ||
|
|
03970faf71 | ||
|
|
19d50637ad | ||
|
|
adbea02202 | ||
|
|
a7c51efea2 | ||
|
|
3cac414712 | ||
|
|
f028443f28 | ||
|
|
4ec729a8f1 | ||
|
|
17c2b2dbce | ||
|
|
251c09cb81 | ||
|
|
2d55a81c5e | ||
|
|
60c23b1d64 | ||
|
|
f38530041a | ||
|
|
e25b86fbf1 | ||
|
|
67646c850a | ||
|
|
4bbdc6a80e | ||
|
|
c301f82672 | ||
|
|
f8202b119e | ||
|
|
51f42d6629 | ||
|
|
9d601bb2cf | ||
|
|
19a5f3d531 | ||
|
|
39256961f4 | ||
|
|
63d3045c45 | ||
|
|
0ec38f7ec5 | ||
|
|
9789ecb923 | ||
|
|
2f2d4c7211 | ||
|
|
08a06ecfce | ||
|
|
cba1b34f21 | ||
|
|
6f18722bcf | ||
|
|
f6694293ec | ||
|
|
ea2beab605 | ||
|
|
a6d87f191a | ||
|
|
fec0804996 | ||
|
|
25af9f0752 | ||
|
|
1079efdee3 | ||
|
|
5a5d3f8c02 | ||
|
|
2f9778a7bb | ||
|
|
a2db834383 | ||
|
|
af05c45752 | ||
|
|
83aadb7abf | ||
|
|
11dc1aa6ea | ||
|
|
12e2c10cff | ||
|
|
789321143a | ||
|
|
cfe214469b | ||
|
|
713d09354d | ||
|
|
974cd8b6e2 | ||
|
|
2bd2f896ca | ||
|
|
385582122d | ||
|
|
16f026813a | ||
|
|
79381bc5a3 | ||
|
|
40d4ee7582 | ||
|
|
9b8c89bc92 | ||
|
|
b114996f26 | ||
|
|
e71c197da1 | ||
|
|
84285ffebb | ||
|
|
b46b0a62e3 | ||
|
|
28e93b62b7 | ||
|
|
6019d29a2b | ||
|
|
208fdad134 | ||
|
|
415c3c20a5 | ||
|
|
4f81014a13 | ||
|
|
03df5c8e37 | ||
|
|
5c89560fd4 | ||
|
|
6f85d8bc71 | ||
|
|
89e012b38a | ||
|
|
8ec25b74b2 | ||
|
|
49b96a65b6 | ||
|
|
d349245890 | ||
|
|
266c242df7 | ||
|
|
09ece96e39 | ||
|
|
9f31af523f | ||
|
|
732ec73b86 | ||
|
|
0690e49ceb | ||
|
|
2f18ffeda0 | ||
|
|
87259150c7 | ||
|
|
5f274c5db4 | ||
|
|
ece092bfdc | ||
|
|
6da609c4d1 | ||
|
|
e8aa936898 | ||
|
|
710b7679f2 | ||
|
|
6fdbfc3398 | ||
|
|
0499bd6034 | ||
|
|
c1ab2105a5 | ||
|
|
28f9085c63 | ||
|
|
ad39453dca | ||
|
|
7a33783acf | ||
|
|
9edc54a019 | ||
|
|
404537f1eb | ||
|
|
665e2f9af1 | ||
|
|
30533acf5c | ||
|
|
a097557176 | ||
|
|
f7af2621dc | ||
|
|
3f293e2759 | ||
|
|
9702829b57 | ||
|
|
b2ebfa2bf4 | ||
|
|
f1636f4921 | ||
|
|
536241ea4a | ||
|
|
792342634e | ||
|
|
6407c58704 | ||
|
|
1b7039e858 | ||
|
|
ce86a8945f | ||
|
|
b047762803 | ||
|
|
1b92ed9234 | ||
|
|
dcbfed6b59 | ||
|
|
d1fb8837f7 | ||
|
|
34a374e1c2 | ||
|
|
29860fdae8 | ||
|
|
93dabed113 | ||
|
|
b73a5f71a9 | ||
|
|
11647b3508 | ||
|
|
524421cc22 | ||
|
|
3ec95ecbb2 | ||
|
|
112d679f83 | ||
|
|
97d8b30e17 | ||
|
|
4ac9376b19 | ||
|
|
98ba823e23 | ||
|
|
4a2c8e9167 | ||
|
|
8ebb89aaaf | ||
|
|
e892c91518 | ||
|
|
b048b57461 | ||
|
|
4ba15eb62f | ||
|
|
2b7cec04b9 | ||
|
|
79d15adc13 | ||
|
|
43e700d1e6 | ||
|
|
0d646677ce | ||
|
|
4e055d0d4a | ||
|
|
68d7fd70c8 | ||
|
|
1492c225d7 | ||
|
|
2bbffce9e1 | ||
|
|
76a0714638 | ||
|
|
e909158de5 | ||
|
|
4c7c9593de | ||
|
|
04d1fc8299 | ||
|
|
6174f924e0 | ||
|
|
5031c5f5c1 | ||
|
|
23f617d22a | ||
|
|
f33865ccc4 | ||
|
|
620466ad3a | ||
|
|
df6b9fe9b3 | ||
|
|
63bc899a97 | ||
|
|
5c84079283 | ||
|
|
64b14f4005 | ||
|
|
b0ce69da6a | ||
|
|
da7edc4580 | ||
|
|
31b7e4d788 | ||
|
|
c940b56459 | ||
|
|
dcc28d9ce2 | ||
|
|
334a071219 | ||
|
|
48ba4e26b8 | ||
|
|
8da70c6e75 | ||
|
|
61198caae5 | ||
|
|
4e8b9d41ba | ||
|
|
86af637781 | ||
|
|
08825ba79a | ||
|
|
f2b3161474 | ||
|
|
22f2f68a3a | ||
|
|
e3f666570a | ||
|
|
dc757d48e5 | ||
|
|
da6b7db0e6 | ||
|
|
ec218e1424 | ||
|
|
c178ec9ab4 | ||
|
|
9f87a780a7 | ||
|
|
40809b6396 | ||
|
|
6f04ef8921 | ||
|
|
a3235b23bb | ||
|
|
b3fdde036e | ||
|
|
1e86c3c2d6 | ||
|
|
57a89f0c45 | ||
|
|
710c49850c | ||
|
|
94662bbd4c | ||
|
|
fc1f9375ed | ||
|
|
7db6b1ad07 | ||
|
|
d70d6a0bd6 | ||
|
|
b130e68b51 | ||
|
|
fdbb835199 | ||
|
|
3cc2d861db | ||
|
|
e5ca96879a | ||
|
|
80248d2a77 | ||
|
|
400de47586 | ||
|
|
cfdbbff3c7 | ||
|
|
5235cc001b | ||
|
|
12fd9611f7 | ||
|
|
be323d555d | ||
|
|
11facf0acb | ||
|
|
4b13017620 | ||
|
|
7ddaaa20e6 | ||
|
|
b659dfaf79 | ||
|
|
20c73a9e92 | ||
|
|
dfca13b96d | ||
|
|
3c25189fdb | ||
|
|
a1c67447b5 | ||
|
|
6710758962 | ||
|
|
e761a5f7ef | ||
|
|
c8f84e4694 | ||
|
|
e40215a4d1 | ||
|
|
46d6ab8f9e | ||
|
|
377fbfab39 | ||
|
|
4c4259f5ca | ||
|
|
0e8b29936e | ||
|
|
54f16def09 | ||
|
|
e8d7235cfb | ||
|
|
bac1cbc028 | ||
|
|
94ceb8d9df | ||
|
|
6f1a0c0316 | ||
|
|
a225d7e7c7 | ||
|
|
e3f7719ca7 | ||
|
|
809e46eaf7 | ||
|
|
5450ad8311 | ||
|
|
68866eb2cb | ||
|
|
9ff569e8ce | ||
|
|
9375235fc6 | ||
|
|
a2cd63afa6 | ||
|
|
6052a86f0a | ||
|
|
75357d7f41 | ||
|
|
c493f62466 | ||
|
|
89ef72aab3 | ||
|
|
343423898e | ||
|
|
cf02a3ea55 | ||
|
|
811f2a7021 | ||
|
|
fe92bf89e5 | ||
|
|
c9ac9ca23f | ||
|
|
300c6b61c6 | ||
|
|
8678404b84 | ||
|
|
54b29472cc | ||
|
|
f0a3305753 | ||
|
|
d9ce3d0538 | ||
|
|
b457ccbccd | ||
|
|
1fb61028b1 | ||
|
|
98fc8e05bc | ||
|
|
03989f3fd8 | ||
|
|
b41eb364bb | ||
|
|
27708b4dd2 | ||
|
|
0d2ab45c6b | ||
|
|
0cfede0e7a | ||
|
|
2a404541e5 | ||
|
|
657526eab4 | ||
|
|
eb16a80515 | ||
|
|
e283bcb65d | ||
|
|
a1459ba494 | ||
|
|
042998dd71 | ||
|
|
717d46a332 | ||
|
|
b6fd404788 | ||
|
|
02a43a63a6 | ||
|
|
719b76ea80 | ||
|
|
eae8540708 | ||
|
|
539a74aa7a | ||
|
|
4b0bcaa20e |
291
CHANGELOG.md
291
CHANGELOG.md
@@ -1,5 +1,296 @@
|
||||
# ZeroBrane Studio Changelog
|
||||
|
||||
## v0.90 (Nov 08 2014)
|
||||
|
||||
### Highlights
|
||||
- Added function outline.
|
||||
- Added Lua 5.3 (beta) binaries and debugging support.
|
||||
- Added scope-aware auto-complete for local/global variables.
|
||||
- Added hiding/showing files by type in the project/filetree.
|
||||
- Added Esperanto (eo) translation.
|
||||
- Improved compatibility with Lua 5.2 interpreter.
|
||||
- Improved compatibility with system/custom Lua interpreter.
|
||||
|
||||
### Special thanks
|
||||
- To [cosmotect](https://github.com/cosmotect) for added Esperanto translation.
|
||||
- To [riidom](https://github.com/riidom) for updated German translation.
|
||||
- To [Christoph Kubisch](https://github.com/pixeljetstream) for glsl improvements.
|
||||
- To [Wojciech Milkowski](https://github.com/milkowski) for making indentation guide configurable.
|
||||
- To [sclark39](https://github.com/sclark39) for adding project dir to find dialog paths.
|
||||
|
||||
### Improvements
|
||||
- Added Lua 5.3 (beta) support and binaries.
|
||||
- Added Russian translation for new messages (#70).
|
||||
- Added `AddPackage` and `RemovePackage` methods (#166).
|
||||
- Added `CreateBareEditor` package method (#166).
|
||||
- Added `GetAPI` method for interpreter (#166).
|
||||
- Added `GetOutputNotebook` package method (#166).
|
||||
- Added `IsPanelDocked` package method (#166).
|
||||
- Added `Run` and `Run as Scratchpad` buttons to the toolbar.
|
||||
- Added `acandtip.maxlength` option for setting the length of a tooltip.
|
||||
- Added `function` handling to the token processing.
|
||||
- Added `imagemap` setting to support custom images.
|
||||
- Added `onEditorCallTip` method (#166).
|
||||
- Added `showonefile` option for the outline to always show one file (#337).
|
||||
- Added an Esperanto (eo) translation.
|
||||
- Added build support for Lua 5.3-alpha and luasocket for Lua 5.3.
|
||||
- Added check for existing process id before stopping the process.
|
||||
- Added check for pending data to improve re-starting debugging session.
|
||||
- Added collapsing outlines for files in inactive tabs (#337).
|
||||
- Added creating italic font if only the main one is provided.
|
||||
- Added document `SetActive` method (#166).
|
||||
- Added drag-and-drop support for the Outline tab (#337).
|
||||
- Added example of enabling `Opt+Shift+Left/Right` shortcut on OSX.
|
||||
- Added function outline (closes #337, closes #222).
|
||||
- Added handling of `~` in launch command path.
|
||||
- Added hiding/showing files by type in the project/filetree (closes #375).
|
||||
- Added local/global indicators to function outline (#337).
|
||||
- Added marking file after showing files in the tree (#375).
|
||||
- Added navigation based on 'filename:line:pos' in the Output window.
|
||||
- Added option for not/showing anonymous functions in the outline (#337).
|
||||
- Added package `AddTool` and `RemoveTool` methods (#166).
|
||||
- Added package `CreateImageList` method (#166).
|
||||
- Added package `ExecuteCommand` method (#166).
|
||||
- Added package `FindTopMenu` method (#166).
|
||||
- Added package `GetAppName` method and removed hardcoded name references (#166).
|
||||
- Added package `GetConsole` method (#166).
|
||||
- Added package `GetKnownExtensions` method (#166).
|
||||
- Added project dir to find dialog paths; thanks to @sclark39 (closes #358).
|
||||
- Added rule to enable `Set From Current File` only when available.
|
||||
- Added scope-aware auto-complete for local/global variables (closes #291).
|
||||
- Added scrolling to the top of the outline when `showonefile` is set (#337).
|
||||
- Added sending Corona SDK simulator output to the Output window on Windows.
|
||||
- Added translation label for `Toggle Bookmark` toolbar icon (#70, #373).
|
||||
- Added unindent on backspace (controlled by `editor.backspaceunindent`).
|
||||
- Added view menu for the Outline window (#337).
|
||||
- bugfix in output callback for commandline tools
|
||||
- bugfix on extension change save-as, related to new indication handling
|
||||
- cg/hlsl/glsl refine isfndef capture, mostly to react on GLSL's layout mechanism
|
||||
- Disabled moving of Output/Console/Project tabs between panels.
|
||||
- Disabled closing tabs in floating panels.
|
||||
- Improved `ffitoapi` tool logic when no replacement is made.
|
||||
- Improved compatibility with Lua 5.2 interpreter (closes #357).
|
||||
- Improved scroll positioning in the outline after tab changes (#337).
|
||||
- Improved support for non-lua specs in the outline (#337).
|
||||
- Minor update to indentation guides handling (#371).
|
||||
- Moved 'default' search path to be searched first (#357).
|
||||
- Reduced rate of toolbar UI checks to improve performance (fixes #352).
|
||||
- Reduced the number of focus changes in the outline (#337).
|
||||
- Reduced unnecessary editor processing to improve performance (#352).
|
||||
- Refactored `GetBitmap` package method (#166).
|
||||
- Refactored `tools` interface to make it easy to add/remove tools.
|
||||
- Refactored adding editor tab to ensure callbacks have document data.
|
||||
- Refactored default `fprojdir` and `fworkdir` from the interpreter code.
|
||||
- Refactored drag-and-drop processing for Project/Output window tabs (#377).
|
||||
- Refactored panel docking; added `AddPanelDocked` package method (#166).
|
||||
- Refactored timer usage for consistency.
|
||||
- Remove function dropdown from the toolbar (#337).
|
||||
- Removed menu separator from the Tools menu.
|
||||
- Removed prepending libraries for debugging to LUA_CPATH when custom interpreter is specified.
|
||||
- Removed reference to `funclist`, which is no longer needed.
|
||||
- Removed unused image files.
|
||||
- Renamed `markvars` method used in spec files to `marksymbols`.
|
||||
- Renamed image files to have names correspond to the content.
|
||||
- Reorganized default config settings.
|
||||
- Reorganized token list processing to keep it within the editor.
|
||||
- Restored removed function in Lua spec (partial revert of 713d0935).
|
||||
- Switched to using `Is{Input|Error}Available` instead of `stream:CanRead`.
|
||||
- updated luxinia2 related files
|
||||
- Update de.lua
|
||||
- Updated C-based specs to handle function calls without parameters.
|
||||
- Updated C-based specs to use `marksymbols` to provide outline for C functions.
|
||||
- Updated Lua 5.3 build scripts.
|
||||
- Updated `AddPackage` to assign package file name (#166).
|
||||
- Updated `RemoveMenuItem` to disconnect handlers attached to the main frame (#166).
|
||||
- Updated `package.config` description to remove reference to Lua 5.2.
|
||||
- Updated `showanonymous` to a label for anon functions in the outline (#337).
|
||||
- Updated code based on static analysis suggestions.
|
||||
- Updated command launch handling to allow output suppression.
|
||||
- Updated function call indicator to support `isfncall` and `marksymbols`.
|
||||
- Updated function indicator processing to use ranges.
|
||||
- Updated handling of extensions to allow more symbols in extensions.
|
||||
- Updated images in the outline; added `showmethodindicator` option (#337).
|
||||
- Updated indicator processing to improve performance on large files.
|
||||
- Updated interpreter processing to run after packages are loaded.
|
||||
- Updated label for anonymous functions in the outline (#337).
|
||||
- Updated language files with new messages (#70).
|
||||
- Updated markup processing to allow for 3+ markup sequences.
|
||||
- Updated markup processing to support links in non-editor documents.
|
||||
- Updated messages for to match translations (#70).
|
||||
- Updated method of collapsing outline to fix crash on OSX (#337, fixes #368).
|
||||
- Updated outline logic to show on the very first launch (#337).
|
||||
- Updated outline to always expand functions in the current file (#337).
|
||||
- Updated outline to show files without functions (#337).
|
||||
- Updated outline to track filename changes after `Save As` (#337).
|
||||
- Updated outline to use `AddPackage` method (#337).
|
||||
- Updated output callback processing not to run when nothing to process.
|
||||
- Updated package `GetRootPath` to accept file/directory name (#166).
|
||||
- Updated parser to avoid 'breaking' statements during incremental processing.
|
||||
- Updated parser to handle `...` in function parameters.
|
||||
- Updated parser to report function token before parameters (#337).
|
||||
- Updated parser to store position for not-quite-valid function names.
|
||||
- Updated processing of function indicators when auto-analyzer is off.
|
||||
- Updated search/replace to always use the current editor/output/console tab.
|
||||
- Updated static analizer to accept typedlua parser in addition to metalua.
|
||||
- Updated tooltip processing to make it more consistent and better use space.
|
||||
- Updated translation building script to handle non-string parameters (#70).
|
||||
- Updated un/comment to keep the current selection and caret position (#360).
|
||||
- Upgraded MobDebug (0.606) for `Detach Process` to correctly close debugging.
|
||||
- Upgraded Mobdebug (0.607) to fix debugging after `Detach Process` command.
|
||||
|
||||
### Incompatibilities
|
||||
- Renamed `markvars` method used in spec files to `marksymbols`.
|
||||
|
||||
### Fixes
|
||||
- Fixed 'slow' mode of static analysis to work with Metalua 0.7.2.
|
||||
- Fixed `Output` tab name after stopping/completing remote debugging.
|
||||
- Fixed `Project` label shown untranslated in other languages (#70, #373).
|
||||
- Fixed `Run` toolbar label not being translated (#70, #373).
|
||||
- Fixed activation in `tree:FindItem` when new editor tab is opened (#166).
|
||||
- Fixed an error when dragging Stack/Watch/other tabs between notebooks.
|
||||
- Fixed an issue with removing first menu item in RemoveMenuItem (#166).
|
||||
- Fixed an issue with searching in Output and Console windows.
|
||||
- Fixed column indicator on lines with tabs (fixes #379).
|
||||
- Fixed disabling Stack/Watch icons in the toolbar.
|
||||
- Fixed error after using Enter multiple times in `Find in Files` on OSX.
|
||||
- Fixed file renaming in the filetree after using `SaveAs`.
|
||||
- Fixed flicker in the outline when auto-complete is shown (#337).
|
||||
- Fixed focus switch after selecting a function in the outline and editing (#337).
|
||||
- Fixed handling of remapped image files; improved error reporting.
|
||||
- Fixed incorrect `binary not` calculation with wxlua and LuaJIT 2.1.
|
||||
- Fixed index check during tab name update.
|
||||
- Fixed keeping toolbar status after hiding it.
|
||||
- Fixed localization in function outline (#337).
|
||||
- Fixed localization to avoid error in `SaveAs` processing.
|
||||
- Fixed navigation in function outline when `showonefile` is set (#337).
|
||||
- Fixed not hiding directories when files without extension are hidden (#375).
|
||||
- Fixed off-by-one error in function outline position tracking (#337).
|
||||
- Fixed outline refresh after quick tab switches (#337).
|
||||
- Fixed refresh of 'background' markers during debugging.
|
||||
- Fixed replacement when selection doesn't match the text being searched for.
|
||||
- Fixed search in files/directories with `%` in the name (fixes #369).
|
||||
- Fixed storing position in `function` handling.
|
||||
- Fixed stream reading for the Output to only include actually read chars.
|
||||
- Fixed unused variables and constants based on static analysis.
|
||||
|
||||
## v0.80 (Aug 31 2014)
|
||||
|
||||
### Highlights
|
||||
- Added support for expanding table elements in Watch window.
|
||||
- Added editing of values in Watch window.
|
||||
- Added highlighting all instances of selected text.
|
||||
- Added replacing all selected instances using a dialog.
|
||||
- Added saving (one-line) layout for editor tabs.
|
||||
- Added support for `filename:<line>` and `filename:p<pos>` on the command line.
|
||||
- Added search in Console and Output windows.
|
||||
- Improved compatibility with Lua 5.2 to run the IDE.
|
||||
|
||||
### Special thanks
|
||||
- To [Li Jia](https://github.com/tiwb) for fixing remote path map when 'runonstart' option is set.
|
||||
|
||||
### Improvements
|
||||
- Added default values for `hotexit` and `saveallonrun` settings.
|
||||
- Added debugger `GetHostName` and `GetPortNumber` methods (#166).
|
||||
- Added a check for a local shortcut (F2/Del) being enabled before triggering.
|
||||
- Added refresh of expanded Watch values.
|
||||
- Added support for expanding table elements in Watch window.
|
||||
- Added package `AddWatch` method (#166).
|
||||
- Added `toolbar.iconsize` to configure toolbar icon size.
|
||||
- Added `run-as-scratchpad` toolbar icon (hidden by default).
|
||||
- Added `run` toolbar icon (hidden by default).
|
||||
- Added `find-in-files` toolbar icon (hidden by default).
|
||||
- Added support for disabling individual icons in the toolbar.
|
||||
- Added replacing all selected instances using a dialog (closes #342).
|
||||
- Added highlighting all instances of selected text (closes #344).
|
||||
- Added `filetree.mousemove` option to disable drag-n-drop (closes #351).
|
||||
- Added `suspended` to Output panel title when debugger is stopped (closes #350).
|
||||
- Added a warning when remote console can't evaluate an expression (#350).
|
||||
- Added handling of `osname` to package dependencies (#166).
|
||||
- Added `onIdle` event (#166).
|
||||
- Added `tree:FindItem` method (#166).
|
||||
- Added package `Yield` method (#166).
|
||||
- Added ability to set location of `ini` file from config.
|
||||
- Added ability to load bitmap as toolbar icon.
|
||||
- Added package `RemoveMenuItem` method (#166).
|
||||
- Added ability to customize toolbar.
|
||||
- Added saving (one-line) layout for editor tabs.
|
||||
- Added centering of the screen after re-indenting and sorting (#337).
|
||||
- Added local to variable 'activated' in function mapRemotePath
|
||||
- Added centering of the screen after 'go to definition' and back (#337).
|
||||
- Added centering of the screen after selection from the function list (#337).
|
||||
- Added package `onEditorUpdateUI` event (#166).
|
||||
- Added package `AddPanel` method (#166).
|
||||
- Added package `GetUIManager` method (#166).
|
||||
- Added editor `SetupKeywords` method (#166).
|
||||
- Added document `GetFileExit` method (#166).
|
||||
- Added `onEditorPainted` event (#166).
|
||||
- Added support for `name:<line>` and `name:p<pos>` on the command line.
|
||||
- Added error reporting on failure to load file from the command line.
|
||||
- Added metalua components to MANIFEST (missing in packaging on OSX).
|
||||
- Added saving auto-recovery record on switching from the application.
|
||||
- Added `hotexit` option to exit without forcing to save files.
|
||||
- Added setting of margin properties to support their reordering.
|
||||
- Added error reporting on failure to delete directory from project tree.
|
||||
- Added check for shortcut in conflict being enabled before activating (#233).
|
||||
- Added workaround for missing `GetChildren` call in some wxlua configurations.
|
||||
- Added unfolding modified lines to avoid leaving hidden lines in the editor.
|
||||
- Added search in Console and Output windows (closes #313).
|
||||
- Allowed double-click selection in the Output window (#313).
|
||||
- Avoided system lib conflict when debugging by using bundled libs (fixes #355).
|
||||
- Disabled editing on non-root watch elements.
|
||||
- Disabled smart indentation for multi-line comments and strings (#324).
|
||||
- Disabled re-indentation of multi-line comments/strings (#324).
|
||||
- Disabled `Opt+Shift+Left/Right` shortcut as it conflicts with block selection.
|
||||
- Enabled editing of values in Watch window.
|
||||
- Enabled `editor.autoreload` by default.
|
||||
- Improved config handling when `editor` configuration is removed/empty.
|
||||
- Improved `autotabs` logic when the file starts with indentation.
|
||||
- Improved auto-complete logic that tracks variable assignments (fixes #343).
|
||||
- Improved cursor positioning after re-indenting or sorting.
|
||||
- Improved compatibility with Lua5.2 to run the IDE.
|
||||
- Increased default project history length to 20.
|
||||
- Removed check for multiple references in stack values.
|
||||
- Refactored stack processing to use methods to handle expandable table values.
|
||||
- Refactored file name generation for compilation and static analysis.
|
||||
- Removed erroneous message about failure to open '-psn...' file on OSX.
|
||||
- Renamed all image files to remove cruft from their names.
|
||||
- Simplified logic for watch processing.
|
||||
- Switched from using TreeItemData to Lua tables for watch expressions.
|
||||
- Switched to using tree control for watches.
|
||||
- Updated copas library to support non-blocking requests using socket.http.
|
||||
- Updated Stack and Watch views to better stringify keys.
|
||||
- Updated watch menu to handle item under mouse cursor.
|
||||
- Updated constants for image lists.
|
||||
- Updated `FindMenuItem` method to search in the main and specified menus (#166).
|
||||
- Updated `ide.config` to access wx, wxstc, and os through metatable.
|
||||
- Updated recent projects/files handling to allow menus to be removed.
|
||||
- Updated package `FindMenuItem` method (#166).
|
||||
- Updated `autotabs` to respect `usetabs` when no indentation is present.
|
||||
- Updated copy/cut to capture one instance when all are the same (closes #345).
|
||||
- Updated default marker colors for lighter border (#305).
|
||||
- Updated auto-recovery logic to skip missing files (fixes #323).
|
||||
|
||||
### Fixes
|
||||
- Fixed disabling auto-recovery on app switching.
|
||||
- Fixed find-in-files error when used with editor not in focus (fixes #354).
|
||||
- Fixed package `GetStack` method to return proper control (#166).
|
||||
- Fixed Watch window background color on some Mint Linux systems.
|
||||
- Fixed debugging error when `debugger.runonstart` is specified (fixes #348, #341).
|
||||
- Fixed keybinding for `Ctrl-<punctuation>` working on Linux (fixes #346).
|
||||
- Fixed localization based on static analysis.
|
||||
- Fixed remote path map when 'runonstart' option is set.
|
||||
- Fixed error reporting during Analyze (fixes #340).
|
||||
- Fixed using image lists for stack/filetree to keep them in memory.
|
||||
- Fixed indentation when Enter is hit at the middle of a line.
|
||||
- Fixed formatting of `until` statements (fixes #335).
|
||||
- Fixed formatting of strings including comments '--' (#335).
|
||||
- Fixed restoring proper file names for unsaved tabs during auto-recovery.
|
||||
- Fixed deleting 'dynamic words' when multiple lines are removed.
|
||||
- Fixed `love.update` description (#247).
|
||||
- Fixed indentation of strings starting from `endSomething` (#324).
|
||||
- Fixed use of '%' in replacement for Lua5.2 compatibility (#153, #156, #143).
|
||||
- Fixed warnings from static analysis.
|
||||
|
||||
## v0.70 (Jun 18 2014)
|
||||
|
||||
### Highlights
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ZeroBrane Studio](http://studio.zerobrane.com/) is a lightweight cross-platform Lua IDE with code completion,
|
||||
syntax highlighting, remote debugger, code analyzer, live coding,
|
||||
and debugging support for several Lua engines (LuaJIT,
|
||||
and debugging support for several Lua engines (Lua 5.1, Lua 5.2, Lua 5.3, LuaJIT,
|
||||
[Löve 2D](http://notebook.kulchenko.com/zerobrane/love2d-debugging),
|
||||
[Moai](http://notebook.kulchenko.com/zerobrane/moai-debugging-with-zerobrane-studio),
|
||||
[Gideros](http://notebook.kulchenko.com/zerobrane/gideros-debugging-with-zerobrane-studio-ide),
|
||||
@@ -24,6 +24,7 @@ and others). It originated from the [Estrela Editor](http://www.luxinia.de/index
|
||||
* Interactive console to directly test code snippets with local and remote execution.
|
||||
* Integrated debugger with local and [remote debugging](http://studio.zerobrane.com/doc-remote-debugging.html) for Lua 5.1,
|
||||
[Lua 5.2](http://studio.zerobrane.com/doc-lua52-debugging.html),
|
||||
Lua 5.3,
|
||||
[LuaJIT](http://studio.zerobrane.com/doc-luajit-debugging.html),
|
||||
and [other Lua engines](http://studio.zerobrane.com/documentation.html#debugging).
|
||||
* [Live coding](http://studio.zerobrane.com/documentation.html#live_coding)
|
||||
@@ -74,6 +75,8 @@ Loading custom configuration:
|
||||
e.g.: zbstudio -cfg cfg/estrela.lua
|
||||
```
|
||||
|
||||
If you are loading a file, you can also request the cursor to be set on a particular line or at a particular position by using `filename:<line>` and `filename:p<pos>` syntax (0.71+).
|
||||
|
||||
## Author
|
||||
|
||||
### ZeroBrane Studio and MobDebug
|
||||
|
||||
@@ -130,8 +130,14 @@ findMSB = fn "returns bit number of msb. - (intN)(intN)",
|
||||
|
||||
discard = fn "conditionally (<0) kill a pixel before output. - ()(vecN)",
|
||||
dFdx = fn "returns approximate partial derivative with respect to window-space X. - (vecN)(vecN)",
|
||||
dFdxCoarse = fn "returns approximate partial derivative with respect to window-space X. - (vecN)(vecN)",
|
||||
dFdxFine = fn "returns approximate partial derivative with respect to window-space X. - (vecN)(vecN)",
|
||||
dFdy = fn "returns approximate partial derivative with respect to window-space Y. - (vecN)(vecN)",
|
||||
fwidth = fn "returns sum of approximate window-space partial derivatives magnitudes. - (vecN)(vecN)",
|
||||
dFdyCoarse = fn "returns approximate partial derivative with respect to window-space Y. - (vecN)(vecN)",
|
||||
dFdyFine = fn "returns approximate partial derivative with respect to window-space Y. - (vecN)(vecN)",
|
||||
fwidth = fn "returns abs sum of approximate window-space partial derivatives magnitudes. - (vecN)(vecN)",
|
||||
fwidthFine = fn "returns abs sum of approximate window-space partial derivatives magnitudes. - (vecN)(vecN)",
|
||||
fwidthCoarse = fn "returns abs sum of approximate window-space partial derivatives magnitudes. - (vecN)(vecN)",
|
||||
interpolateAtCentroid = fn "Return value of interpolant sampled inside pixel and the primitive. - (floatN)(floatN)",
|
||||
interpolateAtSample = fn "Return value of interpolant at the location fo sample. - (floatN)(floatN, int sample)",
|
||||
interpolateAtOffset = fn "Return value of interpolant sampled at fixed offset offset from pixel center. - (floatN)(floatN, vec2 offset)",
|
||||
@@ -166,6 +172,7 @@ imageAtomicCompSwap = fn "performs atomic operation on individual texels returns
|
||||
imageStore = fn "stores the texel at the coordinate. - ()(imageN, intN coord, [int sample], vecN data)",
|
||||
imageLoad = fn "loads the texel at the coordinate. - (vecN)(imageN, intN coord, [int sample])",
|
||||
imageSize = fn "returns the size of the image. - (ivecN)(imageN)",
|
||||
imageSamples = fn "returns the samples of the multi-sampled image. - (int)(image2DMSN)",
|
||||
|
||||
atomicCounterIncrement = fn "increments counter and returns old value. - (uint)(atomic_uint)",
|
||||
atomicCounterDecrement = fn "decrements counter and returns old value. - (uint)(atomic_uint)",
|
||||
@@ -180,6 +187,7 @@ atomicExchange = fn "performs atomic operation on memory location (ssbo/shared)
|
||||
atomicCompSwap = fn "performs atomic operation on memory location (ssbo/shared) returns old value. - (uint)(inout uint mem, uint data)",
|
||||
|
||||
textureSize = fn "returns the size of the texture (no lod required: Rect, MS and Buffer). - (intN)(samplerN, [int lod])",
|
||||
textureSamples = fn "returns the samples of the multi-sampled texture. - (int)(texture2DMSN)",
|
||||
textureQueryLod = fn "returns the lod values for a given coordinate. - (vec2)(samplerN, vecN coord)",
|
||||
texture = fn "performs a texture lookup. Shadow samplers require base N+1 coordinate. Lod bias is optional (illegal for MS, Buffer, Rect). - (vec4)(samplerN, vecN coord, [float bias])",
|
||||
textureProj = fn "performas a projective texture lookup (only Nd samplers + Rect). Shadows require N+1 base coordinate, no Lod bias allowed for Rect. - (vec4)(samplerN, vecN+1 coord, [float bias])",
|
||||
@@ -248,6 +256,7 @@ local keyw =
|
||||
local_size_x local_size_y local_size_z
|
||||
gl_BaseVertexARB gl_BaseInstanceARB gl_DrawIDARB
|
||||
bindless_sampler bound_sampler bindless_image bound_image early_fragment_tests
|
||||
gl_HelperInvocation gl_CullDistance gl_MaxSamples
|
||||
|
||||
coherent volatile restrict readonly writeonly
|
||||
image1D image2D image3D image2DRect imageCube imageBuffer image1DArray image2DArray imageCubeArray image2DMS image2DMSArray
|
||||
|
||||
@@ -264,7 +264,7 @@ return {
|
||||
childs = {
|
||||
config = {
|
||||
type = "value",
|
||||
description = "A string describing some compile-time configurations for packages.\nThis string is a sequence of lines:\n* The first line is the directory separator string. Default is '\\' for Windows and '/' for all other systems.\n* The second line is the character that separates templates in a path. Default is ';'.\n* The third line is the string that marks the substitution points in a template. Default is '?'.\n* The fourth line is a string that, in a path in Windows, is replaced by the executable's directory. Default is '!'.\n* The fifth line is a mark to ignore all text before it when building the luaopen_ function name. Default is '-'.\nVALUE ADDED IN Lua 5.2.",
|
||||
description = "A string describing some compile-time configurations for packages.\nThis string is a sequence of lines:\n* The first line is the directory separator string. Default is '\\' for Windows and '/' for all other systems.\n* The second line is the character that separates templates in a path. Default is ';'.\n* The third line is the string that marks the substitution points in a template. Default is '?'.\n* The fourth line is a string that, in a path in Windows, is replaced by the executable's directory. Default is '!'.\n* The fifth line is a mark to ignore all text before it when building the luaopen_ function name. Default is '-'.",
|
||||
},
|
||||
cpath = {
|
||||
type = "value",
|
||||
|
||||
2116
api/lua/glewgl.lua
2116
api/lua/glewgl.lua
File diff suppressed because it is too large
Load Diff
@@ -5370,7 +5370,7 @@ local love = {
|
||||
},
|
||||
update = {
|
||||
args = "(dt: number)",
|
||||
description = "Callback function triggered when a key is pressed.",
|
||||
description = "Callback function used to update the state of the game every frame.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
|
||||
@@ -1,823 +0,0 @@
|
||||
--[[// lxm | Lux Math
|
||||
typedef float lxVector2 [ 2 ] ;
|
||||
typedef float lxVector3 [ 3 ] ;
|
||||
typedef float lxVector4 [ 4 ] ;
|
||||
typedef float lxPlane [ 4 ] ;
|
||||
typedef float lxMatrix44 [ 16 ] ;
|
||||
typedef float lxMatrix34 [ 12 ] ;
|
||||
typedef float lxQuat [ 4 ] ;
|
||||
typedef float * lxVector2PTR ;
|
||||
typedef float * lxVector3PTR ;
|
||||
typedef float * lxVector4PTR ;
|
||||
typedef float * lxPlanePTR ;
|
||||
typedef float * lxMatrix44PTR ;
|
||||
typedef float * lxMatrix34PTR ;
|
||||
typedef float * lxQuatPTR ;
|
||||
typedef const float * lxVector2CPTR ;
|
||||
typedef const float * lxVector3CPTR ;
|
||||
typedef const float * lxVector4CPTR ;
|
||||
typedef const float * lxPlaneCPTR ;
|
||||
typedef const float * lxMatrix44CPTR ;
|
||||
typedef const float * lxMatrix34CPTR ;
|
||||
typedef const float * lxQuatCPTR ;
|
||||
typedef __declspec ( align ( 16 ) ) lxMatrix44 lxMatrix44SIMD ;
|
||||
typedef __declspec ( align ( 16 ) ) lxVector4 lxVector4SIMD ;
|
||||
typedef __declspec ( align ( 16 ) ) lxVector4 lxVector3SIMD ;
|
||||
typedef struct lxFrustumPlane_s * lxFrustumPlanePTR ;
|
||||
typedef const struct lxFrustumPlane_s * lxFrustumPlaneCPTR ;
|
||||
typedef struct lxFrustum_s * lxFrustumPTR ;
|
||||
typedef const struct lxFrustum_s * lxFrustumCPTR ;
|
||||
typedef struct lxBoundingBox_s * lxBoundingBoxPTR ;
|
||||
typedef const struct lxBoundingBox_s * lxBoundingBoxCPTR ;
|
||||
typedef struct lxBoundingBoxCenter_s * lxBoundingBoxCenterPTR ;
|
||||
typedef const struct lxBoundingBoxCenter_s * lxBoundingBoxCenterCPTR ;
|
||||
typedef struct lxBoundingSphere_s * lxBoundingSpherePTR ;
|
||||
typedef const struct lxBoundingSphere_s * lxBoundingSphereCPTR ;
|
||||
typedef struct lxBoundingCone_s * lxBoundingConePTR ;
|
||||
typedef const struct lxBoundingCone_s * lxBoundingConeCPTR ;
|
||||
typedef struct lxBoundingCapsule_s * lxBoundingCapsulePTR ;
|
||||
typedef const struct lxBoundingCapsule_s * lxBoundingCapsuleCPTR ;
|
||||
typedef enum lxFrustumPlaneType_e
|
||||
{
|
||||
LUX_FRUSTUM_TOP , LUX_FRUSTUM_BOTTOM , LUX_FRUSTUM_NEAR , LUX_FRUSTUM_FAR , LUX_FRUSTUM_LEFT , LUX_FRUSTUM_RIGHT , LUX_FRUSTUM_PLANES , }
|
||||
lxFrustumPlaneType_t ;
|
||||
typedef enum lxFrustumCornerType_e
|
||||
{
|
||||
LUX_FRUSTUM_C_NTR , LUX_FRUSTUM_C_NTL , LUX_FRUSTUM_C_NBL , LUX_FRUSTUM_C_NBR , LUX_FRUSTUM_C_FTR , LUX_FRUSTUM_C_FTL , LUX_FRUSTUM_C_FBL , LUX_FRUSTUM_C_FBR , LUX_FRUSTUM_CORNERS , }
|
||||
lxFrustumCornerType_t ;
|
||||
typedef enum lxCullType_e
|
||||
{
|
||||
LUX_CULL_INTERSECT = - 1 , LUX_CULL_OUTSIDE = 0 , LUX_CULL_INSIDE = 1 , }
|
||||
lxCullType_t ;
|
||||
typedef struct lxFrustumPlane_s
|
||||
{
|
||||
lxPlane pvec ;
|
||||
union
|
||||
{
|
||||
int n [ 3 ] ;
|
||||
struct
|
||||
{
|
||||
int nx ;
|
||||
int ny ;
|
||||
int nz ;
|
||||
int _npad ;
|
||||
}
|
||||
;
|
||||
}
|
||||
;
|
||||
union
|
||||
{
|
||||
int p [ 3 ] ;
|
||||
struct
|
||||
{
|
||||
int px ;
|
||||
int py ;
|
||||
int pz ;
|
||||
int _ppad ;
|
||||
}
|
||||
;
|
||||
}
|
||||
;
|
||||
}
|
||||
lxFrustumPlane_t ;
|
||||
typedef struct lxFrustum_s
|
||||
{
|
||||
lxFrustumPlane_t fplanes [ LUX_FRUSTUM_PLANES ] ;
|
||||
}
|
||||
lxFrustum_t ;
|
||||
typedef struct lxBoundingBox_s
|
||||
{
|
||||
lxVector4 min ;
|
||||
lxVector4 max ;
|
||||
}
|
||||
lxBoundingBox_t ;
|
||||
typedef struct lxBoundingBoxCenter_s
|
||||
{
|
||||
lxVector4 center ;
|
||||
lxVector4 size ;
|
||||
}
|
||||
lxBoundingBoxCenter_t ;
|
||||
typedef struct lxBoundingSphere_s
|
||||
{
|
||||
lxVector3 center ;
|
||||
float radius ;
|
||||
}
|
||||
lxBoundingSphere_t ;
|
||||
typedef struct lxBoundingCone_s
|
||||
{
|
||||
lxVector4 top ;
|
||||
lxVector4 axis ;
|
||||
float sinDiv ;
|
||||
float sinSqr ;
|
||||
float cosSqr ;
|
||||
float _pad ;
|
||||
}
|
||||
lxBoundingCone_t ;
|
||||
typedef struct lxBoundingCapsule_s
|
||||
{
|
||||
lxVector4 origin ;
|
||||
lxVector4 toEnd ;
|
||||
float radius ;
|
||||
float radiusSqr ;
|
||||
float _pad [ 2 ] ;
|
||||
}
|
||||
lxBoundingCapsule_t ;
|
||||
booln lxMinMax_intersectsV ( const float selfminmax [ 6 ] , const float otherminmax [ 6 ] ) ;
|
||||
void lxBoundingBox_init ( lxBoundingBoxPTR bbox ) ;
|
||||
void lxBoundingBox_toCenter ( lxBoundingBoxCPTR bbox , lxVector3 center , lxVector3 size ) ;
|
||||
lxBoundingBoxPTR lxBoundingBox_copy ( lxBoundingBoxPTR dst , lxBoundingBoxCPTR src ) ;
|
||||
lxBoundingSpherePTR lxBoundingSphere_copy ( lxBoundingSpherePTR dst , lxBoundingSphereCPTR src ) ;
|
||||
lxBoundingBoxPTR lxBoundingBox_merge ( lxBoundingBoxPTR out , lxBoundingBoxCPTR a , lxBoundingBoxCPTR b ) ;
|
||||
booln lxBoundingBox_mergeChange ( lxBoundingBoxPTR out , lxBoundingBoxCPTR a , lxBoundingBoxCPTR b ) ;
|
||||
booln lxBoundingSphere_mergeChange ( lxBoundingSpherePTR out , lxBoundingSphereCPTR a , lxBoundingSphereCPTR b ) ;
|
||||
void lxBoundingBox_toCenterBox ( lxBoundingBoxCPTR box , lxBoundingBoxCenterPTR ctr ) ;
|
||||
void lxBoundingBox_fromCenterBox ( lxBoundingBoxPTR box , lxBoundingBoxCenterCPTR ctr ) ;
|
||||
lxBoundingSpherePTR lxBoundingBox_toSphere ( lxBoundingBoxCPTR bbox , lxBoundingSpherePTR sphere ) ;
|
||||
void lxBoundingBox_toSphereV ( const lxVector3 min , const lxVector3 max , lxVector3 center , float * radius ) ;
|
||||
lxBoundingCapsulePTR lxBoundingBox_toCapsule ( lxBoundingBoxCPTR bbox , lxBoundingCapsulePTR capsule ) ;
|
||||
lxBoundingBoxPTR lxBoundingBox_transform ( lxBoundingBoxPTR out , lxBoundingBoxCPTR in , lxMatrix44CPTR trans ) ;
|
||||
void lxBoundingBox_transformBoxCorners ( lxBoundingBoxCPTR in , lxMatrix44CPTR trans , lxVector3 box [ 8 ] ) ;
|
||||
void lxBoundingBox_transformV ( lxVector3 outmins , lxVector3 outmaxs , const lxVector3 mins , const lxVector3 maxs , lxMatrix44CPTR trans ) ;
|
||||
void lxBoundingBox_fromCorners ( lxBoundingBoxPTR bbox , const lxVector3 vecs [ 8 ] ) ;
|
||||
void lxBoundingCorners_fromCamera ( lxVector3 vecs [ 8 ] , lxMatrix44CPTR mat , const float fov , const float frontplane , const float backplane , const float aspect ) ;
|
||||
booln lxBoundingBox_intersect ( lxBoundingBoxCPTR a , lxBoundingBoxCPTR b ) ;
|
||||
booln lxBoundingBox_checkPoint ( lxBoundingBoxCPTR out , const lxVector3 point ) ;
|
||||
booln lxBoundingCone_checkSphere ( lxBoundingConeCPTR cone , lxBoundingSphereCPTR sphere ) ;
|
||||
void lxBoundingSphereCone_fromCamera ( lxBoundingSpherePTR sphere , lxBoundingConePTR cone , float frontplane , float backplane , const lxVector3 pos , const lxVector3 dir , float fov ) ;
|
||||
void lxBoundingCone_fromFrustumCorners ( lxBoundingConePTR cone , const lxVector3 box [ LUX_FRUSTUM_CORNERS ] ) ;
|
||||
void lxBoundingSphere_fromFrustumCorners ( lxBoundingSpherePTR sphere , const lxVector3 box [ LUX_FRUSTUM_CORNERS ] ) ;
|
||||
void lxFrustum_update ( lxFrustumPTR frustum , lxMatrix44CPTR viewproj ) ;
|
||||
booln lxFrustum_checkPoint ( lxFrustumCPTR frustum , lxVector3CPTR vec ) ;
|
||||
booln lxFrustum_checkSphere ( lxFrustumCPTR frustum , lxBoundingSphereCPTR ) ;
|
||||
booln lxFrustum_checkSphereCoherent ( lxFrustumCPTR pFrustum , lxBoundingSphereCPTR sphere , int * plane ) ;
|
||||
booln lxFrustum_checkSphereFull ( lxFrustumCPTR frustum , lxBoundingSphereCPTR ) ;
|
||||
booln lxFrustum_checkBoundingBox ( lxFrustumCPTR frustum , lxBoundingBoxCPTR bbox ) ;
|
||||
booln lxFrustum_checkBoundingBoxCoherent ( lxFrustumCPTR pFrustum , lxBoundingBoxCPTR bbox , int * plane ) ;
|
||||
lxCullType_t lxFrustum_cullBoundingBoxMaskedCoherent ( lxFrustumCPTR pFrustum , lxBoundingBoxCPTR bbox , int in_mask , int * out_mask , int * inoutstart_id ) ;
|
||||
lxCullType_t lxFrustum_cullPoints ( lxFrustumCPTR frustum , const lxVector4 * vecarray , const int numVec ) ;
|
||||
lxCullType_t lxFrustum_cullBoundingBox ( lxFrustumCPTR frustum , lxBoundingBoxCPTR bbox ) ;
|
||||
void lxFrustum_getCorners ( lxFrustumCPTR frustum , lxVector3 box [ LUX_FRUSTUM_CORNERS ] ) ;
|
||||
void lxFrustum_fromCorners ( lxFrustumPTR frustum , const lxVector3 box [ LUX_FRUSTUM_CORNERS ] ) ;
|
||||
void lxFrustum_updateSigns ( lxFrustumPTR frustum ) ;
|
||||
lxMatrix44CPTR lxMatrix44GetIdentity ( ) ;
|
||||
void lxMatrix44Identity ( lxMatrix44PTR dst ) ;
|
||||
void lxMatrix44Copy ( lxMatrix44PTR dst , lxMatrix44CPTR src ) ;
|
||||
void lxMatrix44CopyRot ( lxMatrix44PTR dst , lxMatrix44CPTR src ) ;
|
||||
void lxMatrix44CopyRotTransposed ( lxMatrix44PTR dst , lxMatrix44CPTR src ) ;
|
||||
void lxMatrix44SetTranslation ( lxMatrix44PTR dst , lxVector3CPTR translation ) ;
|
||||
void lxMatrix44SetInvTranslation ( lxMatrix44PTR dst , lxVector3CPTR translation ) ;
|
||||
void lxMatrix44SetScale ( lxMatrix44PTR dst , lxVector3CPTR scale ) ;
|
||||
void lxMatrix44PreScale ( lxMatrix44PTR dst , lxMatrix44CPTR mat , lxVector3CPTR scale ) ;
|
||||
void lxMatrix44SetRotRows ( lxMatrix44PTR dst , float a , float b , float c , float d , float e , float f , float g , float h , float i ) ;
|
||||
float * lxMatrix44GetTranslation ( lxMatrix44CPTR mat , lxVector3PTR vec ) ;
|
||||
void lxMatrix44Clear ( lxMatrix44PTR mat ) ;
|
||||
void lxMatrix44ClearRot ( lxMatrix44PTR mat ) ;
|
||||
void lxMatrix44ClearTranslation ( lxMatrix44PTR mat ) ;
|
||||
void lxMatrix44VectorTransform ( lxMatrix44CPTR mat , lxVector3PTR v1 ) ;
|
||||
void lxMatrix44VectorInvTransform ( lxMatrix44CPTR mat , lxVector3PTR pVect ) ;
|
||||
void lxMatrix44VectorRotate ( lxMatrix44CPTR mat , lxVector3PTR v1 ) ;
|
||||
void lxMatrix44VectorInvRotate ( lxMatrix44CPTR mat , lxVector3PTR pVect ) ;
|
||||
void lxMatrix44VectorTranslate ( lxMatrix44CPTR mat , lxVector3PTR pVect ) ;
|
||||
void lxMatrix44VectorInvTranslate ( lxMatrix44CPTR mat , lxVector3PTR pVect ) ;
|
||||
void lxMatrix44Multiply ( lxMatrix44PTR dst , lxMatrix44CPTR mat1 , lxMatrix44CPTR mat2 ) ;
|
||||
void lxMatrix44Multiply1 ( lxMatrix44PTR mat1 , lxMatrix44CPTR mat2 ) ;
|
||||
void lxMatrix44Multiply2 ( lxMatrix44CPTR mat1 , lxMatrix44PTR mat2 ) ;
|
||||
void lxMatrix44MultiplyFull ( lxMatrix44PTR clip , lxMatrix44CPTR proj , lxMatrix44CPTR modl ) ;
|
||||
void lxMatrix44MultiplyRot ( lxMatrix44PTR dst , lxMatrix44CPTR mat1 , lxMatrix44CPTR mat2 ) ;
|
||||
void lxMatrix44MultiplyRot1 ( lxMatrix44PTR mat1 , lxMatrix44CPTR mat2 ) ;
|
||||
void lxMatrix44MultiplyRot2 ( lxMatrix44CPTR mat1 , lxMatrix44PTR mat2 ) ;
|
||||
void lxMatrix44Orthonormalize ( lxMatrix44PTR dst , lxMatrix44PTR src ) ;
|
||||
void lxMatrix44Transpose ( lxMatrix44PTR dst , lxMatrix44CPTR src ) ;
|
||||
void lxMatrix44Transpose1 ( lxMatrix44PTR mat ) ;
|
||||
void lxMatrix44TransposeRot ( lxMatrix44PTR dst , lxMatrix44CPTR src ) ;
|
||||
void lxMatrix44TransposeRot1 ( lxMatrix44PTR mat ) ;
|
||||
void lxMatrix44TransposeRotIdentity ( lxMatrix44PTR dst , lxMatrix44CPTR src ) ;
|
||||
void lxMatrix44Invert ( lxMatrix44PTR dst , lxMatrix44CPTR src ) ;
|
||||
void lxMatrix44Invert1 ( lxMatrix44PTR mat ) ;
|
||||
void lxMatrix44AffineInvert ( lxMatrix44PTR dst , lxMatrix44CPTR src ) ;
|
||||
void lxMatrix44Orient ( lxMatrix44PTR mat , lxVector3CPTR forward , lxVector3CPTR up , int axis ) ;
|
||||
void lxMatrix44LookAt ( lxMatrix44PTR mat , lxVector3CPTR from , lxVector3CPTR to , lxVector3CPTR up ) ;
|
||||
void lxMatrix44FromEulerZYX ( lxMatrix44PTR mat , lxVector3CPTR angles ) ;
|
||||
void lxMatrix44FromEulerZYXFast ( lxMatrix44PTR mat , lxVector3CPTR angles ) ;
|
||||
void lxMatrix44FromEulerZYXdeg ( lxMatrix44PTR mat , lxVector3CPTR angles ) ;
|
||||
void lxMatrix44FromEulerXYZ ( lxMatrix44PTR mat , lxVector3PTR angles ) ;
|
||||
void lxMatrix44FromEulerXYZFast ( lxMatrix44PTR mat , lxVector3PTR angles ) ;
|
||||
void lxMatrix44FromAngleAxis ( lxMatrix44PTR mat , lxVector3CPTR axis , float cos , float sin , float oneminuscos ) ;
|
||||
void lxMatrix44FromAngleAxisFast ( lxMatrix44PTR mat , float anglerad , lxVector3CPTR axis ) ;
|
||||
void lxMatrix44RotateAngle ( lxMatrix44PTR mat , lxVector3PTR from , lxVector3PTR to ) ;
|
||||
void lxMatrix44RotateAroundVector ( lxMatrix44PTR mat , lxVector3PTR axis , float cos , float sin , float oneminuscos ) ;
|
||||
void lxMatrix44RotateAroundVectorFast ( lxMatrix44PTR mat , lxVector3PTR axis , float angleRad ) ;
|
||||
void lxMatrix44RotateAroundPointFast ( lxMatrix44PTR mat , lxVector3CPTR center , lxVector3CPTR angles ) ;
|
||||
void lxMatrix44ToEulerXYZ ( lxMatrix44CPTR mat , lxVector3PTR angles ) ;
|
||||
void lxMatrix44ToEulerZYX ( lxMatrix44CPTR mat , lxVector3PTR angles ) ;
|
||||
void lxMatrix44Perspective ( lxMatrix44PTR mat , const float fov , const float front , const float back , const float aspect ) ;
|
||||
void lxMatrix44PerspectiveInf ( lxMatrix44PTR mat , const float fov , const float front , const float aspect ) ;
|
||||
void lxMatrix44Ortho ( lxMatrix44PTR mat , const float height , const float front , const float back , const float aspect ) ;
|
||||
void lxMatrix44OrthoDirect ( lxMatrix44PTR mat , const float left , const float right , const float bottom , const float top , const float front , const float back ) ;
|
||||
void lxMatrix44PlaneProjection ( lxMatrix44PTR mat , lxVector3CPTR planenormal ) ;
|
||||
void lxMatrix44ModifyProjectionClipplane ( lxMatrix44PTR projmatrix , lxMatrix44CPTR mview , lxMatrix44CPTR mviewinv , lxVector4CPTR clipPlane ) ;
|
||||
void lxMatrix44Reflection ( lxMatrix44PTR mat , lxVector4PTR plane ) ;
|
||||
float lxMatrix44CompareRot ( lxMatrix44PTR mat1 , lxMatrix44PTR mat2 ) ;
|
||||
void lxMatrix44Swizzle1 ( lxMatrix44PTR mat , uint axis [ 3 ] , lxVector3PTR dirs ) ;
|
||||
extern const float lx_gMatrix44_ident [ 16 ] ;
|
||||
float16 lxFloat32To16 ( float fval ) ;
|
||||
float lxFloat16To32 ( float16 ival ) ;
|
||||
]]
|
||||
--auto-generated api from ffi headers
|
||||
local api =
|
||||
{
|
||||
["lx_gMatrix44_ident"] = { type ='value', description = "extern const float lx_gMatrix44_ident[16]", valuetype = nil, },
|
||||
["LUX_FRUSTUM_TOP"] = { type ='value', },
|
||||
["LUX_FRUSTUM_BOTTOM"] = { type ='value', },
|
||||
["LUX_FRUSTUM_NEAR"] = { type ='value', },
|
||||
["LUX_FRUSTUM_FAR"] = { type ='value', },
|
||||
["LUX_FRUSTUM_LEFT"] = { type ='value', },
|
||||
["LUX_FRUSTUM_RIGHT"] = { type ='value', },
|
||||
["LUX_FRUSTUM_PLANES"] = { type ='value', },
|
||||
["LUX_FRUSTUM_C_NTR"] = { type ='value', },
|
||||
["LUX_FRUSTUM_C_NTL"] = { type ='value', },
|
||||
["LUX_FRUSTUM_C_NBL"] = { type ='value', },
|
||||
["LUX_FRUSTUM_C_NBR"] = { type ='value', },
|
||||
["LUX_FRUSTUM_C_FTR"] = { type ='value', },
|
||||
["LUX_FRUSTUM_C_FTL"] = { type ='value', },
|
||||
["LUX_FRUSTUM_C_FBL"] = { type ='value', },
|
||||
["LUX_FRUSTUM_C_FBR"] = { type ='value', },
|
||||
["LUX_FRUSTUM_CORNERS"] = { type ='value', },
|
||||
["LUX_CULL_INTERSECT"] = { type ='value', },
|
||||
["LUX_CULL_OUTSIDE"] = { type ='value', },
|
||||
["LUX_CULL_INSIDE"] = { type ='value', },
|
||||
["lxMinMax_intersectsV"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(const float selfminmax [ 6 ] , const float otherminmax [ 6 ])", },
|
||||
["lxBoundingBox_init"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingBoxPTR bbox)", },
|
||||
["lxBoundingBox_toCenter"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingBoxCPTR bbox , lxVector3 center , lxVector3 size)", },
|
||||
["lxBoundingBox_copy"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxBoundingBoxPTR)",
|
||||
valuetype = "lxm.lxBoundingBox_t",
|
||||
args = "(lxBoundingBoxPTR dst , lxBoundingBoxCPTR src)", },
|
||||
["lxBoundingSphere_copy"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxBoundingSpherePTR)",
|
||||
valuetype = "lxm.lxBoundingSphere_t",
|
||||
args = "(lxBoundingSpherePTR dst , lxBoundingSphereCPTR src)", },
|
||||
["lxBoundingBox_merge"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxBoundingBoxPTR)",
|
||||
valuetype = "lxm.lxBoundingBox_t",
|
||||
args = "(lxBoundingBoxPTR out , lxBoundingBoxCPTR a , lxBoundingBoxCPTR b)", },
|
||||
["lxBoundingBox_mergeChange"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingBoxPTR out , lxBoundingBoxCPTR a , lxBoundingBoxCPTR b)", },
|
||||
["lxBoundingSphere_mergeChange"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingSpherePTR out , lxBoundingSphereCPTR a , lxBoundingSphereCPTR b)", },
|
||||
["lxBoundingBox_toCenterBox"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingBoxCPTR box , lxBoundingBoxCenterPTR ctr)", },
|
||||
["lxBoundingBox_fromCenterBox"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingBoxPTR box , lxBoundingBoxCenterCPTR ctr)", },
|
||||
["lxBoundingBox_toSphere"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxBoundingSpherePTR)",
|
||||
valuetype = "lxm.lxBoundingSphere_t",
|
||||
args = "(lxBoundingBoxCPTR bbox , lxBoundingSpherePTR sphere)", },
|
||||
["lxBoundingBox_toSphereV"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(const lxVector3 min , const lxVector3 max , lxVector3 center , float * radius)", },
|
||||
["lxBoundingBox_toCapsule"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxBoundingCapsulePTR)",
|
||||
valuetype = "lxm.lxBoundingCapsule_t",
|
||||
args = "(lxBoundingBoxCPTR bbox , lxBoundingCapsulePTR capsule)", },
|
||||
["lxBoundingBox_transform"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxBoundingBoxPTR)",
|
||||
valuetype = "lxm.lxBoundingBox_t",
|
||||
args = "(lxBoundingBoxPTR out , lxBoundingBoxCPTR in , lxMatrix44CPTR trans)", },
|
||||
["lxBoundingBox_transformBoxCorners"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingBoxCPTR in , lxMatrix44CPTR trans , lxVector3 box [ 8 ])", },
|
||||
["lxBoundingBox_transformV"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxVector3 outmins , lxVector3 outmaxs , const lxVector3 mins , const lxVector3 maxs , lxMatrix44CPTR trans)", },
|
||||
["lxBoundingBox_fromCorners"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingBoxPTR bbox , const lxVector3 vecs [ 8 ])", },
|
||||
["lxBoundingCorners_fromCamera"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxVector3 vecs [ 8 ] , lxMatrix44CPTR mat , const float fov , const float frontplane , const float backplane , const float aspect)", },
|
||||
["lxBoundingBox_intersect"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingBoxCPTR a , lxBoundingBoxCPTR b)", },
|
||||
["lxBoundingBox_checkPoint"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingBoxCPTR out , const lxVector3 point)", },
|
||||
["lxBoundingCone_checkSphere"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingConeCPTR cone , lxBoundingSphereCPTR sphere)", },
|
||||
["lxBoundingSphereCone_fromCamera"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingSpherePTR sphere , lxBoundingConePTR cone , float frontplane , float backplane , const lxVector3 pos , const lxVector3 dir , float fov)", },
|
||||
["lxBoundingCone_fromFrustumCorners"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingConePTR cone , const lxVector3 box [ LUX_FRUSTUM_CORNERS ])", },
|
||||
["lxBoundingSphere_fromFrustumCorners"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxBoundingSpherePTR sphere , const lxVector3 box [ LUX_FRUSTUM_CORNERS ])", },
|
||||
["lxFrustum_update"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumPTR frustum , lxMatrix44CPTR viewproj)", },
|
||||
["lxFrustum_checkPoint"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR frustum , lxVector3CPTR vec)", },
|
||||
["lxFrustum_checkSphere"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR frustum , lxBoundingSphereCPTR)", },
|
||||
["lxFrustum_checkSphereCoherent"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR pFrustum , lxBoundingSphereCPTR sphere , int * plane)", },
|
||||
["lxFrustum_checkSphereFull"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR frustum , lxBoundingSphereCPTR)", },
|
||||
["lxFrustum_checkBoundingBox"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR frustum , lxBoundingBoxCPTR bbox)", },
|
||||
["lxFrustum_checkBoundingBoxCoherent"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(booln)",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR pFrustum , lxBoundingBoxCPTR bbox , int * plane)", },
|
||||
["lxFrustum_cullBoundingBoxMaskedCoherent"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxCullType_t)",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR pFrustum , lxBoundingBoxCPTR bbox , int in_mask , int * out_mask , int * inoutstart_id)", },
|
||||
["lxFrustum_cullPoints"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxCullType_t)",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR frustum , const lxVector4 * vecarray , const int numVec)", },
|
||||
["lxFrustum_cullBoundingBox"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxCullType_t)",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR frustum , lxBoundingBoxCPTR bbox)", },
|
||||
["lxFrustum_getCorners"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumCPTR frustum , lxVector3 box [ LUX_FRUSTUM_CORNERS ])", },
|
||||
["lxFrustum_fromCorners"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumPTR frustum , const lxVector3 box [ LUX_FRUSTUM_CORNERS ])", },
|
||||
["lxFrustum_updateSigns"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxFrustumPTR frustum)", },
|
||||
["lxMatrix44GetIdentity"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(lxMatrix44CPTR)",
|
||||
valuetype = nil,
|
||||
args = "()", },
|
||||
["lxMatrix44Identity"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst)", },
|
||||
["lxMatrix44Copy"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR src)", },
|
||||
["lxMatrix44CopyRot"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR src)", },
|
||||
["lxMatrix44CopyRotTransposed"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR src)", },
|
||||
["lxMatrix44SetTranslation"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxVector3CPTR translation)", },
|
||||
["lxMatrix44SetInvTranslation"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxVector3CPTR translation)", },
|
||||
["lxMatrix44SetScale"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxVector3CPTR scale)", },
|
||||
["lxMatrix44PreScale"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR mat , lxVector3CPTR scale)", },
|
||||
["lxMatrix44SetRotRows"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , float a , float b , float c , float d , float e , float f , float g , float h , float i)", },
|
||||
["lxMatrix44GetTranslation"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(float *)",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat , lxVector3PTR vec)", },
|
||||
["lxMatrix44Clear"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat)", },
|
||||
["lxMatrix44ClearRot"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat)", },
|
||||
["lxMatrix44ClearTranslation"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat)", },
|
||||
["lxMatrix44VectorTransform"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat , lxVector3PTR v1)", },
|
||||
["lxMatrix44VectorInvTransform"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat , lxVector3PTR pVect)", },
|
||||
["lxMatrix44VectorRotate"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat , lxVector3PTR v1)", },
|
||||
["lxMatrix44VectorInvRotate"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat , lxVector3PTR pVect)", },
|
||||
["lxMatrix44VectorTranslate"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat , lxVector3PTR pVect)", },
|
||||
["lxMatrix44VectorInvTranslate"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat , lxVector3PTR pVect)", },
|
||||
["lxMatrix44Multiply"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR mat1 , lxMatrix44CPTR mat2)", },
|
||||
["lxMatrix44Multiply1"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat1 , lxMatrix44CPTR mat2)", },
|
||||
["lxMatrix44Multiply2"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat1 , lxMatrix44PTR mat2)", },
|
||||
["lxMatrix44MultiplyFull"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR clip , lxMatrix44CPTR proj , lxMatrix44CPTR modl)", },
|
||||
["lxMatrix44MultiplyRot"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR mat1 , lxMatrix44CPTR mat2)", },
|
||||
["lxMatrix44MultiplyRot1"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat1 , lxMatrix44CPTR mat2)", },
|
||||
["lxMatrix44MultiplyRot2"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat1 , lxMatrix44PTR mat2)", },
|
||||
["lxMatrix44Orthonormalize"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44PTR src)", },
|
||||
["lxMatrix44Transpose"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR src)", },
|
||||
["lxMatrix44Transpose1"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat)", },
|
||||
["lxMatrix44TransposeRot"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR src)", },
|
||||
["lxMatrix44TransposeRot1"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat)", },
|
||||
["lxMatrix44TransposeRotIdentity"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR src)", },
|
||||
["lxMatrix44Invert"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR src)", },
|
||||
["lxMatrix44Invert1"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat)", },
|
||||
["lxMatrix44AffineInvert"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR dst , lxMatrix44CPTR src)", },
|
||||
["lxMatrix44Orient"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3CPTR forward , lxVector3CPTR up , int axis)", },
|
||||
["lxMatrix44LookAt"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3CPTR from , lxVector3CPTR to , lxVector3CPTR up)", },
|
||||
["lxMatrix44FromEulerZYX"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3CPTR angles)", },
|
||||
["lxMatrix44FromEulerZYXFast"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3CPTR angles)", },
|
||||
["lxMatrix44FromEulerZYXdeg"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3CPTR angles)", },
|
||||
["lxMatrix44FromEulerXYZ"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3PTR angles)", },
|
||||
["lxMatrix44FromEulerXYZFast"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3PTR angles)", },
|
||||
["lxMatrix44FromAngleAxis"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3CPTR axis , float cos , float sin , float oneminuscos)", },
|
||||
["lxMatrix44FromAngleAxisFast"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , float anglerad , lxVector3CPTR axis)", },
|
||||
["lxMatrix44RotateAngle"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3PTR from , lxVector3PTR to)", },
|
||||
["lxMatrix44RotateAroundVector"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3PTR axis , float cos , float sin , float oneminuscos)", },
|
||||
["lxMatrix44RotateAroundVectorFast"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3PTR axis , float angleRad)", },
|
||||
["lxMatrix44RotateAroundPointFast"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3CPTR center , lxVector3CPTR angles)", },
|
||||
["lxMatrix44ToEulerXYZ"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat , lxVector3PTR angles)", },
|
||||
["lxMatrix44ToEulerZYX"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44CPTR mat , lxVector3PTR angles)", },
|
||||
["lxMatrix44Perspective"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , const float fov , const float front , const float back , const float aspect)", },
|
||||
["lxMatrix44PerspectiveInf"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , const float fov , const float front , const float aspect)", },
|
||||
["lxMatrix44Ortho"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , const float height , const float front , const float back , const float aspect)", },
|
||||
["lxMatrix44OrthoDirect"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , const float left , const float right , const float bottom , const float top , const float front , const float back)", },
|
||||
["lxMatrix44PlaneProjection"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector3CPTR planenormal)", },
|
||||
["lxMatrix44ModifyProjectionClipplane"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR projmatrix , lxMatrix44CPTR mview , lxMatrix44CPTR mviewinv , lxVector4CPTR clipPlane)", },
|
||||
["lxMatrix44Reflection"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , lxVector4PTR plane)", },
|
||||
["lxMatrix44CompareRot"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(float)",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat1 , lxMatrix44PTR mat2)", },
|
||||
["lxMatrix44Swizzle1"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(lxMatrix44PTR mat , uint axis [ 3 ] , lxVector3PTR dirs)", },
|
||||
["lxFloat32To16"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(float16)",
|
||||
valuetype = nil,
|
||||
args = "(float fval)", },
|
||||
["lxFloat16To32"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(float)",
|
||||
valuetype = nil,
|
||||
args = "(float16 ival)", },
|
||||
["lxFrustumPlane_t"] = { type ='class',
|
||||
description = "",
|
||||
childs = {
|
||||
["pvec"] = { type ='value', description = "lxPlane", valuetype = nil, },
|
||||
[""] = { type ='class',
|
||||
description = "",
|
||||
childs = {
|
||||
["nx"] = { type ='value', description = "int", valuetype = nil, },
|
||||
["ny"] = { type ='value', description = "int", valuetype = nil, },
|
||||
["nz"] = { type ='value', description = "int", valuetype = nil, },
|
||||
["_npad"] = { type ='value', description = "int", valuetype = nil, },
|
||||
}
|
||||
},
|
||||
[""] = { type ='class',
|
||||
description = "",
|
||||
childs = {
|
||||
["px"] = { type ='value', description = "int", valuetype = nil, },
|
||||
["py"] = { type ='value', description = "int", valuetype = nil, },
|
||||
["pz"] = { type ='value', description = "int", valuetype = nil, },
|
||||
["_ppad"] = { type ='value', description = "int", valuetype = nil, },
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
["lxFrustum_t"] = { type ='class',
|
||||
description = "",
|
||||
childs = {
|
||||
["LUX_FRUSTUM_PLANES"] = { type ='value', description = "lxFrustumPlane_t fplanes]", valuetype = nil, },
|
||||
}
|
||||
},
|
||||
["lxBoundingBox_t"] = { type ='class',
|
||||
description = "",
|
||||
childs = {
|
||||
["min"] = { type ='value', description = "lxVector4", valuetype = nil, },
|
||||
["max"] = { type ='value', description = "lxVector4", valuetype = nil, },
|
||||
}
|
||||
},
|
||||
["lxBoundingBoxCenter_t"] = { type ='class',
|
||||
description = "",
|
||||
childs = {
|
||||
["center"] = { type ='value', description = "lxVector4", valuetype = nil, },
|
||||
["size"] = { type ='value', description = "lxVector4", valuetype = nil, },
|
||||
}
|
||||
},
|
||||
["lxBoundingSphere_t"] = { type ='class',
|
||||
description = "",
|
||||
childs = {
|
||||
["center"] = { type ='value', description = "lxVector3", valuetype = nil, },
|
||||
["radius"] = { type ='value', description = "float", valuetype = nil, },
|
||||
}
|
||||
},
|
||||
["lxBoundingCone_t"] = { type ='class',
|
||||
description = "",
|
||||
childs = {
|
||||
["top"] = { type ='value', description = "lxVector4", valuetype = nil, },
|
||||
["axis"] = { type ='value', description = "lxVector4", valuetype = nil, },
|
||||
["sinDiv"] = { type ='value', description = "float", valuetype = nil, },
|
||||
["sinSqr"] = { type ='value', description = "float", valuetype = nil, },
|
||||
["cosSqr"] = { type ='value', description = "float", valuetype = nil, },
|
||||
["_pad"] = { type ='value', description = "float", valuetype = nil, },
|
||||
}
|
||||
},
|
||||
["lxBoundingCapsule_t"] = { type ='class',
|
||||
description = "",
|
||||
childs = {
|
||||
["origin"] = { type ='value', description = "lxVector4", valuetype = nil, },
|
||||
["toEnd"] = { type ='value', description = "lxVector4", valuetype = nil, },
|
||||
["radius"] = { type ='value', description = "float", valuetype = nil, },
|
||||
["radiusSqr"] = { type ='value', description = "float", valuetype = nil, },
|
||||
["2"] = { type ='value', description = "float _pad]", valuetype = nil, },
|
||||
}
|
||||
},
|
||||
}
|
||||
return {
|
||||
lxm = {
|
||||
type = 'lib',
|
||||
description = "Lux Math",
|
||||
childs = api,
|
||||
},
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
--[[// lxs | Lux Scene
|
||||
typedef enum lxMeshIndexType_e
|
||||
{
|
||||
LUX_MESH_INDEX_UINT16 , LUX_MESH_INDEX_UINT32 , LUX_MESH_INDICES , }
|
||||
lxMeshIndexType_t ;
|
||||
void lxMeshPlane_getCounts ( int segs [ 2 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices ) ;
|
||||
void lxMeshPlane_initTriangles ( int segs [ 2 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices ) ;
|
||||
void lxMeshPlane_initOutline ( int segs [ 2 ] , uint32 * indices ) ;
|
||||
void lxMeshDisc_getCounts ( int segs [ 2 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices ) ;
|
||||
void lxMeshDisc_initTriangles ( int segs [ 2 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices ) ;
|
||||
void lxMeshDisc_initOutline ( int segs [ 2 ] , uint32 * indices ) ;
|
||||
void lxMeshBox_getCounts ( int segs [ 3 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices ) ;
|
||||
void lxMeshBox_initTriangles ( int segs [ 3 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices ) ;
|
||||
void lxMeshBox_initOutline ( int segs [ 3 ] , uint32 * indices ) ;
|
||||
void lxMeshSphere_getCounts ( int segs [ 2 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices ) ;
|
||||
void lxMeshSphere_initTriangles ( int segs [ 2 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices ) ;
|
||||
void lxMeshSphere_initOutline ( int segs [ 2 ] , uint32 * indices ) ;
|
||||
void lxMeshCylinder_getCounts ( int segs [ 3 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices ) ;
|
||||
void lxMeshCylinder_initTriangles ( int segs [ 3 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices ) ;
|
||||
void lxMeshCylinder_initOutline ( int segs [ 3 ] , uint32 * indices ) ;
|
||||
void * lxVertexCacheOptimize_tipsify ( void * indices , int nTriangles , int nVertices , int k , lxMeshIndexType_t type ) ;
|
||||
void * lxVertexCacheOptimize_forsyth ( void * indices , int nTriangles , int nVertices , int vcache , lxMeshIndexType_t type ) ;
|
||||
void * lxVertexCacheOptimize_grid_castano ( void * indices , int maxTriangles , int width , int height , int vcache , lxMeshIndexType_t type , int * writtenTriangles ) ;
|
||||
|
||||
|
||||
]]
|
||||
--auto-generated api from ffi headers
|
||||
local api =
|
||||
{
|
||||
["LUX_MESH_INDEX_UINT16"] = { type ='value', },
|
||||
["LUX_MESH_INDEX_UINT32"] = { type ='value', },
|
||||
["LUX_MESH_INDICES"] = { type ='value', },
|
||||
["lxMeshPlane_getCounts"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 2 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices)", },
|
||||
["lxMeshPlane_initTriangles"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 2 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices)", },
|
||||
["lxMeshPlane_initOutline"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 2 ] , uint32 * indices)", },
|
||||
["lxMeshDisc_getCounts"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 2 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices)", },
|
||||
["lxMeshDisc_initTriangles"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 2 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices)", },
|
||||
["lxMeshDisc_initOutline"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 2 ] , uint32 * indices)", },
|
||||
["lxMeshBox_getCounts"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 3 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices)", },
|
||||
["lxMeshBox_initTriangles"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 3 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices)", },
|
||||
["lxMeshBox_initOutline"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 3 ] , uint32 * indices)", },
|
||||
["lxMeshSphere_getCounts"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 2 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices)", },
|
||||
["lxMeshSphere_initTriangles"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 2 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices)", },
|
||||
["lxMeshSphere_initOutline"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 2 ] , uint32 * indices)", },
|
||||
["lxMeshCylinder_getCounts"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 3 ] , int * numVertices , int * numTriangleIndices , int * numOutlineIndices)", },
|
||||
["lxMeshCylinder_initTriangles"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 3 ] , lxVector3 * pos , lxVector3 * normal , lxVector2 * uv , uint32 * indices)", },
|
||||
["lxMeshCylinder_initOutline"] = { type ='function',
|
||||
description = "",
|
||||
returns = "()",
|
||||
valuetype = nil,
|
||||
args = "(int segs [ 3 ] , uint32 * indices)", },
|
||||
["lxVertexCacheOptimize_tipsify"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void *)",
|
||||
valuetype = nil,
|
||||
args = "(void * indices , int nTriangles , int nVertices , int k , lxMeshIndexType_t type)", },
|
||||
["lxVertexCacheOptimize_forsyth"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void *)",
|
||||
valuetype = nil,
|
||||
args = "(void * indices , int nTriangles , int nVertices , int vcache , lxMeshIndexType_t type)", },
|
||||
["lxVertexCacheOptimize_grid_castano"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void *)",
|
||||
valuetype = nil,
|
||||
args = "(void * indices , int maxTriangles , int width , int height , int vcache , lxMeshIndexType_t type , int * writtenTriangles)", },
|
||||
}
|
||||
return {
|
||||
lxs = {
|
||||
type = 'lib',
|
||||
description = "Lux Scene",
|
||||
childs = api,
|
||||
},
|
||||
}
|
||||
0
bin/clibs/mime/core.dylib
Executable file → Normal file
0
bin/clibs/mime/core.dylib
Executable file → Normal file
0
bin/clibs/socket/core.dylib
Executable file → Normal file
0
bin/clibs/socket/core.dylib
Executable file → Normal file
BIN
bin/clibs53/mime/core.dll
Normal file
BIN
bin/clibs53/mime/core.dll
Normal file
Binary file not shown.
BIN
bin/clibs53/mime/core.dylib
Normal file
BIN
bin/clibs53/mime/core.dylib
Normal file
Binary file not shown.
BIN
bin/clibs53/socket/core.dll
Normal file
BIN
bin/clibs53/socket/core.dll
Normal file
Binary file not shown.
BIN
bin/clibs53/socket/core.dylib
Normal file
BIN
bin/clibs53/socket/core.dylib
Normal file
Binary file not shown.
0
bin/liblua.dylib
Executable file → Normal file
0
bin/liblua.dylib
Executable file → Normal file
BIN
bin/liblua53.dylib
Normal file
BIN
bin/liblua53.dylib
Normal file
Binary file not shown.
0
bin/libwx.dylib
Executable file → Normal file
0
bin/libwx.dylib
Executable file → Normal file
BIN
bin/linux/x64/clibs53/mime/core.so
Normal file
BIN
bin/linux/x64/clibs53/mime/core.so
Normal file
Binary file not shown.
BIN
bin/linux/x64/clibs53/socket/core.so
Normal file
BIN
bin/linux/x64/clibs53/socket/core.so
Normal file
Binary file not shown.
BIN
bin/linux/x64/lua53
Executable file
BIN
bin/linux/x64/lua53
Executable file
Binary file not shown.
BIN
bin/linux/x86/clibs53/mime/core.so
Normal file
BIN
bin/linux/x86/clibs53/mime/core.so
Normal file
Binary file not shown.
BIN
bin/linux/x86/clibs53/socket/core.so
Normal file
BIN
bin/linux/x86/clibs53/socket/core.so
Normal file
Binary file not shown.
BIN
bin/linux/x86/lua53
Executable file
BIN
bin/linux/x86/lua53
Executable file
Binary file not shown.
BIN
bin/lua.app/Contents/MacOS/lua53
Executable file
BIN
bin/lua.app/Contents/MacOS/lua53
Executable file
Binary file not shown.
BIN
bin/lua53.dll
Normal file
BIN
bin/lua53.dll
Normal file
Binary file not shown.
BIN
bin/lua53.exe
Normal file
BIN
bin/lua53.exe
Normal file
Binary file not shown.
@@ -43,6 +43,10 @@ for ARG in "$@"; do
|
||||
5.2)
|
||||
BUILD_52=true
|
||||
;;
|
||||
5.3)
|
||||
BUILD_53=true
|
||||
BUILD_FLAGS="$BUILD_FLAGS -DLUA_COMPAT_APIINTCASTS"
|
||||
;;
|
||||
jit)
|
||||
BUILD_JIT=true
|
||||
;;
|
||||
@@ -111,6 +115,14 @@ fi
|
||||
LUA_FILENAME="$LUA_BASENAME.tar.gz"
|
||||
LUA_URL="http://www.lua.org/ftp/$LUA_FILENAME"
|
||||
|
||||
if [ $BUILD_53 ]; then
|
||||
LUAV="53"
|
||||
LUAS=$LUAV
|
||||
LUA_BASENAME="lua-5.3.0-beta"
|
||||
LUA_FILENAME="$LUA_BASENAME.tar.gz"
|
||||
LUA_URL="http://www.lua.org/work/$LUA_FILENAME"
|
||||
fi
|
||||
|
||||
if [ $BUILD_JIT ]; then
|
||||
LUA_BASENAME="LuaJIT-2.0.2"
|
||||
LUA_FILENAME="$LUA_BASENAME.tar.gz"
|
||||
|
||||
@@ -49,6 +49,10 @@ for ARG in "$@"; do
|
||||
5.2)
|
||||
BUILD_52=true
|
||||
;;
|
||||
5.3)
|
||||
BUILD_53=true
|
||||
BUILD_FLAGS="$BUILD_FLAGS -DLUA_COMPAT_APIINTCASTS"
|
||||
;;
|
||||
jit)
|
||||
BUILD_JIT=true
|
||||
;;
|
||||
@@ -122,6 +126,14 @@ fi
|
||||
LUA_FILENAME="$LUA_BASENAME.tar.gz"
|
||||
LUA_URL="http://www.lua.org/ftp/$LUA_FILENAME"
|
||||
|
||||
if [ $BUILD_53 ]; then
|
||||
LUAV="53"
|
||||
LUAS=$LUAV
|
||||
LUA_BASENAME="lua-5.3.0-beta"
|
||||
LUA_FILENAME="$LUA_BASENAME.tar.gz"
|
||||
LUA_URL="http://www.lua.org/work/$LUA_FILENAME"
|
||||
fi
|
||||
|
||||
if [ $BUILD_JIT ]; then
|
||||
LUA_BASENAME="LuaJIT-2.0.2"
|
||||
LUA_FILENAME="$LUA_BASENAME.tar.gz"
|
||||
|
||||
@@ -50,6 +50,10 @@ for ARG in "$@"; do
|
||||
5.2)
|
||||
BUILD_52=true
|
||||
;;
|
||||
5.3)
|
||||
BUILD_53=true
|
||||
BUILD_FLAGS="$BUILD_FLAGS -DLUA_COMPAT_APIINTCASTS"
|
||||
;;
|
||||
jit)
|
||||
BUILD_JIT=true
|
||||
;;
|
||||
@@ -140,6 +144,14 @@ fi
|
||||
LUA_FILENAME="$LUA_BASENAME.tar.gz"
|
||||
LUA_URL="http://www.lua.org/ftp/$LUA_FILENAME"
|
||||
|
||||
if [ $BUILD_53 ]; then
|
||||
LUAV="53"
|
||||
LUAS=$LUAV
|
||||
LUA_BASENAME="lua-5.3.0-beta"
|
||||
LUA_FILENAME="$LUA_BASENAME.tar.gz"
|
||||
LUA_URL="http://www.lua.org/work/$LUA_FILENAME"
|
||||
fi
|
||||
|
||||
if [ $BUILD_JIT ]; then
|
||||
LUA_BASENAME="LuaJIT-2.0.2"
|
||||
LUA_FILENAME="$LUA_BASENAME.tar.gz"
|
||||
|
||||
@@ -61,8 +61,13 @@ for _, mask in ipairs({"zbstudio/*.lua", "src/main.lua", "src/editor/*.lua"}) do
|
||||
-- remove brackets aroung ("foo")
|
||||
-- extract message from ("foo", count)
|
||||
msg = msg:gsub("^%(", ""):gsub("%)$", ""):gsub([[(["']), .+]], "%1")
|
||||
messages[msg] = messages[msg] or {}
|
||||
messages[msg][file] = (messages[msg][file] or 0) + 1
|
||||
if not msg:find([=[^["']]=]) or not msg:find([=[["']$]=]) then
|
||||
io.stderr:write(("Call with a non-string 'TR(%s)' ignored in '%s'.\n")
|
||||
:format(msg, file))
|
||||
else
|
||||
messages[msg] = messages[msg] or {}
|
||||
messages[msg][file] = (messages[msg][file] or 0) + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -90,7 +95,7 @@ end
|
||||
table.sort(msgs)
|
||||
print("return {\n"..plural..table.concat(msgs, "\n").."\n}")
|
||||
if next(existing) then
|
||||
local str = "-- no match found for the following elements: "
|
||||
local str = "No match found for the following elements: "
|
||||
for msg in pairs(existing) do str = str .. msg .. ", " end
|
||||
print((str:gsub(", $", "")))
|
||||
io.stderr:write((str:gsub(", $", "\n")))
|
||||
end
|
||||
|
||||
@@ -7,13 +7,14 @@ return {
|
||||
["&Close Page"] = "关闭页面", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["&Community"] = nil, -- src\editor\menu_help.lua
|
||||
["&Compile"] = "编译", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "复制", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Copy"] = "复制", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "布局", -- src\editor\menu_view.lua
|
||||
["&Delete Watch"] = "删除监视", -- src\editor\debugger.lua
|
||||
["&Delete"] = nil, -- src\editor\filetree.lua
|
||||
["&Documentation"] = nil, -- src\editor\menu_help.lua
|
||||
["&Down"] = "往下", -- src\editor\findreplace.lua
|
||||
["&Edit Project Directory"] = nil, -- src\editor\filetree.lua
|
||||
["&Edit Value"] = nil, -- src\editor\debugger.lua
|
||||
["&Edit Watch"] = "编辑监视", -- src\editor\debugger.lua
|
||||
["&Edit"] = "编辑", -- src\editor\menu_edit.lua
|
||||
["&File"] = "文件", -- src\editor\menu_file.lua
|
||||
@@ -29,10 +30,10 @@ return {
|
||||
["&New"] = "新建", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "打开...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "输出/主控台视窗", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "粘贴", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Paste"] = "粘贴", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project Page"] = nil, -- src\editor\menu_help.lua
|
||||
["&Project"] = "项目", -- src\editor\inspect.lua, src\editor\menu_project.lua
|
||||
["&Redo"] = "重做", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Project"] = "项目", -- src\editor\menu_project.lua
|
||||
["&Redo"] = "重做", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Rename"] = nil, -- src\editor\filetree.lua
|
||||
["&Replace All"] = "全替换", -- src\editor\findreplace.lua
|
||||
["&Replace"] = "替换", -- src\editor\findreplace.lua, src\editor\menu_search.lua
|
||||
@@ -46,7 +47,7 @@ return {
|
||||
["&Subdirectories"] = "子文件夹", -- src\editor\findreplace.lua
|
||||
["&Tool Bar"] = nil, -- src\editor\menu_view.lua
|
||||
["&Tutorials"] = nil, -- src\editor\menu_help.lua
|
||||
["&Undo"] = "撤消", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Undo"] = "撤消", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Up"] = "往上", -- src\editor\findreplace.lua
|
||||
["&View"] = "视图", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "监视视窗", -- src\editor\menu_view.lua
|
||||
@@ -56,16 +57,18 @@ return {
|
||||
["Add Watch Expression"] = "添加监视表达式", -- src\editor\editor.lua
|
||||
["All files"] = "全部文件", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "允许外部进程开启除错", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "分析源代码", -- src\editor\inspect.lua
|
||||
["Analyze"] = "分析", -- src\editor\inspect.lua
|
||||
["Analyze the source code"] = "分析源代码", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Analyze"] = "分析", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Auto Complete Identifiers"] = "自动补全标识符", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "当输入时自动补全", -- src\editor\menu_edit.lua
|
||||
["Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "执行下一语句之后中断执行", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "清除输出视窗", -- src\editor\menu_project.lua
|
||||
["Break execution at the next executed line of code"] = "执行下一语句之后中断执行", -- src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "清除输出视窗", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "注释/消除注释", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "不能在现行编辑视窗对脚本进行除错", -- src\editor\debugger.lua
|
||||
["Can't evaluate the expression while the application is running."] = nil, -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "在当前项目中寻找不到文件 '%s' 以进行激活然后除错, 更新项目或是在编辑器里开启文件后再除错", -- src\editor\debugger.lua
|
||||
["Can't open file '%s': %s"] = nil, -- src\editor\singleinstance.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "不能处理自动恢复存档: %s", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "不能执行entry point脚本 ('%s')", -- src\editor\debugger.lua
|
||||
["Can't start debugger server at %s:%d: %s."] = nil, -- src\editor\debugger.lua
|
||||
@@ -74,7 +77,7 @@ return {
|
||||
["Can't stop debugger server as it is not started."] = nil, -- src\editor\debugger.lua
|
||||
["Cancel"] = "取消", -- src\editor\findreplace.lua
|
||||
["Cancelled by the user."] = nil, -- src\editor\findreplace.lua
|
||||
["Choose a project directory"] = "选择项目文件夹", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Choose a project directory"] = "选择项目文件夹", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Choose..."] = "请选...", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Clear Items"] = nil, -- src\editor\menu_file.lua
|
||||
["Clear items from this list"] = nil, -- src\editor\menu_file.lua
|
||||
@@ -93,11 +96,12 @@ return {
|
||||
["Complete &Identifier"] = "补全标识符", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "补全当前标识符", -- src\editor\menu_edit.lua
|
||||
["Consider removing backslash from escape sequence '%s'."] = nil, -- src\editor\commands.lua
|
||||
["Copy Full Path"] = nil, -- src\editor\filetree.lua
|
||||
["Copy Full Path"] = nil, -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Copy selected text to clipboard"] = "复制被选的text到clipboard", -- src\editor\menu_edit.lua
|
||||
["Correct &Indentation"] = nil, -- src\editor\menu_edit.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "不能激活 '%s' 以除错; 省略后继续进行", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "新建空文档", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Cu&t"] = "剪切", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Create an empty document"] = "新建空文档", -- src\editor\menu_file.lua
|
||||
["Cu&t"] = "剪切", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "剪切被选的text到clipboard", -- src\editor\menu_edit.lua
|
||||
["Debugger server started at %s:%d."] = "除错伺服器起始于 %s:%d.", -- src\editor\debugger.lua
|
||||
["Debugger server stopped at %s:%d."] = nil, -- src\editor\debugger.lua
|
||||
@@ -114,6 +118,7 @@ return {
|
||||
["Enter Lua code and press Enter to run it."] = "输入Lua代码然后按 <Enter> 以执行", -- src\editor\shellbox.lua
|
||||
["Enter command line parameters (use Cancel to clear)"] = nil, -- src\editor\menu_project.lua
|
||||
["Enter line number"] = "输入行号码", -- src\editor\menu_search.lua
|
||||
["Enter replacement text"] = nil, -- src\editor\editor.lua
|
||||
["Error while loading API file: %s"] = "导入API档时出错误: %s", -- src\editor\autocomplete.lua
|
||||
["Error while loading configuration file: %s"] = "导入configuration档时出错误: %s", -- src\editor\style.lua
|
||||
["Error while processing API file: %s"] = "处理API档时出错误: %s", -- src\editor\autocomplete.lua
|
||||
@@ -124,10 +129,9 @@ return {
|
||||
["Execute the current project/file"] = "执行当前项目/文档", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "执行出错误", -- src\editor\debugger.lua
|
||||
["Exit program"] = "离开程式", -- src\editor\menu_file.lua
|
||||
["Expr"] = "表达式", -- src\editor\debugger.lua
|
||||
["Expression"] = "表达式", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "磁碟上的文档 '%s' 已被更改", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "文档 '%s' 的时间戳比 '%s' 更新近; 请检验后再保存", -- src\editor\commands.lua
|
||||
["File '%s' is missing and can't be recovered."] = nil, -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "文档 '%s' 已不存在", -- src\editor\menu_file.lua, src\editor\editor.lua
|
||||
["File Type"] = "文档类", -- src\editor\findreplace.lua
|
||||
["File already exists."] = nil, -- src\editor\commands.lua
|
||||
@@ -137,9 +141,9 @@ return {
|
||||
["Find &Previous"] = "查找上一个", -- src\editor\menu_search.lua
|
||||
["Find In Files"] = "在文档中查找", -- src\editor\findreplace.lua
|
||||
["Find and replace text in files"] = "在文档中查找text然后更换", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "查找text然后更换", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find and replace text"] = "查找text然后更换", -- src\editor\menu_search.lua
|
||||
["Find text in files"] = "在文档中查找text", -- src\editor\menu_search.lua
|
||||
["Find text"] = "查找text", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find text"] = "查找text", -- src\editor\menu_search.lua
|
||||
["Find the earlier text occurence"] = "查找之前出现的text", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "查找之後将出现的text", -- src\editor\menu_search.lua
|
||||
["Find"] = "查找", -- src\editor\findreplace.lua
|
||||
@@ -153,8 +157,8 @@ return {
|
||||
["Go To Previous Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "到所选的行", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["Ignored error in debugger initialization code: %s."] = nil, -- src\editor\debugger.lua
|
||||
["In Files"] = "在档案里", -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "跳到函数定义", -- src\editor\editor.lua
|
||||
["Known Files"] = "所知的文档", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "行: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "本地主控台", -- src\editor\gui.lua, src\editor\shellbox.lua
|
||||
@@ -166,13 +170,17 @@ return {
|
||||
["New &File"] = nil, -- src\editor\filetree.lua
|
||||
["OVR"] = "OVR", -- src\editor\editor.lua
|
||||
["Open With Default Program"] = nil, -- src\editor\filetree.lua
|
||||
["Open an existing document"] = "打开现存文档", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Open an existing document"] = "打开现存文档", -- src\editor\menu_file.lua
|
||||
["Open file"] = "打开文档", -- src\editor\commands.lua
|
||||
["Options"] = "选项", -- src\editor\findreplace.lua
|
||||
["Output (running)"] = "输出 (进行中)", -- src\editor\output.lua
|
||||
["Output"] = "输出", -- src\editor\gui.lua, src\editor\output.lua, src\editor\settings.lua
|
||||
["Outline Window"] = nil, -- src\editor\menu_view.lua
|
||||
["Outline"] = nil, -- src\editor\outline.lua
|
||||
["Output (running)"] = "输出 (进行中)", -- src\editor\debugger.lua, src\editor\output.lua
|
||||
["Output (suspended)"] = nil, -- src\editor\debugger.lua
|
||||
["Output"] = "输出", -- src\editor\debugger.lua, src\editor\output.lua, src\editor\gui.lua, src\editor\settings.lua
|
||||
["Paste text from the clipboard"] = "从clipboard粘贴text", -- src\editor\menu_edit.lua
|
||||
["Preferences"] = "首选项", -- src\editor\menu_edit.lua
|
||||
["Prepend '!' to force local execution."] = nil, -- src\editor\shellbox.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "在多行展现复杂值请前置 '='", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "按 <cancel> 以退出", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "程式 '%s' 执行于 '%s' (pid: %d).", -- src\editor\output.lua
|
||||
@@ -183,12 +191,13 @@ return {
|
||||
["Program unable to run as '%s'."] = "程式不能以 '%s' 执行", -- src\editor\output.lua
|
||||
["Project Directory"] = "项目文件夹", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Project history"] = nil, -- src\editor\menu_file.lua
|
||||
["Project"] = "项目", -- src\editor\gui.lua
|
||||
["Project"] = "项目", -- src\editor\filetree.lua
|
||||
["Project/&FileTree Window"] = "项目/文档树 视窗", -- src\editor\menu_view.lua
|
||||
["Provide command line parameters"] = nil, -- src\editor\menu_project.lua
|
||||
["R/O"] = "唯读", -- src\editor\editor.lua
|
||||
["R/W"] = "读写", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "在文档中替换", -- src\editor\menu_search.lua
|
||||
["Re-indent selected lines"] = nil, -- src\editor\menu_edit.lua
|
||||
["Recent &Projects"] = nil, -- src\editor\menu_file.lua
|
||||
["Recent Files"] = "最近的文档", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "重做最后被取消的编辑", -- src\editor\menu_edit.lua
|
||||
@@ -197,6 +206,7 @@ return {
|
||||
["Remote console"] = "远程主控台", -- src\editor\shellbox.lua
|
||||
["Rename All Instances"] = nil, -- src\editor\editor.lua
|
||||
["Replace A&ll"] = "更换全部", -- src\editor\findreplace.lua
|
||||
["Replace All Selections"] = nil, -- src\editor\editor.lua
|
||||
["Replace"] = "更换", -- src\editor\findreplace.lua
|
||||
["Replaced an invalid UTF8 character with %s."] = "以%s更换无效的UTF8字元", -- src\editor\commands.lua
|
||||
["Replaced"] = "更换", -- src\editor\findreplace.lua
|
||||
@@ -208,24 +218,24 @@ return {
|
||||
["Save &As..."] = "另存为...", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save A&ll"] = "全部存档", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "存档更新?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "保存所有开启的文档", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save all open documents"] = "保存所有开启的文档", -- src\editor\menu_file.lua
|
||||
["Save file as"] = "文档另存为", -- src\editor\commands.lua
|
||||
["Save file?"] = "保存文档?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "用新档案名称保存当前文档", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "保存当前文档", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save the current document"] = "保存当前文档", -- src\editor\menu_file.lua
|
||||
["Saved auto-recover at %s."] = "在 %s 存档自动恢复", -- src\editor\commands.lua
|
||||
["Scope"] = "范围", -- src\editor\findreplace.lua
|
||||
["Scratchpad error"] = "暂存器错误", -- src\editor\debugger.lua
|
||||
["Searching for"] = "搜索", -- src\editor\findreplace.lua
|
||||
["Sel: %d/%d"] = nil, -- src\editor\editor.lua
|
||||
["Select &All"] = "选全部", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Select &All"] = "选全部", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "选编辑器内的所有text", -- src\editor\menu_edit.lua
|
||||
["Select and Find Next"] = nil, -- src\editor\menu_search.lua
|
||||
["Select and Find Previous"] = nil, -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its next occurrence"] = nil, -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its previous occurrence"] = nil, -- src\editor\menu_search.lua
|
||||
["Set From Current File"] = "从当前文档设置", -- src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "从当前文档设置项目文件夹", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "从当前文档设置项目文件夹", -- src\editor\menu_project.lua
|
||||
["Set the interpreter to be used"] = "设置解释器", -- src\editor\menu_project.lua
|
||||
["Set the project directory to be used"] = "设置项目文件夹", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Settings: System"] = "设置: 系统", -- src\editor\menu_edit.lua
|
||||
@@ -236,28 +246,30 @@ return {
|
||||
["Show/Hide the status bar"] = nil, -- src\editor\menu_view.lua
|
||||
["Show/Hide the toolbar"] = nil, -- src\editor\menu_view.lua
|
||||
["Sort selected lines"] = "对被选的行进行排列", -- src\editor\menu_edit.lua
|
||||
["Stack"] = "堆栈", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["Source"] = nil, -- src\editor\menu_edit.lua
|
||||
["Stack"] = "堆栈", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "开始除错", -- src\editor\menu_project.lua
|
||||
["Start or Continue debugging"] = nil, -- src\editor\gui.lua
|
||||
["Start or continue debugging"] = nil, -- src\editor\menu_project.lua
|
||||
["Step &Into"] = "除错运行 进入子程序/函数", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "除错运行 掠过子程序/函数", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "除错运行 离开子程序/函数", -- src\editor\menu_project.lua
|
||||
["Step into"] = "除错运行 进入子程序/函数", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "除错运行 离开当前的函数", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step over"] = "除错运行 掠过子程序/函数", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = nil, -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "终止目前进行着的进程", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step into"] = "除错运行 进入子程序/函数", -- src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "除错运行 离开当前的函数", -- src\editor\menu_project.lua
|
||||
["Step over"] = "除错运行 掠过子程序/函数", -- src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = nil, -- src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "终止目前进行着的进程", -- src\editor\menu_project.lua
|
||||
["Switch to or from full screen mode"] = "切换全屏模式", -- src\editor\menu_view.lua
|
||||
["Text not found."] = "寻找不到text", -- src\editor\findreplace.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "API file必须存放在API文件夹中的子文件夹", -- src\editor\autocomplete.lua
|
||||
["Toggle Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Toggle Break&point"] = "切换中断点", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "切换中断点", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Toggle bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Toggle breakpoint"] = "切换中断点", -- src\editor\menu_project.lua
|
||||
["Tr&ace"] = "追踪", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "执行追踪展示每一执行过的语句", -- src\editor\menu_project.lua
|
||||
["Unable to create directory '%s'."] = nil, -- src\editor\filetree.lua
|
||||
["Unable to create file '%s'."] = nil, -- src\editor\filetree.lua
|
||||
["Unable to delete directory '%s': %s"] = nil, -- src\editor\filetree.lua
|
||||
["Unable to load file '%s'."] = "导出文件失败 '%s'.", -- src\editor\commands.lua
|
||||
["Unable to rename file '%s'."] = nil, -- src\editor\filetree.lua
|
||||
["Unable to save file '%s': %s"] = "保存文件失败 '%s': %s", -- src\editor\commands.lua
|
||||
@@ -267,12 +279,12 @@ return {
|
||||
["Use '%s' to show line endings and '%s' to convert them."] = "用 '%s' 来显示语句的终结和 '%s' 来进行转换", -- src\editor\commands.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "用 'clear' 来清除shell的输出和历史", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "用 <Shift-Enter> 来处理多行代码", -- src\editor\shellbox.lua
|
||||
["Value"] = "数值", -- src\editor\debugger.lua
|
||||
["View the outline window"] = nil, -- src\editor\menu_view.lua
|
||||
["View the output/console window"] = "查看输出/主控台视窗", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "查看项目/文件树视窗", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "查看堆栈视窗", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["View the watch window"] = "查看监视视窗", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["Watch"] = "监视", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["View the stack window"] = "查看堆栈视窗", -- src\editor\menu_view.lua
|
||||
["View the watch window"] = "查看监视视窗", -- src\editor\menu_view.lua
|
||||
["Watch"] = "监视", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "欢迎来到互动 Lua interpreter.", -- src\editor\shellbox.lua
|
||||
["Wrap ar&ound"] = "卷绕", -- src\editor\findreplace.lua
|
||||
["You must save the program first."] = "必须先保存程序", -- src\editor\commands.lua
|
||||
|
||||
@@ -8,13 +8,14 @@ return {
|
||||
["&Close Page"] = "S&eite schließen", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["&Community"] = "&Community", -- src\editor\menu_help.lua
|
||||
["&Compile"] = "&Compiler", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "&Kopieren", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Copy"] = "&Kopieren", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "Standard-&Layout", -- src\editor\menu_view.lua
|
||||
["&Delete Watch"] = "&Beobachtungspunkt entfernen", -- src\editor\debugger.lua
|
||||
["&Delete"] = "&Entfernen", -- src\editor\filetree.lua
|
||||
["&Documentation"] = "&Dokumentation", -- src\editor\menu_help.lua
|
||||
["&Down"] = "&Runter", -- src\editor\findreplace.lua
|
||||
["&Edit Project Directory"] = "Projektverzeichnis ändern", -- src\editor\filetree.lua
|
||||
["&Edit Value"] = "Wert editieren", -- src\editor\debugger.lua
|
||||
["&Edit Watch"] = "&Beobachtungspunkt bearbeiten", -- src\editor\debugger.lua
|
||||
["&Edit"] = "&Bearbeiten", -- src\editor\menu_edit.lua
|
||||
["&File"] = "&Datei", -- src\editor\menu_file.lua
|
||||
@@ -30,10 +31,10 @@ return {
|
||||
["&New"] = "&Neu", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Öffnen...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "&Ausgabefenster/Konsole", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "&Einfügen", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Paste"] = "&Einfügen", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project Page"] = "&Projektseite", -- src\editor\menu_help.lua
|
||||
["&Project"] = "&Projekt", -- src\editor\inspect.lua, src\editor\menu_project.lua
|
||||
["&Redo"] = "&Wiederholen", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Project"] = "&Projekt", -- src\editor\menu_project.lua
|
||||
["&Redo"] = "&Wiederholen", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Rename"] = "&Umbenennen", -- src\editor\filetree.lua
|
||||
["&Replace All"] = "&Alles ersetzen", -- src\editor\findreplace.lua
|
||||
["&Replace"] = "&Ersetzen", -- src\editor\findreplace.lua, src\editor\menu_search.lua
|
||||
@@ -47,7 +48,7 @@ return {
|
||||
["&Subdirectories"] = "&Unterverzeichnisse", -- src\editor\findreplace.lua
|
||||
["&Tool Bar"] = "&Werkzeugleiste", -- src\editor\menu_view.lua
|
||||
["&Tutorials"] = "&Tutorien", -- src\editor\menu_help.lua
|
||||
["&Undo"] = "&Rückgängig", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Undo"] = "&Rückgängig", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Up"] = "&Hoch", -- src\editor\findreplace.lua
|
||||
["&View"] = "&Ansicht", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "&Beobachtungspunkte", -- src\editor\menu_view.lua
|
||||
@@ -57,16 +58,18 @@ return {
|
||||
["Add Watch Expression"] = "Beobachtungspunkt hinzufügen", -- src\editor\editor.lua
|
||||
["All files"] = "Alle Dateien", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Externem Prozeß erlauben, den Debugger zu starten", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Quellcode analysieren", -- src\editor\inspect.lua
|
||||
["Analyze"] = "&Analyseroutine", -- src\editor\inspect.lua
|
||||
["Analyze the source code"] = "Quellcode analysieren", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Analyze"] = "&Analyseroutine", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Auto Complete Identifiers"] = "Auto-Vervollständigen von Bezeichnern", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Auto-Vervollständigen beim Tippen", -- src\editor\menu_edit.lua
|
||||
["Bookmark"] = "Lese&zeichen", -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Programmausführung bei der nächsten ausgeführten Zeile stoppen", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "Ausgabefenster l&öschen", -- src\editor\menu_project.lua
|
||||
["Break execution at the next executed line of code"] = "Programmausführung bei der nächsten ausgeführten Zeile stoppen", -- src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "Ausgabefenster l&öschen", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "(Aus-)/K&ommentieren", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "Script kann im aktiven Editorfenster nicht gedebuggt werden.", -- src\editor\debugger.lua
|
||||
["Can't evaluate the expression while the application is running."] = "Kann den Ausdruck nicht auswerten solange die Anwendung läuft.", -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "Kann Datei '%s' zwecks Debugging im aktuellen Projekt nicht finden. Bitte Projekt aktualisieren oder Datei in den Editor laden.", -- src\editor\debugger.lua
|
||||
["Can't open file '%s': %s"] = "Kann Datei '%s' nicht öffnen: %s", -- src\editor\singleinstance.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "Auto-Wiederherstellen nicht möglich; ungültiges Format: %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "Kann Script für Einsprungspunkt ('%s') nicht ausführen.", -- src\editor\debugger.lua
|
||||
["Can't start debugger server at %s:%d: %s."] = "Kann Debugserver nicht starten (%s:%d): %s.", -- src\editor\debugger.lua
|
||||
@@ -75,7 +78,7 @@ return {
|
||||
["Can't stop debugger server as it is not started."] = "Kann Debugserver nicht stoppen wenn er vorher nicht gestartet wurde.", -- src\editor\debugger.lua
|
||||
["Cancel"] = "Abbrechen", -- src\editor\findreplace.lua
|
||||
["Cancelled by the user."] = "Durch Benutzer abgebrochen.", -- src\editor\findreplace.lua
|
||||
["Choose a project directory"] = "Projektverzeichnis auswählen", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Choose a project directory"] = "Projektverzeichnis auswählen", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Choose..."] = "Wählen...", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Clear Items"] = "Liste &löschen", -- src\editor\menu_file.lua
|
||||
["Clear items from this list"] = "Diese Liste löschen", -- src\editor\menu_file.lua
|
||||
@@ -94,11 +97,12 @@ return {
|
||||
["Complete &Identifier"] = "&Bezeichner vervollständigen", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = " Aktuellen Bezeichner vervollständigen", -- src\editor\menu_edit.lua
|
||||
["Consider removing backslash from escape sequence '%s'."] = "Möglicherweise muß `\' aus '%s' entfernt werden.", -- src\editor\commands.lua
|
||||
["Copy Full Path"] = "Kopiere Pfadangabe", -- src\editor\filetree.lua
|
||||
["Copy Full Path"] = "Kopiere Pfadangabe", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Copy selected text to clipboard"] = "Text in Zwischenablage kopieren", -- src\editor\menu_edit.lua
|
||||
["Correct &Indentation"] = "E&inzug korrigieren", -- src\editor\menu_edit.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "Konnte Datei '%s' zwecks nicht Debugging aktivieren; fahre ohne die Datei fort.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Leeres Dokument anlegen", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Cu&t"] = "A&usschneiden", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Create an empty document"] = "Leeres Dokument anlegen", -- src\editor\menu_file.lua
|
||||
["Cu&t"] = "A&usschneiden", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Schneide ausgewählten Text in die Zwischenablage hinein", -- src\editor\menu_edit.lua
|
||||
["Debugger server started at %s:%d."] = "Debugserver gestartet als %s:%d.", -- src\editor\debugger.lua
|
||||
["Debugger server stopped at %s:%d."] = "Debugserver gestoppt als %s:%d.", -- src\editor\debugger.lua
|
||||
@@ -115,6 +119,7 @@ return {
|
||||
["Enter Lua code and press Enter to run it."] = "Lua-Code eingeben und Enter drücken zum Ausführen.", -- src\editor\shellbox.lua
|
||||
["Enter command line parameters (use Cancel to clear)"] = "Kommandozeilenparameter eingeben (Cancel zum löschen)", -- src\editor\menu_project.lua
|
||||
["Enter line number"] = "Zeilennummer eingeben", -- src\editor\menu_search.lua
|
||||
["Enter replacement text"] = "Neuen Text eingeben", -- src\editor\editor.lua
|
||||
["Error while loading API file: %s"] = "Fehler beim Laden von API-Datei: %s", -- src\editor\autocomplete.lua
|
||||
["Error while loading configuration file: %s"] = "Fehler beim Laden von Konfigurationsdatei: %s", -- src\editor\style.lua
|
||||
["Error while processing API file: %s"] = "Fehler beim Lesen von API-Datei: %s", -- src\editor\autocomplete.lua
|
||||
@@ -125,10 +130,9 @@ return {
|
||||
["Execute the current project/file"] = "Aktuelles Projekt/ aktuelle Datei ausführen", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Fehler bei Ausführung", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Programm beenden", -- src\editor\menu_file.lua
|
||||
["Expr"] = "Ausdr.", -- src\editor\debugger.lua
|
||||
["Expression"] = "Ausdruck", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "Datei '%s' wurde auf der Festplatte geändert.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Datei '%s' hat neueren Zeitstempel als wiederhergestellte Datei '%s'; bitte vor dem Speichern kontrollieren.", -- src\editor\commands.lua
|
||||
["File '%s' is missing and can't be recovered."] = "Datei '%s' fehlt und kann nicht wiederhergestellt werden.", -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "Datei '%s' existiert nicht mehr.", -- src\editor\menu_file.lua, src\editor\editor.lua
|
||||
["File Type"] = "Dateityp", -- src\editor\findreplace.lua
|
||||
["File already exists."] = "Datei existiert bereits.", -- src\editor\commands.lua
|
||||
@@ -138,9 +142,9 @@ return {
|
||||
["Find &Previous"] = "Finde &Vorherige", -- src\editor\menu_search.lua
|
||||
["Find In Files"] = "Finde in Dateien", -- src\editor\findreplace.lua
|
||||
["Find and replace text in files"] = "Finde und ersetze Text in Dateien", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Finde und ersetze Text", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Finde und ersetze Text", -- src\editor\menu_search.lua
|
||||
["Find text in files"] = "Finde Text in Dateien", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Finde Text", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find text"] = "Finde Text", -- src\editor\menu_search.lua
|
||||
["Find the earlier text occurence"] = "Finde vorheriges Auftreten des Textes", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Finde nächstes Auftreten des Textes", -- src\editor\menu_search.lua
|
||||
["Find"] = "Finden", -- src\editor\findreplace.lua
|
||||
@@ -154,8 +158,8 @@ return {
|
||||
["Go To Previous Bookmark"] = "Zu vorherigem Lesezeichen", -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "Gehe zu ausgewählter Zeile", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["Ignored error in debugger initialization code: %s."] = "Ignorierter Fehler im Debugger-Init-Code: %s.", -- src\editor\debugger.lua
|
||||
["In Files"] = "In Dateien", -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "Springe zu Funktions-Definition...", -- src\editor\editor.lua
|
||||
["Known Files"] = "Bekannte Dateien", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Zeile: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Lokale Konsole", -- src\editor\gui.lua, src\editor\shellbox.lua
|
||||
@@ -167,13 +171,17 @@ return {
|
||||
["New &File"] = "Neue &Datei", -- src\editor\filetree.lua
|
||||
["OVR"] = "OVR", -- src\editor\editor.lua
|
||||
["Open With Default Program"] = "Mit Standardanwendung öffnen", -- src\editor\filetree.lua
|
||||
["Open an existing document"] = "Öffne existierendes Dokument", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Open an existing document"] = "Öffne existierendes Dokument", -- src\editor\menu_file.lua
|
||||
["Open file"] = "Öffne Datei", -- src\editor\commands.lua
|
||||
["Options"] = "Optionen", -- src\editor\findreplace.lua
|
||||
["Output (running)"] = "Ausgabe (ausgeführt)", -- src\editor\output.lua
|
||||
["Output"] = "Ausgabe", -- src\editor\gui.lua, src\editor\output.lua, src\editor\settings.lua
|
||||
["Outline Window"] = "Übersichtsfenster", -- src\editor\menu_view.lua
|
||||
["Outline"] = "Übersicht", -- src\editor\outline.lua
|
||||
["Output (running)"] = "Ausgabe (ausgeführt)", -- src\editor\debugger.lua, src\editor\output.lua
|
||||
["Output (suspended)"] = "Ausgabe (angehalten)", -- src\editor\debugger.lua
|
||||
["Output"] = "Ausgabe", -- src\editor\debugger.lua, src\editor\output.lua, src\editor\gui.lua, src\editor\settings.lua
|
||||
["Paste text from the clipboard"] = "Text aus Zwischenablage einfügen", -- src\editor\menu_edit.lua
|
||||
["Preferences"] = "Einstellungen", -- src\editor\menu_edit.lua
|
||||
["Prepend '!' to force local execution."] = "'!' voranstellen um lokale Ausführung zu erzwingen.", -- src\editor\shellbox.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "'=' voranstellen, um komplexe Ausdrücke auf mehrere Zeilen zu verteilen.", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Abbrechen Drücken zum Beenden.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "Programm '%s' gestartet in '%s' (pid : %d).", -- src\editor\output.lua
|
||||
@@ -184,12 +192,13 @@ return {
|
||||
["Program unable to run as '%s'."] = "Programm kann nicht als '%s' laufen.", -- src\editor\output.lua
|
||||
["Project Directory"] = "&Projektverzeichnis", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Project history"] = "Liste bisheriger Projekte", -- src\editor\menu_file.lua
|
||||
["Project"] = "Projekt", -- src\editor\gui.lua
|
||||
["Project"] = "Projekt", -- src\editor\filetree.lua
|
||||
["Project/&FileTree Window"] = "&Projekt/Datei Fenster", -- src\editor\menu_view.lua
|
||||
["Provide command line parameters"] = "Kommandozeilenparameter angeben", -- src\editor\menu_project.lua
|
||||
["R/O"] = "R/O", -- src\editor\editor.lua
|
||||
["R/W"] = "R/W", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Ersetze in &Dateien", -- src\editor\menu_search.lua
|
||||
["Re-indent selected lines"] = "Ausgewählte Zeilen neu einrücken", -- src\editor\menu_edit.lua
|
||||
["Recent &Projects"] = "Letzte &Projekte", -- src\editor\menu_file.lua
|
||||
["Recent Files"] = "Letzte Dateien", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Stelle letzte rückgängig gemachte Bearbeitung wieder her", -- src\editor\menu_edit.lua
|
||||
@@ -198,6 +207,7 @@ return {
|
||||
["Remote console"] = "Fensteuerungs-Konsole", -- src\editor\shellbox.lua
|
||||
["Rename All Instances"] = "Umbenennen aller Instanzen", -- src\editor\editor.lua
|
||||
["Replace A&ll"] = "A&lles ersetzen", -- src\editor\findreplace.lua
|
||||
["Replace All Selections"] = "Alle Auswahlen ersetzen", -- src\editor\editor.lua
|
||||
["Replace"] = "Ersetzen", -- src\editor\findreplace.lua
|
||||
["Replaced an invalid UTF8 character with %s."] = "Unbekanntes UTF8-Symbol ersetzt mit %s.", -- src\editor\commands.lua
|
||||
["Replaced"] = "Ersetzt:", -- src\editor\findreplace.lua
|
||||
@@ -209,24 +219,24 @@ return {
|
||||
["Save &As..."] = "S&peichern als...", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save A&ll"] = "&Alle Speichern", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "Änderungen speichern?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Alle offenen Dokumente speichern", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save all open documents"] = "Alle offenen Dokumente speichern", -- src\editor\menu_file.lua
|
||||
["Save file as"] = "Datei speichern als", -- src\editor\commands.lua
|
||||
["Save file?"] = "Datei speichern?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Aktuelles Dokument unter neuem Namen speichern", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Aktuelles Dokument speichern", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save the current document"] = "Aktuelles Dokument speichern", -- src\editor\menu_file.lua
|
||||
["Saved auto-recover at %s."] = "%s Autowiederherstellen gespeichert.", -- src\editor\commands.lua
|
||||
["Scope"] = "Richtung", -- src\editor\findreplace.lua
|
||||
["Scratchpad error"] = "Fehler im Entwurf", -- src\editor\debugger.lua
|
||||
["Searching for"] = "Suchen nach", -- src\editor\findreplace.lua
|
||||
["Sel: %d/%d"] = "Ausgew.: %d/%d", -- src\editor\editor.lua
|
||||
["Select &All"] = "&Alles Auswählen", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Select &All"] = "&Alles Auswählen", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Kompletten Text im Editor auswählen", -- src\editor\menu_edit.lua
|
||||
["Select and Find Next"] = "Auswählen und nächstes finden", -- src\editor\menu_search.lua
|
||||
["Select and Find Previous"] = "Auswählen und vorheriges finden", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its next occurrence"] = "Wort unter dem Cursor auswählen und nächstes Auftauchen finden", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its previous occurrence"] = "Wort unter dem Cursor auswählen und vorheriges Auftauchen finden", -- src\editor\menu_search.lua
|
||||
["Set From Current File"] = "Anhand der aktuellen Datei festlegen", -- src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Lege Projektverzeichnis anhand der aktuellen Datei fest", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Lege Projektverzeichnis anhand der aktuellen Datei fest", -- src\editor\menu_project.lua
|
||||
["Set the interpreter to be used"] = "Wähle zu benutzenden Interpreter aus", -- src\editor\menu_project.lua
|
||||
["Set the project directory to be used"] = "Lege zu benutzendes Projektverzeichnis fest", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Settings: System"] = "Einstellungen: System", -- src\editor\menu_edit.lua
|
||||
@@ -237,30 +247,32 @@ return {
|
||||
["Show/Hide the status bar"] = "Statuszeile zeigen/verstecken", -- src\editor\menu_view.lua
|
||||
["Show/Hide the toolbar"] = "Werkzeugleiste zeigen/verstecken", -- src\editor\menu_view.lua
|
||||
["Sort selected lines"] = "Ausgewählte Zeilen sortieren", -- src\editor\menu_edit.lua
|
||||
["Stack"] = "Stack", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["Source"] = "Source", -- src\editor\menu_edit.lua
|
||||
["Stack"] = "Stack", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "&Debugging starten", -- src\editor\menu_project.lua
|
||||
["Start or Continue debugging"] = "Debuggen starten/fortsetzen", -- src\editor\gui.lua
|
||||
["Start or continue debugging"] = "Debuggen starten/fortsetzen", -- src\editor\menu_project.lua
|
||||
["Step &Into"] = "Schritt h&inein", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "&Überspringen", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "Schritt &raus", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Schritt hinein", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Schritt aus der aktuellen Funktion heraus", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step over"] = "Überspringen", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = "Beende debuggen und setze den Prozeß fort", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Aktuell laufenden Prozeß stoppen", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step into"] = "Schritt hinein", -- src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Schritt aus der aktuellen Funktion heraus", -- src\editor\menu_project.lua
|
||||
["Step over"] = "Überspringen", -- src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = "Beende debuggen und setze den Prozeß fort", -- src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Aktuell laufenden Prozeß stoppen", -- src\editor\menu_project.lua
|
||||
["Switch to or from full screen mode"] = "Vollbild an/aus", -- src\editor\menu_view.lua
|
||||
["Text not found."] = "Text nicht gefunden.", -- src\editor\findreplace.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "Die API-Datei muß sich in einem Unterverzeichnis des API-Vereichnisses befinden.", -- src\editor\autocomplete.lua
|
||||
["Toggle Bookmark"] = "Lesezeichen setzen/löschen", -- src\editor\menu_edit.lua
|
||||
["Toggle Break&point"] = "&Haltepunkt an/aus", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "Haltepunkt an/aus", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Toggle bookmark"] = "Lesezeichen setzen/löschen", -- src\editor\menu_edit.lua
|
||||
["Toggle breakpoint"] = "Haltepunkt an/aus", -- src\editor\menu_project.lua
|
||||
["Tr&ace"] = "Ablauf &verfolgen", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Ablaufverfolgung zeigt jede ausgeführte Zeile an", -- src\editor\menu_project.lua
|
||||
["Unable to create directory '%s'."] = "Kann kein Verzeichnis '%s' erstellen.", -- src\editor\filetree.lua
|
||||
["Unable to create file '%s'."] = "Kann Datei '%s' nicht erstellen.", -- src\editor\filetree.lua
|
||||
["Unable to delete directory '%s': %s"] = "Scheitern beim Löschen von Verzeichnis '%s': %s", -- src\editor\filetree.lua
|
||||
["Unable to load file '%s'."] = "Scheitern beim Laden von Datei '%s'.", -- src\editor\commands.lua
|
||||
["Unable to rename file '%s'."] = "Kann Datei '%s' nicht umbenennen.", -- src\editor\filetree.lua
|
||||
["Unable to rename file '%s'."] = "Scheitern beim umbenennen von Datei '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to save file '%s': %s"] = "Scheitern beim Speichern von Datei '%s' : %s", -- src\editor\commands.lua
|
||||
["Unable to stop program (pid: %d), code %d."] = "Scheitern beim Stoppen des Prozesses (pid : %d), code %d.", -- src\editor\debugger.lua
|
||||
["Undo last edit"] = "Letzte Änderung rückgängig machen", -- src\editor\menu_edit.lua
|
||||
@@ -268,12 +280,12 @@ return {
|
||||
["Use '%s' to show line endings and '%s' to convert them."] = "'%s' um Zeilenende-Codes zu sehen, und '%s' um sie zu konvertieren.", -- src\editor\commands.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "'clear' um Ausgabefenster und Verlauf zu löschen.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "<Umsch-Eingabetaste> für Code in mehreren Zeilen.", -- src\editor\shellbox.lua
|
||||
["Value"] = "Wert", -- src\editor\debugger.lua
|
||||
["View the outline window"] = "Übersichtsfenster ansehen", -- src\editor\menu_view.lua
|
||||
["View the output/console window"] = "Ausgabe-/Konsolenfenster ansehen", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Projekt-/Dateifenster ansehen", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Stapel/Stack-Fenster ansehen", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["View the watch window"] = "Fenster für Beobachtungspunkte ansehen", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["Watch"] = "Beobachtungspunkte", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["View the stack window"] = "Stapel/Stack-Fenster ansehen", -- src\editor\menu_view.lua
|
||||
["View the watch window"] = "Fenster für Beobachtungspunkte ansehen", -- src\editor\menu_view.lua
|
||||
["Watch"] = "Beobachtungspunkte", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Willkommen zum interaktiven Lua-Interpretr!", -- src\editor\shellbox.lua
|
||||
["Wrap ar&ound"] = "Am Anfang fortsetzen", -- src\editor\findreplace.lua
|
||||
["You must save the program first."] = "Erst das Programm speichern.", -- src\editor\commands.lua
|
||||
|
||||
300
cfg/i18n/eo.lua
Normal file
300
cfg/i18n/eo.lua
Normal file
@@ -0,0 +1,300 @@
|
||||
-- Traduko fare de cosmotect
|
||||
return {
|
||||
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
|
||||
["%d instance"] = {"%d aperaĵo", "%d aperaĵoj"}, -- src\editor\findreplace.lua
|
||||
["%s event failed: %s"] = "%s evento malplenumiĝas: %s", -- src\editor\package.lua
|
||||
["&About"] = "&Pri", -- src\editor\menu_help.lua
|
||||
["&Add Watch"] = "&Aldoni observadaĵon", -- src\editor\debugger.lua
|
||||
["&Break"] = "&Haltigi", -- src\editor\menu_project.lua
|
||||
["&Close Page"] = "&Fermi paĝon", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["&Community"] = "&Komunumo", -- src\editor\menu_help.lua
|
||||
["&Compile"] = "&Kompili", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "&Kopii", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "&Defaŭlta aranĝo", -- src\editor\menu_view.lua
|
||||
["&Delete Watch"] = "&Forigi observadaĵon", -- src\editor\debugger.lua
|
||||
["&Delete"] = "&Forigi", -- src\editor\filetree.lua
|
||||
["&Documentation"] = "&Dokumentado", -- src\editor\menu_help.lua
|
||||
["&Down"] = "&Malsupren", -- src\editor\findreplace.lua
|
||||
["&Edit Project Directory"] = "&Redakti projektan dosierujon", -- src\editor\filetree.lua
|
||||
["&Edit Value"] = "&Redakti valoron", -- src\editor\debugger.lua
|
||||
["&Edit Watch"] = "&Redakti observadaĵon", -- src\editor\debugger.lua
|
||||
["&Edit"] = "&Redakti", -- src\editor\menu_edit.lua
|
||||
["&File"] = "&Dosiero", -- src\editor\menu_file.lua
|
||||
["&Find All"] = "Tra&serĉi ĉion", -- src\editor\findreplace.lua
|
||||
["&Find Next"] = "&Pluserĉi", -- src\editor\findreplace.lua
|
||||
["&Find"] = "Tra&serĉi", -- src\editor\menu_search.lua
|
||||
["&Fold/Unfold All"] = "&Kaŝi/Malkaŝi ĉion", -- src\editor\menu_edit.lua
|
||||
["&Frequently Asked Questions"] = "&Oftaj demandoj", -- src\editor\menu_help.lua
|
||||
["&Getting Started Guide"] = "&Ekgvidilo", -- src\editor\menu_help.lua
|
||||
["&Go To Line..."] = "&Iri al linio...", -- src\editor\menu_search.lua
|
||||
["&Help"] = "&Helpo", -- src\editor\menu_help.lua
|
||||
["&New Directory"] = "&Nova dosierujo", -- src\editor\filetree.lua
|
||||
["&New"] = "&Nova paĝo", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Malfermi...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "&Eliga/Konzola fenestro", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "&Alglui", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project Page"] = "&Projektpaĝo", -- src\editor\menu_help.lua
|
||||
["&Project"] = "&Projekto", -- src\editor\menu_project.lua
|
||||
["&Redo"] = "&Refari", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Rename"] = "&Renomigi", -- src\editor\filetree.lua
|
||||
["&Replace All"] = "&Anstataŭi ĉion", -- src\editor\findreplace.lua
|
||||
["&Replace"] = "&Anstataŭi", -- src\editor\findreplace.lua, src\editor\menu_search.lua
|
||||
["&Run"] = "&Plenumi", -- src\editor\menu_project.lua
|
||||
["&Save"] = "&Konservi", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["&Search"] = "&Serĉi", -- src\editor\menu_search.lua
|
||||
["&Sort"] = "&Ordi", -- src\editor\menu_edit.lua
|
||||
["&Stack Window"] = "&Staka fenestro", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "&Ekfunkciigi sencimigilo-servilon", -- src\editor\menu_project.lua
|
||||
["&Status Bar"] = "&Stata breto", -- src\editor\menu_view.lua
|
||||
["&Subdirectories"] = "&Subdosierujoj", -- src\editor\findreplace.lua
|
||||
["&Tool Bar"] = "&Ilobreto", -- src\editor\menu_view.lua
|
||||
["&Tutorials"] = "&Lerniloj", -- src\editor\menu_help.lua
|
||||
["&Undo"] = "&Malfari", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Up"] = "&Supren", -- src\editor\findreplace.lua
|
||||
["&View"] = "&Vidi", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "&Observada fenestro", -- src\editor\menu_view.lua
|
||||
[".&bak on Replace"] = ".&bak post anstataŭigo", -- src\editor\findreplace.lua
|
||||
["About %s"] = "Pri %s", -- src\editor\menu_help.lua
|
||||
["Add To Scratchpad"] = "Aldoni al malnetdosiero", -- src\editor\editor.lua
|
||||
["Add Watch Expression"] = "Aldoni observadaĵan esprimon", -- src\editor\editor.lua
|
||||
["All files"] = "Ĉiuj dosieroj", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Lasi eksteran procezon ek-sencimigi", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Analizi fontkodon", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Analyze"] = "Analizi", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Auto Complete Identifiers"] = "Aŭtomate kompletigi fontkodnomojn", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Aŭtomate kompletigi dumtajpe", -- src\editor\menu_edit.lua
|
||||
["Bookmark"] = "Legosigno", -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Haltigi plenumon ĉe la sekva plenumata linio da fontkodo", -- src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "Viŝi eligan fenestron", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "F&orkomenti/Eksforkomenti", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "Ne povas sencimigi la skripton en la aktiva redaktila fenestro.", -- src\editor\debugger.lua
|
||||
["Can't evaluate the expression while the application is running."] = "Ne povas malkodi la esprimon dum funkciatas la aplikaĵo.", -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "Ne povas trovi la dosieron '%s' en la kuranta projekto por aktivi por sencimigo. Ĝisdatigu la projekton aŭ malfermu la dosieron en redaktilo antaŭ sencimigo.", -- src\editor\debugger.lua
|
||||
["Can't open file '%s': %s"] = "Ne povas malfermi la dosieron '%s': %s", -- src\editor\singleinstance.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "Ne povas analizi aŭtomatrestaŭran dosieron; neprava dosierformo: %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "Ne povas plenumi la enirejan skripton", -- src\editor\debugger.lua
|
||||
["Can't start debugger server at %s:%d: %s."] = "Ne povas ekfunkciigi sencimigilo-servilon ĉe %s:%d: %s.", -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "Ne povas komenci sencimigan seancon pro interna eraro", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Ne povas ek-sencimigon sen malfermita dosiero aŭ kun la kuranta dosiero nekonserviĝas ('%s').", -- src\editor\debugger.lua
|
||||
["Can't stop debugger server as it is not started."] = "Ne povas malfunkciigi sencimigilo-servilon, ĉar ĝi ne funkciantas", -- src\editor\debugger.lua
|
||||
["Cancel"] = "Nuligi", -- src\editor\findreplace.lua
|
||||
["Cancelled by the user."] = "Nuligita per la uzanto", -- src\editor\findreplace.lua
|
||||
["Choose a project directory"] = "Elekti projektan dosierujon", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Choose..."] = "Elekti...", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Clear Items"] = "Viŝi anojn", -- src\editor\menu_file.lua
|
||||
["Clear items from this list"] = "Senlistigi tiujn ĉi anojn", -- src\editor\menu_file.lua
|
||||
["Clear the output window before compiling or debugging"] = "Viŝi la eligan fenestron antaŭ kompilado aŭ sencimigado", -- src\editor\menu_project.lua
|
||||
["Close &Other Pages"] = "Fermi &aliajn paĝojn", -- src\editor\gui.lua
|
||||
["Close A&ll Pages"] = "Fermi ĉiujn paĝojn", -- src\editor\gui.lua
|
||||
["Close the current editor window"] = "Fermi la kurantan redaktilan fenestron", -- src\editor\menu_file.lua
|
||||
["Co&ntinue"] = "Daŭrigi", -- src\editor\menu_project.lua
|
||||
["Col: %d"] = "Kol: %d", -- src\editor\editor.lua
|
||||
["Command Line Parameters..."] = "Komandliniaj parametroj", -- src\editor\menu_project.lua
|
||||
["Command line parameters"] = "Komandliniaj parametroj", -- src\editor\menu_project.lua
|
||||
["Comment or uncomment current or selected lines"] = "Forkomenti aŭ eksforkomenti la kurantan aŭ la elektitajn liniojn", -- src\editor\menu_edit.lua
|
||||
["Compilation error"] = "Eraro de kompilo", -- src\editor\commands.lua, src\editor\debugger.lua
|
||||
["Compilation successful; %.0f%% success rate (%d/%d)."] = "Kompilo sukcesa; %.0f%% elcentaĵo da sukceso (%d/%d).", -- src\editor\commands.lua
|
||||
["Compile the current file"] = "Kompili la kurantan dosieron", -- src\editor\menu_project.lua
|
||||
["Complete &Identifier"] = "Finfari &fontkodnomon", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "Finfari la kurantan fontkodnomon", -- src\editor\menu_edit.lua
|
||||
["Consider removing backslash from escape sequence '%s'."] = "Kontemplu forigi maloblikvon el eskapsekvenco '%s'.", -- src\editor\commands.lua
|
||||
["Copy Full Path"] = "Kopii plenan vojon", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Copy selected text to clipboard"] = "Kopii elektitan tekston al la tondejo", -- src\editor\menu_edit.lua
|
||||
["Correct &Indentation"] = "Korekti &alineon", -- src\editor\menu_edit.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "Ne povis aktivi la dosieron '%s' por sencimigi; daŭrantas sen ĝi.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Krei malplenan dokumenton", -- src\editor\menu_file.lua
|
||||
["Cu&t"] = "El&tondi", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Eltondi la elektitan tekston al la tondejo", -- src\editor\menu_edit.lua
|
||||
["Debugger server started at %s:%d."] = "Sencimigilo-servilon ekfunkciiĝis ĉe %s:%d.", -- src\editor\debugger.lua
|
||||
["Debugger server stopped at %s:%d."] = "Sencimigilo-servilon malfunkciiĝis ĉe %s:%d.", -- src\editor\debugger.lua
|
||||
["Debugging session completed (%s)."] = "Sencimiga seanco estas finita (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Sencimiga seanco komencitas en '%s'.", -- src\editor\debugger.lua
|
||||
["Debugging suspended at %s:%s (couldn't activate the file)."] = "La sencimigo estis finetita ĉe %s:%s (ne povis aktivi la dosieron).", -- src\editor\debugger.lua
|
||||
["Detach &Process"] = "Deigi &procezon", -- src\editor\menu_project.lua
|
||||
["Directory"] = "Dosierujo", -- src\editor\findreplace.lua
|
||||
["Do you want to delete '%s'?"] = "Ĉu vi volas forigi je '%s'?", -- src\editor\filetree.lua
|
||||
["Do you want to overwrite it?"] = "Ĉu vi volas superskribi ĉi tiun?", -- src\editor\commands.lua
|
||||
["Do you want to reload it?"] = "Ĉu vi volas reŝarĝi tiun ĉi?", -- src\editor\editor.lua
|
||||
["Do you want to save the changes to '%s'?"] = "Ĉu vi volas konservi ĉiujn ŝanĝojn, kiuj enfaris je '%s'?", -- src\editor\commands.lua
|
||||
["E&xit"] = "&Eliri", -- src\editor\menu_file.lua
|
||||
["Enter Lua code and press Enter to run it."] = "Enigu fontkodon de Lua kaj premu enenklavon por plenumi ĝin.", -- src\editor\shellbox.lua
|
||||
["Enter command line parameters (use Cancel to clear)"] = "Enigu komandliniajn parametrojn (uzu nulig-butonon por viŝi)", -- src\editor\menu_project.lua
|
||||
["Enter line number"] = "Enigu linian numeron", -- src\editor\menu_search.lua
|
||||
["Enter replacement text"] = "Enigu anstataŭigan tekston", -- src\editor\editor.lua
|
||||
["Error while loading API file: %s"] = "Eraro okazis dum ŝargado de API-a dosiero: %s", -- src\editor\autocomplete.lua
|
||||
["Error while loading configuration file: %s"] = "Eraro okazis dum ŝargado de agorda dosiero: %s", -- src\editor\style.lua
|
||||
["Error while processing API file: %s"] = "Eraro okazis dum analizado de API-a dosiero: %s", -- src\editor\autocomplete.lua
|
||||
["Error while processing configuration file: %s"] = "Eraro okazis dum analizado de agorda dosiero: %s", -- src\editor\style.lua
|
||||
["Error"] = "Eraro", -- src\editor\commands.lua
|
||||
["Evaluate In Console"] = "Malkodi en la konzolo", -- src\editor\editor.lua
|
||||
["Execute the current project/file and keep updating the code to see immediate results"] = "Plenumi la kurantan projekton/dosieron, kaj ĝisdatigadi la fontkodon por vidi tujajn rezultojn", -- src\editor\menu_project.lua
|
||||
["Execute the current project/file"] = "Plenumi la kurantan projekton/dosieron", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Eraro de plenumo", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Eliri programon", -- src\editor\menu_file.lua
|
||||
["File '%s' has been modified on disk."] = "La dosiero nome de '%s' ŝanĝitis en disko.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "La dosiero nome de '%s' havas pli freŝan tempindikon, ol la ripardosiero '%s'; bonvolu ekzameni ĝin antaû konservi.", -- src\editor\commands.lua
|
||||
["File '%s' is missing and can't be recovered."] = "La dosiero nome de '%s' forestas kaj ne povas esti reakirita.", -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "La dosiero nome de '%s' ne plu ekzistas.", -- src\editor\menu_file.lua, src\editor\editor.lua
|
||||
["File Type"] = "Dosierspeco", -- src\editor\findreplace.lua
|
||||
["File already exists."] = "Jam ekzistas tiu ĉi dosiero.", -- src\editor\commands.lua
|
||||
["File history"] = "Dosiera historio", -- src\editor\menu_file.lua
|
||||
["Find &In Files"] = "Traserĉi &en dosieroj", -- src\editor\menu_search.lua
|
||||
["Find &Next"] = "&Pluserĉi", -- src\editor\menu_search.lua
|
||||
["Find &Previous"] = "Traserĉi &antaŭanta", -- src\editor\menu_search.lua
|
||||
["Find In Files"] = "Traserĉi en dosieroj", -- src\editor\findreplace.lua
|
||||
["Find and replace text in files"] = "Traserĉi kaj anstataŭi tekston en dosieroj", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Traserĉi kaj anstataŭi tekston", -- src\editor\menu_search.lua
|
||||
["Find text in files"] = "Traserĉi tekston en dosieroj", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Traserĉi tekston", -- src\editor\menu_search.lua
|
||||
["Find the earlier text occurence"] = "Traserĉi la antaŭantan aperaĵon da teksto", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Pluserĉi la aperaĵon da teksto", -- src\editor\menu_search.lua
|
||||
["Find"] = "Traserĉi", -- src\editor\findreplace.lua
|
||||
["Fold or unfold all code folds"] = "Kaŝi aŭ malkaŝi ĉiujn faldaĵojn da fontkodoj", -- src\editor\menu_edit.lua
|
||||
["Found auto-recovery record and restored saved session."] = "Trovis aŭtomatrestaŭran dosieron kaj riparis konservitan seancon.", -- src\editor\commands.lua
|
||||
["Found"] = "Trovis", -- src\editor\findreplace.lua
|
||||
["Full &Screen"] = "Plenekrana &reĝimo", -- src\editor\menu_view.lua
|
||||
["Go To Definition"] = "Iri al deklaro", -- src\editor\editor.lua
|
||||
["Go To Line"] = "Iri al linio", -- src\editor\menu_search.lua
|
||||
["Go To Next Bookmark"] = "Iri al sekvanta legosigno", -- src\editor\menu_edit.lua
|
||||
["Go To Previous Bookmark"] = "Iri al antaŭanta legosigno", -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "Iri al elektita linio", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["Ignored error in debugger initialization code: %s."] = "Ignoris eraron en pravaloriza kodo de la sencimigilo: %s.", -- src\editor\debugger.lua
|
||||
["In Files"] = "Ene de dosieroj", -- src\editor\findreplace.lua
|
||||
["Known Files"] = "Konataj dosieroj", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Ln: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Loka konzolo", -- src\editor\gui.lua, src\editor\shellbox.lua
|
||||
["Lua &Interpreter"] = "Interpretilo de Lua", -- src\editor\menu_project.lua
|
||||
["Mapped remote request for '%s' to '%s'."] = "Mapi faran peton pri '%s' al '%s'.", -- src\editor\debugger.lua
|
||||
["Match &case"] = "Atenti &usklecon", -- src\editor\findreplace.lua
|
||||
["Match &whole word"] = "Atenti &plenan vorton", -- src\editor\findreplace.lua
|
||||
["Mixed end-of-line encodings detected."] = "Detektis kodoprezentojn miksitajn linifinajn", -- src\editor\commands.lua
|
||||
["New &File"] = "Nova &dosiero", -- src\editor\filetree.lua
|
||||
["OVR"] = "SUS", -- src\editor\editor.lua
|
||||
["Open With Default Program"] = "Malfermi per la defaŭlta programo", -- src\editor\filetree.lua
|
||||
["Open an existing document"] = "Malfermi jaman dokumenton", -- src\editor\menu_file.lua
|
||||
["Open file"] = "Malfermi dosieron", -- src\editor\commands.lua
|
||||
["Options"] = "Opcioj", -- src\editor\findreplace.lua
|
||||
["Outline Window"] = "Skemo-fenestro", -- src\editor\menu_view.lua
|
||||
["Outline"] = "Skemo", -- src\editor\outline.lua
|
||||
["Output (running)"] = "Eligo (funkciata)", -- src\editor\debugger.lua, src\editor\output.lua
|
||||
["Output (suspended)"] = "Eligo (finetita)", -- src\editor\debugger.lua
|
||||
["Output"] = "Eligo", -- src\editor\debugger.lua, src\editor\output.lua, src\editor\gui.lua, src\editor\settings.lua
|
||||
["Paste text from the clipboard"] = "Alglui tekston el la tondejo", -- src\editor\menu_edit.lua
|
||||
["Preferences"] = "Preferoj", -- src\editor\menu_edit.lua
|
||||
["Prepend '!' to force local execution."] = "Antaŭdoni je '!' por altrudi lokan plenumon.", -- src\editor\shellbox.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "Antaŭdoni je '=' por montri komplikajn valorojn sur multaj linioj.", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Premu nulig-butonon por fini.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "La programo nome de '%s' komencitas en '%s' (pid: %d).", -- src\editor\output.lua
|
||||
["Program can't start because conflicting process is running as '%s'."] = "La programo ne povas komenci, ĉar konflikta procezo funkcias kiel je la '%s'.", -- src\editor\output.lua
|
||||
["Program completed in %.2f seconds (pid: %d)."] = "La programo finfaris post %.2f sekundoj", -- src\editor\output.lua
|
||||
["Program starting as '%s'."] = "La programo komencas kiel je '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "La programo finis (pid: %d).", -- src\editor\debugger.lua
|
||||
["Program unable to run as '%s'."] = "La programo ne kapablas plenumi kiel je '%s'.", -- src\editor\output.lua
|
||||
["Project Directory"] = "Projekta dosierujo", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Project history"] = "Projekta historio", -- src\editor\menu_file.lua
|
||||
["Project"] = "Projekto", -- src\editor\filetree.lua
|
||||
["Project/&FileTree Window"] = "Projekta/&Dosierarba Fenestro", -- src\editor\menu_view.lua
|
||||
["Provide command line parameters"] = "Doni komandliniajn parametrojn", -- src\editor\menu_project.lua
|
||||
["R/O"] = "L/A", -- src\editor\editor.lua
|
||||
["R/W"] = "L/S", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Anstataŭi en dosieroj", -- src\editor\menu_search.lua
|
||||
["Re-indent selected lines"] = "Realinei elektitajn liniojn", -- src\editor\menu_edit.lua
|
||||
["Recent &Projects"] = "Antaŭnelongaj &projektoj", -- src\editor\menu_file.lua
|
||||
["Recent Files"] = "Antaŭnelongaj dosieroj", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Refari lastan redakton", -- src\editor\menu_edit.lua
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "Peto por komenci novan sencimigan seancon malakceptis, ĉar seanco jam faratas.", -- src\editor\debugger.lua
|
||||
["Regular &expression"] = "Regul&esprimo", -- src\editor\findreplace.lua
|
||||
["Remote console"] = "Fora konzolo", -- src\editor\shellbox.lua
|
||||
["Rename All Instances"] = "Renomigi ĉiujn aperaĵojn", -- src\editor\editor.lua
|
||||
["Replace A&ll"] = "Anstataŭi ĉ&ion", -- src\editor\findreplace.lua
|
||||
["Replace All Selections"] = "Anstataŭi ĉiujn elektojn", -- src\editor\editor.lua
|
||||
["Replace"] = "Anstataŭi", -- src\editor\findreplace.lua
|
||||
["Replaced an invalid UTF8 character with %s."] = "Anstataŭis UTF8-an signon per %s.", -- src\editor\commands.lua
|
||||
["Replaced"] = "Anstataŭita", -- src\editor\findreplace.lua
|
||||
["Replacing"] = "Anstataŭanta", -- src\editor\findreplace.lua
|
||||
["Reset to default layout"] = "Rekomenciĝi al defaŭltan aranĝon", -- src\editor\menu_view.lua
|
||||
["Run as Scratchpad"] = "Plenumi kiel malnetdosieron", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "&Fini sencimigo", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "&Fini procezon", -- src\editor\menu_project.lua
|
||||
["Save &As..."] = "Konservi &kiel...", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save A&ll"] = "Konservi ĉ&ion", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "Ĉu konservi ĉiujn ŝanĝojn?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Konservi ĉiujn malfermajn dokumentojn", -- src\editor\menu_file.lua
|
||||
["Save file as"] = "Konservi dosieron kiel", -- src\editor\commands.lua
|
||||
["Save file?"] = "Ĉu konservi dosieron?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Konservi la kurantan dokumenton kun dosiero novanome", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Konservi la kurantan dokumenton", -- src\editor\menu_file.lua
|
||||
["Saved auto-recover at %s."] = "Konservis aŭtomatrestaŭron je %s.", -- src\editor\commands.lua
|
||||
["Scope"] = "Amplekso", -- src\editor\findreplace.lua
|
||||
["Scratchpad error"] = "Eraro de malnetdosiero", -- src\editor\debugger.lua
|
||||
["Searching for"] = "Serĉanti pri", -- src\editor\findreplace.lua
|
||||
["Sel: %d/%d"] = "Ele: %d/%d", -- src\editor\editor.lua
|
||||
["Select &All"] = "Elekti &ĉion", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Elekti la tekston en la redaktilo", -- src\editor\menu_edit.lua
|
||||
["Select and Find Next"] = "Elekti kaj pluserĉi", -- src\editor\menu_search.lua
|
||||
["Select and Find Previous"] = "Elekti kaj traserĉi antaŭantan", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its next occurrence"] = "Elekti la vorton sub la tajpmontrilo, kaj pluserĉi", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its previous occurrence"] = "Elekti la vorton sub la tajpmontrilo, kaj traserĉi antaŭantan", -- src\editor\menu_search.lua
|
||||
["Set From Current File"] = "Precizigi per la kuranta dosiero", -- src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Precizigi la projektan dosierujon per la kurantan dosieron", -- src\editor\menu_project.lua
|
||||
["Set the interpreter to be used"] = "Precizigi la interpretiloton", -- src\editor\menu_project.lua
|
||||
["Set the project directory to be used"] = "Precizigi la projekt-dosierujoton", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Settings: System"] = "Agordoj de la sistemo", -- src\editor\menu_edit.lua
|
||||
["Settings: User"] = "Agordoj de la uzanto", -- src\editor\menu_edit.lua
|
||||
["Show &Tooltip"] = "Montri &ŝpruchelpilon", -- src\editor\menu_edit.lua
|
||||
["Show Location"] = "Montri lokon", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Montri ŝpruchelpilon pri la kuranta pozicio; meti la tajpmontrilon preter la ronda ekkrampo de la funkcio", -- src\editor\menu_edit.lua
|
||||
["Show/Hide the status bar"] = "Montri/Kaŝi la statan breton", -- src\editor\menu_view.lua
|
||||
["Show/Hide the toolbar"] = "Montri/Kaŝi la ilobreton", -- src\editor\menu_view.lua
|
||||
["Sort selected lines"] = "Ordi la elektitajn liniojn", -- src\editor\menu_edit.lua
|
||||
["Source"] = "Fontkodo", -- src\editor\menu_edit.lua
|
||||
["Stack"] = "Stako", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "Ek-&sencimigi", -- src\editor\menu_project.lua
|
||||
["Start or continue debugging"] = "Komenci aŭ pluigi sencimigon", -- src\editor\menu_project.lua
|
||||
["Step &Into"] = "Eniri &enen", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "Trans&salti", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "Eliri el", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Eniri enen", -- src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Eliri el la kuranta funkcio", -- src\editor\menu_project.lua
|
||||
["Step over"] = "Transsalti", -- src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = "Fini sencimigon kaj plenumadi la procezon", -- src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Fini la nunfunkciatan procezon", -- src\editor\menu_project.lua
|
||||
["Switch to or from full screen mode"] = "Interŝanĝi al aŭ el plenekrana reĝimo", -- src\editor\menu_view.lua
|
||||
["Text not found."] = "Teksto ne trovitis", -- src\editor\findreplace.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "La dosiero de API devas troviĝi en subdosierujo de la API-a dosierujo.", -- src\editor\autocomplete.lua
|
||||
["Toggle Bookmark"] = "Baskuli legosignon", -- src\editor\menu_edit.lua
|
||||
["Toggle Break&point"] = "Baskuli halto&punkto", -- src\editor\menu_project.lua
|
||||
["Toggle bookmark"] = "Baskuli legosignon", -- src\editor\menu_edit.lua
|
||||
["Toggle breakpoint"] = "Baskuli haltopunkto", -- src\editor\menu_project.lua
|
||||
["Tr&ace"] = "Spuri", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Spurili plenumon per montri ĉiun plenumitan linion", -- src\editor\menu_project.lua
|
||||
["Unable to create directory '%s'."] = "Ne kapablas krei je la dosierujo '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to create file '%s'."] = "Ne kapablas krei je la dosiero '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to delete directory '%s': %s"] = "Ne kapablas forigi je la dosierujo '%s': %s", -- src\editor\filetree.lua
|
||||
["Unable to load file '%s'."] = "Ne kapablas ŝarĝi je la dosiero '%s'.", -- src\editor\commands.lua
|
||||
["Unable to rename file '%s'."] = "Ne kapablas renomigi je la dosiero '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to save file '%s': %s"] = "Ne kapablas konservi je la dosiero '%s': %s", -- src\editor\commands.lua
|
||||
["Unable to stop program (pid: %d), code %d."] = "Ne kapablas fini la programon (pid: %d), kodo %d.", -- src\editor\debugger.lua
|
||||
["Undo last edit"] = "Malfari la antaŭan redakton", -- src\editor\menu_edit.lua
|
||||
["Use '%s' to see full description."] = "Uzu je '%s' por vidi plenan priskribon", -- src\editor\editor.lua
|
||||
["Use '%s' to show line endings and '%s' to convert them."] = "Uzu je '%s' por montri linifinojn kaj je '%s' por konverti ilin", -- src\editor\commands.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "Tajpu 'clear' por viŝi la eligon kaj historion de la ŝelo.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "Uzu <Majuskligklavon-Enenklavon> por plurlinia fontkodo.", -- src\editor\shellbox.lua
|
||||
["View the outline window"] = "Vidi la skemo-fenestron", -- src\editor\menu_view.lua
|
||||
["View the output/console window"] = "Vidi la eligo/konzolo-fenestron", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Vidi la projekto/dosierarbo-fenestron", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Vidi la stako-fenestron", -- src\editor\menu_view.lua
|
||||
["View the watch window"] = "Vidi la observado-fenestron", -- src\editor\menu_view.lua
|
||||
["Watch"] = "Observado", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Bonvenon al la interaga interpretilo de Lua.", -- src\editor\shellbox.lua
|
||||
["Wrap ar&ound"] = "&Ĉirkaŭflui", -- src\editor\findreplace.lua
|
||||
["You must save the program first."] = "Vi unue devas konservi la programon.", -- src\editor\commands.lua
|
||||
["Zoom In"] = "Zomi", -- src\editor\menu_view.lua
|
||||
["Zoom Out"] = "Malzomi", -- src\editor\menu_view.lua
|
||||
["Zoom to 100%"] = "Zomi al 100%", -- src\editor\menu_view.lua
|
||||
["Zoom"] = "Zomo", -- src\editor\menu_view.lua
|
||||
["on line %d"] = "sur la linio %d", -- src\editor\debugger.lua, src\editor\editor.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"spuris je %d instrukcio", "spuris je %d instrukcioj"}, -- src\editor\debugger.lua
|
||||
["unknown error"] = "obskura eraro", -- src\editor\debugger.lua
|
||||
}
|
||||
@@ -9,13 +9,14 @@ return {
|
||||
["&Close Page"] = "Cerrar página", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["&Community"] = nil, -- src\editor\menu_help.lua
|
||||
["&Compile"] = "Compilar", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "Copiar", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Copy"] = "Copiar", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "Diseño por defecto", -- src\editor\menu_view.lua
|
||||
["&Delete Watch"] = "Eliminar observación", -- src\editor\debugger.lua
|
||||
["&Delete"] = nil, -- src\editor\filetree.lua
|
||||
["&Documentation"] = nil, -- src\editor\menu_help.lua
|
||||
["&Down"] = nil, -- src\editor\findreplace.lua
|
||||
["&Edit Project Directory"] = nil, -- src\editor\filetree.lua
|
||||
["&Edit Value"] = nil, -- src\editor\debugger.lua
|
||||
["&Edit Watch"] = "Editar observación", -- src\editor\debugger.lua
|
||||
["&Edit"] = "Editar", -- src\editor\menu_edit.lua
|
||||
["&File"] = "Archivo", -- src\editor\menu_file.lua
|
||||
@@ -31,10 +32,10 @@ return {
|
||||
["&New"] = "&Nuevo", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Abrir...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "Salida/Consola", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "Pegar", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Paste"] = "Pegar", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project Page"] = nil, -- src\editor\menu_help.lua
|
||||
["&Project"] = "Proyecto", -- src\editor\inspect.lua, src\editor\menu_project.lua
|
||||
["&Redo"] = "Rehacer", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Project"] = "Proyecto", -- src\editor\menu_project.lua
|
||||
["&Redo"] = "Rehacer", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Rename"] = nil, -- src\editor\filetree.lua
|
||||
["&Replace All"] = nil, -- src\editor\findreplace.lua
|
||||
["&Replace"] = "Remplazar", -- src\editor\findreplace.lua, src\editor\menu_search.lua
|
||||
@@ -48,7 +49,7 @@ return {
|
||||
["&Subdirectories"] = nil, -- src\editor\findreplace.lua
|
||||
["&Tool Bar"] = nil, -- src\editor\menu_view.lua
|
||||
["&Tutorials"] = nil, -- src\editor\menu_help.lua
|
||||
["&Undo"] = "Deshacer", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Undo"] = "Deshacer", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Up"] = nil, -- src\editor\findreplace.lua
|
||||
["&View"] = "Ver", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "Ventana de observaciones", -- src\editor\menu_view.lua
|
||||
@@ -58,16 +59,18 @@ return {
|
||||
["Add Watch Expression"] = "Añadir expresión de observación", -- src\editor\editor.lua
|
||||
["All files"] = "Todos los archivos", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Permitir proceso externo para iniciar depuración", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Analizar el código fuente", -- src\editor\inspect.lua
|
||||
["Analyze"] = "Analizar", -- src\editor\inspect.lua
|
||||
["Analyze the source code"] = "Analizar el código fuente", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Analyze"] = "Analizar", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Auto Complete Identifiers"] = "Autocompletar identificadores", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Autocompletar mientras se escribe", -- src\editor\menu_edit.lua
|
||||
["Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Parar ejecución en la siguiente línea de código", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "Limpiar ventana de Salida", -- src\editor\menu_project.lua
|
||||
["Break execution at the next executed line of code"] = "Parar ejecución en la siguiente línea de código", -- src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "Limpiar ventana de Salida", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "Comentar/descomentar", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "No se puede depurar el script en la ventana activa del editor", -- src\editor\debugger.lua
|
||||
["Can't evaluate the expression while the application is running."] = nil, -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "No se puede encontrar el archivo '%s' en el proyecto actual para activar la depuración. Actualiza el proyecto o abre el archivo en el editor antes de depurar.", -- src\editor\debugger.lua
|
||||
["Can't open file '%s': %s"] = nil, -- src\editor\singleinstance.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "No se puede procesar la autorrecuperación; formato inválido: %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "No se pude ejecutar el punto de entrada del script (%s).", -- src\editor\debugger.lua
|
||||
["Can't start debugger server at %s:%d: %s."] = nil, -- src\editor\debugger.lua
|
||||
@@ -76,7 +79,7 @@ return {
|
||||
["Can't stop debugger server as it is not started."] = nil, -- src\editor\debugger.lua
|
||||
["Cancel"] = nil, -- src\editor\findreplace.lua
|
||||
["Cancelled by the user."] = nil, -- src\editor\findreplace.lua
|
||||
["Choose a project directory"] = "Elegir el directorio del proyecto", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Choose a project directory"] = "Elegir el directorio del proyecto", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Choose..."] = nil, -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Clear Items"] = nil, -- src\editor\menu_file.lua
|
||||
["Clear items from this list"] = nil, -- src\editor\menu_file.lua
|
||||
@@ -95,11 +98,12 @@ return {
|
||||
["Complete &Identifier"] = "Completar identificador", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "Completar el actual identificador", -- src\editor\menu_edit.lua
|
||||
["Consider removing backslash from escape sequence '%s'."] = nil, -- src\editor\commands.lua
|
||||
["Copy Full Path"] = nil, -- src\editor\filetree.lua
|
||||
["Copy Full Path"] = nil, -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Copy selected text to clipboard"] = "Copiar el texto seleccionado al portapapeles", -- src\editor\menu_edit.lua
|
||||
["Correct &Indentation"] = nil, -- src\editor\menu_edit.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "No se pudo activar el archivo '%s' para la depuración; continuar sin él.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Crear un documento en blanco", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Cu&t"] = "Cortar", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Create an empty document"] = "Crear un documento en blanco", -- src\editor\menu_file.lua
|
||||
["Cu&t"] = "Cortar", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Cortar el texto selecionado al portapapeles", -- src\editor\menu_edit.lua
|
||||
["Debugger server started at %s:%d."] = "Servidor de depuración inciado en %s:%s", -- src\editor\debugger.lua
|
||||
["Debugger server stopped at %s:%d."] = nil, -- src\editor\debugger.lua
|
||||
@@ -116,6 +120,7 @@ return {
|
||||
["Enter Lua code and press Enter to run it."] = "Introduce código Lua y pulsa <Entrer> para ejecutarlo.", -- src\editor\shellbox.lua
|
||||
["Enter command line parameters (use Cancel to clear)"] = nil, -- src\editor\menu_project.lua
|
||||
["Enter line number"] = "Introduce número de línea", -- src\editor\menu_search.lua
|
||||
["Enter replacement text"] = nil, -- src\editor\editor.lua
|
||||
["Error while loading API file: %s"] = "Error mientras se cargaba el archivo de API: %s", -- src\editor\autocomplete.lua
|
||||
["Error while loading configuration file: %s"] = nil, -- src\editor\style.lua
|
||||
["Error while processing API file: %s"] = "Error mientras se procesaba el archivo de API: %s", -- src\editor\autocomplete.lua
|
||||
@@ -126,10 +131,9 @@ return {
|
||||
["Execute the current project/file"] = "Ejecutar el proyecto/archivo actual", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Error de ejecución", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Salir del programa", -- src\editor\menu_file.lua
|
||||
["Expr"] = "Expr.", -- src\editor\debugger.lua
|
||||
["Expression"] = "Expresión", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "El archivo '%s' ha sido modificado en el disco.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "El archivo '%s' tiene una fecha más reciente que el restaurado '%s'; por favor, revísalo antes de guardar.", -- src\editor\commands.lua
|
||||
["File '%s' is missing and can't be recovered."] = nil, -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "El archivo '%s' no existe.", -- src\editor\menu_file.lua, src\editor\editor.lua
|
||||
["File Type"] = nil, -- src\editor\findreplace.lua
|
||||
["File already exists."] = nil, -- src\editor\commands.lua
|
||||
@@ -139,9 +143,9 @@ return {
|
||||
["Find &Previous"] = "Buscar anterior", -- src\editor\menu_search.lua
|
||||
["Find In Files"] = nil, -- src\editor\findreplace.lua
|
||||
["Find and replace text in files"] = "Buscar y remplazar texto en archivos", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Buscar y rempleazar texto", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Buscar y rempleazar texto", -- src\editor\menu_search.lua
|
||||
["Find text in files"] = "Buscar texto en archivos", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Buscar texto", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find text"] = "Buscar texto", -- src\editor\menu_search.lua
|
||||
["Find the earlier text occurence"] = "Buscar la anterior aparición del texto", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Buscar la siguiente aparecición del texto", -- src\editor\menu_search.lua
|
||||
["Find"] = nil, -- src\editor\findreplace.lua
|
||||
@@ -155,8 +159,8 @@ return {
|
||||
["Go To Previous Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "Ir a línea seleccionada", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["Ignored error in debugger initialization code: %s."] = nil, -- src\editor\debugger.lua
|
||||
["In Files"] = nil, -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "Saltar a la definición de la función...", -- src\editor\editor.lua
|
||||
["Known Files"] = "Archivos conocidos", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Ln: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Consola local", -- src\editor\gui.lua, src\editor\shellbox.lua
|
||||
@@ -168,13 +172,17 @@ return {
|
||||
["New &File"] = nil, -- src\editor\filetree.lua
|
||||
["OVR"] = "OVR", -- src\editor\editor.lua
|
||||
["Open With Default Program"] = nil, -- src\editor\filetree.lua
|
||||
["Open an existing document"] = "Abrir un documento existente", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Open an existing document"] = "Abrir un documento existente", -- src\editor\menu_file.lua
|
||||
["Open file"] = "Abrir archivo", -- src\editor\commands.lua
|
||||
["Options"] = nil, -- src\editor\findreplace.lua
|
||||
["Output (running)"] = "Salida (en ejecución)", -- src\editor\output.lua
|
||||
["Output"] = "Salida", -- src\editor\gui.lua, src\editor\output.lua, src\editor\settings.lua
|
||||
["Outline Window"] = nil, -- src\editor\menu_view.lua
|
||||
["Outline"] = nil, -- src\editor\outline.lua
|
||||
["Output (running)"] = "Salida (en ejecución)", -- src\editor\debugger.lua, src\editor\output.lua
|
||||
["Output (suspended)"] = nil, -- src\editor\debugger.lua
|
||||
["Output"] = "Salida", -- src\editor\debugger.lua, src\editor\output.lua, src\editor\gui.lua, src\editor\settings.lua
|
||||
["Paste text from the clipboard"] = "Pegar texto desde el portapapeles", -- src\editor\menu_edit.lua
|
||||
["Preferences"] = nil, -- src\editor\menu_edit.lua
|
||||
["Prepend '!' to force local execution."] = nil, -- src\editor\shellbox.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "Antepón '=' para ver valores complejos en líneas múltiples", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Presiona cancelar para abortar.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "Programa '%s' iniciado en '%s' (pid: %d).", -- src\editor\output.lua
|
||||
@@ -185,12 +193,13 @@ return {
|
||||
["Program unable to run as '%s'."] = "No se puede ejecutar el programa como '%s'.", -- src\editor\output.lua
|
||||
["Project Directory"] = nil, -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Project history"] = nil, -- src\editor\menu_file.lua
|
||||
["Project"] = "Proyecto", -- src\editor\gui.lua
|
||||
["Project"] = "Proyecto", -- src\editor\filetree.lua
|
||||
["Project/&FileTree Window"] = "Ventana de proyecto/árbol de archivos", -- src\editor\menu_view.lua
|
||||
["Provide command line parameters"] = nil, -- src\editor\menu_project.lua
|
||||
["R/O"] = "R/O", -- src\editor\editor.lua
|
||||
["R/W"] = "R/W", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Remplazar en archivos", -- src\editor\menu_search.lua
|
||||
["Re-indent selected lines"] = nil, -- src\editor\menu_edit.lua
|
||||
["Recent &Projects"] = nil, -- src\editor\menu_file.lua
|
||||
["Recent Files"] = "Archivos recientes", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Rehacer la última edición deshecha", -- src\editor\menu_edit.lua
|
||||
@@ -199,6 +208,7 @@ return {
|
||||
["Remote console"] = "Consola remota", -- src\editor\shellbox.lua
|
||||
["Rename All Instances"] = nil, -- src\editor\editor.lua
|
||||
["Replace A&ll"] = nil, -- src\editor\findreplace.lua
|
||||
["Replace All Selections"] = nil, -- src\editor\editor.lua
|
||||
["Replace"] = nil, -- src\editor\findreplace.lua
|
||||
["Replaced an invalid UTF8 character with %s."] = nil, -- src\editor\commands.lua
|
||||
["Replaced"] = nil, -- src\editor\findreplace.lua
|
||||
@@ -210,24 +220,24 @@ return {
|
||||
["Save &As..."] = "Guardar como...", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save A&ll"] = "Guardar todo", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "¿Guardar cambios?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Guardar todos los documentos abiertos", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save all open documents"] = "Guardar todos los documentos abiertos", -- src\editor\menu_file.lua
|
||||
["Save file as"] = "Guardar archivo como", -- src\editor\commands.lua
|
||||
["Save file?"] = "¿Guardar archivo?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Guardar el documento actual en un archivo con un nombre nuevo", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Guardar el documento actual", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save the current document"] = "Guardar el documento actual", -- src\editor\menu_file.lua
|
||||
["Saved auto-recover at %s."] = "Guardar autorrecuperación en %s.", -- src\editor\commands.lua
|
||||
["Scope"] = nil, -- src\editor\findreplace.lua
|
||||
["Scratchpad error"] = "Error en el borrador", -- src\editor\debugger.lua
|
||||
["Searching for"] = nil, -- src\editor\findreplace.lua
|
||||
["Sel: %d/%d"] = nil, -- src\editor\editor.lua
|
||||
["Select &All"] = "Seleccionar todo", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Select &All"] = "Seleccionar todo", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Seleccionar todo el texto en el editor", -- src\editor\menu_edit.lua
|
||||
["Select and Find Next"] = nil, -- src\editor\menu_search.lua
|
||||
["Select and Find Previous"] = nil, -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its next occurrence"] = nil, -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its previous occurrence"] = nil, -- src\editor\menu_search.lua
|
||||
["Set From Current File"] = nil, -- src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Establecer el directorio del proyecto del archivo actual", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Establecer el directorio del proyecto del archivo actual", -- src\editor\menu_project.lua
|
||||
["Set the interpreter to be used"] = "Establecer el intérprete a ser usado", -- src\editor\menu_project.lua
|
||||
["Set the project directory to be used"] = nil, -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Settings: System"] = nil, -- src\editor\menu_edit.lua
|
||||
@@ -238,28 +248,30 @@ return {
|
||||
["Show/Hide the status bar"] = nil, -- src\editor\menu_view.lua
|
||||
["Show/Hide the toolbar"] = nil, -- src\editor\menu_view.lua
|
||||
["Sort selected lines"] = "Clasificar las líneas seleccionadas", -- src\editor\menu_edit.lua
|
||||
["Stack"] = nil, -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["Source"] = nil, -- src\editor\menu_edit.lua
|
||||
["Stack"] = nil, -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "Comenzar depuración", -- src\editor\menu_project.lua
|
||||
["Start or Continue debugging"] = nil, -- src\editor\gui.lua
|
||||
["Start or continue debugging"] = nil, -- src\editor\menu_project.lua
|
||||
["Step &Into"] = "Paso dentro", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "Paso sin entrar", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "Paso fuera", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Paso dentro", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Hasta salir de la función actual", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step over"] = "Paso sin entrar", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = nil, -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Parar el proceso en ejecución", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step into"] = "Paso dentro", -- src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Hasta salir de la función actual", -- src\editor\menu_project.lua
|
||||
["Step over"] = "Paso sin entrar", -- src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = nil, -- src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Parar el proceso en ejecución", -- src\editor\menu_project.lua
|
||||
["Switch to or from full screen mode"] = "Conmutar el modo de pantalla completa", -- src\editor\menu_view.lua
|
||||
["Text not found."] = nil, -- src\editor\findreplace.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "El archivo de API debe ser almacenado en un subdirectorio del directorio de API.", -- src\editor\autocomplete.lua
|
||||
["Toggle Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Toggle Break&point"] = "Conmutar punto de ruptura", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "Conmutar punto de ruptura", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Toggle bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Toggle breakpoint"] = "Conmutar punto de ruptura", -- src\editor\menu_project.lua
|
||||
["Tr&ace"] = "Traza", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Traza de ejecución mostrando cada línea ejecutada", -- src\editor\menu_project.lua
|
||||
["Unable to create directory '%s'."] = nil, -- src\editor\filetree.lua
|
||||
["Unable to create file '%s'."] = nil, -- src\editor\filetree.lua
|
||||
["Unable to delete directory '%s': %s"] = nil, -- src\editor\filetree.lua
|
||||
["Unable to load file '%s'."] = "No se pudo cargar el archivo '%s'.", -- src\editor\commands.lua
|
||||
["Unable to rename file '%s'."] = nil, -- src\editor\filetree.lua
|
||||
["Unable to save file '%s': %s"] = "No se pudo guardar el archivo '%s': %s", -- src\editor\commands.lua
|
||||
@@ -269,12 +281,12 @@ return {
|
||||
["Use '%s' to show line endings and '%s' to convert them."] = nil, -- src\editor\commands.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "Usa 'clear' para limpiar la consola de salida y el historial.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "Usa <Shift-Enter> para código multilínea.", -- src\editor\shellbox.lua
|
||||
["Value"] = "Valor", -- src\editor\debugger.lua
|
||||
["View the outline window"] = nil, -- src\editor\menu_view.lua
|
||||
["View the output/console window"] = "Ver ventana de salida/consola", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Ver la ventana de proyecto/árbol de archivos", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Ver la ventana de la pila de ejecución", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["View the watch window"] = "Ver la ventana de observación", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["Watch"] = nil, -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["View the stack window"] = "Ver la ventana de la pila de ejecución", -- src\editor\menu_view.lua
|
||||
["View the watch window"] = "Ver la ventana de observación", -- src\editor\menu_view.lua
|
||||
["Watch"] = nil, -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Bienvenido al intérprete interactico de Lua.", -- src\editor\shellbox.lua
|
||||
["Wrap ar&ound"] = nil, -- src\editor\findreplace.lua
|
||||
["You must save the program first."] = "Debes guardar el programa primero", -- src\editor\commands.lua
|
||||
|
||||
@@ -8,13 +8,14 @@ return {
|
||||
["&Close Page"] = "&Fermer la page", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["&Community"] = "&Communauté", -- src\editor\menu_help.lua
|
||||
["&Compile"] = "&Compiler", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "Co&pier", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Copy"] = "Co&pier", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "Affichage par &défaut", -- src\editor\menu_view.lua
|
||||
["&Delete Watch"] = "&Supprimer une expression", -- src\editor\debugger.lua
|
||||
["&Delete"] = "&Supprimer", -- src\editor\filetree.lua
|
||||
["&Documentation"] = "&Documentation", -- src\editor\menu_help.lua
|
||||
["&Down"] = "Vers le &bas", -- src\editor\findreplace.lua
|
||||
["&Edit Project Directory"] = "&Modifier le répertoire de projet", -- src\editor\filetree.lua
|
||||
["&Edit Value"] = nil, -- src\editor\debugger.lua
|
||||
["&Edit Watch"] = "&Modifier une expression", -- src\editor\debugger.lua
|
||||
["&Edit"] = "É&dition", -- src\editor\menu_edit.lua
|
||||
["&File"] = "&Fichier", -- src\editor\menu_file.lua
|
||||
@@ -30,10 +31,10 @@ return {
|
||||
["&New"] = "&Nouveau", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Ouvrir...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "&Sortie/Console", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "Co&ller", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Paste"] = "Co&ller", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project Page"] = "&Site Web de ZeroBrane", -- src\editor\menu_help.lua
|
||||
["&Project"] = "&Projet", -- src\editor\inspect.lua, src\editor\menu_project.lua
|
||||
["&Redo"] = "&Rétablir", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Project"] = "&Projet", -- src\editor\menu_project.lua
|
||||
["&Redo"] = "&Rétablir", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Rename"] = "&Renommer", -- src\editor\filetree.lua
|
||||
["&Replace All"] = "Remplacer &tout", -- src\editor\findreplace.lua
|
||||
["&Replace"] = "Re&mplacer", -- src\editor\findreplace.lua, src\editor\menu_search.lua
|
||||
@@ -47,7 +48,7 @@ return {
|
||||
["&Subdirectories"] = "&Sous-répertoires", -- src\editor\findreplace.lua
|
||||
["&Tool Bar"] = "&Barre d'outils", -- src\editor\menu_view.lua
|
||||
["&Tutorials"] = "&Tutoriels", -- src\editor\menu_help.lua
|
||||
["&Undo"] = "&Annuler", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Undo"] = "&Annuler", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Up"] = "Vers le &haut", -- src\editor\findreplace.lua
|
||||
["&View"] = "&Affichage", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "&Expressions espionnes", -- src\editor\menu_view.lua
|
||||
@@ -57,16 +58,18 @@ return {
|
||||
["Add Watch Expression"] = "Ajouter une expression", -- src\editor\editor.lua
|
||||
["All files"] = "Tous les fichiers", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Autoriser les processus externes à lancer le débogage", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Analyser le code source", -- src\editor\inspect.lua
|
||||
["Analyze"] = "Analyser", -- src\editor\inspect.lua
|
||||
["Analyze the source code"] = "Analyser le code source", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Analyze"] = "Analyser", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Auto Complete Identifiers"] = "Auto-compléter les identifiants", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Auto-compléter lors de la saisie", -- src\editor\menu_edit.lua
|
||||
["Bookmark"] = "&Marque-pages", -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Interrompre l'exécution à la ligne suivante", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "E&ffacer la fenêtre de sortie", -- src\editor\menu_project.lua
|
||||
["Break execution at the next executed line of code"] = "Interrompre l'exécution à la ligne suivante", -- src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "E&ffacer la fenêtre de sortie", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "Co&mmenter/Décommenter", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "Impossible de déboguer le script dans la fenêtre d'édition active.", -- src\editor\debugger.lua
|
||||
["Can't evaluate the expression while the application is running."] = nil, -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "Impossible de trouver le fichier '%s' dans le projet courant pour permettre le débogage. Mettez le projet à jour ou ouvrez le fichier dans l'éditeur avant débogage.", -- src\editor\debugger.lua
|
||||
["Can't open file '%s': %s"] = nil, -- src\editor\singleinstance.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "Impossible de lire la récupération automatique ; format invalide : %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "Impossible d'exécuter le point d'entrée du script ('%s').", -- src\editor\debugger.lua
|
||||
["Can't start debugger server at %s:%d: %s."] = "Impossible de lancer le serveur de débogage à %s:%d: %s." , -- src\editor\debugger.lua
|
||||
@@ -75,7 +78,7 @@ return {
|
||||
["Can't stop debugger server as it is not started."] = "Impossible d'arrêter le serveur de débogage car il n'a pas été démarré", -- src\editor\debugger.lua
|
||||
["Cancel"] = "Annuler", -- src\editor\findreplace.lua
|
||||
["Cancelled by the user."] = "Annulé par l'utilisateur.", -- src\editor\findreplace.lua
|
||||
["Choose a project directory"] = "Choisissez un répertoire de projet", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Choose a project directory"] = "Choisissez un répertoire de projet", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Choose..."] = "Choisir...", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Clear Items"] = "Effacer les éléments", -- src\editor\menu_file.lua
|
||||
["Clear items from this list"] = "Effacer les éléments de cette liste", -- src\editor\menu_file.lua
|
||||
@@ -94,11 +97,12 @@ return {
|
||||
["Complete &Identifier"] = "Compléter l'&identifiant", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "Compléter l'identifiant courant", -- src\editor\menu_edit.lua
|
||||
["Consider removing backslash from escape sequence '%s'."] = "Essayez de supprimer les antislashs dans '%s'.", -- src\editor\commands.lua
|
||||
["Copy Full Path"] = "Copier le chemin absolu", -- src\editor\filetree.lua
|
||||
["Copy Full Path"] = "Copier le chemin absolu", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Copy selected text to clipboard"] = "Copier le texte sélectionné dans le presse-papiers", -- src\editor\menu_edit.lua
|
||||
["Correct &Indentation"] = nil, -- src\editor\menu_edit.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "Impossible d'activer le fichier '%s' pour débogage ; poursuite du processus en ignorant le fichier.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Créer un document vierge", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Cu&t"] = "&Couper", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Create an empty document"] = "Créer un document vierge", -- src\editor\menu_file.lua
|
||||
["Cu&t"] = "&Couper", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Couper le texte sélectionné et copier dans le presse-papiers", -- src\editor\menu_edit.lua
|
||||
["Debugger server started at %s:%d."] = "Serveur de débogage démarré à %s:%d.", -- src\editor\debugger.lua
|
||||
["Debugger server stopped at %s:%d."] = "Serveur de débogage stoppé à %s:%d.", -- src\editor\debugger.lua
|
||||
@@ -115,6 +119,7 @@ return {
|
||||
["Enter Lua code and press Enter to run it."] = "Saisissez du code Lua et appuyez sur <Entrée> pour l´exécuter.", -- src\editor\shellbox.lua
|
||||
["Enter command line parameters (use Cancel to clear)"] = "Entrez des paramètres de ligne de commande (pressez Annuler pour effacer)", -- src\editor\menu_project.lua
|
||||
["Enter line number"] = "Entrez le numéro de ligne", -- src\editor\menu_search.lua
|
||||
["Enter replacement text"] = nil, -- src\editor\editor.lua
|
||||
["Error while loading API file: %s"] = "Erreur lors du chargement du fichier d'API : %s", -- src\editor\autocomplete.lua
|
||||
["Error while loading configuration file: %s"] = "Erreur lors du chargement du fichier de configuration : %s", -- src\editor\style.lua
|
||||
["Error while processing API file: %s"] = "Erreur lors de la lecture du fichier d'API : %s", -- src\editor\autocomplete.lua
|
||||
@@ -125,10 +130,9 @@ return {
|
||||
["Execute the current project/file"] = "Exécuter le projet/fichier courant", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Erreur d'exécution", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Quitter le programme", -- src\editor\menu_file.lua
|
||||
["Expr"] = "Expr.", -- src\editor\debugger.lua
|
||||
["Expression"] = "Expression", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "Le fichier '%s' a été modifié sur le disque.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Le fichier '%s' a un horodatage plus récent que celui restauré '%s' ; veuillez vérifier avant d'enregistrer.", -- src\editor\commands.lua
|
||||
["File '%s' is missing and can't be recovered."] = nil, -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "Le fichier '%s' n'existe plus.", -- src\editor\menu_file.lua, src\editor\editor.lua
|
||||
["File Type"] = "Type de fichier ", -- src\editor\findreplace.lua
|
||||
["File already exists."] = "Le fichier existe déjà.", -- src\editor\commands.lua
|
||||
@@ -138,9 +142,9 @@ return {
|
||||
["Find &Previous"] = "Rechercher l'occurrence &précédente", -- src\editor\menu_search.lua
|
||||
["Find In Files"] = "Rechercher dans les fichiers", -- src\editor\findreplace.lua
|
||||
["Find and replace text in files"] = "Rechercher et remplacer le texte dans les fichiers", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Rechercher et remplacer le texte", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Rechercher et remplacer le texte", -- src\editor\menu_search.lua
|
||||
["Find text in files"] = "Rechercher le texte dans les fichiers", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Rechercher le texte", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find text"] = "Rechercher le texte", -- src\editor\menu_search.lua
|
||||
["Find the earlier text occurence"] = "Recherche l'occurrence précédente du texte", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Recherche l'occurrence suivante du texte", -- src\editor\menu_search.lua
|
||||
["Find"] = "Rechercher ", -- src\editor\findreplace.lua
|
||||
@@ -154,8 +158,8 @@ return {
|
||||
["Go To Previous Bookmark"] = "Aller au marque-page précédent", -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "Aller à la ligne sélectionnée", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["Ignored error in debugger initialization code: %s."] = nil, -- src\editor\debugger.lua
|
||||
["In Files"] = "Dans les fichiers", -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "Aller à la définition de fonction...", -- src\editor\editor.lua
|
||||
["Known Files"] = "Fichiers connus", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Lig : %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Console locale", -- src\editor\gui.lua, src\editor\shellbox.lua
|
||||
@@ -167,13 +171,17 @@ return {
|
||||
["New &File"] = "Nouveau &Fichier", -- src\editor\filetree.lua
|
||||
["OVR"] = "OVR", -- src\editor\editor.lua
|
||||
["Open With Default Program"] = "Ouvrir avec le programme par défaut", -- src\editor\filetree.lua
|
||||
["Open an existing document"] = "Ouvrir un document existant", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Open an existing document"] = "Ouvrir un document existant", -- src\editor\menu_file.lua
|
||||
["Open file"] = "Ouvrir un fichier", -- src\editor\commands.lua
|
||||
["Options"] = "Options", -- src\editor\findreplace.lua
|
||||
["Output (running)"] = "Sortie (en cours d'exécution)", -- src\editor\output.lua
|
||||
["Output"] = "Sortie", -- src\editor\gui.lua, src\editor\output.lua, src\editor\settings.lua
|
||||
["Outline Window"] = nil, -- src\editor\menu_view.lua
|
||||
["Outline"] = nil, -- src\editor\outline.lua
|
||||
["Output (running)"] = "Sortie (en cours d'exécution)", -- src\editor\debugger.lua, src\editor\output.lua
|
||||
["Output (suspended)"] = nil, -- src\editor\debugger.lua
|
||||
["Output"] = "Sortie", -- src\editor\debugger.lua, src\editor\output.lua, src\editor\gui.lua, src\editor\settings.lua
|
||||
["Paste text from the clipboard"] = "Coller le texte depuis le presse-papiers", -- src\editor\menu_edit.lua
|
||||
["Preferences"] = "Préférences", -- src\editor\menu_edit.lua
|
||||
["Prepend '!' to force local execution."] = nil, -- src\editor\shellbox.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "Préfixez par '=' pour afficher les valeurs complexes sur plusieurs lignes.", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Cliquez sur Annuler pour annuler.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "Programme '%s' démarré dans '%s' (pid : %d).", -- src\editor\output.lua
|
||||
@@ -184,12 +192,13 @@ return {
|
||||
["Program unable to run as '%s'."] = "Impossible d'exécuter le programme en tant que '%s'.", -- src\editor\output.lua
|
||||
["Project Directory"] = "Répertoire de projet", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Project history"] = "Historique de projet", -- src\editor\menu_file.lua
|
||||
["Project"] = "Projet", -- src\editor\gui.lua
|
||||
["Project"] = "Projet", -- src\editor\filetree.lua
|
||||
["Project/&FileTree Window"] = "&Explorateur de projet", -- src\editor\menu_view.lua
|
||||
["Provide command line parameters"] = "Renseignez les paramètres de ligne de commande", -- src\editor\menu_project.lua
|
||||
["R/O"] = "R/O", -- src\editor\editor.lua
|
||||
["R/W"] = "R/W", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Remp&lacer dans les fichiers", -- src\editor\menu_search.lua
|
||||
["Re-indent selected lines"] = nil, -- src\editor\menu_edit.lua
|
||||
["Recent &Projects"] = "&Projets récents", -- src\editor\menu_file.lua
|
||||
["Recent Files"] = "Fichiers récents", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Rétablir la dernière modification", -- src\editor\menu_edit.lua
|
||||
@@ -198,6 +207,7 @@ return {
|
||||
["Remote console"] = "Console à distance", -- src\editor\shellbox.lua
|
||||
["Rename All Instances"] = "Renommer toutes les occurrences", -- src\editor\editor.lua
|
||||
["Replace A&ll"] = "Remplacer &tout", -- src\editor\findreplace.lua
|
||||
["Replace All Selections"] = nil, -- src\editor\editor.lua
|
||||
["Replace"] = "Remplacer par ", -- src\editor\findreplace.lua
|
||||
["Replaced an invalid UTF8 character with %s."] = "Un caractère UTF8 invalide a été remplacé par %s.", -- src\editor\commands.lua
|
||||
["Replaced"] = "Occurrences remplacées :", -- src\editor\findreplace.lua
|
||||
@@ -209,24 +219,24 @@ return {
|
||||
["Save &As..."] = "Enregistrer &sous...", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save A&ll"] = "Enregistrer &tout", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "Enregistrer les modifications ?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Enregistrer tous les documents ouverts", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save all open documents"] = "Enregistrer tous les documents ouverts", -- src\editor\menu_file.lua
|
||||
["Save file as"] = "Enregistrer le fichier sous", -- src\editor\commands.lua
|
||||
["Save file?"] = "Enregistrer le fichier ?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Enregistrer le document courant sous un nouveau nom", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Enregistrer le document courant", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save the current document"] = "Enregistrer le document courant", -- src\editor\menu_file.lua
|
||||
["Saved auto-recover at %s."] = "Récup. auto enregistrée à %s.", -- src\editor\commands.lua
|
||||
["Scope"] = "Direction", -- src\editor\findreplace.lua
|
||||
["Scratchpad error"] = "Erreur dans le brouillon", -- src\editor\debugger.lua
|
||||
["Searching for"] = "Recherche de", -- src\editor\findreplace.lua
|
||||
["Sel: %d/%d"] = "Sel: %d/%d", -- src\editor\editor.lua
|
||||
["Select &All"] = "Sélectionner &tout", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Select &All"] = "Sélectionner &tout", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Sélectionner tout le texte dans l'éditeur", -- src\editor\menu_edit.lua
|
||||
["Select and Find Next"] = "Sélectionner et chercher le suivant", -- src\editor\menu_search.lua
|
||||
["Select and Find Previous"] = "Sélectionner et chercher le précédent", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its next occurrence"] = "Sélectionner le mot sous le curseur et chercher son occurence suivante", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its previous occurrence"] = "Sélectionner le mot sous le curseur et chercher son occurence précédente", -- src\editor\menu_search.lua
|
||||
["Set From Current File"] = "Définir depuis le fichier courant", -- src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Définir le répertoire de projet depuis le fichier courant", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Définir le répertoire de projet depuis le fichier courant", -- src\editor\menu_project.lua
|
||||
["Set the interpreter to be used"] = "Définir l'interpréteur à utiliser", -- src\editor\menu_project.lua
|
||||
["Set the project directory to be used"] = "Définir le répertoire de projet à utiliser", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Settings: System"] = "Paramètres : Système", -- src\editor\menu_edit.lua
|
||||
@@ -237,28 +247,30 @@ return {
|
||||
["Show/Hide the status bar"] = "Afficher/Masquer la barre de statut", -- src\editor\menu_view.lua
|
||||
["Show/Hide the toolbar"] = "Afficher/Masquer la barre d'outils", -- src\editor\menu_view.lua
|
||||
["Sort selected lines"] = "Trier les lignes sélectionnées", -- src\editor\menu_edit.lua
|
||||
["Stack"] = "Pile d'exécution", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["Source"] = nil, -- src\editor\menu_edit.lua
|
||||
["Stack"] = "Pile d'exécution", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "Lancer le &débogage", -- src\editor\menu_project.lua
|
||||
["Start or Continue debugging"] = "Démarrer ou Continuer le debogage", -- src\editor\gui.lua
|
||||
["Start or continue debugging"] = "Démarrer ou continuer le debogage", -- src\editor\menu_project.lua
|
||||
["Step &Into"] = "Pas à pas détai&llé", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "Pas à pas so&mmaire", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "Pas à pas so&rtant", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Rentrer dans l'instruction suivante", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Sortir de la fonction courante", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step over"] = "Enjamber l'instruction suivante", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = "Arrêter le débogage et continuer l'exécution du processus", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Arrêter le processus en cours d'exécution", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step into"] = "Rentrer dans l'instruction suivante", -- src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Sortir de la fonction courante", -- src\editor\menu_project.lua
|
||||
["Step over"] = "Enjamber l'instruction suivante", -- src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = "Arrêter le débogage et continuer l'exécution du processus", -- src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Arrêter le processus en cours d'exécution", -- src\editor\menu_project.lua
|
||||
["Switch to or from full screen mode"] = "Activer ou désactiver le mode plein écran", -- src\editor\menu_view.lua
|
||||
["Text not found."] = "Texte non trouvé.", -- src\editor\findreplace.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "Le fichier d'API doit être placé dans un sous-répertoire du répertoire d'API.", -- src\editor\autocomplete.lua
|
||||
["Toggle Bookmark"] = "Créer/Supprimer un marque-page", -- src\editor\menu_edit.lua
|
||||
["Toggle Break&point"] = "Créer/Supprimer un &point d'arrêt", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "Créer ou supprimer un point d'arrêt", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Toggle bookmark"] = "Créer/Supprimer un marque-page", -- src\editor\menu_edit.lua
|
||||
["Toggle breakpoint"] = "Créer ou supprimer un point d'arrêt", -- src\editor\menu_project.lua
|
||||
["Tr&ace"] = "&Tracer", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Tracer l'exécution en montrant chaque ligne de code exécutée", -- src\editor\menu_project.lua
|
||||
["Unable to create directory '%s'."] = "Impossible de créer le répertoire '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to create file '%s'."] = "Impossible de créer le fichier '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to delete directory '%s': %s"] = nil, -- src\editor\filetree.lua
|
||||
["Unable to load file '%s'."] = "Impossible de charger le le fichier '%s'.", -- src\editor\commands.lua
|
||||
["Unable to rename file '%s'."] = "Impossible de renommer le fichier '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to save file '%s': %s"] = "Impossible d'enregistrer le fichier '%s' : %s", -- src\editor\commands.lua
|
||||
@@ -268,12 +280,12 @@ return {
|
||||
["Use '%s' to show line endings and '%s' to convert them."] = "Utilisez '%s' pour afficher les fins de ligne et '%s' pour les convertir.", -- src\editor\commands.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "Utilisez 'clear' pour effacer la sortie console et l´historique.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "Appuyez sur <Shift-Entrée> pour du code multiligne.", -- src\editor\shellbox.lua
|
||||
["Value"] = "Valeur", -- src\editor\debugger.lua
|
||||
["View the outline window"] = nil, -- src\editor\menu_view.lua
|
||||
["View the output/console window"] = "Afficher la fenêtre de sortie/console", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Afficher la fenêtre d'explorateur de projet", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Afficher la fenêtre de pile d'exécution", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["View the watch window"] = "Afficher la fenêtre d'expressions espionnes", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["Watch"] = "Expressions espionnes", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["View the stack window"] = "Afficher la fenêtre de pile d'exécution", -- src\editor\menu_view.lua
|
||||
["View the watch window"] = "Afficher la fenêtre d'expressions espionnes", -- src\editor\menu_view.lua
|
||||
["Watch"] = "Expressions espionnes", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Bienvenue dans l´interpréteur interactif Lua.", -- src\editor\shellbox.lua
|
||||
["Wrap ar&ound"] = "B&oucler", -- src\editor\findreplace.lua
|
||||
["You must save the program first."] = "Vous devez d'abord enregistrer le programme.", -- src\editor\commands.lua
|
||||
|
||||
@@ -8,13 +8,14 @@ return {
|
||||
["&Close Page"] = "&Chiudi pagina", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["&Community"] = "&Comunità", -- src\editor\menu_help.lua
|
||||
["&Compile"] = "&Compila", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "&Copia", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Copy"] = "&Copia", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "Visualizzazione di &Default", -- src\editor\menu_view.lua
|
||||
["&Delete Watch"] = "Elimina Espressione di Controllo", -- src\editor\debugger.lua
|
||||
["&Delete"] = "Elimina", -- src\editor\filetree.lua
|
||||
["&Documentation"] = "Documentazione", -- src\editor\menu_help.lua
|
||||
["&Down"] = "Verso il basso", -- src\editor\findreplace.lua
|
||||
["&Edit Project Directory"] = "Modifica directory di progetto", -- src\editor\filetree.lua
|
||||
["&Edit Value"] = nil, -- src\editor\debugger.lua
|
||||
["&Edit Watch"] = "Modifica Espressione di Controllo", -- src\editor\debugger.lua
|
||||
["&Edit"] = "Modifica", -- src\editor\menu_edit.lua
|
||||
["&File"] = "File", -- src\editor\menu_file.lua
|
||||
@@ -30,10 +31,10 @@ return {
|
||||
["&New"] = "&Nuovo", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Apri...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "Finestra di Output/Console", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "Incolla", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Paste"] = "Incolla", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project Page"] = "&Pagina di Progetto", -- src\editor\menu_help.lua
|
||||
["&Project"] = "&Progetto", -- src\editor\inspect.lua, src\editor\menu_project.lua
|
||||
["&Redo"] = "&Ripeti", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Project"] = "&Progetto", -- src\editor\menu_project.lua
|
||||
["&Redo"] = "&Ripeti", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Rename"] = "&Rinomina", -- src\editor\filetree.lua
|
||||
["&Replace All"] = "Sostituisci Tutti", -- src\editor\findreplace.lua
|
||||
["&Replace"] = "Sostituisci", -- src\editor\findreplace.lua, src\editor\menu_search.lua
|
||||
@@ -47,7 +48,7 @@ return {
|
||||
["&Subdirectories"] = "Sotto Directory", -- src\editor\findreplace.lua
|
||||
["&Tool Bar"] = "Barra degli strumenti", -- src\editor\menu_view.lua
|
||||
["&Tutorials"] = "Guide", -- src\editor\menu_help.lua
|
||||
["&Undo"] = "Annulla", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Undo"] = "Annulla", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Up"] = "Verso l'alto", -- src\editor\findreplace.lua
|
||||
["&View"] = "Visualizza", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "Finestra Espressioni di Controllo", -- src\editor\menu_view.lua
|
||||
@@ -57,16 +58,18 @@ return {
|
||||
["Add Watch Expression"] = "Aggiungi Espressione di Controllo", -- src\editor\editor.lua
|
||||
["All files"] = "Tutti i files", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Permetti a processi esterni di avviare il debug", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Analizza il codice", -- src\editor\inspect.lua
|
||||
["Analyze"] = "Analizza", -- src\editor\inspect.lua
|
||||
["Analyze the source code"] = "Analizza il codice", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Analyze"] = "Analizza", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Auto Complete Identifiers"] = "Autocompletamento identificatori", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Autocompletamento in linea", -- src\editor\menu_edit.lua
|
||||
["Bookmark"] = "Segnalibro", -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Interrompi l'esecuzione alla successiva riga di codice ", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "Pulisci finestra di output", -- src\editor\menu_project.lua
|
||||
["Break execution at the next executed line of code"] = "Interrompi l'esecuzione alla successiva riga di codice ", -- src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "Pulisci finestra di output", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "Commenta/Scommenta", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "Impossibile farte debug dello script nella finestra attiva", -- src\editor\debugger.lua
|
||||
["Can't evaluate the expression while the application is running."] = nil, -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "File '%s' non trovato nel progetto per attivare il debug. Modificare il progetto o apire il file prima di lanciare il debug.", -- src\editor\debugger.lua
|
||||
["Can't open file '%s': %s"] = nil, -- src\editor\singleinstance.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "Impossibile procedere all'auto-recovery; Formato non valido: %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "Impossibile eseguire il punto di ingresos dello script (%s).", -- src\editor\debugger.lua
|
||||
["Can't start debugger server at %s:%d: %s."] = "Impossibile lanciare il server debugger a %s:%d: %s.", -- src\editor\debugger.lua
|
||||
@@ -75,7 +78,7 @@ return {
|
||||
["Can't stop debugger server as it is not started."] = "Impossibile fermare il server debugger perchè non è stato avviato", -- src\editor\debugger.lua
|
||||
["Cancel"] = "Annulla", -- src\editor\findreplace.lua
|
||||
["Cancelled by the user."] = "Annullato dall'utente", -- src\editor\findreplace.lua
|
||||
["Choose a project directory"] = "Scegli la directory di un progetto", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Choose a project directory"] = "Scegli la directory di un progetto", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Choose..."] = "Scegli...", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Clear Items"] = "Pulisci elementi", -- src\editor\menu_file.lua
|
||||
["Clear items from this list"] = "Pulisci elementi della lista", -- src\editor\menu_file.lua
|
||||
@@ -94,11 +97,12 @@ return {
|
||||
["Complete &Identifier"] = "Completa l'&Identificatore", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "Completa l'identificatore corrente", -- src\editor\menu_edit.lua
|
||||
["Consider removing backslash from escape sequence '%s'."] = "Prova a rimuovere i backslash dalla sequenza di escape '%s'.", -- src\editor\commands.lua
|
||||
["Copy Full Path"] = "Copia Path Completo", -- src\editor\filetree.lua
|
||||
["Copy Full Path"] = "Copia Path Completo", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Copy selected text to clipboard"] = "Copia il testo selezionato negli appunti", -- src\editor\menu_edit.lua
|
||||
["Correct &Indentation"] = nil, -- src\editor\menu_edit.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "Impossibile attivare il file '%s' per debug; si prosegue senza.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Crea un documento vuoto", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Cu&t"] = "&Taglia", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Create an empty document"] = "Crea un documento vuoto", -- src\editor\menu_file.lua
|
||||
["Cu&t"] = "&Taglia", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Taglia il testo selezionato e mette negli appunti", -- src\editor\menu_edit.lua
|
||||
["Debugger server started at %s:%d."] = "Server Debugger iniziato %s:%d.", -- src\editor\debugger.lua
|
||||
["Debugger server stopped at %s:%d."] = "Server Debugger fermato %s:%d.", -- src\editor\debugger.lua
|
||||
@@ -115,6 +119,7 @@ return {
|
||||
["Enter Lua code and press Enter to run it."] = "Inserisci codice Lua e premi <Enter> per eseguirlo.", -- src\editor\shellbox.lua
|
||||
["Enter command line parameters (use Cancel to clear)"] = "Inserisci i parametri riga di comando (Annulla per pulire)", -- src\editor\menu_project.lua
|
||||
["Enter line number"] = "Inserisci il numero di linea", -- src\editor\menu_search.lua
|
||||
["Enter replacement text"] = nil, -- src\editor\editor.lua
|
||||
["Error while loading API file: %s"] = "Errore durante il caricamento del file API: %s", -- src\editor\autocomplete.lua
|
||||
["Error while loading configuration file: %s"] = "Errore nel caricamento del file di configurazione: %s", -- src\editor\style.lua
|
||||
["Error while processing API file: %s"] = "Errore durante l'elaborazione del file API: %s", -- src\editor\autocomplete.lua
|
||||
@@ -125,10 +130,9 @@ return {
|
||||
["Execute the current project/file"] = "Esegue il progetto/file corrente", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Errore di esecuzione", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Uscita dal programma", -- src\editor\menu_file.lua
|
||||
["Expr"] = "Expr.", -- src\editor\debugger.lua
|
||||
["Expression"] = "Espressione", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "Il file '%s' e' stato modificato sul disco.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Il file '%s' ha un timestamp più recente di quello ripristinato '%s'; verificare prima di salvare.", -- src\editor\commands.lua
|
||||
["File '%s' is missing and can't be recovered."] = nil, -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "Il file '%s' non esiste piu'.", -- src\editor\menu_file.lua, src\editor\editor.lua
|
||||
["File Type"] = "File Type", -- src\editor\findreplace.lua
|
||||
["File already exists."] = "Il file esiste già.", -- src\editor\commands.lua
|
||||
@@ -138,9 +142,9 @@ return {
|
||||
["Find &Previous"] = "Cerca il precedente", -- src\editor\menu_search.lua
|
||||
["Find In Files"] = "Ricerca nei Files", -- src\editor\findreplace.lua
|
||||
["Find and replace text in files"] = "Cerca e sostituisci testo nei files", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Cerca e sostituisci testo", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Cerca e sostituisci testo", -- src\editor\menu_search.lua
|
||||
["Find text in files"] = "Cerca testo nei files", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Cerca testo", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find text"] = "Cerca testo", -- src\editor\menu_search.lua
|
||||
["Find the earlier text occurence"] = "Cerca la precedente occorrenza nel testo", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Cerca la successiva occorrenza nel testo", -- src\editor\menu_search.lua
|
||||
["Find"] = "Ricerca", -- src\editor\findreplace.lua
|
||||
@@ -154,8 +158,8 @@ return {
|
||||
["Go To Previous Bookmark"] = "Vai al Precedente Segnalibro", -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "Vai alla riga selezionata", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["Ignored error in debugger initialization code: %s."] = nil, -- src\editor\debugger.lua
|
||||
["In Files"] = "Nei Files", -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "Salta alla definizione della funzione...", -- src\editor\editor.lua
|
||||
["Known Files"] = "Files conosciuti", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Ln: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Console locale", -- src\editor\gui.lua, src\editor\shellbox.lua
|
||||
@@ -167,13 +171,17 @@ return {
|
||||
["New &File"] = "Nuovo &File", -- src\editor\filetree.lua
|
||||
["OVR"] = "OVR", -- src\editor\editor.lua
|
||||
["Open With Default Program"] = "Apri con programma predefinito", -- src\editor\filetree.lua
|
||||
["Open an existing document"] = "Apri un documento esistente", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Open an existing document"] = "Apri un documento esistente", -- src\editor\menu_file.lua
|
||||
["Open file"] = "Apri un file", -- src\editor\commands.lua
|
||||
["Options"] = "Opzioni", -- src\editor\findreplace.lua
|
||||
["Output (running)"] = "Output (in corso d'esecuzione)", -- src\editor\output.lua
|
||||
["Output"] = "Output", -- src\editor\gui.lua, src\editor\output.lua, src\editor\settings.lua
|
||||
["Outline Window"] = nil, -- src\editor\menu_view.lua
|
||||
["Outline"] = nil, -- src\editor\outline.lua
|
||||
["Output (running)"] = "Output (in corso d'esecuzione)", -- src\editor\debugger.lua, src\editor\output.lua
|
||||
["Output (suspended)"] = nil, -- src\editor\debugger.lua
|
||||
["Output"] = "Output", -- src\editor\debugger.lua, src\editor\output.lua, src\editor\gui.lua, src\editor\settings.lua
|
||||
["Paste text from the clipboard"] = "Incolla testo dagli appunti", -- src\editor\menu_edit.lua
|
||||
["Preferences"] = "Preferenze", -- src\editor\menu_edit.lua
|
||||
["Prepend '!' to force local execution."] = nil, -- src\editor\shellbox.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "Prefissa '=' per visualizzare valori complessi su piu` righe", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Premi cancel per bloccare.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "Programma '%s' partito da '%s' (pid: %d).", -- src\editor\output.lua
|
||||
@@ -184,12 +192,13 @@ return {
|
||||
["Program unable to run as '%s'."] = "Il programma non puo' partire '%s'.", -- src\editor\output.lua
|
||||
["Project Directory"] = "Directory del Progetto", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Project history"] = "Storia del Progetto", -- src\editor\menu_file.lua
|
||||
["Project"] = "Progetto", -- src\editor\gui.lua
|
||||
["Project"] = "Progetto", -- src\editor\filetree.lua
|
||||
["Project/&FileTree Window"] = "Progetto/Explorer", -- src\editor\menu_view.lua
|
||||
["Provide command line parameters"] = "Fornire parametri riga di comando", -- src\editor\menu_project.lua
|
||||
["R/O"] = "R/O", -- src\editor\editor.lua
|
||||
["R/W"] = "R/W", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Sostituisci nei files", -- src\editor\menu_search.lua
|
||||
["Re-indent selected lines"] = nil, -- src\editor\menu_edit.lua
|
||||
["Recent &Projects"] = "Progetti Recenti", -- src\editor\menu_file.lua
|
||||
["Recent Files"] = "Files recenti", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Ripeti l'ultima azione annullata", -- src\editor\menu_edit.lua
|
||||
@@ -198,6 +207,7 @@ return {
|
||||
["Remote console"] = "Console remota", -- src\editor\shellbox.lua
|
||||
["Rename All Instances"] = "Rinomina tutte le occorrenze", -- src\editor\editor.lua
|
||||
["Replace A&ll"] = "Sostituisci Tutto", -- src\editor\findreplace.lua
|
||||
["Replace All Selections"] = nil, -- src\editor\editor.lua
|
||||
["Replace"] = "Sostituisci", -- src\editor\findreplace.lua
|
||||
["Replaced an invalid UTF8 character with %s."] = "Sostituito un carattere UTF8 invalido con %s.", -- src\editor\commands.lua
|
||||
["Replaced"] = "Sostituiti :", -- src\editor\findreplace.lua
|
||||
@@ -209,24 +219,24 @@ return {
|
||||
["Save &As..."] = "S&alva con nome...", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save A&ll"] = "Sa&lva tutto", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "Vuoi salvare le modifiche?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Salva tutti i documenti aperti", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save all open documents"] = "Salva tutti i documenti aperti", -- src\editor\menu_file.lua
|
||||
["Save file as"] = "Salva il file con nome", -- src\editor\commands.lua
|
||||
["Save file?"] = "Vuoi salvare il file?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Salva il documento corrente in un file con un nuovo nome", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Salva il documento corrente", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save the current document"] = "Salva il documento corrente", -- src\editor\menu_file.lua
|
||||
["Saved auto-recover at %s."] = "Salvato auto-recover a %s.", -- src\editor\commands.lua
|
||||
["Scope"] = "Direzione", -- src\editor\findreplace.lua
|
||||
["Scratchpad error"] = "Errore durente Scratchpad", -- src\editor\debugger.lua
|
||||
["Searching for"] = "Ricerca di", -- src\editor\findreplace.lua
|
||||
["Sel: %d/%d"] = "Sel: %d/%d", -- src\editor\editor.lua
|
||||
["Select &All"] = "Selezion&a Tutto", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Select &All"] = "Selezion&a Tutto", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Seleziona tutto il testo nell'editor", -- src\editor\menu_edit.lua
|
||||
["Select and Find Next"] = "Seleziona e trova successivo", -- src\editor\menu_search.lua
|
||||
["Select and Find Previous"] = "Seleziona e trova precedente", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its next occurrence"] = "Seleziona la parola e trova successivo", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its previous occurrence"] = "Seleziona la parola e trova precedente", -- src\editor\menu_search.lua
|
||||
["Set From Current File"] = "Impostato da file corrente", -- src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Definisci la directory del progeetto dal file corrente", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Definisci la directory del progeetto dal file corrente", -- src\editor\menu_project.lua
|
||||
["Set the interpreter to be used"] = "Definisci l'interprete da utilizzare", -- src\editor\menu_project.lua
|
||||
["Set the project directory to be used"] = "Imposta la directory di progetto da usare", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Settings: System"] = "Impostazioni: Sistema", -- src\editor\menu_edit.lua
|
||||
@@ -237,28 +247,30 @@ return {
|
||||
["Show/Hide the status bar"] = "Mostra/Nascondi la barra di stato", -- src\editor\menu_view.lua
|
||||
["Show/Hide the toolbar"] = "Mostra/Nascondi la barra degli strumenti", -- src\editor\menu_view.lua
|
||||
["Sort selected lines"] = "Ordina le righe selezionate", -- src\editor\menu_edit.lua
|
||||
["Stack"] = "Stack", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["Source"] = nil, -- src\editor\menu_edit.lua
|
||||
["Stack"] = "Stack", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "Inizia il &Debug", -- src\editor\menu_project.lua
|
||||
["Start or Continue debugging"] = "Inizia o continua il debug", -- src\editor\gui.lua
|
||||
["Start or continue debugging"] = "Inizia o continua il debug", -- src\editor\menu_project.lua
|
||||
["Step &Into"] = "Step &Into", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "Step &Over", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "Step O&ut", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Step into", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Contina fino all'uscita della funzione", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step over"] = "Continua senza entrare nella funzione", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = "Ferma il debug e continua l'esecuzione del processo", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Ferma il processo in esecuzione", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step into"] = "Step into", -- src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Contina fino all'uscita della funzione", -- src\editor\menu_project.lua
|
||||
["Step over"] = "Continua senza entrare nella funzione", -- src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = "Ferma il debug e continua l'esecuzione del processo", -- src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Ferma il processo in esecuzione", -- src\editor\menu_project.lua
|
||||
["Switch to or from full screen mode"] = "Passa da tutto schermo a finestra", -- src\editor\menu_view.lua
|
||||
["Text not found."] = "Testo non trovato.", -- src\editor\findreplace.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "Il file API deve essere presente in una sottodirectory o nella direcotory API.", -- src\editor\autocomplete.lua
|
||||
["Toggle Bookmark"] = "Attiva/Disattiva Segnalibro", -- src\editor\menu_edit.lua
|
||||
["Toggle Break&point"] = "Attiva/Disattiva Break&point", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "Attiva/Disattiva Breakpoint", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Toggle bookmark"] = "Attiva/Disattiva Segnalibro", -- src\editor\menu_edit.lua
|
||||
["Toggle breakpoint"] = "Attiva/Disattiva Breakpoint", -- src\editor\menu_project.lua
|
||||
["Tr&ace"] = "Tr&ace", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Traccia l'esecuzione mostrando le righe eseguite", -- src\editor\menu_project.lua
|
||||
["Unable to create directory '%s'."] = "Impossibile creare la directory '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to create file '%s'."] = "Impossibile creare il file '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to delete directory '%s': %s"] = nil, -- src\editor\filetree.lua
|
||||
["Unable to load file '%s'."] = "Impossibile aprire il file '%s'.", -- src\editor\commands.lua
|
||||
["Unable to rename file '%s'."] = "Impossibile rinominare il file '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to save file '%s': %s"] = "Impossibile salvare il file '%s': %s", -- src\editor\commands.lua
|
||||
@@ -268,12 +280,12 @@ return {
|
||||
["Use '%s' to show line endings and '%s' to convert them."] = "Utilizza '%s' per vedere la fine della riga e '%s' per convertirli.", -- src\editor\commands.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "Utilizza 'clear' per pulire l`output e lo storico.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "Premi <Shift-Invio> per inserire piu` righe di codice.", -- src\editor\shellbox.lua
|
||||
["Value"] = "Valore", -- src\editor\debugger.lua
|
||||
["View the outline window"] = nil, -- src\editor\menu_view.lua
|
||||
["View the output/console window"] = "Mostra la finestra di output/console", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Mostra la finestra di progetto/explorer", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Mostra la finestra dello Stack", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["View the watch window"] = "Mostra la finestra delle Espressioni di Controllo", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["Watch"] = "Watch", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["View the stack window"] = "Mostra la finestra dello Stack", -- src\editor\menu_view.lua
|
||||
["View the watch window"] = "Mostra la finestra delle Espressioni di Controllo", -- src\editor\menu_view.lua
|
||||
["Watch"] = "Watch", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Benvenuti nell`interprete interattivo Lua.", -- src\editor\shellbox.lua
|
||||
["Wrap ar&ound"] = "Wrap ar&ound", -- src\editor\findreplace.lua
|
||||
["You must save the program first."] = "Devi prima salvare il programma", -- src\editor\commands.lua
|
||||
|
||||
@@ -8,13 +8,14 @@ return {
|
||||
["&Close Page"] = "&Закрыть", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["&Community"] = nil, -- src\editor\menu_help.lua
|
||||
["&Compile"] = "&Компилировать", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "&Копировать", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Copy"] = "&Копировать", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "Вид по &умолчанию", -- src\editor\menu_view.lua
|
||||
["&Delete Watch"] = "&Удалить выражение", -- src\editor\debugger.lua
|
||||
["&Delete"] = "&Удалить", -- src\editor\filetree.lua
|
||||
["&Documentation"] = "Документация", -- src\editor\menu_help.lua
|
||||
["&Down"] = "Вниз", -- src\editor\findreplace.lua
|
||||
["&Edit Project Directory"] = "&Редактировать папку проекта", -- src\editor\filetree.lua
|
||||
["&Edit Value"] = "&Редактировать значение", -- src\editor\debugger.lua
|
||||
["&Edit Watch"] = "&Редактировать выражение", -- src\editor\debugger.lua
|
||||
["&Edit"] = "&Правка", -- src\editor\menu_edit.lua
|
||||
["&File"] = "&Файл", -- src\editor\menu_file.lua
|
||||
@@ -30,10 +31,10 @@ return {
|
||||
["&New"] = "Соз&дать", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Открыть...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "Окно &вывода/консоли", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "В&ставить", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Paste"] = "В&ставить", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project Page"] = "Страница проекта", -- src\editor\menu_help.lua
|
||||
["&Project"] = "Пр&оект", -- src\editor\inspect.lua, src\editor\menu_project.lua
|
||||
["&Redo"] = "Верну&ть", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Project"] = "Пр&оект", -- src\editor\menu_project.lua
|
||||
["&Redo"] = "Верну&ть", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Rename"] = "Переименовать", -- src\editor\filetree.lua
|
||||
["&Replace All"] = "Заменить всe", -- src\editor\findreplace.lua
|
||||
["&Replace"] = "За&менить", -- src\editor\findreplace.lua, src\editor\menu_search.lua
|
||||
@@ -47,7 +48,7 @@ return {
|
||||
["&Subdirectories"] = "В папках", -- src\editor\findreplace.lua
|
||||
["&Tool Bar"] = "Панель инструментов", -- src\editor\menu_view.lua
|
||||
["&Tutorials"] = "&Обучающие материалы", -- src\editor\menu_help.lua
|
||||
["&Undo"] = "&Отменить", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Undo"] = "&Отменить", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Up"] = "Вверх", -- src\editor\findreplace.lua
|
||||
["&View"] = "&Вид", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "Окно &выражений", -- src\editor\menu_view.lua
|
||||
@@ -57,16 +58,18 @@ return {
|
||||
["Add Watch Expression"] = "Добавить выражение", -- src\editor\editor.lua
|
||||
["All files"] = "Все файлы", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Разрешить внешнему процессу начать отладку", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Проанализировать исходный код", -- src\editor\inspect.lua
|
||||
["Analyze"] = "Анализировать", -- src\editor\inspect.lua
|
||||
["Analyze the source code"] = "Проанализировать исходный код", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Analyze"] = "Анализировать", -- src\editor\inspect.lua, src\editor\inspect.lua-profile
|
||||
["Auto Complete Identifiers"] = "Автодополнение идентификаторов", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Автоматически дополнять идентификаторы при наборе", -- src\editor\menu_edit.lua
|
||||
["Bookmark"] = "Закладка", -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Прервать выполнение на следующей строке", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "Очистка ок&на вывода", -- src\editor\menu_project.lua
|
||||
["Break execution at the next executed line of code"] = "Прервать выполнение на следующей строке", -- src\editor\menu_project.lua
|
||||
["C&lear Output Window"] = "Очистка ок&на вывода", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "Зако&мментировать/раскомментировать", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "Невозможно отладить скрипт в текущем окне редактирования.", -- src\editor\debugger.lua
|
||||
["Can't evaluate the expression while the application is running."] = nil, -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "Файл '%s', необходимый для отладки, не найден в текущем проекте. Обновите проект или откройте файл в редакторе перед началом отладки.", -- src\editor\debugger.lua
|
||||
["Can't open file '%s': %s"] = "Ошибка открытия файла '%s': %s", -- src\editor\singleinstance.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "Ошибка обработки записи автоматического восстановления; неверный формат: %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "Ошибка выполнения стартового скрипта ('%s').", -- src\editor\debugger.lua
|
||||
["Can't start debugger server at %s:%d: %s."] = "Невозможно запустить сервер отладки %s:%d: %s", -- src\editor\debugger.lua
|
||||
@@ -75,7 +78,7 @@ return {
|
||||
["Can't stop debugger server as it is not started."] = "Невозможно остановить сервер отладки пока он не запущен", -- src\editor\debugger.lua
|
||||
["Cancel"] = "Отмена", -- src\editor\findreplace.lua
|
||||
["Cancelled by the user."] = "Отменено пользователем.", -- src\editor\findreplace.lua
|
||||
["Choose a project directory"] = "Выберите папку проекта", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Choose a project directory"] = "Выберите папку проекта", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Choose..."] = "Выбрать...", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Clear Items"] = "Очистить список", -- src\editor\menu_file.lua
|
||||
["Clear items from this list"] = "Удалить элементы из списка", -- src\editor\menu_file.lua
|
||||
@@ -94,11 +97,12 @@ return {
|
||||
["Complete &Identifier"] = "Дополнить &идентификатор", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "Дополнить текущий идентификатор", -- src\editor\menu_edit.lua
|
||||
["Consider removing backslash from escape sequence '%s'."] = "Рассмотрите вариант удаления backslash из строки '%s'.", -- src\editor\commands.lua
|
||||
["Copy Full Path"] = "Скопировать полный путь", -- src\editor\filetree.lua
|
||||
["Copy Full Path"] = "Скопировать полный путь", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Copy selected text to clipboard"] = "Скопировать выделенный текст в буфер обмена", -- src\editor\menu_edit.lua
|
||||
["Correct &Indentation"] = "Откорректировать отступ", -- src\editor\menu_edit.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "Невозможно открыть файл '%s' для отладки; выполнение будет продолжено без него.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Создать новый документ", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Cu&t"] = "Вы&резать", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Create an empty document"] = "Создать новый документ", -- src\editor\menu_file.lua
|
||||
["Cu&t"] = "Вы&резать", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Вырезать выделенный текст в буфер обмена", -- src\editor\menu_edit.lua
|
||||
["Debugger server started at %s:%d."] = "Сервер отладки запущен на %s:%d.", -- src\editor\debugger.lua
|
||||
["Debugger server stopped at %s:%d."] = "Сервер отладки остановлен %s:%d.", -- src\editor\debugger.lua
|
||||
@@ -115,6 +119,7 @@ return {
|
||||
["Enter Lua code and press Enter to run it."] = "Введите код на Lua и нажмите Enter для выполнения.", -- src\editor\shellbox.lua
|
||||
["Enter command line parameters (use Cancel to clear)"] = "Введите параметры командной строки (Cancel чтобы очистить)", -- src\editor\menu_project.lua
|
||||
["Enter line number"] = "Введите номер строки", -- src\editor\menu_search.lua
|
||||
["Enter replacement text"] = "Введите текст замены", -- src\editor\editor.lua
|
||||
["Error while loading API file: %s"] = "Ошибка загрузки файла определений API: %s", -- src\editor\autocomplete.lua
|
||||
["Error while loading configuration file: %s"] = "Ошибка загрузки файла конфигурации: %s", -- src\editor\style.lua
|
||||
["Error while processing API file: %s"] = "Ошибка обработки файла определений API: %s", -- src\editor\autocomplete.lua
|
||||
@@ -125,10 +130,9 @@ return {
|
||||
["Execute the current project/file"] = "Запустить текущий проект/файл", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Ошибка выполнения", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Выйти из программы", -- src\editor\menu_file.lua
|
||||
["Expr"] = "Выр.", -- src\editor\debugger.lua
|
||||
["Expression"] = "Выражение", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "Файл '%s' был изменен на диске.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Файл '%s' имеет более позднее время модификации, чем восстановленный '%s'; пожалуйста просмотрите его перед сохранением.", -- src\editor\commands.lua
|
||||
["File '%s' is missing and can't be recovered."] = nil, -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "Файл '%s' больше не существует.", -- src\editor\menu_file.lua, src\editor\editor.lua
|
||||
["File Type"] = "Тип файла", -- src\editor\findreplace.lua
|
||||
["File already exists."] = "Файл уже существует.", -- src\editor\commands.lua
|
||||
@@ -138,9 +142,9 @@ return {
|
||||
["Find &Previous"] = "Найти &ранее", -- src\editor\menu_search.lua
|
||||
["Find In Files"] = "Найти в файлах", -- src\editor\findreplace.lua
|
||||
["Find and replace text in files"] = "Найти и заменить текст в файлах", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Найти и заменить текст", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Найти и заменить текст", -- src\editor\menu_search.lua
|
||||
["Find text in files"] = "Найти текст в файлах", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Найти текст", -- src\editor\gui.lua, src\editor\menu_search.lua
|
||||
["Find text"] = "Найти текст", -- src\editor\menu_search.lua
|
||||
["Find the earlier text occurence"] = "Найти предыдущее вхождение текста", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Найти следующее вхождение текста", -- src\editor\menu_search.lua
|
||||
["Find"] = "Найти", -- src\editor\findreplace.lua
|
||||
@@ -154,8 +158,8 @@ return {
|
||||
["Go To Previous Bookmark"] = "Перейти к предыдущей закладке", -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "Перейти к заданной строке", -- src\editor\menu_search.lua
|
||||
["INS"] = "ВСТ", -- src\editor\editor.lua
|
||||
["Ignored error in debugger initialization code: %s."] = nil, -- src\editor\debugger.lua
|
||||
["In Files"] = "Установки файлов", -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "Перейти к определению функции...", -- src\editor\editor.lua
|
||||
["Known Files"] = "Файлы Lua", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Стр: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Локальная консоль", -- src\editor\gui.lua, src\editor\shellbox.lua
|
||||
@@ -167,13 +171,17 @@ return {
|
||||
["New &File"] = "Новый файл", -- src\editor\filetree.lua
|
||||
["OVR"] = "ЗАМ", -- src\editor\editor.lua
|
||||
["Open With Default Program"] = "Открыть используя программу по умолчанию", -- src\editor\filetree.lua
|
||||
["Open an existing document"] = "Открыть существующий документ", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Open an existing document"] = "Открыть существующий документ", -- src\editor\menu_file.lua
|
||||
["Open file"] = "Открыть файл", -- src\editor\commands.lua
|
||||
["Options"] = "Установки", -- src\editor\findreplace.lua
|
||||
["Output (running)"] = "Вывод (запущен)", -- src\editor\output.lua
|
||||
["Output"] = "Вывод", -- src\editor\gui.lua, src\editor\output.lua, src\editor\settings.lua
|
||||
["Outline Window"] = "Окно структуры", -- src\editor\menu_view.lua
|
||||
["Outline"] = "Структура", -- src\editor\outline.lua
|
||||
["Output (running)"] = "Вывод (запущен)", -- src\editor\debugger.lua, src\editor\output.lua
|
||||
["Output (suspended)"] = "Вывод (приостановлен)", -- src\editor\debugger.lua
|
||||
["Output"] = "Вывод", -- src\editor\debugger.lua, src\editor\output.lua, src\editor\gui.lua, src\editor\settings.lua
|
||||
["Paste text from the clipboard"] = "Вставить текст из буфера обмена", -- src\editor\menu_edit.lua
|
||||
["Preferences"] = "Настройки", -- src\editor\menu_edit.lua
|
||||
["Prepend '!' to force local execution."] = "Укажите '=' в начале выражения для выполнения в локальной консоли", -- src\editor\shellbox.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "Укажите '=' в начале выражения для отображения сложных значений на нескольких строках.", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Нажмите Отмена для завершения.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "Программа '%s' запущена в '%s' (pid: %d).", -- src\editor\output.lua
|
||||
@@ -184,12 +192,13 @@ return {
|
||||
["Program unable to run as '%s'."] = "Программа не может быть запущена как '%s'.", -- src\editor\output.lua
|
||||
["Project Directory"] = "Папка проекта", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Project history"] = "История проектов", -- src\editor\menu_file.lua
|
||||
["Project"] = "Проект", -- src\editor\gui.lua
|
||||
["Project"] = "Проект", -- src\editor\filetree.lua
|
||||
["Project/&FileTree Window"] = "Окно &проекта/списка файлов", -- src\editor\menu_view.lua
|
||||
["Provide command line parameters"] = "Установить параметры командной строки", -- src\editor\menu_project.lua
|
||||
["R/O"] = "R/O", -- src\editor\editor.lua
|
||||
["R/W"] = "R/W", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Замени&ть в файлах", -- src\editor\menu_search.lua
|
||||
["Re-indent selected lines"] = nil, -- src\editor\menu_edit.lua
|
||||
["Recent &Projects"] = "Недавние &проекты", -- src\editor\menu_file.lua
|
||||
["Recent Files"] = "Недавние файлы", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Вернуть последнее отмененное изменение", -- src\editor\menu_edit.lua
|
||||
@@ -198,6 +207,7 @@ return {
|
||||
["Remote console"] = "Удаленная консоль", -- src\editor\shellbox.lua
|
||||
["Rename All Instances"] = "Переименовать все совпадения", -- src\editor\editor.lua
|
||||
["Replace A&ll"] = "Заменить все", -- src\editor\findreplace.lua
|
||||
["Replace All Selections"] = nil, -- src\editor\editor.lua
|
||||
["Replace"] = "Заменить", -- src\editor\findreplace.lua
|
||||
["Replaced an invalid UTF8 character with %s."] = "Некорректный символ UTF8 заменен на %s.", -- src\editor\commands.lua
|
||||
["Replaced"] = "Заменено", -- src\editor\findreplace.lua
|
||||
@@ -209,24 +219,24 @@ return {
|
||||
["Save &As..."] = "Сохранить &как...", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save A&ll"] = "Сохранить &все", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "Сохранить изменения?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Сохранить все открытые документы", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save all open documents"] = "Сохранить все открытые документы", -- src\editor\menu_file.lua
|
||||
["Save file as"] = "Сохранить файл как", -- src\editor\commands.lua
|
||||
["Save file?"] = "Сохранить файл?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Сохранить текущий документ в файл под новым именем", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Сохранить текущий документ", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Save the current document"] = "Сохранить текущий документ", -- src\editor\menu_file.lua
|
||||
["Saved auto-recover at %s."] = "Сохранено авто-восст в %s.", -- src\editor\commands.lua
|
||||
["Scope"] = "Направление", -- src\editor\findreplace.lua
|
||||
["Scratchpad error"] = "Ошибка в черновике", -- src\editor\debugger.lua
|
||||
["Searching for"] = "Поиск", -- src\editor\findreplace.lua
|
||||
["Sel: %d/%d"] = "Выд: %d/%d", -- src\editor\editor.lua
|
||||
["Select &All"] = "Выделить &все", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["Select &All"] = "Выделить &все", -- src\editor\gui.lua, src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Выделить весь текст в редакторе", -- src\editor\menu_edit.lua
|
||||
["Select and Find Next"] = "Выделить и найти далее", -- src\editor\menu_search.lua
|
||||
["Select and Find Previous"] = "Выделить и найти ранее", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its next occurrence"] = "Выделить слово под курсором и найти далее", -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its previous occurrence"] = "Выделить слово под курсором и найти ранее", -- src\editor\menu_search.lua
|
||||
["Set From Current File"] = "Установить по текущему файлу", -- src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Установить папку проекта по текущему файлу", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Set project directory from current file"] = "Установить папку проекта по текущему файлу", -- src\editor\menu_project.lua
|
||||
["Set the interpreter to be used"] = "Установить используемый интерпретатор", -- src\editor\menu_project.lua
|
||||
["Set the project directory to be used"] = "Установить используемую папку проекта", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Settings: System"] = "Установки: Системы", -- src\editor\menu_edit.lua
|
||||
@@ -237,28 +247,30 @@ return {
|
||||
["Show/Hide the status bar"] = "Показать/спрятать панель состояния", -- src\editor\menu_view.lua
|
||||
["Show/Hide the toolbar"] = "Показать/спрятать панель инструментов", -- src\editor\menu_view.lua
|
||||
["Sort selected lines"] = "Отсортировать выделенные строки", -- src\editor\menu_edit.lua
|
||||
["Stack"] = "Стек", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["Source"] = "Исходный код", -- src\editor\menu_edit.lua
|
||||
["Stack"] = "Стек", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "Начать &отладку", -- src\editor\menu_project.lua
|
||||
["Start or Continue debugging"] = "Начать или продолжить отладку", -- src\editor\gui.lua
|
||||
["Start or continue debugging"] = "Начать или продолжить отладку", -- src\editor\menu_project.lua
|
||||
["Step &Into"] = "&Войти", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "&Следующая строка", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "В&ыйти", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Войти в функцию", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Выйти из текущей функции", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step over"] = "Перейти на следующую строку", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = "Завершить отладку и продолжить текущий процесс", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Завершить текущий процесс", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Step into"] = "Войти в функцию", -- src\editor\menu_project.lua
|
||||
["Step out of the current function"] = "Выйти из текущей функции", -- src\editor\menu_project.lua
|
||||
["Step over"] = "Перейти на следующую строку", -- src\editor\menu_project.lua
|
||||
["Stop debugging and continue running the process"] = "Завершить отладку и продолжить текущий процесс", -- src\editor\menu_project.lua
|
||||
["Stop the currently running process"] = "Завершить текущий процесс", -- src\editor\menu_project.lua
|
||||
["Switch to or from full screen mode"] = "Переключить полноэкранный режим", -- src\editor\menu_view.lua
|
||||
["Text not found."] = "Текст не найден.", -- src\editor\findreplace.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "Файл определений API должен быть расположен внутри папки API.", -- src\editor\autocomplete.lua
|
||||
["Toggle Bookmark"] = "Установить/Снять закладку", -- src\editor\menu_edit.lua
|
||||
["Toggle Break&point"] = "&Точка останова", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "Переключить точку останова", -- src\editor\gui.lua, src\editor\menu_project.lua
|
||||
["Toggle bookmark"] = "Установить/Снять закладку", -- src\editor\menu_edit.lua
|
||||
["Toggle breakpoint"] = "Переключить точку останова", -- src\editor\menu_project.lua
|
||||
["Tr&ace"] = "Т&рассировка", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Отслеживать выполнение, показывая каждую выполненную строку", -- src\editor\menu_project.lua
|
||||
["Unable to create directory '%s'."] = "Ошибка создания папки '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to create file '%s'."] = "Ошибка создания файла '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to delete directory '%s': %s"] = nil, -- src\editor\filetree.lua
|
||||
["Unable to load file '%s'."] = "Ошибка загрузки файла '%s'.", -- src\editor\commands.lua
|
||||
["Unable to rename file '%s'."] = "Ошибка переименования файла '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to save file '%s': %s"] = "Ошибка сохранения файла '%s': %s", -- src\editor\commands.lua
|
||||
@@ -268,12 +280,12 @@ return {
|
||||
["Use '%s' to show line endings and '%s' to convert them."] = "Используйте '%s' для отображения символов конца строки и '%s' для их преобразования.", -- src\editor\commands.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "Используйте команду 'clear' для очистки содержимого окна и истории.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "Используйте Shift-Enter для многострочного кода.", -- src\editor\shellbox.lua
|
||||
["Value"] = "Значение", -- src\editor\debugger.lua
|
||||
["View the outline window"] = nil, -- src\editor\menu_view.lua
|
||||
["View the output/console window"] = "Показать окно вывода/консоли", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Показать окно проекта/списка файлов", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Показать окно стека", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["View the watch window"] = "Показать окно выражений", -- src\editor\gui.lua, src\editor\menu_view.lua
|
||||
["Watch"] = "Выражение", -- src\editor\debugger.lua, src\editor\gui.lua
|
||||
["View the stack window"] = "Показать окно стека", -- src\editor\menu_view.lua
|
||||
["View the watch window"] = "Показать окно выражений", -- src\editor\menu_view.lua
|
||||
["Watch"] = "Выражение", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Добро пожаловать в интерактивный интерпретатор Lua.", -- src\editor\shellbox.lua
|
||||
["Wrap ar&ound"] = "Продолжить сначала", -- src\editor\findreplace.lua
|
||||
["You must save the program first."] = "Вы должны сначала сохранить программу.", -- src\editor\commands.lua
|
||||
|
||||
@@ -153,3 +153,7 @@ luaspec.keywords[1] = luaspec.keywords[1]:gsub(' return', ''):gsub(' break', '')
|
||||
|
||||
-- assign new style to the added slot (starting from 0)
|
||||
styles["keywords"..num] = {fg = {240, 0, 0}, b = true}
|
||||
|
||||
-- enable `Opt+Shift+Left/Right` shortcut on OSX
|
||||
editor.keymap[#editor.keymap+1] = {wxstc.wxSTC_KEY_LEFT, wxstc.wxSTC_SCMOD_ALT+wxstc.wxSTC_SCMOD_SHIFT, wxstc.wxSTC_CMD_WORDLEFTEXTEND, "Macintosh"}
|
||||
editor.keymap[#editor.keymap+1] = {wxstc.wxSTC_KEY_RIGHT, wxstc.wxSTC_SCMOD_ALT+wxstc.wxSTC_SCMOD_SHIFT, wxstc.wxSTC_CMD_WORDRIGHTENDEXTEND, "Macintosh"}
|
||||
|
||||
@@ -55,12 +55,6 @@ return {
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() if rundebug then wx.wxRemoveFile(file) end end)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function(self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ return {
|
||||
|
||||
if rundebug then
|
||||
-- start running the application right away
|
||||
DebuggerAttachDefault({startwith = file, redirect = mac and "r" or "c",
|
||||
DebuggerAttachDefault({startwith = file, redirect = "r",
|
||||
runstart = ide.config.debugger.runonstart ~= false})
|
||||
|
||||
local function needRefresh(mdbl, mdbc)
|
||||
@@ -79,19 +79,19 @@ return {
|
||||
end
|
||||
end
|
||||
|
||||
local cfg = ide.config.corona or {}
|
||||
local debugopt = mac and "-debug 1 -project " or "-debug "
|
||||
local skin = ide.config.corona and ide.config.corona.skin
|
||||
and (" -skin "..ide.config.corona.skin) or ""
|
||||
local cmd = ('"%s" %s"%s"%s')
|
||||
:format(corona, rundebug and debugopt or "", file, skin)
|
||||
local skin = cfg.skin and (" -skin "..ide.config.corona.skin) or ""
|
||||
local noconsole = win and not cfg.showconsole and "-no-console " or ""
|
||||
local cmd = ('"%s" %s%s"%s"%s')
|
||||
:format(corona, noconsole, rundebug and debugopt or "", file, skin)
|
||||
|
||||
local uhw = ide.config.unhidewindow
|
||||
local cwc = uhw and uhw.ConsoleWindowClass
|
||||
if uhw and cfg.showconsole then uhw.ConsoleWindowClass = 0 end
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function(self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,true,nil,nil,
|
||||
function() if uhw and cfg.showconsole then uhw.ConsoleWindowClass = cwc end end)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
|
||||
@@ -9,7 +9,4 @@ return {
|
||||
|
||||
ShellExecuteFile(wfilename)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -135,12 +135,6 @@ return {
|
||||
end
|
||||
return pid
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function(self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
scratchextloop = true,
|
||||
|
||||
@@ -81,12 +81,6 @@ return {
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() if rundebug then wx.wxRemoveFile(filepath) end end)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function(self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
skipcompile = true,
|
||||
|
||||
@@ -52,9 +52,6 @@ return {
|
||||
wx.wxSetEnv("PATH", path)
|
||||
return pid
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function (self,wfilename)
|
||||
return (not ide.config.lfw or ide.config.lfw.chdirtofile ~= true)
|
||||
and ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
|
||||
@@ -47,12 +47,6 @@ return {
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,true)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function(self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
scratchextloop = true,
|
||||
|
||||
@@ -51,24 +51,32 @@ return {
|
||||
local cmd = '"'..exe..'" '..code..(params and " "..params or "")
|
||||
|
||||
-- modify CPATH to work with other Lua versions
|
||||
local clibs = ('/clibs%s/'):format(version and tostring(version):gsub('%.','') or '')
|
||||
local _, cpath = wx.wxGetEnv("LUA_CPATH")
|
||||
if version and cpath and not cpath:find(clibs, 1, true) then
|
||||
wx.wxSetEnv("LUA_CPATH", cpath:gsub('/clibs/', clibs)) end
|
||||
local envname = "LUA_CPATH"
|
||||
if version then
|
||||
local env = "LUA_CPATH_"..string.gsub(version, '%.', '_')
|
||||
if os.getenv(env) then envname = env end
|
||||
end
|
||||
|
||||
local cpath = os.getenv(envname)
|
||||
if rundebug and cpath and not ide.config.path['lua'..(version or "")] then
|
||||
-- prepend osclibs as the libraries may be needed for debugging,
|
||||
-- but only if no path.lua is set as it may conflict with system libs
|
||||
wx.wxSetEnv(envname, ide.osclibs..';'..cpath)
|
||||
end
|
||||
if version and cpath then
|
||||
local cpath = os.getenv(envname)
|
||||
local clibs = string.format('/clibs%s/', version):gsub('%.','')
|
||||
if not cpath:find(clibs, 1, true) then cpath = cpath:gsub('/clibs/', clibs) end
|
||||
wx.wxSetEnv(envname, cpath)
|
||||
end
|
||||
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
local pid = CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() if rundebug then wx.wxRemoveFile(filepath) end end)
|
||||
|
||||
if version and cpath then wx.wxSetEnv("LUA_CPATH", cpath) end
|
||||
if (rundebug or version) and cpath then wx.wxSetEnv(envname, cpath) end
|
||||
return pid
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function (self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
scratchextloop = false,
|
||||
|
||||
4
interpreters/luadeb53.lua
Normal file
4
interpreters/luadeb53.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
dofile 'interpreters/luabase.lua'
|
||||
local interpreter = MakeLuaInterpreter(5.3, ' 5.3')
|
||||
interpreter.skipcompile = true
|
||||
return interpreter
|
||||
@@ -1,12 +1,13 @@
|
||||
|
||||
return {
|
||||
name = "Luxinia2",
|
||||
description = "Luxinia2",
|
||||
api = {"baselib","glfw","glewgl","assimp20","luxmath","luxscene","luajit2",},
|
||||
api = {"baselib","glfw","glewgl","assimp20","luajit2",},
|
||||
|
||||
frun = function(self,wfilename,rundebug)
|
||||
if not ide.config.path.luxinia2 then wx.wxMessageBox("Please define 'path.luxinia2' in your cfg/user.lua (see estrela.lua for examples)"); return end
|
||||
|
||||
local editorDir = string.gsub(ide.editorFilename:gsub("[^/\\]+$",""),"\\","/")
|
||||
local luxDir = ide.config.path.luxinia2 or os.getenv("LUXINIA2")
|
||||
local luxDir = ide.config.path.luxinia2
|
||||
local scratchpad = rundebug and rundebug:match("scratchpad")
|
||||
local filename = wfilename:GetFullName()
|
||||
|
||||
@@ -63,12 +64,6 @@ return {
|
||||
return CommandLineRun(cmd,wdir,true,true,nil,self:fuid(wfilename))
|
||||
end,
|
||||
fuid = function(self,wfilename) return "luxinia2: luajit "..wfilename:GetFullName() end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function (self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
scratchextloop = true,
|
||||
|
||||
@@ -114,12 +114,6 @@ return {
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,GetPathWithSep(projdir),true,true)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function(self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
}
|
||||
|
||||
@@ -86,12 +86,6 @@ return {
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() if rundebug then wx.wxRemoveFile(file) end end)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function(self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
scratchextloop = true,
|
||||
|
||||
@@ -222,11 +222,11 @@ end
|
||||
|
||||
-- same as above but with special treatment when reading chunks,
|
||||
-- unblocks on any data received.
|
||||
function copas.receivePartial(client, pattern)
|
||||
local s, err, part
|
||||
function copas.receivePartial(client, pattern, part)
|
||||
local s, err
|
||||
pattern = pattern or "*l"
|
||||
repeat
|
||||
s, err, part = client:receive(pattern)
|
||||
s, err, part = client:receive(pattern, part)
|
||||
if s or ( (type(pattern)=="number") and part~="" and part ~=nil ) or
|
||||
err ~= "timeout" then
|
||||
_reading_log[client] = nil
|
||||
@@ -310,11 +310,11 @@ local _skt_mt = {__index = {
|
||||
return copas.send (self.socket, data, from, to)
|
||||
end,
|
||||
|
||||
receive = function (self, pattern)
|
||||
receive = function (self, pattern, prefix)
|
||||
if (self.timeout==0) then
|
||||
return copas.receivePartial(self.socket, pattern)
|
||||
return copas.receivePartial(self.socket, pattern, prefix)
|
||||
end
|
||||
return copas.receive(self.socket, pattern)
|
||||
return copas.receive(self.socket, pattern, prefix)
|
||||
end,
|
||||
|
||||
flush = function (self)
|
||||
@@ -323,8 +323,12 @@ local _skt_mt = {__index = {
|
||||
|
||||
settimeout = function (self,time)
|
||||
self.timeout=time
|
||||
return
|
||||
return true
|
||||
end,
|
||||
|
||||
skip = function(self, ...) return self.socket:skip(...) end,
|
||||
|
||||
close = function(self, ...) return self.socket:close(...) end,
|
||||
}}
|
||||
|
||||
-- wraps a UDP socket, copy of TCP one adapted for UDP.
|
||||
@@ -352,7 +356,7 @@ local _skt_mt_udp = {__index = {
|
||||
|
||||
settimeout = function (self,time)
|
||||
self.timeout=time
|
||||
return
|
||||
return true
|
||||
end,
|
||||
}}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
local PARSE = {}
|
||||
|
||||
local unpack = table.unpack or unpack
|
||||
local LEX = require 'lua_lexer_loose'
|
||||
|
||||
local function warn(message, position)
|
||||
@@ -31,6 +32,7 @@ end
|
||||
'Scope', opt - beginning of scope block.
|
||||
'EndScope', nil, lineinfo - end of scope block.
|
||||
'FunctionCall', name, lineinfo - function call (in addition to other events).
|
||||
'Function', name, lineinfo - function definition.
|
||||
--]]
|
||||
function PARSE.parse_scope(lx, f, level)
|
||||
local cprev = {tag='Eof'}
|
||||
@@ -39,36 +41,50 @@ function PARSE.parse_scope(lx, f, level)
|
||||
local scopes = {{}}
|
||||
for l = 2, (level or 1) do scopes[l] = {} end
|
||||
|
||||
local function scope_begin(opt, lineinfo)
|
||||
local function scope_begin(opt, lineinfo, nobreak)
|
||||
scopes[#scopes+1] = {}
|
||||
f('Scope', opt, lineinfo)
|
||||
f('Scope', opt, lineinfo, nobreak)
|
||||
end
|
||||
local function scope_end(opt, lineinfo)
|
||||
if #scopes <= 1 then
|
||||
local scope = #scopes
|
||||
if scope <= 1 then
|
||||
warn("'end' without opening block", lineinfo)
|
||||
else
|
||||
table.remove(scopes)
|
||||
end
|
||||
f('EndScope', opt, lineinfo)
|
||||
local inside_local = false
|
||||
for scope = scope-1, 1, -1 do
|
||||
if scopes[scope].inside_local then inside_local = true; break end
|
||||
end
|
||||
f('EndScope', opt, lineinfo, inside_local)
|
||||
end
|
||||
|
||||
local function parse_function_list(has_self)
|
||||
local function parse_function_list(has_self, name, pos)
|
||||
local c = lx:next(); assert(c[1] == '(')
|
||||
f('Statement', c[1], c.lineinfo) -- generate Statement for function definition
|
||||
scope_begin(c[1], c.lineinfo)
|
||||
f('Statement', c[1], c.lineinfo, true) -- generate Statement for function definition
|
||||
scope_begin(c[1], c.lineinfo, true)
|
||||
|
||||
local vars = {} -- accumulate vars (if any) to send after 'Function'
|
||||
if has_self then
|
||||
local lineinfo = c.lineinfo+1 -- zero size
|
||||
f('VarSelf', 'self', lineinfo)
|
||||
table.insert(vars, {'VarSelf', 'self', lineinfo, true})
|
||||
end
|
||||
while lx:peek().tag == 'Id' do
|
||||
while true do
|
||||
local n = lx:peek()
|
||||
if not (n.tag == 'Id' or n.tag == 'Keyword' and n[1] == '...') then break end
|
||||
local c = lx:next()
|
||||
f('Var', c[1], c.lineinfo)
|
||||
if c.tag == 'Id' then table.insert(vars, {'Var', c[1], c.lineinfo, true}) end
|
||||
-- ignore '...' in this case
|
||||
if lx:peek()[1] == ',' then lx:next() end
|
||||
end
|
||||
if lx:peek()[1] == ')' then lx:next() end
|
||||
if lx:peek()[1] == ')' then
|
||||
lx:next()
|
||||
f('Function', name, pos or c.lineinfo, true)
|
||||
end
|
||||
for _, var in ipairs(vars) do f(unpack(var)) end
|
||||
end
|
||||
|
||||
while 1 do
|
||||
while true do
|
||||
local c = lx:next()
|
||||
|
||||
-- Detect end of previous statement
|
||||
@@ -87,7 +103,10 @@ function PARSE.parse_scope(lx, f, level)
|
||||
cprev.tag == 'Number' or cprev.tag == 'String')
|
||||
then
|
||||
if scopes[#scopes].inside_until then scope_end(nil, c.lineinfo) end
|
||||
f('Statement', c[1], c.lineinfo)
|
||||
local scope = #scopes
|
||||
if not scopes[scope].inside_table then scopes[scope].inside_local = nil end
|
||||
f('Statement', c[1], c.lineinfo,
|
||||
scopes[scope].inside_local or c[1] == 'local' or c[1] == 'function' or c[1] == 'end')
|
||||
end
|
||||
|
||||
if c.tag == 'Eof' then break end
|
||||
@@ -100,41 +119,45 @@ function PARSE.parse_scope(lx, f, level)
|
||||
local c = lx:next(); assert(c[1] == 'function')
|
||||
if lx:peek().tag == 'Id' then
|
||||
c = lx:next()
|
||||
f('Var', c[1], c.lineinfo)
|
||||
if lx:peek()[1] == '(' then parse_function_list() end
|
||||
f('Var', c[1], c.lineinfo, true)
|
||||
if lx:peek()[1] == '(' then parse_function_list(nil, c[1], c.lineinfo) end
|
||||
end
|
||||
elseif c[1] == 'function' then
|
||||
if lx:peek()[1] == '(' then -- inline function
|
||||
parse_function_list()
|
||||
elseif lx:peek().tag == 'Id' then -- function definition statement
|
||||
c = lx:next(); assert(c.tag == 'Id')
|
||||
f('Id', c[1], c.lineinfo)
|
||||
local name = c[1]
|
||||
local pos = c.lineinfo
|
||||
f('Id', name, pos, true)
|
||||
local has_self
|
||||
while lx:peek()[1] ~= '(' and lx:peek().tag ~= 'Eof' do
|
||||
c = lx:next()
|
||||
name = name .. c[1]
|
||||
if c.tag == 'Id' then
|
||||
f('String', c[1], c.lineinfo)
|
||||
f('String', c[1], c.lineinfo, true)
|
||||
elseif c.tag == 'Keyword' and c[1] == ':' then
|
||||
has_self = true
|
||||
end
|
||||
end
|
||||
if lx:peek()[1] == '(' then parse_function_list(has_self) end
|
||||
if lx:peek()[1] == '(' then parse_function_list(has_self, name, pos) end
|
||||
end
|
||||
elseif c[1] == 'local' and lx:peek().tag == 'Id' then
|
||||
scopes[#scopes].inside_local = true
|
||||
c = lx:next()
|
||||
f('VarNext', c[1], c.lineinfo)
|
||||
f('VarNext', c[1], c.lineinfo, true)
|
||||
while lx:peek().tag == 'Keyword' and lx:peek()[1] == ',' do
|
||||
c = lx:next(); if lx:peek().tag ~= 'Id' then break end
|
||||
c = lx:next()
|
||||
f('VarNext', c[1], c.lineinfo)
|
||||
f('VarNext', c[1], c.lineinfo, true)
|
||||
end
|
||||
elseif c[1] == 'for' and lx:peek().tag == 'Id' then
|
||||
c = lx:next()
|
||||
f('VarInside', c[1], c.lineinfo)
|
||||
f('VarInside', c[1], c.lineinfo, true)
|
||||
while lx:peek().tag == 'Keyword' and lx:peek()[1] == ',' do
|
||||
c = lx:next(); if lx:peek().tag ~= 'Id' then break end
|
||||
c = lx:next()
|
||||
f('VarInside', c[1], c.lineinfo)
|
||||
f('VarInside', c[1], c.lineinfo, true)
|
||||
end
|
||||
elseif c[1] == 'do' then
|
||||
scope_begin('do', c.lineinfo)
|
||||
@@ -159,15 +182,18 @@ function PARSE.parse_scope(lx, f, level)
|
||||
local cnext = lx:peek()
|
||||
if cnext.tag == 'Keyword' and (cnext[1] == '(' or cnext[1] == '{')
|
||||
or cnext.tag == 'String' then
|
||||
f('FunctionCall', c[1], c.lineinfo)
|
||||
f('FunctionCall', c[1], c.lineinfo, scopes[#scopes].inside_local ~= nil)
|
||||
end
|
||||
if scopes[#scopes].inside_table and cnext.tag == 'Keyword' and cnext[1] == '=' then
|
||||
local scope = #scopes
|
||||
local inside_local = scopes[scope].inside_local ~= nil
|
||||
if (scopes[scope].inside_table or cprev[1] == ',')
|
||||
and cnext.tag == 'Keyword' and cnext[1] == '=' then
|
||||
-- table field
|
||||
f('String', c[1], c.lineinfo)
|
||||
f('String', c[1], c.lineinfo, inside_local)
|
||||
elseif cprev.tag == 'Keyword' and (cprev[1] == ':' or cprev[1] == '.') then
|
||||
f('String', c[1], c.lineinfo)
|
||||
f('String', c[1], c.lineinfo, inside_local)
|
||||
else
|
||||
f('Id', c[1], c.lineinfo)
|
||||
f('Id', c[1], c.lineinfo, inside_local)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -203,7 +229,7 @@ function PARSE.parse_scope_resolve(lx, f, vars)
|
||||
vars = vars or newscope({[0] = 0}, nil, 1)
|
||||
vars[NEXT] = false -- vars that come into scope upon next statement
|
||||
vars[INSIDE] = false -- vars that come into scope upon entering block
|
||||
PARSE.parse_scope(lx, function(op, name, lineinfo)
|
||||
PARSE.parse_scope(lx, function(op, name, lineinfo, nobreak)
|
||||
-- in some (rare) cases VarNext can follow Statement event (which copies
|
||||
-- vars[NEXT]). This may cause vars[0] to be `nil`, so default to 1.
|
||||
local var = op:find("^Var") and
|
||||
@@ -226,9 +252,8 @@ function PARSE.parse_scope_resolve(lx, f, vars)
|
||||
else
|
||||
vars = mt.__index
|
||||
end
|
||||
elseif op == 'Id' then
|
||||
-- Just make callback
|
||||
elseif op == 'String' or op == 'FunctionCall' then
|
||||
elseif op == 'Id'
|
||||
or op == 'String' or op == 'FunctionCall' or op == 'Function' then
|
||||
-- Just make callback
|
||||
elseif op == 'Statement' then -- beginning of statement
|
||||
-- Apply vars that come into scope upon beginning of statement.
|
||||
@@ -240,7 +265,7 @@ function PARSE.parse_scope_resolve(lx, f, vars)
|
||||
else
|
||||
assert(false)
|
||||
end
|
||||
f(op, name, lineinfo, vars)
|
||||
f(op, name, lineinfo, vars, nobreak)
|
||||
end, vars[0])
|
||||
end
|
||||
|
||||
|
||||
@@ -365,14 +365,14 @@ function M.get_keywords(ast, src)
|
||||
-- Get position range [fpos,lpos] between subsequent children.
|
||||
local fpos
|
||||
if i == 0 then -- before first child
|
||||
fpos = tostring(ast.lineinfo.first):match('|L(%d+)')
|
||||
fpos = tonumber(tostring(ast.lineinfo.first):match('|L(%d+)'))
|
||||
else
|
||||
local last = oast[i].lineinfo.last; local c = last.comments
|
||||
fpos = (c and #c > 0 and c[#c][3] or tostring(last):match('|L(%d+)')) + 1
|
||||
end
|
||||
local lpos
|
||||
if j == #ast+1 then -- after last child
|
||||
lpos = tostring(ast.lineinfo.last):match('|L(%d+)')
|
||||
lpos = tonumber(tostring(ast.lineinfo.last):match('|L(%d+)'))
|
||||
else
|
||||
local first = oast[j].lineinfo.first; local c = first.comments
|
||||
lpos = (c and #c > 0 and c[1][2] or tostring(first):match('|L(%d+)')) - 1
|
||||
@@ -388,7 +388,6 @@ function M.get_keywords(ast, src)
|
||||
if mfpos then
|
||||
local mlpos = mlppos-1
|
||||
if mlpos > lpos then mlpos = lpos end
|
||||
--DEBUG('look', ast.tag, #ast,i,j,'*', mfpos, tok, mlppos, fpos, lpos, src:sub(fpos, fpos+5))
|
||||
if mlpos >= mfpos then
|
||||
list[#list+1] = mfpos
|
||||
list[#list+1] = mlpos
|
||||
@@ -424,7 +423,9 @@ function M.ast_to_tokenlist(top_ast, src)
|
||||
if isterminal[ast.tag] then -- Extract terminal
|
||||
local token = ast
|
||||
if ast.lineinfo then
|
||||
token.fpos, token.lpos, token.ast = tostring(ast.lineinfo.first):match('|L(%d+)'), tostring(ast.lineinfo.last):match('|L(%d+)'), ast
|
||||
token.fpos = tonumber(tostring(ast.lineinfo.first):match('|L(%d+)'))
|
||||
token.lpos = tonumber(tostring(ast.lineinfo.last):match('|L(%d+)'))
|
||||
token.ast = ast
|
||||
table.insert(tokens, token)
|
||||
end
|
||||
else -- Extract non-terminal
|
||||
@@ -443,7 +444,9 @@ function M.ast_to_tokenlist(top_ast, src)
|
||||
if not isseen[comment] then
|
||||
comment.tag = 'Comment'
|
||||
local token = comment
|
||||
token.fpos, token.lpos, token.ast = comment[2], comment[3], comment
|
||||
token.fpos = tonumber(tostring(comment.lineinfo.first):match('|L(%d+)'))
|
||||
token.lpos = tonumber(tostring(comment.lineinfo.last):match('|L(%d+)'))
|
||||
token.ast = comment
|
||||
table.insert(tokens, token)
|
||||
isseen[comment] = true
|
||||
end
|
||||
|
||||
@@ -330,7 +330,7 @@ function M.related_keywords(ast, top_ast, tokenlist, src)
|
||||
end
|
||||
elseif grand_ast.tag == 'Localrec' then
|
||||
local tidx = LA.ast_idx_range_in_tokenlist(tokenlist, grand_ast)
|
||||
repeat tidx = tidx + 1 until tokenlist[tidx].tag == 'Keyword' and tokenlist[tidx][1] == 'function'
|
||||
repeat tidx = tidx + 1 until not tokenlist[tidx] or (tokenlist[tidx].tag == 'Keyword' and tokenlist[tidx][1] == 'function')
|
||||
local token = tokenlist[tidx]
|
||||
keywords[#keywords+1] = token
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--
|
||||
-- MobDebug 0.564
|
||||
-- MobDebug -- Lua remote debugger
|
||||
-- Copyright 2011-14 Paul Kulchenko
|
||||
-- Based on RemDebug 1.0 Copyright Kepler Project 2005
|
||||
--
|
||||
@@ -10,6 +10,7 @@ local io = io or require "io"
|
||||
local table = table or require "table"
|
||||
local string = string or require "string"
|
||||
local coroutine = coroutine or require "coroutine"
|
||||
local debug = require "debug"
|
||||
-- protect require "os" as it may fail on embedded systems without os module
|
||||
local os = os or (function(module)
|
||||
local ok, res = pcall(require, module)
|
||||
@@ -18,12 +19,13 @@ end)("os")
|
||||
|
||||
local mobdebug = {
|
||||
_NAME = "mobdebug",
|
||||
_VERSION = 0.564,
|
||||
_VERSION = 0.607,
|
||||
_COPYRIGHT = "Paul Kulchenko",
|
||||
_DESCRIPTION = "Mobile Remote Debugger for the Lua programming language",
|
||||
port = os and os.getenv and tonumber((os.getenv("MOBDEBUG_PORT"))) or 8172,
|
||||
checkcount = 200,
|
||||
yieldtimeout = 0.02,
|
||||
yieldtimeout = 0.02, -- yield timeout (s)
|
||||
connecttimeout = 2, -- connect timeout (s)
|
||||
}
|
||||
|
||||
local error = error
|
||||
@@ -95,7 +97,6 @@ local iscasepreserving = win or (mac and io.open('/library') ~= nil)
|
||||
if jit and jit.off then jit.off() end
|
||||
|
||||
local socket = require "socket"
|
||||
local debug = require "debug"
|
||||
local coro_debugger
|
||||
local coro_debugee
|
||||
local coroutines = {}; setmetatable(coroutines, {__mode = "k"}) -- "weak" keys
|
||||
@@ -640,7 +641,8 @@ local function debug_hook(event, line)
|
||||
-- need to recheck once more as resume after 'stack' command may
|
||||
-- return something else (for example, 'exit'), which needs to be handled
|
||||
if status and res and res ~= 'stack' then
|
||||
if abort == nil and res == "exit" then os.exit(1, true); return end
|
||||
if not abort and res == "exit" then os.exit(1, true); return end
|
||||
if not abort and res == "done" then mobdebug.done(); return end
|
||||
abort = res
|
||||
-- only abort if safe; if not, there is another (earlier) check inside
|
||||
-- debug_hook, which will abort execution at the first safe opportunity
|
||||
@@ -671,7 +673,7 @@ local function stringify_results(status, ...)
|
||||
end
|
||||
|
||||
local function isrunning()
|
||||
return coro_debugger and corostatus(coro_debugger) == 'suspended'
|
||||
return coro_debugger and (corostatus(coro_debugger) == 'suspended' or corostatus(coro_debugger) == 'running')
|
||||
end
|
||||
|
||||
-- this is a function that removes all hooks and closes the socket to
|
||||
@@ -731,7 +733,7 @@ local function debugger_loop(sev, svars, sfile, sline)
|
||||
elseif mobdebug.yield then mobdebug.yield()
|
||||
end
|
||||
elseif not line and err == "closed" then
|
||||
error("Debugger connection unexpectedly closed", 0)
|
||||
error("Debugger connection closed", 0)
|
||||
else
|
||||
-- if there is something in the pending buffer, prepend it to the line
|
||||
if buf then line = buf .. line; buf = nil end
|
||||
@@ -906,7 +908,7 @@ local function debugger_loop(sev, svars, sfile, sline)
|
||||
-- do nothing; it already fulfilled its role
|
||||
elseif command == "DONE" then
|
||||
server:send("200 OK\n")
|
||||
done()
|
||||
coroyield("done")
|
||||
return -- done with all the debugging
|
||||
elseif command == "STACK" then
|
||||
-- first check if we can execute the stack command
|
||||
@@ -963,7 +965,15 @@ local function debugger_loop(sev, svars, sfile, sline)
|
||||
end
|
||||
|
||||
local function connect(controller_host, controller_port)
|
||||
return (socket.connect4 or socket.connect)(controller_host, controller_port)
|
||||
local sock, err = socket.tcp()
|
||||
if not sock then return nil, err end
|
||||
|
||||
if sock.settimeout then sock:settimeout(mobdebug.connecttimeout) end
|
||||
local res, err = sock:connect(controller_host, controller_port)
|
||||
if sock.settimeout then sock:settimeout() end
|
||||
|
||||
if not res then return nil, err end
|
||||
return sock
|
||||
end
|
||||
|
||||
local lasthost, lastport
|
||||
@@ -980,7 +990,7 @@ local function start(controller_host, controller_port)
|
||||
controller_port = lastport or mobdebug.port
|
||||
|
||||
local err
|
||||
server, err = (socket.connect4 or socket.connect)(controller_host, controller_port)
|
||||
server, err = mobdebug.connect(controller_host, controller_port)
|
||||
if server then
|
||||
-- correct stack depth which already has some calls on it
|
||||
-- so it doesn't go into negative when those calls return
|
||||
@@ -1034,7 +1044,7 @@ local function controller(controller_host, controller_port, scratchpad)
|
||||
|
||||
local exitonerror = not scratchpad
|
||||
local err
|
||||
server, err = (socket.connect4 or socket.connect)(controller_host, controller_port)
|
||||
server, err = mobdebug.connect(controller_host, controller_port)
|
||||
if server then
|
||||
local function report(trace, err)
|
||||
local msg = err .. "\n" .. trace
|
||||
@@ -1067,6 +1077,8 @@ local function controller(controller_host, controller_port, scratchpad)
|
||||
-- err is not necessarily a string, so convert to string to report
|
||||
report(debug.traceback(coro_debugee), tostring(err))
|
||||
if exitonerror then break end
|
||||
-- check if the debugging is done (coro_debugger is nil)
|
||||
if not coro_debugger then break end
|
||||
-- resume once more to clear the response the debugger wants to send
|
||||
-- need to use capture_vars(2) as three would be the level of
|
||||
-- the caller for controller(), but because of the tail call,
|
||||
@@ -1199,7 +1211,7 @@ local function handle(params, client, options)
|
||||
if client:receive() ~= "200 OK" then
|
||||
print("Unknown error")
|
||||
os.exit(1, true)
|
||||
return nil, nil, "Debugger error: unexpected response after 'done'"
|
||||
return nil, nil, "Debugger error: unexpected response after DONE"
|
||||
end
|
||||
elseif command == "setb" or command == "asetb" then
|
||||
_, _, _, file, line = string.find(params, "^([a-z]+)%s+(.-)%s+(%d+)%s*$")
|
||||
@@ -1451,7 +1463,11 @@ local function handle(params, client, options)
|
||||
basedir = dir
|
||||
|
||||
client:send("BASEDIR "..(remdir or dir).."\n")
|
||||
local resp = client:receive()
|
||||
local resp, err = client:receive()
|
||||
if not resp then
|
||||
print("Unknown error: "..err)
|
||||
return nil, nil, "Debugger connection closed"
|
||||
end
|
||||
local _, _, status = string.find(resp, "^(%d+)%s+%w+%s*$")
|
||||
if status == "200" then
|
||||
print("New base directory is " .. basedir)
|
||||
|
||||
@@ -30,6 +30,9 @@ local events = {
|
||||
onEditorKeyDown = function(self, editor, event) end, -- return false
|
||||
onEditorCharAdded = function(self, editor, event) end, -- return false
|
||||
onEditorUserlistSelection = function(self, editor, event) end, -- return false
|
||||
onEditorUpdateUI = function(self, editor, event) end, -- return false
|
||||
onEditorPainted = function(self, editor, event) end, -- return false
|
||||
onEditorCallTip = function(self, editor, tip, value, eval) end, -- return false
|
||||
onFiletreeActivate = function(self, tree, event, item) end, -- return false
|
||||
onFiletreeLDown = function(self, tree, event, item) end,
|
||||
onFiletreeRDown = function(self, tree, event, item) end,
|
||||
@@ -41,6 +44,7 @@ local events = {
|
||||
onProjectClose = function(self, project) end,
|
||||
onInterpreterLoad = function(self, interpreter) end,
|
||||
onInterpreterClose = function(self, interpreter) end,
|
||||
onIdle = function(self, event) end,
|
||||
onIdleOnce = function(self, event) end,
|
||||
onAppFocusLost = function(self, app) end,
|
||||
onAppFocusSet = function(self, app) end,
|
||||
|
||||
32
spec/cbase.lua
Normal file
32
spec/cbase.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
function CMarkSymbols(code, pos, vars)
|
||||
local idtmpl = "[A-Za-z_][A-Za-z0-9_ ]*"
|
||||
local funcdeftmpl = "("..idtmpl.."%s+%*?"..idtmpl..")%s*%(([A-Za-z0-9_ %*,]*)%)%s*%{"
|
||||
local isfndef = function(str, pos)
|
||||
local s,e,pref,cap
|
||||
while true do
|
||||
s,e,pref,cap,parms = str:find("([\r\n]%s*)"..funcdeftmpl, pos)
|
||||
if (not s) then
|
||||
s,e,pref,cap,parms = str:find("^(%s*)"..funcdeftmpl, pos)
|
||||
end
|
||||
if parms and #parms > 0 and not parms:find(idtmpl) then
|
||||
pos = s+#pref+#cap+#parms
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
if s then return s+#pref,s+#pref+#cap-1,cap end
|
||||
end
|
||||
|
||||
return coroutine.wrap(function()
|
||||
-- return a dummy token to produce faster result for quick typing
|
||||
coroutine.yield("String", "dummy", 1, {})
|
||||
while true do
|
||||
local fpos, lpos, name = isfndef(code, pos)
|
||||
if not fpos then return end
|
||||
coroutine.yield("Function", name, fpos, {}, 1)
|
||||
pos = fpos + #name
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return nil -- not a real spec
|
||||
11
spec/cg.lua
11
spec/cg.lua
@@ -3,6 +3,7 @@
|
||||
|
||||
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*"
|
||||
|
||||
if not CMarkSymbols then dofile "spec/cbase.lua" end
|
||||
return {
|
||||
exts = {"cg","cgh","cgfx","cgfxh",},
|
||||
lexer = wxstc.wxSTC_LEX_CPP,
|
||||
@@ -14,15 +15,7 @@ return {
|
||||
return string.find(str, funccall .. "%(")
|
||||
end,
|
||||
|
||||
isfndef = function(str)
|
||||
local l
|
||||
local s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+%s*%(.+%))")
|
||||
if (not s) then
|
||||
s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+)%s*%(")
|
||||
end
|
||||
if (cap and (string.find(cap,"^return") or string.find(cap,"else"))) then return end
|
||||
return s,e,cap,l
|
||||
end,
|
||||
marksymbols = CMarkSymbols,
|
||||
|
||||
lexerstyleconvert = {
|
||||
text = {wxstc.wxSTC_C_IDENTIFIER,},
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*"
|
||||
|
||||
if not CMarkSymbols then dofile "spec/cbase.lua" end
|
||||
return {
|
||||
exts = {"cpp", "c", "hpp", "h"},
|
||||
lexer = wxstc.wxSTC_LEX_CPP,
|
||||
@@ -14,6 +15,8 @@ return {
|
||||
return string.find(str, funccall .. "%(")
|
||||
end,
|
||||
|
||||
marksymbols = CMarkSymbols,
|
||||
|
||||
lexerstyleconvert = {
|
||||
text = {wxstc.wxSTC_C_IDENTIFIER,},
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*"
|
||||
|
||||
if not CMarkSymbols then dofile "spec/cbase.lua" end
|
||||
return {
|
||||
exts = {"glsl","vert","frag","geom","cont","eval", "glslv", "glslf"},
|
||||
lexer = wxstc.wxSTC_LEX_CPP,
|
||||
@@ -14,15 +15,7 @@ return {
|
||||
return string.find(str, funccall .. "%(")
|
||||
end,
|
||||
|
||||
isfndef = function(str)
|
||||
local l
|
||||
local s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+%s*%(.+%))")
|
||||
if (not s) then
|
||||
s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+)%s*%(")
|
||||
end
|
||||
if (cap and (string.find(cap,"^return") or string.find(cap,"else"))) then return end
|
||||
return s,e,cap,l
|
||||
end,
|
||||
marksymbols = CMarkSymbols,
|
||||
|
||||
lexerstyleconvert = {
|
||||
text = {wxstc.wxSTC_C_IDENTIFIER,},
|
||||
@@ -90,6 +83,7 @@ return {
|
||||
local_size_x local_size_y local_size_z
|
||||
gl_BaseVertexARB gl_BaseInstanceARB gl_DrawIDARB
|
||||
bindless_sampler bound_sampler bindless_image bound_image early_fragment_tests
|
||||
gl_HelperInvocation gl_CullDistance
|
||||
|
||||
coherent volatile restrict readonly writeonly
|
||||
image1D image2D image3D image2DRect imageCube imageBuffer image1DArray image2DArray imageCubeArray image2DMS image2DMSArray
|
||||
@@ -120,16 +114,17 @@ return {
|
||||
uaddCarry usubBorrow umulExtended imulExtended
|
||||
bitfeldExtract bitfieldInsert bitfeldReverse bitCount
|
||||
findLSB findMSB
|
||||
dFdx dFdy fwidth
|
||||
dFdx dFdy fwidth dFdxFine dFdyFine fwidthFine dFdxCoarse dFdyCoarse fwidthCoarse
|
||||
interpolateAtCentroid interpolateAtSample interpolateAtOffset
|
||||
noise1 noise2 noise3 noise4
|
||||
EmitStreamVertex EndStreamPrimitive EmitVertex EndPrimitive
|
||||
barrier
|
||||
textureSize textureQueryLod texture textureOffset textureProj
|
||||
textureSize textureSamples textureQueryLod texture textureOffset textureProj
|
||||
textureLod textureProjOffset textureLodOffset
|
||||
texelFetchOffset texelFetch textureProjLod textureProjLodOffset
|
||||
textureGrad textureGradOffset textureProjGrad textureProjGradOffset
|
||||
textureGather textureGatherOffset
|
||||
|
||||
texture2D texture1D texture3D textureCube texture2DRect
|
||||
texture1DProj texture1DLod texture1DProjLod
|
||||
texture2DProj texture2DLod texture2DProjLod
|
||||
@@ -158,7 +153,7 @@ return {
|
||||
imageAtomicAdd imageAtomicMin imageAtomicMax
|
||||
imageAtomicIncWrap imageAtomicDecWrap imageAtomicAnd
|
||||
imageAtomicOr imageAtomixXor imageAtomicExchange
|
||||
imageAtomicCompSwap imageSize
|
||||
imageAtomicCompSwap imageSize imageSamples
|
||||
|
||||
memoryBarrier groupMemoryBarrier memoryBarrierAtomicCounter memoryBarrierShared memoryBarrierBuffer memoryBarrierImage
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*"
|
||||
|
||||
if not CMarkSymbols then dofile "spec/cbase.lua" end
|
||||
return {
|
||||
exts = {"hlsl","fx","fxh","usf",},
|
||||
lexer = wxstc.wxSTC_LEX_CPP,
|
||||
@@ -14,15 +15,7 @@ return {
|
||||
return string.find(str, funccall .. "%(")
|
||||
end,
|
||||
|
||||
isfndef = function(str)
|
||||
local l
|
||||
local s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+%s*%(.+%))")
|
||||
if (not s) then
|
||||
s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+)%s*%(")
|
||||
end
|
||||
if (cap and (string.find(cap,"^return") or string.find(cap,"else"))) then return end
|
||||
return s,e,cap,l
|
||||
end,
|
||||
marksymbols = CMarkSymbols,
|
||||
|
||||
lexerstyleconvert = {
|
||||
text = {wxstc.wxSTC_C_IDENTIFIER,},
|
||||
|
||||
41
spec/lua.lua
41
spec/lua.lua
@@ -2,12 +2,11 @@
|
||||
---------------------------------------------------------
|
||||
|
||||
local funcdef = "([A-Za-z_][A-Za-z0-9_%.%:]*)%s*"
|
||||
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*"
|
||||
local decindent = {
|
||||
['else'] = true, ['elseif'] = true, ['end'] = true}
|
||||
['else'] = true, ['elseif'] = true, ['until'] = true, ['end'] = true}
|
||||
local incindent = {
|
||||
['else'] = true, ['elseif'] = true, ['for'] = true, ['do'] = true,
|
||||
['if'] = true, ['repeat'] = true, ['until'] = true, ['while'] = true}
|
||||
['if'] = true, ['repeat'] = true, ['while'] = true}
|
||||
local function isfndef(str)
|
||||
local l
|
||||
local s,e,cap,par = string.find(str, "function%s+" .. funcdef .. "(%(.-%))")
|
||||
@@ -25,7 +24,6 @@ local function isfndef(str)
|
||||
end
|
||||
return s,e,cap,l
|
||||
end
|
||||
|
||||
local q = EscapeMagic
|
||||
|
||||
return {
|
||||
@@ -34,30 +32,30 @@ return {
|
||||
apitype = "lua",
|
||||
linecomment = "--",
|
||||
sep = ".:",
|
||||
isfncall = function(str)
|
||||
return string.find(str, funccall .. "[%({'\"]")
|
||||
end,
|
||||
isfndef = isfndef,
|
||||
isdecindent = function(str)
|
||||
str = str:gsub('%-%-%[=*%[.*%]=*%]',''):gsub('%-%-.*','')
|
||||
-- this handles three different cases:
|
||||
local term = (str:match("^%s*(%w+)%s*$")
|
||||
or str:match("^%s*(elseif)[%s%(]")
|
||||
or str:match("^%s*(until)[%s%(]")
|
||||
or str:match("^%s*(else)%f[%W]")
|
||||
)
|
||||
-- (1) 'end', 'elseif', 'else'
|
||||
-- (1) 'end', 'elseif', 'else', 'until'
|
||||
local match = term and decindent[term]
|
||||
-- (2) 'end)', 'end}', 'end,', and 'end;'
|
||||
if not term then term, match = str:match("^%s*(end)%s*([%)%}]*)%s*[,;]?") end
|
||||
-- endFoo could be captured as well; filter it out
|
||||
if term and str:match("^%s*(end)%w") then term = nil end
|
||||
-- (3) '},', '};', '),' and ');'
|
||||
if not term then match = str:match("^%s*[%)%}]+%s*[,;]?%s*$") end
|
||||
|
||||
return match and 1 or 0, match and term and 1 or 0
|
||||
end,
|
||||
isincindent = function(str)
|
||||
str = (str:gsub('%-%-%[=*%[.*%]=*%]',''):gsub('%-%-.*','')
|
||||
str = (str:gsub('%-%-%[=*%[.*%]=*%]','')
|
||||
:gsub("'.-\\'","'"):gsub("'.-'","")
|
||||
:gsub('".-\\"','"'):gsub('".-"','')
|
||||
:gsub('%-%-.*','') -- strip comments after strings are processed
|
||||
:gsub("%b()","()") -- remove all function calls
|
||||
)
|
||||
local term = str:match("^%s*(%w+)%W*")
|
||||
@@ -82,14 +80,15 @@ return {
|
||||
|
||||
return opened - closed + func + terminc - ended
|
||||
end,
|
||||
markvars = function(code, pos, vars)
|
||||
marksymbols = function(code, pos, vars)
|
||||
local PARSE = require 'lua_parser_loose'
|
||||
local LEX = require 'lua_lexer_loose'
|
||||
local lx = LEX.lexc(code, nil, pos)
|
||||
return coroutine.wrap(function()
|
||||
local varnext = {}
|
||||
PARSE.parse_scope_resolve(lx, function(op, name, lineinfo, vars)
|
||||
PARSE.parse_scope_resolve(lx, function(op, name, lineinfo, vars, nobreak)
|
||||
if not(op == 'Id' or op == 'Statement' or op == 'Var'
|
||||
or op == 'Function' or op == 'String'
|
||||
or op == 'VarNext' or op == 'VarInside' or op == 'VarSelf'
|
||||
or op == 'FunctionCall' or op == 'Scope' or op == 'EndScope') then
|
||||
return end -- "normal" return; not interested in other events
|
||||
@@ -101,10 +100,10 @@ return {
|
||||
for _, token in pairs(varnext) do coroutine.yield(unpack(token)) end
|
||||
varnext = {}
|
||||
elseif op == 'VarNext' or op == 'VarInside' then
|
||||
table.insert(varnext, {'Var', name, lineinfo, vars, at})
|
||||
table.insert(varnext, {'Var', name, lineinfo, vars, at, nobreak})
|
||||
end
|
||||
|
||||
coroutine.yield(op, name, lineinfo, vars, at)
|
||||
coroutine.yield(op, name, lineinfo, vars, op == 'Function' and at-1 or at, nobreak)
|
||||
end, vars)
|
||||
end)
|
||||
end,
|
||||
@@ -128,16 +127,16 @@ return {
|
||||
|
||||
if (not iscomment[s]) then
|
||||
local tx = editor:GetLine(line)
|
||||
local leftscope
|
||||
local sstart, send
|
||||
|
||||
for i,v in ipairs(scopestart) do
|
||||
if (tx:match("^%s*"..v)) then
|
||||
leftscope = true
|
||||
end
|
||||
for _, v in ipairs(scopestart) do
|
||||
if (tx:match("^%s*"..v.."%f[^%w]")) then sstart = true end
|
||||
end
|
||||
if (leftscope) then
|
||||
break
|
||||
for _, v in ipairs(scopeend) do
|
||||
if (tx:match("%f[%w]"..v.."%s*$")) then send = true end
|
||||
end
|
||||
-- if the scope starts, but doesn't end on one line, stop searching
|
||||
if sstart and not send then break end
|
||||
end
|
||||
line = line -1
|
||||
end
|
||||
|
||||
@@ -38,6 +38,7 @@ astypeout = table.concat(astypeout, " ")
|
||||
|
||||
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*"
|
||||
|
||||
if not CMarkSymbols then dofile "spec/cbase.lua" end
|
||||
return {
|
||||
exts = {"cl","ocl","clh",},
|
||||
lexer = wxstc.wxSTC_LEX_CPP,
|
||||
@@ -49,15 +50,7 @@ return {
|
||||
return string.find(str, funccall .. "%(")
|
||||
end,
|
||||
|
||||
isfndef = function(str)
|
||||
local l
|
||||
local s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+%s*%(.+%))")
|
||||
if (not s) then
|
||||
s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+)%s*%(")
|
||||
end
|
||||
if (cap and (string.find(cap,"^return") or string.find(cap,"else"))) then return end
|
||||
return s,e,cap,l
|
||||
end,
|
||||
marksymbols = CMarkSymbols,
|
||||
|
||||
lexerstyleconvert = {
|
||||
text = {wxstc.wxSTC_C_IDENTIFIER,
|
||||
|
||||
11
spec/ptx.lua
11
spec/ptx.lua
@@ -1,6 +1,7 @@
|
||||
-- author: Christoph Kubisch
|
||||
---------------------------------------------------------
|
||||
|
||||
if not CMarkSymbols then dofile "spec/cbase.lua" end
|
||||
return {
|
||||
exts = {"ptx",},
|
||||
lexer = wxstc.wxSTC_LEX_CPP,
|
||||
@@ -8,15 +9,7 @@ return {
|
||||
sep = ".",
|
||||
linecomment = "//",
|
||||
|
||||
isfndef = function(str)
|
||||
local l
|
||||
local s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+%s*%(.+%))")
|
||||
if (not s) then
|
||||
s,e,cap = string.find(str,"^%s*([A-Za-z0-9_]+%s+[A-Za-z0-9_]+)%s*%(")
|
||||
end
|
||||
if (cap and (string.find(cap,"^return") or string.find(cap,"else"))) then return end
|
||||
return s,e,cap,l
|
||||
end,
|
||||
marksymbols = CMarkSymbols,
|
||||
|
||||
lexerstyleconvert = {
|
||||
text = {wxstc.wxSTC_C_IDENTIFIER,
|
||||
|
||||
17
src/defs.lua
17
src/defs.lua
@@ -64,12 +64,6 @@ style = {
|
||||
caretlinebg = nil,
|
||||
fold = nil,
|
||||
whitespace = nil,
|
||||
|
||||
-- special, functioncall indicator
|
||||
fncall = {
|
||||
fg = {r,g,b},
|
||||
st = wxstc.wxSTC_INDIC_BOX,
|
||||
},
|
||||
}
|
||||
|
||||
-- config definition
|
||||
@@ -78,11 +72,8 @@ style = {
|
||||
-- content is optional
|
||||
-- config is loaded into existing config table
|
||||
config = {
|
||||
appname = "zbstudio", -- by default the launcher name
|
||||
|
||||
path = { -- path for tools/interpreters
|
||||
luxinia = "C:/luxbin/", -- path to luxinia exe
|
||||
projectdir = "", -- the project directory, used by some tools/interpreters
|
||||
lua = "C:/lua/lua.exe", -- path to lua exe
|
||||
},
|
||||
editor = {
|
||||
fontname = "Courier New", -- default font
|
||||
@@ -108,6 +99,8 @@ config = {
|
||||
nomousezoom = nil, -- disable zooming using mouse wheel
|
||||
autoreload = nil, -- trigger auto-reload when file is updated
|
||||
saveallonrun = nil, -- save all modified files before Run/Debug
|
||||
indentguide = true, -- show indentation guides
|
||||
backspaceunindent = true, -- unindent when backspace is used
|
||||
},
|
||||
|
||||
default = {
|
||||
@@ -155,12 +148,14 @@ config = {
|
||||
shorttip = false, -- tooltips are compact during typing
|
||||
nodynwords = false, -- no dynamic words (user entered words)
|
||||
ignorecase = false, -- ignores case when performing comparison with autocomplete list
|
||||
symbols = true, -- include local/global symbols
|
||||
startat = 2, -- start suggesting dynamic words after 2 characters
|
||||
strategy = 0,
|
||||
strategy = 2,
|
||||
-- 0: is string comparison
|
||||
-- 1: substring leading characters (camel case or _ separated)
|
||||
-- 2: leading + any correctly ordered fragments (default)
|
||||
width = 60, -- width of the tooltip text (in characters)
|
||||
maxlength = 450, -- max length of the tooltip on the screen
|
||||
},
|
||||
|
||||
arg = {}, -- command line arguments
|
||||
|
||||
@@ -111,24 +111,9 @@ end
|
||||
-- ToolTip and reserved words list
|
||||
-- also fixes function descriptions
|
||||
|
||||
local function formatUpToX(s, x)
|
||||
local splitstr = "([ \t]*)(%S*)([ \t]*)(\n?)"
|
||||
local t = {""}
|
||||
for prefix, word, suffix, newline in s:gmatch(splitstr) do
|
||||
if #(t[#t]) + #prefix + #word > x and #t > 0 then
|
||||
table.insert(t, word..suffix)
|
||||
else
|
||||
t[#t] = t[#t]..prefix..word..suffix
|
||||
end
|
||||
if #newline > 0 then table.insert(t, "") end
|
||||
end
|
||||
return table.concat(t, "\n")
|
||||
end
|
||||
|
||||
local function fillTips(api,apibasename)
|
||||
local apiac = api.ac
|
||||
local tclass = api.tip
|
||||
local tipwidth = math.max(20, ide.config.acandtip.width)
|
||||
|
||||
tclass.staticnames = {}
|
||||
tclass.keys = {}
|
||||
@@ -152,8 +137,8 @@ local function fillTips(api,apibasename)
|
||||
|
||||
if info.type == "function" or info.type == "method" or info.type == "value" then
|
||||
local frontname = (info.returns or "(?)").." "..fullkey.." "..(info.args or "(?)")
|
||||
frontname = formatUpToX(frontname:gsub("\n"," "):gsub("\t",""), tipwidth)
|
||||
local description = formatUpToX(info.description or "", tipwidth)
|
||||
frontname = frontname:gsub("\n"," "):gsub("\t","")
|
||||
local description = info.description or ""
|
||||
|
||||
-- build info
|
||||
local inf = ((info.type == "value" and "" or frontname.."\n")
|
||||
@@ -254,11 +239,6 @@ local function resolveAssign(editor,tx)
|
||||
c = c..w..s
|
||||
end
|
||||
end
|
||||
-- abort if the same or recursive value is returned; no need to continue.
|
||||
-- this can happen after typing "smth = smth:new(); smth:" or
|
||||
-- "line = line:gsub(...); line:" as the current algorithm attempts to
|
||||
-- replace "line" with the value that also includes "line"
|
||||
if change and c:find("^"..(tx:gsub(anysep,anysep))) then break end
|
||||
tx = c
|
||||
end
|
||||
else
|
||||
@@ -513,7 +493,7 @@ local function getAutoCompApiList(childs,fragment,method)
|
||||
end
|
||||
|
||||
-- make syntype dependent
|
||||
function CreateAutoCompList(editor,key)
|
||||
function CreateAutoCompList(editor,key,pos)
|
||||
local api = editor.api
|
||||
local tip = api.tip
|
||||
local ac = api.ac
|
||||
@@ -593,6 +573,27 @@ function CreateAutoCompList(editor,key)
|
||||
-- handle (multiple) inheritance; add matches from the parent class/lib
|
||||
addInheritance(tab, apilist, {[tab] = true})
|
||||
|
||||
-- include local/global variables
|
||||
if ide.config.acandtip.symbols and not key:find(q(sep)) then
|
||||
local vars, context = {}
|
||||
local tokens = editor:GetTokenList()
|
||||
for _, token in ipairs(tokens) do
|
||||
if token.fpos > pos then break end
|
||||
if token[1] == 'Id' or token[1] == 'Var' then
|
||||
local var = token.name
|
||||
if var ~= key and var:find(key, 1, true) == 1 then
|
||||
-- if it's a global variable, store in the auto-complete list,
|
||||
-- but if it's local, store separately as it needs to be checked
|
||||
table.insert(token.context[var] and vars or apilist, var)
|
||||
end
|
||||
context = token.context
|
||||
end
|
||||
end
|
||||
for _, var in pairs(context and vars or {}) do
|
||||
if context[var] then table.insert(apilist, var) end
|
||||
end
|
||||
end
|
||||
|
||||
local compstr = ""
|
||||
if apilist then
|
||||
if (#rest > 0) then
|
||||
|
||||
@@ -16,7 +16,7 @@ local CURRENT_LINE_MARKER_VALUE = 2^CURRENT_LINE_MARKER
|
||||
function NewFile(filename)
|
||||
filename = filename or ide.config.default.fullname
|
||||
local editor = CreateEditor()
|
||||
SetupKeywords(editor, GetFileExt(filename))
|
||||
editor:SetupKeywords(GetFileExt(filename))
|
||||
local doc = AddEditor(editor, filename)
|
||||
if doc then
|
||||
PackageEventHandle("onEditorNew", editor)
|
||||
@@ -71,7 +71,7 @@ function LoadFile(filePath, editor, file_must_exist, skipselection)
|
||||
editor = editor or findUnusedEditor() or CreateEditor()
|
||||
|
||||
editor:Freeze()
|
||||
SetupKeywords(editor, GetFileExt(filePath))
|
||||
editor:SetupKeywords(GetFileExt(filePath))
|
||||
editor:MarkerDeleteAll(-1)
|
||||
|
||||
-- remove BOM from UTF-8 encoded files; store BOM to add back when saving
|
||||
@@ -109,13 +109,16 @@ function LoadFile(filePath, editor, file_must_exist, skipselection)
|
||||
editor:Colourise(0, -1)
|
||||
editor:Thaw()
|
||||
|
||||
local edcfg = ide.config.editor
|
||||
if current then editor:GotoPos(current) end
|
||||
if (file_text and ide.config.editor.autotabs) then
|
||||
local found = string.find(file_text,"\t") ~= nil
|
||||
editor:SetUseTabs(found)
|
||||
if (file_text and edcfg.autotabs) then
|
||||
-- use tabs if they are already used
|
||||
-- or if "usetabs" is set and no space indentation is used in a file
|
||||
editor:SetUseTabs(string.find(file_text, "\t") ~= nil
|
||||
or edcfg.usetabs and (file_text:find("%f[^\r\n] ") or file_text:find("^ ")) == nil)
|
||||
end
|
||||
|
||||
if (file_text and ide.config.editor.checkeol) then
|
||||
if (file_text and edcfg.checkeol) then
|
||||
-- Auto-detect CRLF/LF line-endings
|
||||
local foundcrlf = string.find(file_text,"\r\n") ~= nil
|
||||
local foundlf = (string.find(file_text,"[^\r]\n") ~= nil)
|
||||
@@ -195,19 +198,26 @@ function ReLoadFile(filePath, editor, ...)
|
||||
return editor
|
||||
end
|
||||
|
||||
local function getExtsString()
|
||||
local knownexts = ""
|
||||
for _,spec in pairs(ide.specs) do
|
||||
if (spec.exts) then
|
||||
for _,ext in ipairs(spec.exts) do
|
||||
knownexts = knownexts.."*."..ext..";"
|
||||
end
|
||||
function ActivateFile(filename)
|
||||
local name, suffix, value = filename:match('(.+):([lLpP]?)(%d+)$')
|
||||
if name and not wx.wxFileExists(filename) and wx.wxFileExists(name) then
|
||||
filename = name
|
||||
end
|
||||
|
||||
local opened = LoadFile(filename, nil, true)
|
||||
if opened and value then
|
||||
if suffix:upper() == 'P' then opened:GotoPosDelayed(tonumber(value))
|
||||
else opened:GotoPosDelayed(opened:PositionFromLine(value-1))
|
||||
end
|
||||
end
|
||||
knownexts = knownexts:len() > 0 and knownexts:sub(1,-2) or nil
|
||||
return opened
|
||||
end
|
||||
|
||||
local exts = knownexts and TR("Known Files").." ("..knownexts..")|"..knownexts.."|" or ""
|
||||
return exts..TR("All files").." (*)|*"
|
||||
local function getExtsString()
|
||||
local exts = ide:GetKnownExtensions()
|
||||
local knownexts = #exts > 0 and "*."..table.concat(exts, ";*.") or nil
|
||||
return (knownexts and TR("Known Files").." ("..knownexts..")|"..knownexts.."|" or "")
|
||||
.. TR("All files").." (*)|*"
|
||||
end
|
||||
|
||||
function ReportError(msg)
|
||||
@@ -323,8 +333,9 @@ function SaveFileAs(editor)
|
||||
if ext ~= GetFileExt(filePath) then
|
||||
-- new extension, so setup new keywords and re-apply indicators
|
||||
editor:ClearDocumentStyle() -- remove styles from the document
|
||||
SetupKeywords(editor, GetFileExt(filePath))
|
||||
editor:SetupKeywords(GetFileExt(filePath))
|
||||
IndicateAll(editor)
|
||||
IndicateFunctionsOnly(editor)
|
||||
MarkupStyle(editor)
|
||||
end
|
||||
saved = true
|
||||
@@ -539,19 +550,6 @@ function FoldSome()
|
||||
editor:EnsureCaretVisible()
|
||||
end
|
||||
|
||||
function EnsureRangeVisible(posStart, posEnd)
|
||||
local editor = GetEditor()
|
||||
if posStart > posEnd then
|
||||
posStart, posEnd = posEnd, posStart
|
||||
end
|
||||
|
||||
local lineStart = editor:LineFromPosition(posStart)
|
||||
local lineEnd = editor:LineFromPosition(posEnd)
|
||||
for line = lineStart, lineEnd do
|
||||
editor:EnsureVisibleEnforcePolicy(line)
|
||||
end
|
||||
end
|
||||
|
||||
function SetAllEditorsReadOnly(enable)
|
||||
for _, document in pairs(openDocuments) do
|
||||
document.editor:SetReadOnly(enable)
|
||||
@@ -564,6 +562,7 @@ end
|
||||
function ClearAllCurrentLineMarkers()
|
||||
for _, document in pairs(openDocuments) do
|
||||
document.editor:MarkerDeleteAll(CURRENT_LINE_MARKER)
|
||||
document.editor:Refresh() -- needed for background markers that don't get refreshed (wx2.9.5)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -574,14 +573,19 @@ function StripShebang(code) return (code:gsub("^#!.-\n", "\n")) end
|
||||
|
||||
local compileOk, compileTotal = 0, 0
|
||||
function CompileProgram(editor, params)
|
||||
local params = { jumponerror = (params or {}).jumponerror ~= false,
|
||||
reportstats = (params or {}).reportstats ~= false }
|
||||
local id = editor:GetId()
|
||||
local filePath = DebuggerMakeFileName(editor, openDocuments[id].filePath)
|
||||
local params = {
|
||||
jumponerror = (params or {}).jumponerror ~= false,
|
||||
reportstats = (params or {}).reportstats ~= false,
|
||||
keepoutput = (params or {}).keepoutput,
|
||||
}
|
||||
local doc = ide:GetDocument(editor)
|
||||
local filePath = doc:GetFilePath() or doc:GetFileName()
|
||||
local func, err = loadstring(StripShebang(editor:GetText()), '@'..filePath)
|
||||
local line = not func and tonumber(err:match(":(%d+)%s*:")) or nil
|
||||
|
||||
if ide.frame.menuBar:IsChecked(ID_CLEAROUTPUT) then ClearOutput() end
|
||||
if not params.keepoutput and ide.frame.menuBar:IsChecked(ID_CLEAROUTPUT) then
|
||||
ClearOutput()
|
||||
end
|
||||
|
||||
compileTotal = compileTotal + 1
|
||||
if func then
|
||||
@@ -723,19 +727,27 @@ function SetOpenTabs(params)
|
||||
DisplayOutputLn(TR("Can't process auto-recovery record; invalid format: %s."):format(nametab))
|
||||
return
|
||||
end
|
||||
DisplayOutputLn(TR("Found auto-recovery record and restored saved session."))
|
||||
if not params.quiet then
|
||||
DisplayOutputLn(TR("Found auto-recovery record and restored saved session."))
|
||||
end
|
||||
for _,doc in ipairs(nametab) do
|
||||
local editor = doc.filename and LoadFile(doc.filename,nil,true,true) or NewFile()
|
||||
local opendoc = openDocuments[editor:GetId()]
|
||||
if doc.content then
|
||||
notebook:SetPageText(opendoc.index, doc.tabname)
|
||||
editor:SetText(doc.content)
|
||||
if doc.filename and opendoc.modTime and doc.modified < opendoc.modTime:GetTicks() then
|
||||
DisplayOutputLn(TR("File '%s' has more recent timestamp than restored '%s'; please review before saving.")
|
||||
:format(doc.filename, doc.tabname))
|
||||
-- check for missing file is no content is stored
|
||||
if doc.filepath and not doc.content and not wx.wxFileExists(doc.filepath) then
|
||||
DisplayOutputLn(TR("File '%s' is missing and can't be recovered.")
|
||||
:format(doc.filepath))
|
||||
else
|
||||
local editor = doc.filepath and LoadFile(doc.filepath,nil,true,true) or NewFile(doc.filename)
|
||||
local opendoc = openDocuments[editor:GetId()]
|
||||
if doc.content then
|
||||
editor:SetText(doc.content)
|
||||
if doc.filepath and opendoc.modTime and doc.modified < opendoc.modTime:GetTicks() then
|
||||
DisplayOutputLn(TR("File '%s' has more recent timestamp than restored '%s'; please review before saving.")
|
||||
:format(doc.filepath, doc.tabname))
|
||||
end
|
||||
SetDocumentModified(editor:GetId(), true)
|
||||
end
|
||||
editor:GotoPosDelayed(doc.cursorpos or 0)
|
||||
end
|
||||
editor:GotoPosDelayed(doc.cursorpos or 0)
|
||||
end
|
||||
notebook:SetSelection(params and params.index or 0)
|
||||
SetEditorSelection()
|
||||
@@ -745,7 +757,8 @@ local function getOpenTabs()
|
||||
local opendocs = {}
|
||||
for _, document in pairs(ide.openDocuments) do
|
||||
table.insert(opendocs, {
|
||||
filename = document.filePath,
|
||||
filename = document.fileName,
|
||||
filepath = document.filePath,
|
||||
tabname = notebook:GetPageText(document.index),
|
||||
modified = document.modTime and document.modTime:GetTicks(), -- get number of seconds
|
||||
content = document.isModified and document.editor:GetText() or nil,
|
||||
@@ -764,18 +777,34 @@ function SetAutoRecoveryMark()
|
||||
ide.session.lastupdated = os.time()
|
||||
end
|
||||
|
||||
local function saveAutoRecovery(event)
|
||||
local function generateRecoveryRecord(opentabs)
|
||||
return require('mobdebug').line(opentabs, {comment = false})
|
||||
end
|
||||
|
||||
local function saveHotExit()
|
||||
local opentabs, params = getOpenTabs()
|
||||
if #opentabs > 0 then
|
||||
params.recovery = generateRecoveryRecord(opentabs)
|
||||
params.quiet = true
|
||||
SettingsSaveFileSession({}, params)
|
||||
end
|
||||
end
|
||||
|
||||
local function saveAutoRecovery(force)
|
||||
if not ide.config.autorecoverinactivity then return end
|
||||
|
||||
local lastupdated = ide.session.lastupdated
|
||||
if not ide.config.autorecoverinactivity or not lastupdated then return end
|
||||
if lastupdated < (ide.session.lastsaved or 0) then return end
|
||||
if not force then
|
||||
if not lastupdated or lastupdated < (ide.session.lastsaved or 0) then return end
|
||||
end
|
||||
|
||||
local now = os.time()
|
||||
if lastupdated + ide.config.autorecoverinactivity > now then return end
|
||||
if not force and lastupdated + ide.config.autorecoverinactivity > now then return end
|
||||
|
||||
-- find all open modified files and save them
|
||||
local opentabs, params = getOpenTabs()
|
||||
if #opentabs > 0 then
|
||||
params.recovery = require('mobdebug').line(opentabs, {comment = false})
|
||||
params.recovery = generateRecoveryRecord(opentabs)
|
||||
SettingsSaveAll()
|
||||
SettingsSaveFileSession({}, params)
|
||||
ide.settings:Flush()
|
||||
@@ -870,7 +899,7 @@ local function closeWindow(event)
|
||||
|
||||
ide.exitingProgram = true -- don't handle focus events
|
||||
|
||||
if not SaveOnExit(event:CanVeto()) then
|
||||
if not ide.config.hotexit and not SaveOnExit(event:CanVeto()) then
|
||||
event:Veto()
|
||||
ide.exitingProgram = false
|
||||
return
|
||||
@@ -887,6 +916,7 @@ local function closeWindow(event)
|
||||
DebuggerShutdown()
|
||||
|
||||
SettingsSaveAll()
|
||||
if ide.config.hotexit then saveHotExit() end
|
||||
ide.settings:Flush()
|
||||
|
||||
do -- hide all floating panes first
|
||||
@@ -900,13 +930,14 @@ local function closeWindow(event)
|
||||
frame.uimgr:UnInit()
|
||||
frame:Hide() -- hide the main frame while the IDE exits
|
||||
|
||||
if ide.session.timer then ide.session.timer:Stop() end
|
||||
-- stop all the timers
|
||||
for _, timer in pairs(ide.timers) do timer:Stop() end
|
||||
|
||||
event:Skip()
|
||||
end
|
||||
frame:Connect(wx.wxEVT_CLOSE_WINDOW, closeWindow)
|
||||
|
||||
frame:Connect(wx.wxEVT_TIMER, saveAutoRecovery)
|
||||
frame:Connect(wx.wxEVT_TIMER, function() saveAutoRecovery() end)
|
||||
|
||||
-- in the presence of wxAuiToolbar, when (1) the app gets focus,
|
||||
-- (2) a floating panel is closed or (3) a toolbar dropdown is closed,
|
||||
@@ -918,7 +949,6 @@ frame:Connect(wx.wxEVT_TIMER, saveAutoRecovery)
|
||||
-- tickets: http://trac.wxwidgets.org/ticket/14142
|
||||
-- and http://trac.wxwidgets.org/ticket/14269)
|
||||
|
||||
local infocus
|
||||
ide.editorApp:Connect(wx.wxEVT_SET_FOCUS, function(event)
|
||||
if ide.exitingProgram then return end
|
||||
|
||||
@@ -926,8 +956,8 @@ ide.editorApp:Connect(wx.wxEVT_SET_FOCUS, function(event)
|
||||
if win then
|
||||
local class = win:GetClassInfo():GetClassName()
|
||||
-- don't set focus on the main frame or toolbar
|
||||
if infocus and (class == 'wxAuiToolBar' or class == 'wxFrame') then
|
||||
pcall(function() infocus:SetFocus() end)
|
||||
if ide.infocus and (class == 'wxAuiToolBar' or class == 'wxFrame') then
|
||||
pcall(function() ide.infocus:SetFocus() end)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -947,40 +977,49 @@ ide.editorApp:Connect(wx.wxEVT_SET_FOCUS, function(event)
|
||||
parent = parent:GetParent()
|
||||
end
|
||||
if mainwin then
|
||||
if infocus and infocus ~= win and ide.osname == 'Macintosh' then
|
||||
if ide.infocus and ide.infocus ~= win and ide.osname == 'Macintosh' then
|
||||
-- kill focus on the control that had the focus as wxwidgets on OSX
|
||||
-- doesn't do it: http://trac.wxwidgets.org/ticket/14142;
|
||||
-- wrap into pcall in case the window is already deleted
|
||||
local ev = wx.wxFocusEvent(wx.wxEVT_KILL_FOCUS)
|
||||
pcall(function() infocus:GetEventHandler():ProcessEvent(ev) end)
|
||||
pcall(function() ide.infocus:GetEventHandler():ProcessEvent(ev) end)
|
||||
end
|
||||
infocus = win
|
||||
ide.infocus = win
|
||||
end
|
||||
end
|
||||
|
||||
event:Skip()
|
||||
end)
|
||||
|
||||
local updateInterval = 250 -- time in ms
|
||||
wx.wxUpdateUIEvent.SetUpdateInterval(updateInterval)
|
||||
|
||||
ide.editorApp:Connect(wx.wxEVT_ACTIVATE_APP,
|
||||
function(event)
|
||||
if not ide.exitingProgram then
|
||||
if ide.osname == 'Macintosh' and infocus and event:GetActive() then
|
||||
if ide.osname == 'Macintosh' and ide.infocus and event:GetActive() then
|
||||
-- restore focus to the last element that received it;
|
||||
-- wrap into pcall in case the element has disappeared
|
||||
-- while the application was out of focus
|
||||
pcall(function() infocus:SetFocus() end)
|
||||
pcall(function() ide.infocus:SetFocus() end)
|
||||
end
|
||||
|
||||
local event = event:GetActive() and "onAppFocusSet" or "onAppFocusLost"
|
||||
PackageEventHandle(event, ide.editorApp)
|
||||
local active = event:GetActive()
|
||||
-- save auto-recovery record when making the app inactive
|
||||
if not active then saveAutoRecovery(true) end
|
||||
|
||||
-- disable UI refresh when app is inactive
|
||||
wx.wxUpdateUIEvent.SetUpdateInterval(active and updateInterval or -1)
|
||||
|
||||
PackageEventHandle(active and "onAppFocusSet" or "onAppFocusLost", ide.editorApp)
|
||||
end
|
||||
event:Skip()
|
||||
end)
|
||||
|
||||
if ide.config.autorecoverinactivity then
|
||||
ide.session.timer = wx.wxTimer(frame)
|
||||
ide.timers.session = wx.wxTimer(frame)
|
||||
-- check at least 5s to be never more than 5s off
|
||||
ide.session.timer:Start(math.min(5, ide.config.autorecoverinactivity)*1000)
|
||||
ide.timers.session:Start(math.min(5, ide.config.autorecoverinactivity)*1000)
|
||||
end
|
||||
|
||||
function PaneFloatToggle(window)
|
||||
|
||||
@@ -23,7 +23,9 @@ debugger.hostname = ide.config.debugger.hostname or (function()
|
||||
local hostname = socket.dns.gethostname()
|
||||
return hostname and socket.dns.toip(hostname) and hostname or "localhost"
|
||||
end)()
|
||||
debugger.imglist = ide:CreateImageList("STACK", "VALUE-CALL", "VALUE-LOCAL", "VALUE-UP")
|
||||
|
||||
local image = { STACK = 0, LOCAL = 1, UPVALUE = 2 }
|
||||
local notebook = ide.frame.notebook
|
||||
|
||||
local CURRENT_LINE_MARKER = StylesGetMarker("currentline")
|
||||
@@ -58,7 +60,7 @@ end
|
||||
|
||||
local q = EscapeMagic
|
||||
|
||||
local function updateWatchesSync(num)
|
||||
local function updateWatchesSync(onlyitem)
|
||||
local watchCtrl = debugger.watchCtrl
|
||||
local pane = ide.frame.uimgr:GetPane("watchpanel")
|
||||
local shown = watchCtrl and (pane:IsOk() and pane:IsShown() or not pane:IsOk() and watchCtrl:IsShown())
|
||||
@@ -67,43 +69,55 @@ local function updateWatchesSync(num)
|
||||
local bgcl = watchCtrl:GetBackgroundColour()
|
||||
local hicl = wx.wxColour(math.floor(bgcl:Red()*.9),
|
||||
math.floor(bgcl:Green()*.9), math.floor(bgcl:Blue()*.9))
|
||||
for idx = 0, watchCtrl:GetItemCount() - 1 do
|
||||
if not num or idx == num then
|
||||
local expression = watchCtrl:GetItemText(idx)
|
||||
local _, values, error = debugger.evaluate(expression)
|
||||
if error then error = error:gsub("%[.-%]:%d+:%s+","")
|
||||
elseif #values == 0 then values = {'nil'} end
|
||||
|
||||
local newval = error and ('error: '..error) or values[1]
|
||||
-- get the current value from a list item
|
||||
do local litem = wx.wxListItem()
|
||||
litem:SetMask(wx.wxLIST_MASK_TEXT)
|
||||
litem:SetId(idx)
|
||||
litem:SetColumn(1)
|
||||
watchCtrl:GetItem(litem)
|
||||
watchCtrl:SetItemBackgroundColour(idx,
|
||||
watchCtrl:GetItem(litem) and newval ~= litem:GetText()
|
||||
and hicl or bgcl)
|
||||
local root = watchCtrl:GetRootItem()
|
||||
if not root or not root:IsOk() then return end
|
||||
|
||||
local item = onlyitem or watchCtrl:GetFirstChild(root)
|
||||
while true do
|
||||
if not item:IsOk() then break end
|
||||
|
||||
local expression = watchCtrl:GetItemExpression(item)
|
||||
if expression then
|
||||
local _, values, error = debugger.evaluate(expression)
|
||||
local curchildren = watchCtrl:GetItemChildren(item)
|
||||
if error then
|
||||
error = error:gsub("%[.-%]:%d+:%s+","")
|
||||
watchCtrl:SetItemValueIfExpandable(item, nil)
|
||||
else
|
||||
if #values == 0 then values = {'nil'} end
|
||||
local _, res = LoadSafe("return "..values[1])
|
||||
watchCtrl:SetItemValueIfExpandable(item, res)
|
||||
end
|
||||
|
||||
watchCtrl:SetItem(idx, 1, newval)
|
||||
local newval = (expression .. ' = '
|
||||
.. (error and ('error: '..error) or table.concat(values, ", ")))
|
||||
local val = watchCtrl:GetItemText(item)
|
||||
|
||||
watchCtrl:SetItemBackgroundColour(item, val ~= newval and hicl or bgcl)
|
||||
watchCtrl:SetItemText(item, newval)
|
||||
|
||||
if onlyitem or val ~= newval then
|
||||
local newchildren = watchCtrl:GetItemChildren(item)
|
||||
if next(curchildren) ~= nil and next(newchildren) == nil then
|
||||
watchCtrl:SetItemHasChildren(item, true)
|
||||
watchCtrl:CollapseAndReset(item)
|
||||
watchCtrl:SetItemHasChildren(item, false)
|
||||
elseif next(curchildren) ~= nil and next(newchildren) ~= nil then
|
||||
watchCtrl:CollapseAndReset(item)
|
||||
watchCtrl:Expand(item)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if onlyitem then break end
|
||||
item = watchCtrl:GetNextSibling(item)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local simpleType = {['nil'] = true, ['string'] = true, ['number'] = true, ['boolean'] = true}
|
||||
local stackItemValue = {}
|
||||
local callData = {}
|
||||
local function checkIfExpandable(value, item)
|
||||
local expandable = type(value) == 'table' and next(value) ~= nil
|
||||
and not stackItemValue[value] -- only expand first time
|
||||
if expandable then -- cache table value to expand when requested
|
||||
stackItemValue[item:GetValue()] = value
|
||||
stackItemValue[value] = item:GetValue() -- to avoid circular refs
|
||||
end
|
||||
return expandable
|
||||
end
|
||||
|
||||
local function updateStackSync()
|
||||
local stackCtrl = debugger.stackCtrl
|
||||
@@ -113,17 +127,16 @@ local function updateStackSync()
|
||||
and not debugger.scratchpad then
|
||||
local stack, _, err = debugger.stack()
|
||||
if not stack or #stack == 0 then
|
||||
stackCtrl:DeleteAllItems()
|
||||
stackCtrl:DeleteAll()
|
||||
if err then -- report an error if any
|
||||
stackCtrl:AppendItem(stackCtrl:AddRoot("Stack"), "Error: " .. err, 0)
|
||||
stackCtrl:AppendItem(stackCtrl:AddRoot("Stack"), "Error: " .. err, image.STACK)
|
||||
end
|
||||
return
|
||||
end
|
||||
stackCtrl:Freeze()
|
||||
stackCtrl:DeleteAllItems()
|
||||
stackCtrl:DeleteAll()
|
||||
|
||||
local root = stackCtrl:AddRoot("Stack")
|
||||
stackItemValue = {} -- reset cache of items in the stack
|
||||
callData = {} -- reset call cache
|
||||
for _,frame in ipairs(stack) do
|
||||
-- "main chunk at line 24"
|
||||
@@ -146,7 +159,7 @@ local function updateStackSync()
|
||||
or " (defined in "..call[7]..")"))
|
||||
|
||||
-- create the new tree item for this level of the call stack
|
||||
local callitem = stackCtrl:AppendItem(root, text, 0)
|
||||
local callitem = stackCtrl:AppendItem(root, text, image.STACK)
|
||||
|
||||
-- register call data to provide stack navigation
|
||||
callData[callitem:GetValue()] = { call[2], call[4] }
|
||||
@@ -162,10 +175,8 @@ local function updateStackSync()
|
||||
local text = ("%s = %s%s"):
|
||||
format(name, fixUTF8(trimToMaxLength(serialize(value, params))),
|
||||
simpleType[type(value)] and "" or (" --[["..comment.."]]"))
|
||||
local item = stackCtrl:AppendItem(callitem, text, 1)
|
||||
if checkIfExpandable(value, item) then
|
||||
stackCtrl:SetItemHasChildren(item, true)
|
||||
end
|
||||
local item = stackCtrl:AppendItem(callitem, text, image.LOCAL)
|
||||
stackCtrl:SetItemValueIfExpandable(item, value)
|
||||
end
|
||||
|
||||
-- add the upvalues for this call stack level to the tree item
|
||||
@@ -174,10 +185,8 @@ local function updateStackSync()
|
||||
local text = ("%s = %s%s"):
|
||||
format(name, fixUTF8(trimToMaxLength(serialize(value, params))),
|
||||
simpleType[type(value)] and "" or (" --[["..comment.."]]"))
|
||||
local item = stackCtrl:AppendItem(callitem, text, 2)
|
||||
if checkIfExpandable(value, item) then
|
||||
stackCtrl:SetItemHasChildren(item, true)
|
||||
end
|
||||
local item = stackCtrl:AppendItem(callitem, text, image.UPVALUE)
|
||||
stackCtrl:SetItemValueIfExpandable(item, value)
|
||||
end
|
||||
|
||||
stackCtrl:SortChildren(callitem)
|
||||
@@ -198,12 +207,12 @@ local function updateStackAndWatches()
|
||||
end
|
||||
end
|
||||
|
||||
local function updateWatches(num)
|
||||
local function updateWatches(item)
|
||||
-- check if the debugger is running and may be waiting for a response.
|
||||
-- allow that request to finish, otherwise updateWatchesSync() does nothing.
|
||||
if debugger.running then debugger.update() end
|
||||
if debugger.server and not debugger.running then
|
||||
copas.addthread(function() updateWatchesSync(num) end)
|
||||
copas.addthread(function() updateWatchesSync(item) end)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -232,7 +241,7 @@ local function debuggerToggleViews(show)
|
||||
end
|
||||
|
||||
local function killClient()
|
||||
if (debugger.pid) then
|
||||
if (debugger.pid and wx.wxProcess.Exists(debugger.pid)) then
|
||||
-- using SIGTERM for some reason kills not only the debugee process,
|
||||
-- but also some system processes, which leads to a blue screen crash
|
||||
-- (at least on Windows Vista SP2)
|
||||
@@ -243,8 +252,8 @@ local function killClient()
|
||||
DisplayOutputLn(TR("Unable to stop program (pid: %d), code %d.")
|
||||
:format(debugger.pid, ret))
|
||||
end
|
||||
debugger.pid = nil
|
||||
end
|
||||
debugger.pid = nil
|
||||
end
|
||||
|
||||
local function activateDocument(file, line, activatehow)
|
||||
@@ -295,6 +304,7 @@ local function activateDocument(file, line, activatehow)
|
||||
end
|
||||
local line = line - 1 -- editor line operations are zero-based
|
||||
editor:MarkerAdd(line, CURRENT_LINE_MARKER)
|
||||
editor:Refresh() -- needed for background markers that don't get refreshed (wx2.9.5)
|
||||
|
||||
-- found and marked what we are looking for;
|
||||
-- don't need to activate with CHECKONLY (this assumes line is given)
|
||||
@@ -430,6 +440,8 @@ debugger.shell = function(expression, isstatement)
|
||||
updateStackSync() updateWatchesSync()
|
||||
end
|
||||
end)
|
||||
elseif debugger.server then
|
||||
DisplayShellErr(TR("Can't evaluate the expression while the application is running."))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -443,6 +455,46 @@ local function stoppedAtBreakpoint(file, line)
|
||||
return breakpoint > -1 and breakpoint == current
|
||||
end
|
||||
|
||||
local function mapRemotePath(basedir, file, line, method)
|
||||
if not file then return end
|
||||
|
||||
-- file is /foo/bar/my.lua; basedir is d:\local\path\
|
||||
-- check for d:\local\path\my.lua, d:\local\path\bar\my.lua, ...
|
||||
-- wxwidgets on Windows handles \\ and / as separators, but on OSX
|
||||
-- and Linux it only handles 'native' separator;
|
||||
-- need to translate for GetDirs to work.
|
||||
local file = file:gsub("\\", "/")
|
||||
local parts = wx.wxFileName(file):GetDirs()
|
||||
local name = wx.wxFileName(file):GetFullName()
|
||||
|
||||
-- find the longest remote path that can be mapped locally
|
||||
local longestpath, remotedir
|
||||
while true do
|
||||
local mapped = GetFullPathIfExists(basedir, name)
|
||||
if mapped then
|
||||
longestpath = mapped
|
||||
remotedir = file:gsub(q(name):gsub("/", ".").."$", "")
|
||||
end
|
||||
if #parts == 0 then break end
|
||||
name = table.remove(parts, #parts) .. "/" .. name
|
||||
end
|
||||
|
||||
-- if found a local mapping under basedir
|
||||
local activated = longestpath and activateDocument(longestpath, line, method or activate.NOREPORT)
|
||||
if activated then
|
||||
-- find remote basedir by removing the tail from remote file
|
||||
debugger.handle("basedir " .. debugger.basedir .. "\t" .. remotedir)
|
||||
-- reset breakpoints again as remote basedir has changed
|
||||
reSetBreakpoints()
|
||||
DisplayOutputLn(TR("Mapped remote request for '%s' to '%s'.")
|
||||
:format(remotedir, debugger.basedir))
|
||||
|
||||
return longestpath
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
debugger.listen = function(start)
|
||||
if start == false then
|
||||
if debugger.listening then
|
||||
@@ -465,8 +517,11 @@ debugger.listen = function(start)
|
||||
end
|
||||
DisplayOutputLn(TR("Debugger server started at %s:%d.")
|
||||
:format(debugger.hostname, debugger.portnumber))
|
||||
|
||||
copas.autoclose = false
|
||||
copas.addserver(server, function (skt)
|
||||
-- pull any pending data not processed yet
|
||||
if debugger.running then debugger.update() end
|
||||
if debugger.server then
|
||||
DisplayOutputLn(TR("Refused a request to start a new debugging session as there is one in progress already."))
|
||||
return
|
||||
@@ -583,8 +638,11 @@ debugger.listen = function(start)
|
||||
..":\n"..err)
|
||||
return debugger.terminate()
|
||||
elseif options.runstart then
|
||||
if stoppedAtBreakpoint(file or startfile, line or 0) then
|
||||
activateDocument(file or startfile, line or 0)
|
||||
local file = (mapRemotePath(basedir, file, line or 0, activate.CHECKONLY)
|
||||
or file or startfile)
|
||||
|
||||
if stoppedAtBreakpoint(file, line or 0) then
|
||||
activateDocument(file, line or 0)
|
||||
options.runstart = false
|
||||
end
|
||||
elseif file and line then
|
||||
@@ -607,36 +665,8 @@ debugger.listen = function(start)
|
||||
-- when autoactivation is disabled.
|
||||
if not activated and (not wx.wxFileName(file):FileExists()
|
||||
or wx.wxIsAbsolutePath(file)) then
|
||||
-- file is /foo/bar/my.lua; basedir is d:\local\path\
|
||||
-- check for d:\local\path\my.lua, d:\local\path\bar\my.lua, ...
|
||||
-- wxwidgets on Windows handles \\ and / as separators, but on OSX
|
||||
-- and Linux it only handles 'native' separator;
|
||||
-- need to translate for GetDirs to work.
|
||||
local file = file:gsub("\\", "/")
|
||||
local parts = wx.wxFileName(file):GetDirs()
|
||||
local name = wx.wxFileName(file):GetFullName()
|
||||
|
||||
-- find the longest remote path that can be mapped locally
|
||||
local longestpath, remotedir
|
||||
while true do
|
||||
local mapped = GetFullPathIfExists(basedir, name)
|
||||
if mapped then
|
||||
longestpath = mapped
|
||||
remotedir = file:gsub(q(name):gsub("/", ".").."$", "")
|
||||
end
|
||||
if #parts == 0 then break end
|
||||
name = table.remove(parts, #parts) .. "/" .. name
|
||||
end
|
||||
|
||||
-- if found a local mapping under basedir
|
||||
activated = longestpath and activateDocument(longestpath, line, activate.NOREPORT)
|
||||
if activated then
|
||||
-- find remote basedir by removing the tail from remote file
|
||||
debugger.handle("basedir " .. debugger.basedir .. "\t" .. remotedir)
|
||||
-- reset breakpoints again as remote basedir has changed
|
||||
reSetBreakpoints()
|
||||
DisplayOutputLn(TR("Mapped remote request for '%s' to '%s'.")
|
||||
:format(remotedir, debugger.basedir))
|
||||
if mapRemotePath(basedir, file, line, activate.NOREPORT) then
|
||||
activated = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -681,6 +711,12 @@ debugger.listen = function(start)
|
||||
debugger.listening = server
|
||||
end
|
||||
|
||||
local function nameOutputTab(name)
|
||||
local nbk = ide.frame.bottomnotebook
|
||||
local index = nbk:GetPageIndex(ide:GetOutput())
|
||||
if index ~= -1 then nbk:SetPageText(index, name) end
|
||||
end
|
||||
|
||||
debugger.handle = function(command, server, options)
|
||||
local verbose = ide.config.debugger.verbose
|
||||
local osexit, gprint
|
||||
@@ -689,11 +725,14 @@ debugger.handle = function(command, server, options)
|
||||
if verbose then DisplayOutputLn(...) end
|
||||
end
|
||||
|
||||
nameOutputTab(TR("Output (running)"))
|
||||
debugger.running = true
|
||||
if verbose then DisplayOutputLn("Debugger sent (command):", command) end
|
||||
local file, line, err = mobdebug.handle(command, server or debugger.server, options)
|
||||
if verbose then DisplayOutputLn("Debugger received (file, line, err):", file, line, err) end
|
||||
debugger.running = false
|
||||
-- only set suspended if the debugging hasn't been terminated
|
||||
if debugger.server then nameOutputTab(TR("Output (suspended)")) end
|
||||
|
||||
os.exit = osexit
|
||||
_G.print = gprint
|
||||
@@ -893,58 +932,48 @@ debugger.quickeval = function(var, callback)
|
||||
end
|
||||
end
|
||||
|
||||
-- need imglist to be a file local variable as SetImageList takes ownership
|
||||
-- of it and if done inside a function, icons do not work as expected
|
||||
local imglist = wx.wxImageList(16,16)
|
||||
do
|
||||
local getBitmap = (ide.app.createbitmap or wx.wxArtProvider.GetBitmap)
|
||||
local size = wx.wxSize(16,16)
|
||||
-- 0 = stack call
|
||||
imglist:Add(getBitmap(wx.wxART_GO_FORWARD, wx.wxART_OTHER, size))
|
||||
-- 1 = local variables
|
||||
imglist:Add(getBitmap(wx.wxART_LIST_VIEW, wx.wxART_OTHER, size))
|
||||
-- 2 = upvalues
|
||||
imglist:Add(getBitmap(wx.wxART_REPORT_VIEW, wx.wxART_OTHER, size))
|
||||
end
|
||||
|
||||
local width, height = 360, 200
|
||||
|
||||
function debuggerAddWindow(ctrl, panel, name)
|
||||
local notebook = wxaui.wxAuiNotebook(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE
|
||||
- wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER)
|
||||
notebook:AddPage(ctrl, name, true)
|
||||
notebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK,
|
||||
function() PaneFloatToggle(notebook) end)
|
||||
local keyword = {}
|
||||
for _,k in ipairs({'and', 'break', 'do', 'else', 'elseif', 'end', 'false',
|
||||
'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat',
|
||||
'return', 'then', 'true', 'until', 'while'}) do keyword[k] = true end
|
||||
|
||||
local mgr = ide.frame.uimgr
|
||||
mgr:AddPane(notebook, wxaui.wxAuiPaneInfo():
|
||||
Name(panel):Float():CaptionVisible(false):PaneBorder(false):
|
||||
MinSize(width/2,height/2):
|
||||
BestSize(width,height):FloatingSize(width,height):
|
||||
PinButton(true):Hide())
|
||||
mgr.defaultPerspective = mgr:SavePerspective() -- resave default perspective
|
||||
|
||||
return notebook
|
||||
local function stringifyKeyIntoPrefix(name, num)
|
||||
return (type(name) == "number"
|
||||
and (num and num == name and '' or ("[%s] = "):format(name))
|
||||
or type(name) == "string" and (name:match("^[%l%u_][%w_]*$") and not keyword[name]
|
||||
and ("%s = "):format(name)
|
||||
or ("[%q] = "):format(name))
|
||||
or ("[%s] = "):format(tostring(name)))
|
||||
end
|
||||
|
||||
function DebuggerAddStackWindow()
|
||||
return debuggerAddWindow(debugger.stackCtrl, "stackpanel", TR("Stack"))
|
||||
end
|
||||
|
||||
function DebuggerAddWatchWindow()
|
||||
return debuggerAddWindow(debugger.watchCtrl, "watchpanel", TR("Watch"))
|
||||
end
|
||||
|
||||
function debuggerCreateStackWindow()
|
||||
local function debuggerCreateStackWindow()
|
||||
local stackCtrl = wx.wxTreeCtrl(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxSize(width, height),
|
||||
wx.wxTR_LINES_AT_ROOT + wx.wxTR_HAS_BUTTONS + wx.wxTR_SINGLE + wx.wxTR_HIDE_ROOT)
|
||||
|
||||
debugger.stackCtrl = stackCtrl
|
||||
|
||||
stackCtrl:SetImageList(imglist)
|
||||
stackCtrl:SetImageList(debugger.imglist)
|
||||
|
||||
local valuecache = {}
|
||||
function stackCtrl:SetItemValueIfExpandable(item, value)
|
||||
local expandable = type(value) == 'table' and next(value) ~= nil
|
||||
if expandable then -- cache table value to expand when requested
|
||||
valuecache[item:GetValue()] = value
|
||||
end
|
||||
self:SetItemHasChildren(item, expandable)
|
||||
end
|
||||
|
||||
function stackCtrl:DeleteAll()
|
||||
self:DeleteAllItems()
|
||||
valuecache = {}
|
||||
end
|
||||
|
||||
function stackCtrl:GetItemChildren(item)
|
||||
return valuecache[item:GetValue()] or {}
|
||||
end
|
||||
|
||||
stackCtrl:Connect(wx.wxEVT_COMMAND_TREE_ITEM_EXPANDING,
|
||||
function (event)
|
||||
@@ -954,15 +983,12 @@ function debuggerCreateStackWindow()
|
||||
|
||||
local image = stackCtrl:GetItemImage(item_id)
|
||||
local num = 1
|
||||
for name,value in pairs(stackItemValue[item_id:GetValue()]) do
|
||||
for name,value in pairs(stackCtrl:GetItemChildren(item_id)) do
|
||||
local strval = fixUTF8(trimToMaxLength(serialize(value, params)))
|
||||
local text = type(name) == "number"
|
||||
and (num == name and strval or ("[%s] = %s"):format(name, strval))
|
||||
or ("%s = %s"):format(tostring(name), strval)
|
||||
local text = stringifyKeyIntoPrefix(name, num)..strval
|
||||
local item = stackCtrl:AppendItem(item_id, text, image)
|
||||
if checkIfExpandable(value, item) then
|
||||
stackCtrl:SetItemHasChildren(item, true)
|
||||
end
|
||||
stackCtrl:SetItemValueIfExpandable(item, value)
|
||||
|
||||
num = num + 1
|
||||
if num > stackmaxnum then break end
|
||||
end
|
||||
@@ -989,101 +1015,210 @@ function debuggerCreateStackWindow()
|
||||
|
||||
local layout = ide:GetSetting("/view", "uimgrlayout")
|
||||
if layout and not layout:find("stackpanel") then
|
||||
ide.frame.bottomnotebook:AddPage(stackCtrl, TR("Stack"), true)
|
||||
return
|
||||
ide:AddPanelDocked(ide.frame.bottomnotebook, stackCtrl, "stackpanel", TR("Stack"))
|
||||
else
|
||||
ide:AddPanel(stackCtrl, "stackpanel", TR("Stack"))
|
||||
end
|
||||
DebuggerAddStackWindow()
|
||||
end
|
||||
|
||||
local function debuggerCreateWatchWindow()
|
||||
local watchCtrl = wx.wxListCtrl(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wx.wxLC_REPORT + wx.wxLC_EDIT_LABELS)
|
||||
local watchCtrl = wx.wxTreeCtrl(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxSize(width, height),
|
||||
wx.wxTR_LINES_AT_ROOT + wx.wxTR_HAS_BUTTONS + wx.wxTR_SINGLE
|
||||
+ wx.wxTR_HIDE_ROOT + wx.wxTR_EDIT_LABELS)
|
||||
|
||||
debugger.watchCtrl = watchCtrl
|
||||
|
||||
local info = wx.wxListItem()
|
||||
info:SetMask(wx.wxLIST_MASK_TEXT + wx.wxLIST_MASK_WIDTH)
|
||||
info:SetText(TR("Expression"))
|
||||
info:SetWidth(width * 0.32)
|
||||
watchCtrl:InsertColumn(0, info)
|
||||
local root = watchCtrl:AddRoot("Watch")
|
||||
watchCtrl:SetImageList(debugger.imglist)
|
||||
|
||||
info:SetText(TR("Value"))
|
||||
info:SetWidth(width * 0.56)
|
||||
watchCtrl:InsertColumn(1, info)
|
||||
local defaultExpr = "watch expression"
|
||||
local expressions = {} -- table to keep track of expressions
|
||||
|
||||
local watchMenu = wx.wxMenu {
|
||||
{ ID_ADDWATCH, TR("&Add Watch")..KSC(ID_ADDWATCH) },
|
||||
{ ID_EDITWATCH, TR("&Edit Watch")..KSC(ID_EDITWATCH) },
|
||||
{ ID_DELETEWATCH, TR("&Delete Watch")..KSC(ID_DELETEWATCH) },
|
||||
}
|
||||
function watchCtrl:SetItemExpression(item, expr, value)
|
||||
expressions[item:GetValue()] = expr
|
||||
self:SetItemText(item, expr .. ' = ' .. (value or '?'))
|
||||
self:SelectItem(item, true)
|
||||
if not value then updateWatches(item) end
|
||||
end
|
||||
|
||||
local function findSelectedWatchItem()
|
||||
local count = watchCtrl:GetSelectedItemCount()
|
||||
if count > 0 then
|
||||
for idx = 0, watchCtrl:GetItemCount() - 1 do
|
||||
if watchCtrl:GetItemState(idx, wx.wxLIST_STATE_FOCUSED) ~= 0 then
|
||||
return idx
|
||||
end
|
||||
end
|
||||
function watchCtrl:GetItemExpression(item)
|
||||
return expressions[item:GetValue()]
|
||||
end
|
||||
|
||||
local names = {}
|
||||
function watchCtrl:SetItemName(item, name)
|
||||
local nametype = type(name)
|
||||
names[item:GetValue()] = (
|
||||
(nametype == 'string' or nametype == 'number' or nametype == 'boolean')
|
||||
and name or nil
|
||||
)
|
||||
end
|
||||
|
||||
function watchCtrl:GetItemName(item)
|
||||
return names[item:GetValue()]
|
||||
end
|
||||
|
||||
local valuecache = {}
|
||||
function watchCtrl:SetItemValueIfExpandable(item, value)
|
||||
local expandable = type(value) == 'table' and next(value) ~= nil
|
||||
valuecache[item:GetValue()] = expandable and value or nil
|
||||
self:SetItemHasChildren(item, expandable)
|
||||
end
|
||||
|
||||
function watchCtrl:GetItemChildren(item)
|
||||
return valuecache[item:GetValue()] or {}
|
||||
end
|
||||
|
||||
function watchCtrl:IsWatch(item)
|
||||
return item:IsOk() and watchCtrl:GetItemParent(item):GetValue() == root:GetValue()
|
||||
end
|
||||
|
||||
function watchCtrl:IsEditable(item)
|
||||
return (item and item:IsOk()
|
||||
and (watchCtrl:IsWatch(item) or watchCtrl:GetItemName(item) ~= nil))
|
||||
end
|
||||
|
||||
function watchCtrl:UpdateItemValue(item, value)
|
||||
local expr = ''
|
||||
local origitem = item
|
||||
while true do
|
||||
local name = watchCtrl:GetItemName(item)
|
||||
expr = (watchCtrl:IsWatch(item)
|
||||
and ('({%s})[1]'):format(watchCtrl:GetItemExpression(item))
|
||||
or (type(name) == 'string' and '[%q]' or '[%s]'):format(tostring(name))
|
||||
)..expr
|
||||
if watchCtrl:IsWatch(item) then break end
|
||||
item = watchCtrl:GetItemParent(item)
|
||||
if not item:IsOk() then break end
|
||||
end
|
||||
|
||||
if debugger.running then debugger.update() end
|
||||
if debugger.server and not debugger.running
|
||||
and (not debugger.scratchpad or debugger.scratchpad.paused) then
|
||||
copas.addthread(function ()
|
||||
local _, _, err = debugger.execute(expr..'='..value)
|
||||
if err then
|
||||
watchCtrl:SetItemText(origitem, 'error: '..err:gsub("%[.-%]:%d+:%s+",""))
|
||||
else
|
||||
updateWatchesSync(item)
|
||||
end
|
||||
updateStackSync()
|
||||
end)
|
||||
end
|
||||
return -1
|
||||
end
|
||||
|
||||
local defaultExpr = ""
|
||||
local function addWatch()
|
||||
local row = watchCtrl:InsertItem(watchCtrl:GetItemCount(), TR("Expr"))
|
||||
watchCtrl:SetItem(row, 0, defaultExpr)
|
||||
watchCtrl:SetItem(row, 1, TR("Value"))
|
||||
watchCtrl:EditLabel(row)
|
||||
end
|
||||
|
||||
local function editWatch()
|
||||
local row = findSelectedWatchItem()
|
||||
if row >= 0 then watchCtrl:EditLabel(row) end
|
||||
end
|
||||
|
||||
local function deleteWatch()
|
||||
local row = findSelectedWatchItem()
|
||||
if row >= 0 then watchCtrl:DeleteItem(row) end
|
||||
end
|
||||
|
||||
watchCtrl:Connect(wx.wxEVT_CONTEXT_MENU,
|
||||
function (event) watchCtrl:PopupMenu(watchMenu) end)
|
||||
|
||||
watchCtrl:Connect(ID_ADDWATCH, wx.wxEVT_COMMAND_MENU_SELECTED, addWatch)
|
||||
|
||||
watchCtrl:Connect(ID_EDITWATCH, wx.wxEVT_COMMAND_MENU_SELECTED, editWatch)
|
||||
watchCtrl:Connect(ID_EDITWATCH, wx.wxEVT_UPDATE_UI,
|
||||
function (event) event:Enable(watchCtrl:GetSelectedItemCount() > 0) end)
|
||||
|
||||
watchCtrl:Connect(ID_DELETEWATCH, wx.wxEVT_COMMAND_MENU_SELECTED, deleteWatch)
|
||||
watchCtrl:Connect(ID_DELETEWATCH, wx.wxEVT_UPDATE_UI,
|
||||
function (event) event:Enable(watchCtrl:GetSelectedItemCount() > 0) end)
|
||||
|
||||
watchCtrl:Connect(wx.wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
|
||||
function (event) watchCtrl:EditLabel(event:GetIndex()) end)
|
||||
|
||||
watchCtrl:Connect(wx.wxEVT_COMMAND_LIST_END_LABEL_EDIT,
|
||||
watchCtrl:Connect(wx.wxEVT_COMMAND_TREE_ITEM_EXPANDING,
|
||||
function (event)
|
||||
local row = event:GetIndex()
|
||||
local item_id = event:GetItem()
|
||||
local count = watchCtrl:GetChildrenCount(item_id, false)
|
||||
if count > 0 then return true end
|
||||
|
||||
local image = watchCtrl:GetItemImage(item_id)
|
||||
local num = 1
|
||||
for name,value in pairs(watchCtrl:GetItemChildren(item_id)) do
|
||||
local strval = fixUTF8(trimToMaxLength(serialize(value, params)))
|
||||
local text = stringifyKeyIntoPrefix(name, num)..strval
|
||||
local item = watchCtrl:AppendItem(item_id, text, image)
|
||||
watchCtrl:SetItemValueIfExpandable(item, value)
|
||||
watchCtrl:SetItemName(item, name)
|
||||
|
||||
num = num + 1
|
||||
if num > stackmaxnum then break end
|
||||
end
|
||||
return true
|
||||
end)
|
||||
|
||||
watchCtrl:Connect(wx.wxEVT_COMMAND_TREE_DELETE_ITEM,
|
||||
function (event)
|
||||
local value = event:GetItem():GetValue()
|
||||
expressions[value] = nil
|
||||
valuecache[value] = nil
|
||||
names[value] = nil
|
||||
end)
|
||||
|
||||
local item
|
||||
-- wx.wxEVT_CONTEXT_MENU is only triggered over tree items on OSX,
|
||||
-- but it needs to be also triggered below any item to add a watch,
|
||||
-- so use RIGHT_DOWN instead
|
||||
watchCtrl:Connect(wx.wxEVT_RIGHT_DOWN,
|
||||
function (event)
|
||||
-- store the item to be used in edit/delete actions
|
||||
item = watchCtrl:HitTest(watchCtrl:ScreenToClient(wx.wxGetMousePosition()))
|
||||
local editlabel = watchCtrl:IsWatch(item) and TR("&Edit Watch") or TR("&Edit Value")
|
||||
watchCtrl:PopupMenu(wx.wxMenu {
|
||||
{ ID_ADDWATCH, TR("&Add Watch")..KSC(ID_ADDWATCH) },
|
||||
{ ID_EDITWATCH, editlabel..KSC(ID_EDITWATCH) },
|
||||
{ ID_DELETEWATCH, TR("&Delete Watch")..KSC(ID_DELETEWATCH) },
|
||||
})
|
||||
item = nil
|
||||
end)
|
||||
|
||||
watchCtrl:Connect(ID_ADDWATCH, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event) watchCtrl:EditLabel(watchCtrl:AppendItem(root, defaultExpr, image.LOCAL)) end)
|
||||
|
||||
watchCtrl:Connect(ID_EDITWATCH, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event) watchCtrl:EditLabel(item or watchCtrl:GetSelection()) end)
|
||||
watchCtrl:Connect(ID_EDITWATCH, wx.wxEVT_UPDATE_UI,
|
||||
function (event) event:Enable(watchCtrl:IsEditable(item or watchCtrl:GetSelection())) end)
|
||||
|
||||
watchCtrl:Connect(ID_DELETEWATCH, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event) watchCtrl:Delete(item or watchCtrl:GetSelection()) end)
|
||||
watchCtrl:Connect(ID_DELETEWATCH, wx.wxEVT_UPDATE_UI,
|
||||
function (event) event:Enable(watchCtrl:IsWatch(item or watchCtrl:GetSelection())) end)
|
||||
|
||||
local label
|
||||
watchCtrl:Connect(wx.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT,
|
||||
function (event)
|
||||
local item = event:GetItem()
|
||||
if not (item:IsOk() and watchCtrl:IsEditable(item)) then
|
||||
event:Veto()
|
||||
return
|
||||
end
|
||||
|
||||
label = watchCtrl:GetItemText(item)
|
||||
|
||||
if watchCtrl:IsWatch(item) then
|
||||
local expr = watchCtrl:GetItemExpression(item)
|
||||
if expr then watchCtrl:SetItemText(item, expr) end
|
||||
else
|
||||
local prefix = stringifyKeyIntoPrefix(watchCtrl:GetItemName(item))
|
||||
local val = watchCtrl:GetItemText(item):gsub(q(prefix),'')
|
||||
watchCtrl:SetItemText(item, val)
|
||||
end
|
||||
end)
|
||||
watchCtrl:Connect(wx.wxEVT_COMMAND_TREE_END_LABEL_EDIT,
|
||||
function (event)
|
||||
event:Veto()
|
||||
|
||||
local item = event:GetItem()
|
||||
if event:IsEditCancelled() then
|
||||
if watchCtrl:GetItemText(row) == defaultExpr then
|
||||
watchCtrl:DeleteItem(row)
|
||||
if watchCtrl:GetItemText(item) == defaultExpr then
|
||||
-- when Delete is called from END_EDIT, it causes infinite loop
|
||||
-- on OSX (wxwidgets 2.9.5) as Delete calls END_EDIT again.
|
||||
-- disable handlers during Delete and then enable back.
|
||||
watchCtrl:SetEvtHandlerEnabled(false)
|
||||
watchCtrl:Delete(item)
|
||||
watchCtrl:SetEvtHandlerEnabled(true)
|
||||
else
|
||||
watchCtrl:SetItemText(item, label)
|
||||
end
|
||||
else
|
||||
watchCtrl:SetItem(row, 0, event:GetText())
|
||||
updateWatches(row)
|
||||
if watchCtrl:IsWatch(item) then
|
||||
watchCtrl:SetItemExpression(item, event:GetLabel())
|
||||
else
|
||||
watchCtrl:UpdateItemValue(item, event:GetLabel())
|
||||
end
|
||||
end
|
||||
event:Skip()
|
||||
end)
|
||||
|
||||
local layout = ide:GetSetting("/view", "uimgrlayout")
|
||||
if layout and not layout:find("watchpanel") then
|
||||
ide.frame.bottomnotebook:AddPage(watchCtrl, TR("Watch"), true)
|
||||
return
|
||||
ide:AddPanelDocked(ide.frame.bottomnotebook, watchCtrl, "watchpanel", TR("Watch"))
|
||||
else
|
||||
ide:AddPanel(watchCtrl, "watchpanel", TR("Watch"))
|
||||
end
|
||||
DebuggerAddWatchWindow()
|
||||
end
|
||||
|
||||
debuggerCreateStackWindow()
|
||||
@@ -1094,27 +1229,6 @@ debuggerCreateWatchWindow()
|
||||
|
||||
DebuggerRefreshPanels = updateStackAndWatches
|
||||
|
||||
function DebuggerAddWatch(watch)
|
||||
local mgr = ide.frame.uimgr
|
||||
local pane = mgr:GetPane("watchpanel")
|
||||
if (pane:IsOk() and not pane:IsShown()) then
|
||||
pane:Show()
|
||||
mgr:Update()
|
||||
end
|
||||
|
||||
local watchCtrl = debugger.watchCtrl
|
||||
-- check if this expression is already on the list
|
||||
for idx = 0, watchCtrl:GetItemCount() - 1 do
|
||||
if watchCtrl:GetItemText(idx) == watch then return end
|
||||
end
|
||||
|
||||
local row = watchCtrl:InsertItem(watchCtrl:GetItemCount(), TR("Expr"))
|
||||
watchCtrl:SetItem(row, 0, watch)
|
||||
watchCtrl:SetItem(row, 1, TR("Value"))
|
||||
|
||||
updateWatches(row)
|
||||
end
|
||||
|
||||
function DebuggerAttachDefault(options)
|
||||
debugger.options = options
|
||||
if (debugger.listening) then return end
|
||||
@@ -1136,6 +1250,7 @@ function DebuggerStop(resetpid)
|
||||
debuggerToggleViews(false)
|
||||
local lines = TR("traced %d instruction", debugger.stats.line):format(debugger.stats.line)
|
||||
DisplayOutputLn(TR("Debugging session completed (%s)."):format(lines))
|
||||
nameOutputTab(debugger.pid and TR("Output (running)") or TR("Output"))
|
||||
else
|
||||
-- it's possible that the application couldn't start, or that the
|
||||
-- debugger in the application didn't start, which means there is
|
||||
@@ -1146,15 +1261,16 @@ function DebuggerStop(resetpid)
|
||||
if resetpid then debugger.pid = nil end
|
||||
end
|
||||
|
||||
function DebuggerMakeFileName(editor, filePath)
|
||||
return filePath or ide.config.default.fullname
|
||||
local function debuggerMakeFileName(editor)
|
||||
return ide:GetDocument(editor):GetFilePath()
|
||||
or ide:GetDocument(editor):GetFileName()
|
||||
or ide.config.default.fullname
|
||||
end
|
||||
|
||||
function DebuggerToggleBreakpoint(editor, line)
|
||||
local markers = editor:MarkerGet(line)
|
||||
local id = editor:GetId()
|
||||
local filePath = debugger.editormap and debugger.editormap[editor]
|
||||
or DebuggerMakeFileName(editor, ide.openDocuments[id].filePath)
|
||||
or debuggerMakeFileName(editor)
|
||||
if bit.band(markers, BREAKPOINT_MARKER_VALUE) > 0 then
|
||||
editor:MarkerDelete(line, BREAKPOINT_MARKER)
|
||||
if debugger.server then debugger.breakpoint(filePath, line+1, false) end
|
||||
@@ -1187,8 +1303,7 @@ function DebuggerRefreshScratchpad()
|
||||
end
|
||||
else
|
||||
local clear = ide.frame.menuBar:IsChecked(ID_CLEAROUTPUT)
|
||||
local filePath = DebuggerMakeFileName(scratchpadEditor,
|
||||
ide.openDocuments[scratchpadEditor:GetId()].filePath)
|
||||
local filePath = debuggerMakeFileName(scratchpadEditor)
|
||||
|
||||
-- wrap into a function call to make "return" to work with scratchpad
|
||||
code = "(function()"..code.."\nend)()"
|
||||
|
||||
@@ -8,7 +8,6 @@ local editorID = 100 -- window id to create editor pages with, incremented for n
|
||||
local openDocuments = ide.openDocuments
|
||||
local statusBar = ide.frame.statusBar
|
||||
local notebook = ide.frame.notebook
|
||||
local funclist = ide.frame.toolBar.funclist
|
||||
local edcfg = ide.config.editor
|
||||
local styles = ide.config.styles
|
||||
local unpack = table.unpack or unpack
|
||||
@@ -37,14 +36,10 @@ local foldtypes = {
|
||||
-- Only update if the text has changed.
|
||||
local statusTextTable = { "OVR?", "R/O?", "Cursor Pos" }
|
||||
|
||||
funclist:SetFont(ide.font.dNormal)
|
||||
|
||||
local function updateStatusText(editor)
|
||||
local texts = { "", "", "" }
|
||||
if ide.frame and editor then
|
||||
local pos = editor:GetCurrentPos()
|
||||
local line = editor:LineFromPosition(pos)
|
||||
local col = 1 + pos - editor:PositionFromLine(line)
|
||||
local selected = #editor:GetSelectedText()
|
||||
local selections = ide.wxver >= "2.9.5" and editor:GetSelections() or 1
|
||||
|
||||
@@ -52,8 +47,8 @@ local function updateStatusText(editor)
|
||||
iff(editor:GetOvertype(), TR("OVR"), TR("INS")),
|
||||
iff(editor:GetReadOnly(), TR("R/O"), TR("R/W")),
|
||||
table.concat({
|
||||
TR("Ln: %d"):format(line + 1),
|
||||
TR("Col: %d"):format(col),
|
||||
TR("Ln: %d"):format(editor:LineFromPosition(pos) + 1),
|
||||
TR("Col: %d"):format(editor:GetColumn(pos) + 1),
|
||||
selected > 0 and TR("Sel: %d/%d"):format(selected, selections) or "",
|
||||
}, ' ')}
|
||||
end
|
||||
@@ -141,7 +136,7 @@ end
|
||||
|
||||
local function navigateToPosition(editor, fromPosition, toPosition, length)
|
||||
table.insert(editor.jumpstack, fromPosition)
|
||||
editor:GotoPos(toPosition)
|
||||
editor:GotoPosEnforcePolicy(toPosition)
|
||||
if length then
|
||||
editor:SetAnchor(toPosition + length)
|
||||
end
|
||||
@@ -150,7 +145,7 @@ end
|
||||
local function navigateBack(editor)
|
||||
if #editor.jumpstack == 0 then return end
|
||||
local pos = table.remove(editor.jumpstack)
|
||||
editor:GotoPos(pos)
|
||||
editor:GotoPosEnforcePolicy(pos)
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -176,9 +171,6 @@ function SetEditorSelection(selection)
|
||||
ide.frame:SetTitle(ExpandPlaceholders(ide.config.format.apptitle))
|
||||
|
||||
if editor then
|
||||
if funclist:IsEmpty() then funclist:Append(TR("Jump to a function definition..."), 0) end
|
||||
funclist:SetSelection(0)
|
||||
|
||||
editor:SetFocus()
|
||||
editor:SetSTCFocus(true)
|
||||
|
||||
@@ -252,7 +244,7 @@ function EditorAutoComplete(editor)
|
||||
lt = lt:match("[^%[%(%{%s,]*$")
|
||||
|
||||
-- know now which string is to be completed
|
||||
local userList = CreateAutoCompList(editor,lt)
|
||||
local userList = CreateAutoCompList(editor, lt, pos)
|
||||
|
||||
-- remove any suggestions that match the word the cursor is on
|
||||
-- for example, if typing 'foo' in front of 'bar', 'foobar' is not offered
|
||||
@@ -328,6 +320,21 @@ local function getValAtPosition(editor, pos)
|
||||
return var, funccall
|
||||
end
|
||||
|
||||
local function formatUpToX(s)
|
||||
local x = math.max(20, ide.config.acandtip.width)
|
||||
local splitstr = "([ \t]*)(%S*)([ \t]*)(\n?)"
|
||||
local t = {""}
|
||||
for prefix, word, suffix, newline in s:gmatch(splitstr) do
|
||||
if #(t[#t]) + #prefix + #word > x and #t > 0 then
|
||||
table.insert(t, word..suffix)
|
||||
else
|
||||
t[#t] = t[#t]..prefix..word..suffix
|
||||
end
|
||||
if #newline > 0 then table.insert(t, "") end
|
||||
end
|
||||
return table.concat(t, "\n")
|
||||
end
|
||||
|
||||
local function callTipFitAndShow(editor, pos, tip)
|
||||
local point = editor:PointFromPosition(pos)
|
||||
local height = editor:TextHeight(pos)
|
||||
@@ -339,7 +346,7 @@ local function callTipFitAndShow(editor, pos, tip)
|
||||
-- find the longest line in terms of width in pixels.
|
||||
local maxwidth = 0
|
||||
local lines = {}
|
||||
for line in tip:gmatch("[^\n]*\n?") do
|
||||
for line in formatUpToX(tip):gmatch("[^\n]*\n?") do
|
||||
local width = editor:TextWidth(wxstc.wxSTC_STYLE_DEFAULT, line)
|
||||
if width > maxwidth then maxwidth = width end
|
||||
table.insert(lines, line)
|
||||
@@ -373,9 +380,9 @@ function EditorCallTip(editor, pos, x, y)
|
||||
-- if this is a value type rather than a function/method call, then use
|
||||
-- full match to avoid calltip about coroutine.status for "status" vars
|
||||
local tip = GetTipInfo(editor, funccall or var, false, not funccall)
|
||||
local limit = ide.config.acandtip.maxlength
|
||||
if ide.debugger and ide.debugger.server then
|
||||
if var then
|
||||
local limit = 128
|
||||
ide.debugger.quickeval(var, function(val)
|
||||
if #val > limit then val = val:sub(1, limit-3).."..." end
|
||||
-- check if the mouse position is specified and the mouse has moved,
|
||||
@@ -384,19 +391,21 @@ function EditorCallTip(editor, pos, x, y)
|
||||
local mpos = wx.wxGetMousePosition()
|
||||
if mpos.x ~= x or mpos.y ~= y then return end
|
||||
end
|
||||
callTipFitAndShow(editor, pos, val)
|
||||
if PackageEventHandle("onEditorCallTip", editor, val, funccall or var, true) ~= false then
|
||||
callTipFitAndShow(editor, pos, val)
|
||||
end
|
||||
end)
|
||||
end
|
||||
elseif tip then
|
||||
local oncalltip = PackageEventHandle("onEditorCallTip", editor, tip, funccall or var, false)
|
||||
-- only shorten if shown on mouse-over. Use shortcut to get full info.
|
||||
local shortento = 450
|
||||
local showtooltip = ide.frame.menuBar:FindItem(ID_SHOWTOOLTIP)
|
||||
local suffix = "...\n"
|
||||
..TR("Use '%s' to see full description."):format(showtooltip:GetLabel())
|
||||
if x and y and #tip > shortento then
|
||||
tip = tip:sub(1, shortento-#suffix):gsub("%W*%w*$","")..suffix
|
||||
if x and y and #tip > limit then
|
||||
tip = tip:sub(1, limit-#suffix):gsub("%W*%w*$","")..suffix
|
||||
end
|
||||
callTipFitAndShow(editor, pos, tip)
|
||||
if oncalltip ~= false then callTipFitAndShow(editor, pos, tip) end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -411,11 +420,14 @@ function EditorIsModified(editor)
|
||||
end
|
||||
|
||||
-- Indicator handling for functions and local/global variables
|
||||
local function indicateFunctionsOnly(editor, lines, linee)
|
||||
if not (edcfg.showfncall and editor.spec and editor.spec.isfncall)
|
||||
or not (styles.indicator and styles.indicator.fncall) then return end
|
||||
-- indicator.MASKED is handled separately, so don't include in MAX
|
||||
local indicator = {FNCALL = 0, LOCAL = 1, GLOBAL = 2, MASKING = 3, MASKED = 4, MAX = 3}
|
||||
|
||||
function IndicateFunctionsOnly(editor, lines, linee)
|
||||
local sindic = styles.indicator
|
||||
if not (edcfg.showfncall and editor.spec and editor.spec.isfncall)
|
||||
or not (sindic and sindic.fncall and sindic.fncall.st ~= wxstc.wxSTC_INDIC_HIDDEN) then return end
|
||||
|
||||
local es = editor:GetEndStyled()
|
||||
local lines = lines or 0
|
||||
local linee = linee or editor:GetLineCount()-1
|
||||
|
||||
@@ -427,18 +439,14 @@ local function indicateFunctionsOnly(editor, lines, linee)
|
||||
for i,v in pairs(editor.spec.iskeyword0) do isinvalid[i] = v end
|
||||
for i,v in pairs(editor.spec.isstring) do isinvalid[i] = v end
|
||||
|
||||
local INDICS_MASK = wxstc.wxSTC_INDICS_MASK
|
||||
local INDIC0_MASK = wxstc.wxSTC_INDIC0_MASK
|
||||
|
||||
editor:SetIndicatorCurrent(indicator.FNCALL)
|
||||
for line=lines,linee do
|
||||
local tx = editor:GetLine(line)
|
||||
local ls = editor:PositionFromLine(line)
|
||||
editor:IndicatorClearRange(ls, #tx)
|
||||
|
||||
local from = 1
|
||||
local off = -1
|
||||
|
||||
editor:StartStyling(ls,INDICS_MASK)
|
||||
editor:SetStyling(#tx,0)
|
||||
while from do
|
||||
tx = from==1 and tx or string.sub(tx,from)
|
||||
|
||||
@@ -447,21 +455,15 @@ local function indicateFunctionsOnly(editor, lines, linee)
|
||||
if (f) then
|
||||
local p = ls+f+off
|
||||
local s = bit.band(editor:GetStyleAt(p),31)
|
||||
editor:StartStyling(p,INDICS_MASK)
|
||||
editor:SetStyling(#w,isinvalid[s] and 0 or (INDIC0_MASK + 1))
|
||||
if not isinvalid[s] then editor:IndicatorFillRange(p, #w) end
|
||||
off = off + t
|
||||
end
|
||||
from = t and (t+1)
|
||||
end
|
||||
end
|
||||
editor:StartStyling(es,31)
|
||||
end
|
||||
|
||||
local delayed = {}
|
||||
local tokenlists = {}
|
||||
|
||||
-- indicator.MASKED is handled separately, so don't include in MAX
|
||||
local indicator = {FNCALL = 0, LOCAL = 1, GLOBAL = 2, MASKING = 3, MASKED = 4, MAX = 3}
|
||||
|
||||
function IndicateIfNeeded()
|
||||
local editor = GetEditor()
|
||||
@@ -473,7 +475,7 @@ end
|
||||
-- find all instances of a symbol at pos
|
||||
-- return table with [0] as the definition position (if local)
|
||||
local function indicateFindInstances(editor, name, pos)
|
||||
local tokens = tokenlists[editor] or {}
|
||||
local tokens = editor:GetTokenList()
|
||||
local instances = {{[-1] = 1}}
|
||||
local this
|
||||
for _, token in ipairs(tokens) do
|
||||
@@ -506,7 +508,9 @@ local function indicateFindInstances(editor, name, pos)
|
||||
return this and instances[#instances] or {}
|
||||
end
|
||||
|
||||
function IndicateAll(editor, lines, linee)
|
||||
function IndicateAll(editor, lines)
|
||||
if not ide.config.autoanalyzer then return end
|
||||
|
||||
local d = delayed[editor]
|
||||
delayed[editor] = nil -- assume this can be finished for now
|
||||
|
||||
@@ -514,10 +518,9 @@ function IndicateAll(editor, lines, linee)
|
||||
-- when there are still some pending events for it, so handle it.
|
||||
if not pcall(function() editor:GetId() end) then return end
|
||||
|
||||
-- if markvars is not set in the spec, check for functions-only indicators
|
||||
if not (editor.spec and editor.spec.markvars) then
|
||||
return indicateFunctionsOnly(editor, lines, linee)
|
||||
end
|
||||
-- if markvars is not set in the spec, nothing else to do
|
||||
if not (editor.spec and editor.spec.marksymbols) then return end
|
||||
|
||||
local indic = styles.indicator or {}
|
||||
|
||||
local pos, vars = d and d[1] or 1, d and d[2] or nil
|
||||
@@ -527,8 +530,7 @@ function IndicateAll(editor, lines, linee)
|
||||
pos, vars = 1, nil
|
||||
end
|
||||
|
||||
tokenlists[editor] = tokenlists[editor] or {}
|
||||
local tokens = tokenlists[editor]
|
||||
local tokens = editor:GetTokenList()
|
||||
|
||||
if start then -- if the range is specified
|
||||
local curindic = editor:GetIndicatorCurrent()
|
||||
@@ -536,7 +538,7 @@ function IndicateAll(editor, lines, linee)
|
||||
for n = #tokens, 1, -1 do
|
||||
local token = tokens[n]
|
||||
-- find the last token before the range
|
||||
if token[1] == 'EndScope' and token.name and token.fpos+#token.name < start then
|
||||
if not token.nobreak and token.name and token.fpos+#token.name < start then
|
||||
pos, vars = token.fpos+#token.name, token.context
|
||||
break
|
||||
end
|
||||
@@ -574,8 +576,7 @@ function IndicateAll(editor, lines, linee)
|
||||
end
|
||||
else
|
||||
if pos == 1 then -- if not continuing, then trim the list
|
||||
tokens = {}
|
||||
tokenlists[editor] = tokens
|
||||
tokens = editor:ResetTokenList()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -591,19 +592,21 @@ function IndicateAll(editor, lines, linee)
|
||||
|
||||
local s = TimeGet()
|
||||
local canwork = start and 0.010 or 0.100 -- use shorter interval when typing
|
||||
local f = editor.spec.markvars(editor:GetText(), pos, vars)
|
||||
|
||||
local f = editor.spec.marksymbols(editor:GetText(), pos, vars)
|
||||
while true do
|
||||
local op, name, lineinfo, vars, at = f()
|
||||
local op, name, lineinfo, vars, at, nobreak = f()
|
||||
if not op then break end
|
||||
local var = vars and vars[name]
|
||||
local token = {op, name=name, fpos=lineinfo, at=at, context=vars,
|
||||
self = (op == 'VarSelf') or nil }
|
||||
self = (op == 'VarSelf') or nil, nobreak=nobreak}
|
||||
if op == 'Function' then
|
||||
vars['function'] = (vars['function'] or 0) + 1
|
||||
end
|
||||
if op == 'FunctionCall' then
|
||||
if indic.fncall and edcfg.showfncall then
|
||||
IndicateOne(indicator.FNCALL, lineinfo, #name)
|
||||
end
|
||||
elseif op ~= 'VarNext' and op ~= 'VarInside' and op ~= 'Statement' then
|
||||
elseif op ~= 'VarNext' and op ~= 'VarInside' and op ~= 'Statement' and op ~= 'String' then
|
||||
table.insert(tokens, token)
|
||||
end
|
||||
|
||||
@@ -620,13 +623,13 @@ function IndicateAll(editor, lines, linee)
|
||||
if indic.varmasked and not var.masked.self then
|
||||
editor:SetIndicatorCurrent(indicator.MASKED)
|
||||
editor:IndicatorFillRange(fpos-1, #name)
|
||||
table.insert(tokens, {"Masked", name=name, fpos=fpos})
|
||||
table.insert(tokens, {"Masked", name=name, fpos=fpos, nobreak=nobreak})
|
||||
end
|
||||
|
||||
if indic.varmasking then IndicateOne(indicator.MASKING, lineinfo, #name) end
|
||||
end
|
||||
if op == 'EndScope' and name and TimeGet()-s > canwork then
|
||||
delayed[editor] = {lineinfo+#name, vars}
|
||||
if lineinfo and not nobreak and (op == 'Statement' or op == 'String') and TimeGet()-s > canwork then
|
||||
delayed[editor] = {lineinfo, vars}
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -637,18 +640,25 @@ function IndicateAll(editor, lines, linee)
|
||||
-- don't clear "masked" indicators as those can be set out of order (so
|
||||
-- last updated fragment is not always the last in terms of its position);
|
||||
-- these indicators should be up-to-date to the end of the code fragment.
|
||||
for indic = 0, indicator.MAX do IndicateOne(indic, pos, 0) end
|
||||
-- also don't clear "funccall" indicators as those can be set based on
|
||||
-- IndicateFunctionsOnly processing, which is dealt with separately
|
||||
local funconly = ide.config.editor.showfncall and editor.spec.isfncall
|
||||
for indic = funconly and indicator.LOCAL or indicator.FNCALL, indicator.MAX do
|
||||
IndicateOne(indic, pos, 0)
|
||||
end
|
||||
|
||||
return delayed[editor] ~= nil -- request more events if still need to work
|
||||
end
|
||||
|
||||
if ide.wxver < "2.9.5" or not ide.config.autoanalyzer then
|
||||
IndicateAll = indicateFunctionsOnly
|
||||
local needmore = delayed[editor] ~= nil
|
||||
if ide.config.outlineinactivity then
|
||||
if needmore then ide.timers.outline:Stop()
|
||||
else ide.timers.outline:Start(ide.config.outlineinactivity*1000, wx.wxTIMER_ONE_SHOT)
|
||||
end
|
||||
end
|
||||
return needmore -- request more events if still need to work
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Create an editor
|
||||
function CreateEditor()
|
||||
function CreateEditor(bare)
|
||||
local editor = wxstc.wxStyledTextCtrl(notebook, editorID,
|
||||
wx.wxDefaultPosition, wx.wxSize(0, 0),
|
||||
wx.wxBORDER_NONE)
|
||||
@@ -661,15 +671,16 @@ function CreateEditor()
|
||||
editor.bom = false
|
||||
editor.jumpstack = {}
|
||||
editor.ctrlcache = {}
|
||||
editor.tokenlist = {}
|
||||
-- populate cache with Ctrl-<letter> combinations for workaround on Linux
|
||||
-- http://wxwidgets.10942.n7.nabble.com/Menu-shortcuts-inconsistentcy-issue-td85065.html
|
||||
for id, shortcut in pairs(ide.config.keymap) do
|
||||
local key = shortcut:match('^Ctrl[-+](%w)$')
|
||||
local key = shortcut:match('^Ctrl[-+](.)$')
|
||||
if key then editor.ctrlcache[key:byte()] = id end
|
||||
end
|
||||
|
||||
-- populate editor keymap with configured combinations
|
||||
for _, map in ipairs(edcfg.keymap) do
|
||||
for _, map in ipairs(edcfg.keymap or {}) do
|
||||
local key, mod, cmd, os = unpack(map)
|
||||
if not os or os == ide.osname then
|
||||
if cmd then
|
||||
@@ -689,7 +700,7 @@ function CreateEditor()
|
||||
editor:SetTabWidth(tonumber(edcfg.tabwidth) or 2)
|
||||
editor:SetIndent(tonumber(edcfg.tabwidth) or 2)
|
||||
editor:SetUseTabs(edcfg.usetabs and true or false)
|
||||
editor:SetIndentationGuides(true)
|
||||
editor:SetIndentationGuides(edcfg.indentguide and true or false)
|
||||
editor:SetViewWhiteSpace(edcfg.whitespace and true or false)
|
||||
|
||||
if (edcfg.usewrap) then
|
||||
@@ -721,12 +732,14 @@ function CreateEditor()
|
||||
|
||||
editor:SetVisiblePolicy(wxstc.wxSTC_VISIBLE_STRICT, 3)
|
||||
|
||||
editor:SetMarginType(margin.LINENUMBER, wxstc.wxSTC_MARGIN_NUMBER)
|
||||
editor:SetMarginMask(margin.LINENUMBER, 0)
|
||||
editor:SetMarginWidth(margin.LINENUMBER,
|
||||
editor:TextWidth(wxstc.wxSTC_STYLE_DEFAULT, linenummask))
|
||||
|
||||
editor:SetMarginWidth(margin.MARKER, 18)
|
||||
editor:SetMarginType(margin.MARKER, wxstc.wxSTC_MARGIN_SYMBOL)
|
||||
editor:SetMarginMask(margin.MARKER, bit.bnot(wxstc.wxSTC_MASK_FOLDERS))
|
||||
editor:SetMarginMask(margin.MARKER, 0xffffffff - wxstc.wxSTC_MASK_FOLDERS)
|
||||
editor:SetMarginSensitive(margin.MARKER, true)
|
||||
|
||||
editor:MarkerDefine(StylesGetMarker("currentline"))
|
||||
@@ -772,6 +785,14 @@ function CreateEditor()
|
||||
editor:AutoCompStops([[ \n\t=-+():.,;*/!"'$%&~'#°^@?´`<>][|}{]])
|
||||
end
|
||||
|
||||
function editor:GotoPosEnforcePolicy(pos)
|
||||
self:GotoPos(pos)
|
||||
self:EnsureVisibleEnforcePolicy(self:LineFromPosition(pos))
|
||||
end
|
||||
|
||||
function editor:GetTokenList() return self.tokenlist end
|
||||
function editor:ResetTokenList() self.tokenlist = {}; return self.tokenlist end
|
||||
|
||||
-- GotoPos should work by itself, but it doesn't (wx 2.9.5).
|
||||
-- This is likely because the editor window hasn't been refreshed yet,
|
||||
-- so its LinesOnScreen method returns 0/-1, which skews the calculations.
|
||||
@@ -788,20 +809,22 @@ function CreateEditor()
|
||||
if ide.osname ~= 'Macintosh' then self:GotoPos(pos) end
|
||||
else
|
||||
redolater = nil
|
||||
self:GotoPos(pos)
|
||||
self:EnsureVisibleEnforcePolicy(self:LineFromPosition(pos))
|
||||
self:GotoPosEnforcePolicy(pos)
|
||||
end
|
||||
elseif not badtime and redolater then
|
||||
-- reset the left margin first to make sure that the position
|
||||
-- is set "from the left" to get the best content displayed.
|
||||
self:SetXOffset(0)
|
||||
self:GotoPos(redolater)
|
||||
self:EnsureVisibleEnforcePolicy(self:LineFromPosition(redolater))
|
||||
self:GotoPosEnforcePolicy(redolater)
|
||||
redolater = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function editor:SetupKeywords(...) return SetupKeywords(self, ...) end
|
||||
|
||||
if bare then return editor end -- bare editor doesn't have any event handlers
|
||||
|
||||
editor.ev = {}
|
||||
editor:Connect(wxstc.wxEVT_STC_MARGINCLICK,
|
||||
function (event)
|
||||
@@ -827,24 +850,36 @@ function CreateEditor()
|
||||
editor.assignscache = false
|
||||
end
|
||||
local evtype = event:GetModificationType()
|
||||
if (bit.band(evtype,wxstc.wxSTC_MOD_INSERTTEXT) ~= 0) then
|
||||
local inserted = bit.band(evtype, wxstc.wxSTC_MOD_INSERTTEXT) ~= 0
|
||||
local deleted = bit.band(evtype, wxstc.wxSTC_MOD_DELETETEXT) ~= 0
|
||||
if (inserted or deleted) then
|
||||
SetAutoRecoveryMark()
|
||||
table.insert(editor.ev,{event:GetPosition(),event:GetLinesAdded()})
|
||||
DynamicWordsAdd(editor,nil,editor:LineFromPosition(event:GetPosition()),event:GetLinesAdded())
|
||||
|
||||
local firstLine = editor:LineFromPosition(event:GetPosition())
|
||||
local linesChanged = inserted and event:GetLinesAdded() or 0
|
||||
table.insert(editor.ev, {event:GetPosition(), linesChanged})
|
||||
DynamicWordsAdd(editor, nil, firstLine, linesChanged)
|
||||
end
|
||||
if (bit.band(evtype,wxstc.wxSTC_MOD_DELETETEXT) ~= 0) then
|
||||
SetAutoRecoveryMark()
|
||||
table.insert(editor.ev,{event:GetPosition(),0})
|
||||
DynamicWordsAdd(editor,nil,editor:LineFromPosition(event:GetPosition()),0)
|
||||
|
||||
local beforeInserted = bit.band(evtype,wxstc.wxSTC_MOD_BEFOREINSERT) ~= 0
|
||||
local beforeDeleted = bit.band(evtype,wxstc.wxSTC_MOD_BEFOREDELETE) ~= 0
|
||||
|
||||
if (beforeInserted or beforeDeleted) then
|
||||
-- unfold the current line being changed if folded
|
||||
local firstLine = editor:LineFromPosition(event:GetPosition())
|
||||
if not editor:GetFoldExpanded(firstLine) then editor:ToggleFold(firstLine) end
|
||||
end
|
||||
|
||||
if ide.config.acandtip.nodynwords then return end
|
||||
-- only required to track changes
|
||||
if (bit.band(evtype,wxstc.wxSTC_MOD_BEFOREDELETE) ~= 0) then
|
||||
local _, numlines = event:GetText():gsub("\r?\n","%1")
|
||||
DynamicWordsRem(editor,nil,editor:LineFromPosition(event:GetPosition()), numlines)
|
||||
|
||||
if beforeDeleted then
|
||||
local pos = event:GetPosition()
|
||||
local text = editor:GetTextRange(pos, pos+event:GetLength())
|
||||
local _, numlines = text:gsub("\r?\n","%1")
|
||||
DynamicWordsRem(editor,nil,editor:LineFromPosition(pos), numlines)
|
||||
end
|
||||
if (bit.band(evtype,wxstc.wxSTC_MOD_BEFOREINSERT) ~= 0) then
|
||||
if beforeInserted then
|
||||
DynamicWordsRem(editor,nil,editor:LineFromPosition(event:GetPosition()), 0)
|
||||
end
|
||||
end)
|
||||
@@ -868,18 +903,22 @@ function CreateEditor()
|
||||
local indent = editor:GetLineIndentation(line - 1)
|
||||
local linedone = editor:GetLine(line - 1)
|
||||
|
||||
-- if the indentation is 0 and the current line is not empty
|
||||
-- then take indentation from the current line (instead of the
|
||||
-- previous one). This may happen when CR is hit at the beginning
|
||||
-- of a line (rather than at the end).
|
||||
if indent == 0 and not linetx:match("^[\010\013]*$") then
|
||||
-- if the indentation is 0 and the current line is not empty,
|
||||
-- but the previous line is empty, then take indentation from the
|
||||
-- current line (instead of the previous one). This may happen when
|
||||
-- CR is hit at the beginning of a line (rather than at the end).
|
||||
if indent == 0 and not linetx:match("^[\010\013]*$")
|
||||
and linedone:match("^[\010\013]*$") then
|
||||
indent = editor:GetLineIndentation(line)
|
||||
end
|
||||
|
||||
local ut = editor:GetUseTabs()
|
||||
local tw = ut and editor:GetTabWidth() or editor:GetIndent()
|
||||
local style = bit.band(editor:GetStyleAt(editor:PositionFromLine(line-1)), 31)
|
||||
|
||||
if edcfg.smartindent
|
||||
-- don't apply smartindent to multi-line comments or strings
|
||||
and not (editor.spec.iscomment[style] or editor.spec.isstring[style])
|
||||
and editor.spec.isdecindent and editor.spec.isincindent then
|
||||
local closed, blockend = editor.spec.isdecindent(linedone)
|
||||
local opened = editor.spec.isincindent(linedone)
|
||||
@@ -905,7 +944,9 @@ function CreateEditor()
|
||||
local tip = GetTipInfo(editor,linetxtopos,ide.config.acandtip.shorttip)
|
||||
if tip then
|
||||
if editor:CallTipActive() then editor:CallTipCancel() end
|
||||
callTipFitAndShow(editor, pos, tip)
|
||||
if PackageEventHandle("onEditorCallTip", editor, tip) ~= false then
|
||||
callTipFitAndShow(editor, pos, tip)
|
||||
end
|
||||
end
|
||||
|
||||
elseif ide.config.autocomplete then -- code completion prompt
|
||||
@@ -1015,7 +1056,9 @@ function CreateEditor()
|
||||
-- where refresh of R/W and R/O status in the status bar is delayed.
|
||||
|
||||
editor:Connect(wxstc.wxEVT_STC_PAINTED,
|
||||
function ()
|
||||
function (event)
|
||||
PackageEventHandle("onEditorPainted", editor, event)
|
||||
|
||||
if ide.osname == 'Windows' then
|
||||
updateStatusText(editor)
|
||||
|
||||
@@ -1029,8 +1072,26 @@ function CreateEditor()
|
||||
end
|
||||
end)
|
||||
|
||||
local alreadyProcessed = 0
|
||||
editor:Connect(wxstc.wxEVT_STC_UPDATEUI,
|
||||
function ()
|
||||
function (event)
|
||||
-- some of UPDATEUI events are triggered by blinking cursor, and since
|
||||
-- there are no changes, the rest of the processing can be skipped;
|
||||
-- the reason for `alreadyProcessed` is that it is not possible
|
||||
-- to completely skip all of these updates as this causes the issue
|
||||
-- of markup styling becoming visible after text deletion by Backspace.
|
||||
-- to avoid this, we allow the first update after any updates caused
|
||||
-- by real changes; the rest of UPDATEUI events are skipped.
|
||||
if event:GetUpdated() == wxstc.wxSTC_UPDATE_CONTENT
|
||||
and not next(editor.ev) then
|
||||
if alreadyProcessed > 1 then return end
|
||||
else
|
||||
alreadyProcessed = 0
|
||||
end
|
||||
alreadyProcessed = alreadyProcessed + 1
|
||||
|
||||
PackageEventHandle("onEditorUpdateUI", editor, event)
|
||||
|
||||
if ide.osname ~= 'Windows' then updateStatusText(editor) end
|
||||
|
||||
editor:GotoPosDelayed()
|
||||
@@ -1039,8 +1100,9 @@ function CreateEditor()
|
||||
for _,iv in ipairs(editor.ev) do
|
||||
local line = editor:LineFromPosition(iv[1])
|
||||
if not minupdated or line < minupdated then minupdated = line end
|
||||
local ok, res = pcall(IndicateAll, editor,line,line+iv[2])
|
||||
local ok, res = pcall(IndicateAll, editor, line)
|
||||
if not ok then DisplayOutputLn("Internal error: ",res,line,line+iv[2]) end
|
||||
IndicateFunctionsOnly(editor,line,line+iv[2])
|
||||
end
|
||||
local firstvisible = editor:DocLineFromVisible(editor:GetFirstVisibleLine())
|
||||
local lastline = math.min(editor:GetLineCount(),
|
||||
@@ -1162,6 +1224,20 @@ function CreateEditor()
|
||||
-- auto-complete suggestions.
|
||||
local style = bit.band(editor:GetStyleAt(pos), 31)
|
||||
if not MarkupIsSpecial or not MarkupIsSpecial(style) then
|
||||
-- if BACKSPACE is used at tab stop, with spaces for indentation,
|
||||
-- and only whilespaces on the left, reduce indent
|
||||
if edcfg.backspaceunindent and keycode == wx.WXK_BACK and not editor:GetUseTabs() then
|
||||
-- get the line number from the *current* position of the cursor
|
||||
local line = editor:LineFromPosition(pos+1)
|
||||
local text = editor:GetLine(line):sub(1, pos-editor:PositionFromLine(line)+1)
|
||||
local tw = editor:GetIndent()
|
||||
-- if on the tab stop position and only white spaces on the left
|
||||
if text:find('^%s+$') and #text % tw == 0 then
|
||||
editor:SetLineIndentation(line, editor:GetLineIndentation(line) - tw)
|
||||
editor:GotoPos(pos+1-tw)
|
||||
return
|
||||
end
|
||||
end
|
||||
event:Skip()
|
||||
return
|
||||
end
|
||||
@@ -1174,6 +1250,10 @@ function CreateEditor()
|
||||
-- if no "jump back" is needed, then do normal processing as this
|
||||
-- combination can be mapped to some action
|
||||
if not navigateBack(editor) then event:Skip() end
|
||||
elseif (keycode == wx.WXK_DELETE and mod == wx.wxMOD_SHIFT)
|
||||
or (keycode == wx.WXK_INSERT and mod == wx.wxMOD_CONTROL) then
|
||||
ide.frame:AddPendingEvent(wx.wxCommandEvent(
|
||||
wx.wxEVT_COMMAND_MENU_SELECTED, keycode == wx.WXK_INSERT and ID_COPY or ID_CUT))
|
||||
elseif ide.osname == "Unix" and ide.wxver >= "2.9.5"
|
||||
and mod == wx.wxMOD_CONTROL and editor.ctrlcache[keycode] then
|
||||
ide.frame:AddPendingEvent(wx.wxCommandEvent(
|
||||
@@ -1250,6 +1330,7 @@ function CreateEditor()
|
||||
or (" (%d)"):format(#instances+(instances[0] and 1 or 0))
|
||||
local line = instances and instances[0] and editor:LineFromPosition(instances[0]-1)+1
|
||||
local def = line and " ("..TR("on line %d"):format(line)..")" or ""
|
||||
local selections = ide.wxver >= "2.9.5" and editor:GetSelections() or 1
|
||||
|
||||
local menu = wx.wxMenu {
|
||||
{ ID_UNDO, TR("&Undo") },
|
||||
@@ -1262,6 +1343,7 @@ function CreateEditor()
|
||||
{ },
|
||||
{ ID_GOTODEFINITION, TR("Go To Definition")..def },
|
||||
{ ID_RENAMEALLINSTANCES, TR("Rename All Instances")..occurrences },
|
||||
{ ID_REPLACEALLSELECTIONS, TR("Replace All Selections") },
|
||||
{ },
|
||||
{ ID_QUICKADDWATCH, TR("Add Watch Expression") },
|
||||
{ ID_QUICKEVAL, TR("Evaluate In Console") },
|
||||
@@ -1269,7 +1351,9 @@ function CreateEditor()
|
||||
}
|
||||
|
||||
menu:Enable(ID_GOTODEFINITION, instances and instances[0])
|
||||
menu:Enable(ID_RENAMEALLINSTANCES, instances and (instances[0] or #instances > 0))
|
||||
menu:Enable(ID_RENAMEALLINSTANCES, instances and (instances[0] or #instances > 0)
|
||||
or editor:GetSelectionStart() ~= editor:GetSelectionEnd())
|
||||
menu:Enable(ID_REPLACEALLSELECTIONS, selections > 1)
|
||||
menu:Enable(ID_QUICKADDWATCH, value ~= nil)
|
||||
menu:Enable(ID_QUICKEVAL, value ~= nil)
|
||||
|
||||
@@ -1300,12 +1384,49 @@ function CreateEditor()
|
||||
editor:Connect(ID_RENAMEALLINSTANCES, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function(event)
|
||||
if value and pos then
|
||||
if not (instances and (instances[0] or #instances > 0)) then
|
||||
-- if multiple instances (of a variable) are not detected,
|
||||
-- then simply find all instances of (selected) `value`
|
||||
instances = {}
|
||||
local length, pos = editor:GetLength(), 0
|
||||
while true do
|
||||
editor:SetTargetStart(pos)
|
||||
editor:SetTargetEnd(length)
|
||||
pos = editor:SearchInTarget(value)
|
||||
if pos == -1 then break end
|
||||
table.insert(instances, pos+1)
|
||||
pos = pos + #value
|
||||
end
|
||||
end
|
||||
selectAllInstances(instances, value, pos)
|
||||
end
|
||||
end)
|
||||
|
||||
editor:Connect(ID_REPLACEALLSELECTIONS, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function(event)
|
||||
local main = editor:GetMainSelection()
|
||||
local text = wx.wxGetTextFromUser(
|
||||
TR("Enter replacement text"),
|
||||
TR("Replace All Selections"),
|
||||
editor:GetTextRange(editor:GetSelectionNStart(main), editor:GetSelectionNEnd(main))
|
||||
)
|
||||
if not text or text == "" then return end
|
||||
|
||||
editor:BeginUndoAction()
|
||||
for s = 0, editor:GetSelections()-1 do
|
||||
local selst, selend = editor:GetSelectionNStart(s), editor:GetSelectionNEnd(s)
|
||||
editor:SetTargetStart(selst)
|
||||
editor:SetTargetEnd(selend)
|
||||
editor:ReplaceTarget(text)
|
||||
editor:SetSelectionNStart(s, selst)
|
||||
editor:SetSelectionNEnd(s, selst+#text)
|
||||
end
|
||||
editor:EndUndoAction()
|
||||
editor:SetMainSelection(main)
|
||||
end)
|
||||
|
||||
editor:Connect(ID_QUICKADDWATCH, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function(event) DebuggerAddWatch(value) end)
|
||||
function(event) ide:AddWatch(value) end)
|
||||
|
||||
editor:Connect(ID_QUICKEVAL, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function(event) ShellExecuteCode(value) end)
|
||||
@@ -1320,19 +1441,26 @@ end
|
||||
-- Add an editor to the notebook
|
||||
function AddEditor(editor, name)
|
||||
assert(notebook:GetPageIndex(editor) == -1, "Editor being added is not in the notebook: failed")
|
||||
if notebook:AddPage(editor, name, true) then
|
||||
local id = editor:GetId()
|
||||
local document = setmetatable({}, ide.proto.Document)
|
||||
document.editor = editor
|
||||
|
||||
-- set the document properties
|
||||
local id = editor:GetId()
|
||||
local document = setmetatable({}, ide.proto.Document)
|
||||
document.editor = editor
|
||||
document.fileName = name
|
||||
document.filePath = nil
|
||||
document.modTime = nil
|
||||
document.isModified = false
|
||||
openDocuments[id] = document
|
||||
|
||||
-- add page only after document is created as there may be handlers
|
||||
-- that expect the document (for example, onEditorFocusSet)
|
||||
if not notebook:AddPage(editor, name, true) then
|
||||
openDocuments[id] = nil
|
||||
return
|
||||
else
|
||||
document.index = notebook:GetPageIndex(editor)
|
||||
document.fileName = name
|
||||
document.filePath = nil
|
||||
document.modTime = nil
|
||||
document.isModified = false
|
||||
openDocuments[id] = document
|
||||
return document
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
function GetSpec(ext,forcespec)
|
||||
@@ -1397,68 +1525,12 @@ function SetupKeywords(editor, ext, forcespec, styles, font, fontitalic)
|
||||
editor:SetProperty("lexer.cpp.track.preprocessor", "0")
|
||||
editor:SetProperty("lexer.cpp.update.preprocessor", "0")
|
||||
|
||||
-- create italic font if only main font is provided
|
||||
if font and not fontitalic then
|
||||
fontitalic = wx.wxFont(font)
|
||||
fontitalic:SetStyle(wx.wxFONTSTYLE_ITALIC)
|
||||
end
|
||||
|
||||
StylesApplyToEditor(styles or ide.config.styles, editor,
|
||||
font or ide.font.eNormal,fontitalic or ide.font.eItalic,lexerstyleconvert)
|
||||
end
|
||||
|
||||
----------------------------------------------------
|
||||
-- function list for current file
|
||||
|
||||
local function refreshFunctionList(event)
|
||||
event:Skip()
|
||||
|
||||
local editor = GetEditor()
|
||||
if (editor and not (editor.spec and editor.spec.isfndef)) then return end
|
||||
|
||||
-- parse current file and update list
|
||||
-- first populate with the current label to minimize flicker
|
||||
-- then populate the list and update the label
|
||||
local current = funclist:GetCurrentSelection()
|
||||
local label = funclist:GetString(current)
|
||||
local default = funclist:GetString(0)
|
||||
funclist:Clear()
|
||||
funclist:Append(current ~= wx.wxNOT_FOUND and label or default, 0)
|
||||
funclist:SetSelection(0)
|
||||
|
||||
local lines = 0
|
||||
local linee = (editor and editor:GetLineCount() or 0)-1
|
||||
for line=lines,linee do
|
||||
local tx = editor:GetLine(line)
|
||||
local s,_,cap,l = editor.spec.isfndef(tx)
|
||||
if (s) then
|
||||
local ls = editor:PositionFromLine(line)
|
||||
local style = bit.band(editor:GetStyleAt(ls+s),31)
|
||||
if not (editor.spec.iscomment[style] or editor.spec.isstring[style]) then
|
||||
funclist:Append((l and " " or "")..cap,line)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
funclist:SetString(0, default)
|
||||
funclist:SetSelection(current ~= wx.wxNOT_FOUND and current or 0)
|
||||
end
|
||||
|
||||
-- wx.wxEVT_SET_FOCUS is not triggered for wxChoice on Mac (wx 2.8.12),
|
||||
-- so use wx.wxEVT_LEFT_DOWN instead; none of the events are triggered for
|
||||
-- wxChoice on Linux (wx 2.9.5+), so use EVT_ENTER_WINDOW attached to the
|
||||
-- toolbar itself until something better is available.
|
||||
if ide.osname == 'Unix' then
|
||||
ide.frame.toolBar:Connect(wx.wxEVT_ENTER_WINDOW, refreshFunctionList)
|
||||
else
|
||||
local event = ide.osname == 'Macintosh' and wx.wxEVT_LEFT_DOWN or wx.wxEVT_SET_FOCUS
|
||||
funclist:Connect(event, refreshFunctionList)
|
||||
end
|
||||
|
||||
funclist:Connect(wx.wxEVT_COMMAND_CHOICE_SELECTED,
|
||||
function (event)
|
||||
-- test if updated
|
||||
-- jump to line
|
||||
event:Skip()
|
||||
local l = event:GetClientData()
|
||||
if (l and l > 0) then
|
||||
local editor = GetEditor()
|
||||
editor:GotoLine(l)
|
||||
editor:SetFocus()
|
||||
editor:SetSTCFocus(true)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -12,30 +12,25 @@ ide.filetree = {
|
||||
projdirlist = {},
|
||||
projdirpartmap = {},
|
||||
projtree = nil,
|
||||
imglist = ide:CreateImageList("PROJECT", "FOLDER", "FILE-KNOWN", "FILE-NORMAL"),
|
||||
settings = {extensionignore = {}},
|
||||
}
|
||||
local filetree = ide.filetree
|
||||
|
||||
local iscaseinsensitive = wx.wxFileName("A"):SameAs(wx.wxFileName("a"))
|
||||
local pathsep = GetPathSeparator()
|
||||
local q = EscapeMagic
|
||||
local image = { DIRECTORY = 0, FILEKNOWN = 1, FILEOTHER = 2 }
|
||||
|
||||
do
|
||||
local settings = ide:AddPackage('core.filetree', {}):GetSettings()
|
||||
for setting in pairs(filetree.settings) do
|
||||
if settings[setting] then filetree.settings[setting] = settings[setting] end
|
||||
end
|
||||
end
|
||||
|
||||
-- generic tree
|
||||
-- ------------
|
||||
|
||||
local IMG_DIRECTORY, IMG_FILE_KNOWN, IMG_FILE_OTHER = 0, 1, 2
|
||||
|
||||
do
|
||||
local getBitmap = (ide.app.createbitmap or wx.wxArtProvider.GetBitmap)
|
||||
local size = wx.wxSize(16, 16)
|
||||
filetree.imglist = wx.wxImageList(16,16)
|
||||
-- 0 = directory
|
||||
filetree.imglist:Add(getBitmap(wx.wxART_FOLDER, wx.wxART_OTHER, size))
|
||||
-- 1 = file known spec
|
||||
filetree.imglist:Add(getBitmap(wx.wxART_HELP_PAGE, wx.wxART_OTHER, size))
|
||||
-- 2 = file other
|
||||
filetree.imglist:Add(getBitmap(wx.wxART_NORMAL_FILE, wx.wxART_OTHER, size))
|
||||
end
|
||||
|
||||
local function treeAddDir(tree,parent_id,rootdir)
|
||||
local items = {}
|
||||
local item, cookie = tree:GetFirstChild(parent_id)
|
||||
@@ -49,28 +44,32 @@ local function treeAddDir(tree,parent_id,rootdir)
|
||||
|
||||
for _, file in ipairs(FileSysGetRecursive(rootdir)) do
|
||||
local name, dir = file:match("([^"..pathsep.."]+)("..pathsep.."?)$")
|
||||
local known = GetSpec(GetFileExt(name))
|
||||
local icon = #dir>0 and IMG_DIRECTORY or known and IMG_FILE_KNOWN or IMG_FILE_OTHER
|
||||
local item = items[name .. icon]
|
||||
if item then -- existing item
|
||||
-- keep deleting items until we find item
|
||||
while true do
|
||||
local next = (curr
|
||||
and tree:GetNextSibling(curr)
|
||||
or tree:GetFirstChild(parent_id))
|
||||
if not next:IsOk() or name == tree:GetItemText(next) then
|
||||
curr = next
|
||||
break
|
||||
local isdir = #dir>0
|
||||
local ext = GetFileExt(name)
|
||||
if isdir or not filetree.settings.extensionignore[ext] then
|
||||
local known = GetSpec(ext)
|
||||
local icon = isdir and image.DIRECTORY or known and image.FILEKNOWN or image.FILEOTHER
|
||||
local item = items[name .. icon]
|
||||
if item then -- existing item
|
||||
-- keep deleting items until we find item
|
||||
while true do
|
||||
local next = (curr
|
||||
and tree:GetNextSibling(curr)
|
||||
or tree:GetFirstChild(parent_id))
|
||||
if not next:IsOk() or name == tree:GetItemText(next) then
|
||||
curr = next
|
||||
break
|
||||
end
|
||||
tree:Delete(next)
|
||||
end
|
||||
tree:Delete(next)
|
||||
else -- new item
|
||||
curr = (curr
|
||||
and tree:InsertItem(parent_id, curr, name, icon)
|
||||
or tree:PrependItem(parent_id, name, icon))
|
||||
if isdir then tree:SetItemHasChildren(curr, FileDirHasContent(file)) end
|
||||
end
|
||||
else -- new item
|
||||
curr = (curr
|
||||
and tree:InsertItem(parent_id, curr, name, icon)
|
||||
or tree:PrependItem(parent_id, name, icon))
|
||||
if #dir>0 then tree:SetItemHasChildren(curr, FileSysHasContent(file)) end
|
||||
if curr:IsOk() then cache[iscaseinsensitive and name:lower() or name] = curr end
|
||||
end
|
||||
if curr:IsOk() then cache[iscaseinsensitive and name:lower() or name] = curr end
|
||||
end
|
||||
|
||||
-- delete any leftovers (something that exists in the tree, but not on disk)
|
||||
@@ -97,7 +96,7 @@ local function treeSetRoot(tree,rootdir)
|
||||
tree:DeleteAllItems()
|
||||
if (not wx.wxDirExists(rootdir)) then return end
|
||||
|
||||
local root_id = tree:AddRoot(rootdir, IMG_DIRECTORY)
|
||||
local root_id = tree:AddRoot(rootdir, image.DIRECTORY)
|
||||
tree:SetItemHasChildren(root_id, true) -- make sure that the item can expand
|
||||
tree:Expand(root_id) -- this will also populate the tree
|
||||
end
|
||||
@@ -141,15 +140,20 @@ local function findItem(tree, match)
|
||||
end
|
||||
|
||||
local function treeSetConnectorsAndIcons(tree)
|
||||
tree:SetImageList(filetree.imglist)
|
||||
tree:AssignImageList(filetree.imglist)
|
||||
|
||||
local function isIt(item, imgtype) return tree:GetItemImage(item) == imgtype end
|
||||
|
||||
function tree:IsDirectory(item_id) return isIt(item_id, IMG_DIRECTORY) end
|
||||
function tree:IsFileKnown(item_id) return isIt(item_id, IMG_FILE_KNOWN) end
|
||||
function tree:IsFileOther(item_id) return isIt(item_id, IMG_FILE_OTHER) end
|
||||
function tree:IsDirectory(item_id) return isIt(item_id, image.DIRECTORY) end
|
||||
function tree:IsFileKnown(item_id) return isIt(item_id, image.FILEKNOWN) end
|
||||
function tree:IsFileOther(item_id) return isIt(item_id, image.FILEOTHER) end
|
||||
function tree:IsRoot(item_id) return not tree:GetItemParent(item_id):IsOk() end
|
||||
|
||||
function tree:FindItem(match)
|
||||
return findItem(self, (wx.wxIsAbsolutePath(match) or match == '') and match
|
||||
or MergeFullPath(ide:GetProject(), match))
|
||||
end
|
||||
|
||||
function tree:GetItemFullName(item_id)
|
||||
local tree = self
|
||||
local str = tree:GetItemText(item_id)
|
||||
@@ -167,6 +171,17 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
return fullPath:GetFullPath()
|
||||
end
|
||||
|
||||
function tree:RefreshChildren(node)
|
||||
node = node or tree:GetRootItem()
|
||||
treeAddDir(tree,node,tree:GetItemFullName(node))
|
||||
local item, cookie = tree:GetFirstChild(node)
|
||||
while true do
|
||||
if not item:IsOk() then return end
|
||||
if tree:IsExpanded(item) then tree:RefreshChildren(item) end
|
||||
item, cookie = tree:GetNextChild(node, cookie)
|
||||
end
|
||||
end
|
||||
|
||||
local function refreshAncestors(node)
|
||||
-- when this method is called from END_EDIT, it causes infinite loop
|
||||
-- on OSX (wxwidgets 2.9.5) as Delete in treeAddDir calls END_EDIT again.
|
||||
@@ -200,7 +215,7 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
|
||||
local empty = ""
|
||||
local function renameItem(itemsrc, target)
|
||||
local isdir = tree:GetItemImage(itemsrc) == IMG_DIRECTORY
|
||||
local isdir = tree:GetItemImage(itemsrc) == image.DIRECTORY
|
||||
local isnew = tree:GetItemText(itemsrc) == empty
|
||||
local source = tree:GetItemFullName(itemsrc)
|
||||
local fn = wx.wxFileName(target)
|
||||
@@ -213,6 +228,9 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
and ide:FindDocumentsByPartialPath(source)
|
||||
or {ide:FindDocument(source)})
|
||||
for _, doc in ipairs(docs) do
|
||||
if not isdir and PackageEventHandle("onEditorPreSave", doc.editor, source) == false then
|
||||
return false
|
||||
end
|
||||
if SaveModifiedDialog(doc.editor, true) == wx.wxID_CANCEL then return end
|
||||
end
|
||||
end
|
||||
@@ -249,10 +267,13 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
doc.filePath = nil -- remove path to avoid "file no longer exists" message
|
||||
-- when moving folders, /foo/bar/file.lua can be replaced with
|
||||
-- /foo/baz/bar/file.lua, so change /foo/bar to /foo/baz/bar
|
||||
LoadFile(fullpath:gsub(q(source), target), doc.editor)
|
||||
local path = (not iscaseinsensitive and fullpath:gsub(q(source), target)
|
||||
or fullpath:lower():gsub(q(source:lower()), target))
|
||||
LoadFile(path, doc.editor)
|
||||
if not isdir then PackageEventHandle("onEditorSave", doc.editor) end
|
||||
end
|
||||
else -- refresh the tree and select the new item
|
||||
local itemdst = findItem(tree, target)
|
||||
local itemdst = tree:FindItem(target)
|
||||
if itemdst then
|
||||
refreshAncestors(tree:GetItemParent(itemdst))
|
||||
tree:SelectItem(itemdst)
|
||||
@@ -263,17 +284,20 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
return true
|
||||
end
|
||||
local function deleteItem(item_id)
|
||||
local isdir = tree:GetItemImage(item_id) == IMG_DIRECTORY
|
||||
local isdir = tree:GetItemImage(item_id) == image.DIRECTORY
|
||||
local source = tree:GetItemFullName(item_id)
|
||||
|
||||
if isdir and FileSysHasContent(source..pathsep) then return false end
|
||||
if isdir and FileDirHasContent(source..pathsep) then return false end
|
||||
if wx.wxMessageBox(
|
||||
TR("Do you want to delete '%s'?"):format(source),
|
||||
GetIDEString("editormessage"),
|
||||
wx.wxYES_NO + wx.wxCENTRE, ide.frame) ~= wx.wxYES then return false end
|
||||
|
||||
if isdir then
|
||||
wx.wxRmdir(source)
|
||||
if not wx.wxRmdir(source) then
|
||||
ReportError(TR("Unable to delete directory '%s': %s")
|
||||
:format(source, wx.wxSysErrorMsg()))
|
||||
end
|
||||
else
|
||||
local doc = ide:FindDocument(source)
|
||||
if doc then ClosePage(doc.index) end
|
||||
@@ -296,13 +320,22 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
tree:ActivateItem(event:GetItem())
|
||||
end)
|
||||
|
||||
-- save configuration and refresh the tree
|
||||
local function saveSettingsAndRefresh()
|
||||
ide:AddPackage('core.filetree', {}):SetSettings(filetree.settings)
|
||||
tree:RefreshChildren()
|
||||
-- now mark the current file (if it was previously disabled)
|
||||
local editor = ide:GetEditor()
|
||||
if editor then FileTreeMarkSelected(ide:GetDocument(editor):GetFilePath()) end
|
||||
end
|
||||
|
||||
-- handle context menu
|
||||
local function addItem(item_id, name, image)
|
||||
local isdir = tree:GetItemImage(item_id) == IMG_DIRECTORY
|
||||
local function addItem(item_id, name, img)
|
||||
local isdir = tree:GetItemImage(item_id) == image.DIRECTORY
|
||||
local parent = isdir and item_id or tree:GetItemParent(item_id)
|
||||
if isdir then tree:Expand(item_id) end -- expand to populate if needed
|
||||
|
||||
local item = tree:PrependItem(parent, name, image)
|
||||
local item = tree:PrependItem(parent, name, img)
|
||||
tree:SetItemHasChildren(parent, true)
|
||||
-- temporarily disable expand as we don't need this node populated
|
||||
tree:SetEvtHandlerEnabled(false)
|
||||
@@ -313,11 +346,11 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
|
||||
tree:Connect(ID_NEWFILE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function()
|
||||
tree:EditLabel(addItem(tree:GetSelection(), empty, IMG_FILE_OTHER))
|
||||
tree:EditLabel(addItem(tree:GetSelection(), empty, image.FILEOTHER))
|
||||
end)
|
||||
tree:Connect(ID_NEWDIRECTORY, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function()
|
||||
tree:EditLabel(addItem(tree:GetSelection(), empty, IMG_DIRECTORY))
|
||||
tree:EditLabel(addItem(tree:GetSelection(), empty, image.DIRECTORY))
|
||||
end)
|
||||
tree:Connect(ID_RENAMEFILE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function() tree:EditLabel(tree:GetSelection()) end)
|
||||
@@ -354,6 +387,17 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
end)
|
||||
tree:Connect(ID_SHOWLOCATION, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function() ShowLocation(tree:GetItemFullName(tree:GetSelection())) end)
|
||||
tree:Connect(ID_HIDEEXTENSION, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function()
|
||||
local ext = GetFileExt(tree:GetItemText(tree:GetSelection()))
|
||||
filetree.settings.extensionignore[ext] = true
|
||||
saveSettingsAndRefresh()
|
||||
end)
|
||||
tree:Connect(ID_SHOWEXTENSIONALL, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function()
|
||||
filetree.settings.extensionignore = {}
|
||||
saveSettingsAndRefresh()
|
||||
end)
|
||||
|
||||
tree:Connect(wx.wxEVT_COMMAND_TREE_ITEM_MENU,
|
||||
function (event)
|
||||
@@ -363,6 +407,8 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
local renamelabel = (tree:IsRoot(item_id)
|
||||
and TR("&Edit Project Directory")
|
||||
or TR("&Rename"))
|
||||
local fname = tree:GetItemText(item_id)
|
||||
local ext = GetFileExt(fname)
|
||||
local menu = wx.wxMenu {
|
||||
{ ID_NEWFILE, TR("New &File") },
|
||||
{ ID_NEWDIRECTORY, TR("&New Directory") },
|
||||
@@ -370,10 +416,28 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
{ ID_RENAMEFILE, renamelabel..KSC(ID_RENAMEFILE) },
|
||||
{ ID_DELETEFILE, TR("&Delete")..KSC(ID_DELETEFILE) },
|
||||
{ },
|
||||
{ ID_HIDEEXTENSION, TR("Hide '.%s' Files"):format(ext) },
|
||||
{ },
|
||||
{ ID_OPENEXTENSION, TR("Open With Default Program") },
|
||||
{ ID_COPYFULLPATH, TR("Copy Full Path") },
|
||||
{ ID_SHOWLOCATION, TR("Show Location") },
|
||||
}
|
||||
local extlist = {
|
||||
{},
|
||||
{ ID_SHOWEXTENSIONALL, TR("Show All Files"), TR("Show all files") },
|
||||
}
|
||||
for ext in pairs(filetree.settings.extensionignore) do
|
||||
local id = ID("filetree.showextension."..ext)
|
||||
table.insert(extlist, 1, {id, '.'..ext})
|
||||
menu:Connect(id, wx.wxEVT_COMMAND_MENU_SELECTED, function()
|
||||
filetree.settings.extensionignore[ext] = nil
|
||||
saveSettingsAndRefresh()
|
||||
end)
|
||||
end
|
||||
menu:Insert(7, wx.wxMenuItem(menu, ID_SHOWEXTENSION,
|
||||
TR("Show Hidden Files"), TR("Show files previously hidden"),
|
||||
wx.wxITEM_NORMAL, wx.wxMenu(extlist)))
|
||||
|
||||
local projectdirectorymenu = wx.wxMenu {
|
||||
{ },
|
||||
{ID_PROJECTDIRCHOOSE, TR("Choose...")..KSC(ID_PROJECTDIRCHOOSE), TR("Choose a project directory")},
|
||||
@@ -381,21 +445,22 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
local projectdirectory = wx.wxMenuItem(menu, ID_PROJECTDIR,
|
||||
TR("Project Directory"), TR("Set the project directory to be used"),
|
||||
wx.wxITEM_NORMAL, projectdirectorymenu)
|
||||
menu:Insert(6, projectdirectory)
|
||||
menu:Insert(9, projectdirectory)
|
||||
FileTreeProjectListUpdate(projectdirectorymenu, 0)
|
||||
|
||||
-- disable Delete on non-empty directories
|
||||
local isdir = tree:GetItemImage(item_id) == IMG_DIRECTORY
|
||||
local isdir = tree:GetItemImage(item_id) == image.DIRECTORY
|
||||
if isdir then
|
||||
local source = tree:GetItemFullName(item_id)
|
||||
menu:Enable(ID_DELETEFILE, not FileSysHasContent(source..pathsep))
|
||||
menu:Enable(ID_DELETEFILE, not FileDirHasContent(source..pathsep))
|
||||
menu:Enable(ID_OPENEXTENSION, false)
|
||||
menu:Enable(ID_HIDEEXTENSION, false)
|
||||
else
|
||||
local fname = tree:GetItemText(item_id)
|
||||
local ext = '.'..wx.wxFileName(fname):GetExt()
|
||||
local ft = wx.wxTheMimeTypesManager:GetFileTypeFromExtension(ext)
|
||||
local ft = wx.wxTheMimeTypesManager:GetFileTypeFromExtension('.'..ext)
|
||||
menu:Enable(ID_OPENEXTENSION, ft and #ft:GetOpenCommand("") > 0)
|
||||
menu:Enable(ID_HIDEEXTENSION, not filetree.settings.extensionignore[ext])
|
||||
end
|
||||
menu:Enable(ID_SHOWEXTENSION, next(filetree.settings.extensionignore) ~= nil)
|
||||
|
||||
PackageEventHandle("onMenuFiletree", menu, tree, event)
|
||||
|
||||
@@ -425,7 +490,7 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
end
|
||||
|
||||
if item_id and bit.band(flags, mask) > 0 then
|
||||
if tree:GetItemImage(item_id) == IMG_DIRECTORY then
|
||||
if tree:GetItemImage(item_id) == image.DIRECTORY then
|
||||
tree:Toggle(item_id)
|
||||
tree:SelectItem(item_id)
|
||||
else
|
||||
@@ -474,7 +539,7 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
local itemsrc
|
||||
tree:Connect(wx.wxEVT_COMMAND_TREE_BEGIN_DRAG,
|
||||
function (event)
|
||||
if tree:GetItemParent(event:GetItem()):IsOk() then
|
||||
if ide.config.filetree.mousemove and tree:GetItemParent(event:GetItem()):IsOk() then
|
||||
itemsrc = event:GetItem()
|
||||
event:Allow()
|
||||
end
|
||||
@@ -504,7 +569,7 @@ projtree:SetFont(ide.font.fNormal)
|
||||
filetree.projtree = projtree
|
||||
|
||||
local projnotebook = ide.frame.projnotebook
|
||||
projnotebook:AddPage(projtree, "Project", true)
|
||||
projnotebook:AddPage(projtree, TR("Project"), true)
|
||||
|
||||
-- proj connectors
|
||||
-- ---------------
|
||||
@@ -595,6 +660,9 @@ function FileTreeProjectListClear()
|
||||
end
|
||||
|
||||
function FileTreeProjectListUpdate(menu, items)
|
||||
-- protect against recent project menu not being present
|
||||
if not ide:FindMenuItem(ID_RECENTPROJECTS) then return end
|
||||
|
||||
local list = getProjectLabels()
|
||||
for i=#list, 1, -1 do
|
||||
local id = ID("file.recentprojects."..i)
|
||||
@@ -622,7 +690,7 @@ local curr_file
|
||||
function FileTreeMarkSelected(file)
|
||||
if not file or not filetree.projdir or #filetree.projdir == 0 then return end
|
||||
|
||||
local item_id = findItem(projtree, file)
|
||||
local item_id = projtree:FindItem(file)
|
||||
|
||||
-- if the select item is different from the current one
|
||||
-- or the current one is the same, but not bold (which may happen when
|
||||
@@ -630,7 +698,7 @@ function FileTreeMarkSelected(file)
|
||||
if curr_file ~= file
|
||||
or item_id and not projtree:IsBold(item_id) then
|
||||
if curr_file then
|
||||
local curr_id = findItem(projtree, curr_file)
|
||||
local curr_id = projtree:FindItem(curr_file)
|
||||
if curr_id and projtree:IsBold(curr_id) then
|
||||
projtree:SetItemBold(curr_id, false)
|
||||
end
|
||||
|
||||
@@ -43,8 +43,10 @@ ide.findReplace = {
|
||||
}
|
||||
local findReplace = ide.findReplace
|
||||
|
||||
local NOTFOUND = -1
|
||||
|
||||
function findReplace:GetEditor()
|
||||
return findReplace.oveditor or GetEditor()
|
||||
return findReplace.oveditor or ide:GetEditorWithLastFocus() or GetEditor()
|
||||
end
|
||||
|
||||
-------------------- Find replace dialog
|
||||
@@ -116,7 +118,7 @@ local function shake(window, shakes, duration, vigour)
|
||||
local delay = math.floor(duration/shakes/2)
|
||||
local position = window:GetPosition() -- get current position
|
||||
local deltax = window:GetSize():GetWidth()*vigour
|
||||
for s = 1, shakes do
|
||||
for _ = 1, shakes do
|
||||
window:Move(position:GetX()-deltax, position:GetY())
|
||||
wx.wxMilliSleep(delay)
|
||||
window:Move(position:GetX()+deltax, position:GetY())
|
||||
@@ -126,18 +128,18 @@ local function shake(window, shakes, duration, vigour)
|
||||
end
|
||||
|
||||
function findReplace:FindString(reverse)
|
||||
if findReplace:HasText() then
|
||||
local editor = findReplace:GetEditor()
|
||||
local editor = findReplace:GetEditor()
|
||||
if editor and findReplace:HasText() then
|
||||
local fDown = iff(reverse, not findReplace.fDown, findReplace.fDown)
|
||||
setSearchFlags(editor)
|
||||
setTarget(editor, fDown)
|
||||
local posFind = editor:SearchInTarget(findReplace.findText)
|
||||
if (posFind == -1) and findReplace.fWrap then
|
||||
if (posFind == NOTFOUND) and findReplace.fWrap then
|
||||
editor:SetTargetStart(iff(fDown, 0, editor:GetLength()))
|
||||
editor:SetTargetEnd(iff(fDown, editor:GetLength(), 0))
|
||||
posFind = editor:SearchInTarget(findReplace.findText)
|
||||
end
|
||||
if posFind == -1 then
|
||||
if posFind == NOTFOUND then
|
||||
findReplace.foundString = false
|
||||
ide.frame:SetStatusText(TR("Text not found."))
|
||||
shake(findReplace.dialog)
|
||||
@@ -145,7 +147,7 @@ function findReplace:FindString(reverse)
|
||||
findReplace.foundString = true
|
||||
local start = editor:GetTargetStart()
|
||||
local finish = editor:GetTargetEnd()
|
||||
EnsureRangeVisible(start, finish)
|
||||
editor:EnsureVisibleEnforcePolicy(editor:LineFromPosition(start))
|
||||
editor:SetSelection(start, finish)
|
||||
ide.frame:SetStatusText("")
|
||||
end
|
||||
@@ -159,15 +161,15 @@ end
|
||||
|
||||
function findReplace:FindStringAll(inFileRegister)
|
||||
local found = false
|
||||
if findReplace:HasText() then
|
||||
local editor = findReplace:GetEditor()
|
||||
if editor and findReplace:HasText() then
|
||||
local findLen = string.len(findReplace.findText)
|
||||
local editor = findReplace:GetEditor()
|
||||
local e = setTargetAll(editor)
|
||||
|
||||
setSearchFlags(editor)
|
||||
local posFind = editor:SearchInTarget(findReplace.findText)
|
||||
if (posFind ~= -1) then
|
||||
while posFind ~= -1 do
|
||||
if (posFind ~= NOTFOUND) then
|
||||
while posFind ~= NOTFOUND do
|
||||
inFileRegister(posFind)
|
||||
editor:SetTargetStart(posFind + findLen)
|
||||
editor:SetTargetEnd(e)
|
||||
@@ -187,9 +189,11 @@ end
|
||||
|
||||
function findReplace:ReplaceString(fReplaceAll, inFileRegister)
|
||||
local replaced = false
|
||||
local editor = findReplace:GetEditor()
|
||||
if editor and findReplace:HasText() then
|
||||
-- don't replace in read-only editors
|
||||
if editor:GetReadOnly() then return false end
|
||||
|
||||
if findReplace:HasText() then
|
||||
local editor = findReplace:GetEditor()
|
||||
local endTarget = inFileRegister and setTargetAll(editor) or
|
||||
setTarget(editor, findReplace.fDown, fReplaceAll, findReplace.fWrap)
|
||||
|
||||
@@ -197,9 +201,9 @@ function findReplace:ReplaceString(fReplaceAll, inFileRegister)
|
||||
setSearchFlags(editor)
|
||||
local occurrences = 0
|
||||
local posFind = editor:SearchInTarget(findReplace.findText)
|
||||
if (posFind ~= -1) then
|
||||
if (posFind ~= NOTFOUND) then
|
||||
if (not inFileRegister) then editor:BeginUndoAction() end
|
||||
while posFind ~= -1 do
|
||||
while posFind ~= NOTFOUND do
|
||||
if (inFileRegister) then inFileRegister(posFind) end
|
||||
|
||||
local length = editor:GetLength()
|
||||
@@ -222,16 +226,14 @@ function findReplace:ReplaceString(fReplaceAll, inFileRegister)
|
||||
ide.frame:SetStatusText(("%s %s."):format(
|
||||
TR("Replaced"), TR("%d instance", occurrences):format(occurrences)))
|
||||
else
|
||||
editor:TargetFromSelection()
|
||||
-- check if there is anything selected as well as the user can
|
||||
-- move the cursor after successful search
|
||||
if findReplace.foundString
|
||||
and editor:GetSelectionStart() ~= editor:GetSelectionEnd() then
|
||||
and editor:GetSelectionStart() ~= editor:GetSelectionEnd()
|
||||
-- check that the current selection matches what's being searched for
|
||||
and editor:SearchInTarget(findReplace.findText) ~= NOTFOUND then
|
||||
local start = editor:GetSelectionStart()
|
||||
|
||||
-- convert selection to target as we need TargetRE support
|
||||
editor:TargetFromSelection()
|
||||
|
||||
local length = editor:GetLength()
|
||||
local replaced = findReplace.fRegularExpr
|
||||
and editor:ReplaceTargetRE(findReplace.replaceText)
|
||||
or editor:ReplaceTarget(findReplace.replaceText)
|
||||
@@ -292,7 +294,7 @@ local function ProcInFiles(startdir,mask,subdirs,replace)
|
||||
end
|
||||
|
||||
-- give time to the UI to refresh
|
||||
if TimeGet() - start > 0.25 then wx.wxYield() end
|
||||
if TimeGet() - start > 0.25 then ide:Yield() end
|
||||
if not findReplace.dialog:IsShown() then
|
||||
DisplayOutputLn(TR("Cancelled by the user."))
|
||||
break
|
||||
@@ -327,15 +329,8 @@ function findReplace:RunInFiles(replace)
|
||||
end
|
||||
|
||||
local function getExts()
|
||||
local knownexts = {}
|
||||
for i,spec in pairs(ide.specs) do
|
||||
if (spec.exts) then
|
||||
for n,ext in ipairs(spec.exts) do
|
||||
table.insert(knownexts, "*."..ext)
|
||||
end
|
||||
end
|
||||
end
|
||||
return #knownexts > 0 and table.concat(knownexts, "; ") or nil
|
||||
local knownexts = ide:GetKnownExtensions()
|
||||
return #knownexts > 0 and "*."..table.concat(knownexts, "; *.") or nil
|
||||
end
|
||||
|
||||
function findReplace:createDialog(replace,infiles)
|
||||
@@ -395,11 +390,13 @@ function findReplace:createDialog(replace,infiles)
|
||||
|
||||
local fname = GetEditorFileAndCurInfo(true)
|
||||
if #(findReplace.filedirText) == 0 then
|
||||
findReplace.filedirText = ide.config.path.projectdir
|
||||
findReplace.filedirText = ide:GetProject()
|
||||
or fname and fname:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
or ""
|
||||
end
|
||||
|
||||
PrependStringToArray(ide.findReplace.filedirTextArray, ide:GetProject())
|
||||
|
||||
infilesDirStat = wx.wxStaticText(findDialog, wx.wxID_ANY, TR("Directory")..": ")
|
||||
infilesDirCombo = wx.wxComboBox(findDialog, wx.wxID_ANY, findReplace.filedirText,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize, findReplace.filedirTextArray)
|
||||
@@ -535,6 +532,8 @@ function findReplace:createDialog(replace,infiles)
|
||||
-- https://groups.google.com/d/msg/wx-users/EVJr8GqyNUA/CUALp585E78J
|
||||
if (mac and ide.wxver >= "2.9.5") then
|
||||
local function simulateEnter()
|
||||
-- the button may be disabled, so check its state first
|
||||
if not findButton:IsEnabled() then return end
|
||||
findDialog:AddPendingEvent(wx.wxCommandEvent(
|
||||
wx.wxEVT_COMMAND_BUTTON_CLICKED, ID_FIND_NEXT))
|
||||
end
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local unpack = table.unpack or unpack
|
||||
|
||||
-- Pick some reasonable fixed width fonts to use for the editor
|
||||
local function setFont(style, config)
|
||||
@@ -24,13 +25,6 @@ do local gui, config = wx.wxTreeCtrl():GetFont(), ide.config.filetree
|
||||
ide.font.fNormal = gui
|
||||
end
|
||||
|
||||
-- funcList font requires similar handling
|
||||
do local gui, config = wx.wxTreeCtrl():GetFont(), ide.config.funclist
|
||||
if config.fontsize then gui:SetPointSize(config.fontsize) end
|
||||
if config.fontname then gui:SetFaceName(config.fontname) end
|
||||
ide.font.dNormal = gui
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Create the wxFrame
|
||||
-- ----------------------------------------------------------------------------
|
||||
@@ -44,7 +38,7 @@ local function createFrame()
|
||||
frame:Connect(wx.wxEVT_DROP_FILES,function(evt)
|
||||
local files = evt:GetFiles()
|
||||
if not files or #files == 0 then return end
|
||||
for i,f in ipairs(files) do
|
||||
for _, f in ipairs(files) do
|
||||
LoadFile(f,nil,true)
|
||||
end
|
||||
end)
|
||||
@@ -79,43 +73,39 @@ local function menuDropDownPosition(event)
|
||||
return ide.frame:ScreenToClient(tb:ClientToScreen(rect:GetBottomLeft()))
|
||||
end
|
||||
|
||||
local function tbIconSize()
|
||||
local iconsize = (tonumber(ide.config.toolbar and ide.config.toolbar.iconsize)
|
||||
or (ide.osname == 'Macintosh' and 24 or 16))
|
||||
if iconsize ~= 24 then iconsize = 16 end
|
||||
return iconsize
|
||||
end
|
||||
|
||||
local function createToolBar(frame)
|
||||
local toolBar = wxaui.wxAuiToolBar(frame, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wxaui.wxAUI_TB_PLAIN_BACKGROUND)
|
||||
-- wxChoice is a bit too narrow on Linux, so make it a bit larger
|
||||
local funclist = wx.wxChoice.new(toolBar, ID "toolBar.funclist",
|
||||
wx.wxDefaultPosition, wx.wxSize.new(240, ide.osname == 'Unix' and 28 or 24))
|
||||
|
||||
-- there are two sets of icons: use 24 on OSX and 16 on others.
|
||||
local toolBmpSize = (
|
||||
ide.osname == 'Macintosh' and wx.wxSize(24, 24) or wx.wxSize(16, 16))
|
||||
local getBitmap = (ide.app.createbitmap or wx.wxArtProvider.GetBitmap)
|
||||
toolBar:AddTool(ID_NEW, "New", getBitmap(wx.wxART_NORMAL_FILE, wx.wxART_TOOLBAR, toolBmpSize), TR("Create an empty document")..SCinB(ID_NEW))
|
||||
toolBar:AddTool(ID_OPEN, "Open", getBitmap(wx.wxART_FILE_OPEN, wx.wxART_TOOLBAR, toolBmpSize), TR("Open an existing document")..SCinB(ID_OPEN))
|
||||
toolBar:AddTool(ID_SAVE, "Save", getBitmap(wx.wxART_FILE_SAVE, wx.wxART_TOOLBAR, toolBmpSize), TR("Save the current document")..SCinB(ID_SAVE))
|
||||
toolBar:AddTool(ID_SAVEALL, "Save All", getBitmap(wx.wxART_NEW_DIR, wx.wxART_TOOLBAR, toolBmpSize), TR("Save all open documents")..SCinB(ID_SAVEALL))
|
||||
toolBar:AddTool(ID_PROJECTDIRFROMFILE, "Update", getBitmap(wx.wxART_GO_DIR_UP, wx.wxART_TOOLBAR, toolBmpSize), TR("Set project directory from current file")..SCinB(ID_PROJECTDIRFROMFILE))
|
||||
toolBar:AddTool(ID_PROJECTDIRCHOOSE, "Choose", getBitmap("wxART_DIR_SETUP", wx.wxART_TOOLBAR, toolBmpSize), TR("Choose a project directory")..SCinB(ID_PROJECTDIRCHOOSE))
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddTool(ID_FIND, "Find", getBitmap(wx.wxART_FIND, wx.wxART_TOOLBAR, toolBmpSize), TR("Find text")..SCinB(ID_FIND))
|
||||
toolBar:AddTool(ID_REPLACE, "Replace", getBitmap(wx.wxART_FIND_AND_REPLACE, wx.wxART_TOOLBAR, toolBmpSize), TR("Find and replace text")..SCinB(ID_REPLACE))
|
||||
if ide.app.createbitmap then -- custom handler should handle all bitmaps
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddTool(ID_STARTDEBUG, "Start Debugging", getBitmap("wxART_DEBUG_START", wx.wxART_TOOLBAR, toolBmpSize), TR("Start or Continue debugging")..SCinB(ID_STARTDEBUG))
|
||||
toolBar:AddTool(ID_STOPDEBUG, "Stop Debugging", getBitmap("wxART_DEBUG_STOP", wx.wxART_TOOLBAR, toolBmpSize), TR("Stop the currently running process")..SCinB(ID_STOPDEBUG))
|
||||
toolBar:AddTool(ID_DETACHDEBUG, "Detach Process", getBitmap("wxART_DEBUG_DETACH", wx.wxART_TOOLBAR, toolBmpSize), TR("Stop debugging and continue running the process")..SCinB(ID_DETACHDEBUG))
|
||||
toolBar:AddTool(ID_BREAK, "Break", getBitmap("wxART_DEBUG_BREAK", wx.wxART_TOOLBAR, toolBmpSize), TR("Break execution at the next executed line of code")..SCinB(ID_BREAK))
|
||||
toolBar:AddTool(ID_STEP, "Step into", getBitmap("wxART_DEBUG_STEP_INTO", wx.wxART_TOOLBAR, toolBmpSize), TR("Step into")..SCinB(ID_STEP))
|
||||
toolBar:AddTool(ID_STEPOVER, "Step over", getBitmap("wxART_DEBUG_STEP_OVER", wx.wxART_TOOLBAR, toolBmpSize), TR("Step over")..SCinB(ID_STEPOVER))
|
||||
toolBar:AddTool(ID_STEPOUT, "Step out", getBitmap("wxART_DEBUG_STEP_OUT", wx.wxART_TOOLBAR, toolBmpSize), TR("Step out of the current function")..SCinB(ID_STEPOUT))
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddTool(ID_TOGGLEBREAKPOINT, "Toggle breakpoint", getBitmap("wxART_DEBUG_BREAKPOINT_TOGGLE", wx.wxART_TOOLBAR, toolBmpSize), TR("Toggle breakpoint")..SCinB(ID_TOGGLEBREAKPOINT))
|
||||
toolBar:AddTool(ID_BOOKMARKTOGGLE, "Toggle bookmark", getBitmap("wxART_BOOKMARK_TOGGLE", wx.wxART_TOOLBAR, toolBmpSize), TR("Toggle bookmark")..SCinB(ID_BOOKMARKTOGGLE))
|
||||
toolBar:AddTool(ID_VIEWCALLSTACK, "Stack window", getBitmap("wxART_DEBUG_CALLSTACK", wx.wxART_TOOLBAR, toolBmpSize), TR("View the stack window")..SCinB(ID_VIEWCALLSTACK))
|
||||
toolBar:AddTool(ID_VIEWWATCHWINDOW, "Watch window", getBitmap("wxART_DEBUG_WATCH", wx.wxART_TOOLBAR, toolBmpSize), TR("View the watch window")..SCinB(ID_VIEWWATCHWINDOW))
|
||||
local iconsize = tbIconSize()
|
||||
local toolBmpSize = wx.wxSize(iconsize, iconsize)
|
||||
local icons, prev = ide.config.toolbar.icons
|
||||
for _, id in ipairs(icons) do
|
||||
if icons[id] ~= false then -- skip explicitly disabled icons
|
||||
if id == ID_SEPARATOR then
|
||||
-- make sure that there are no two separators next to each other;
|
||||
-- this may happen when some of the icons are disabled.
|
||||
if prev ~= ID_SEPARATOR then toolBar:AddSeparator() end
|
||||
else
|
||||
local iconmap = ide.config.toolbar.iconmap[id]
|
||||
if iconmap then
|
||||
local icon, description = unpack(iconmap)
|
||||
local isbitmap = type(icon) == "userdata" and icon:GetClassInfo():GetClassName() == "wxBitmap"
|
||||
local bitmap = isbitmap and icon or ide:GetBitmap(icon, "TOOLBAR", toolBmpSize)
|
||||
toolBar:AddTool(id, "", bitmap, TR(description)..SCinB(id))
|
||||
end
|
||||
end
|
||||
prev = id
|
||||
end
|
||||
end
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddControl(funclist)
|
||||
|
||||
toolBar:SetToolDropDown(ID_OPEN, true)
|
||||
toolBar:Connect(ID_OPEN, wxaui.wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, function(event)
|
||||
@@ -142,7 +132,6 @@ local function createToolBar(frame)
|
||||
toolBar:GetArtProvider():SetElementSize(wxaui.wxAUI_TBART_GRIPPER_SIZE, 0)
|
||||
toolBar:Realize()
|
||||
|
||||
toolBar.funclist = funclist
|
||||
frame.toolBar = toolBar
|
||||
return toolBar
|
||||
end
|
||||
@@ -295,18 +284,21 @@ local function createNotebook(frame)
|
||||
return notebook
|
||||
end
|
||||
|
||||
local function createBottomNotebook(frame)
|
||||
-- bottomnotebook (errorlog,shellbox)
|
||||
local bottomnotebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE
|
||||
- wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER)
|
||||
|
||||
-- this handler allows dragging tabs into this bottom notebook
|
||||
bottomnotebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND,
|
||||
local function addDND(notebook)
|
||||
-- this handler allows dragging tabs into this notebook
|
||||
notebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND,
|
||||
function (event)
|
||||
local notebookfrom = event:GetDragSource()
|
||||
if notebookfrom ~= ide.frame.notebook then
|
||||
-- disable cross-notebook movement of specific tabs
|
||||
local win = notebookfrom:GetPage(event:GetSelection())
|
||||
if not win then return end
|
||||
local winid = win:GetId()
|
||||
if winid == ide:GetOutput():GetId()
|
||||
or winid == ide:GetConsole():GetId()
|
||||
or winid == ide:GetProjectTree():GetId()
|
||||
then return end
|
||||
|
||||
local mgr = ide.frame.uimgr
|
||||
local pane = mgr:GetPane(notebookfrom)
|
||||
if not pane:IsOk() then return end -- not a managed window
|
||||
@@ -329,19 +321,19 @@ local function createBottomNotebook(frame)
|
||||
end
|
||||
end)
|
||||
|
||||
-- these handlers allow dragging tabs out of this bottom notebook.
|
||||
-- these handlers allow dragging tabs out of this notebook.
|
||||
-- I couldn't find a good way to stop dragging event as it's not known
|
||||
-- where the event is going to end when it's started, so we manipulate
|
||||
-- the flag that allows splits and disable it when needed.
|
||||
-- It is then enabled in BEGIN_DRAG event.
|
||||
bottomnotebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG,
|
||||
notebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG,
|
||||
function (event)
|
||||
event:Skip()
|
||||
|
||||
-- allow dragging if it was disabled earlier
|
||||
local flags = bottomnotebook:GetWindowStyleFlag()
|
||||
local flags = notebook:GetWindowStyleFlag()
|
||||
if bit.band(flags, wxaui.wxAUI_NB_TAB_SPLIT) == 0 then
|
||||
bottomnotebook:SetWindowStyleFlag(flags + wxaui.wxAUI_NB_TAB_SPLIT)
|
||||
notebook:SetWindowStyleFlag(flags + wxaui.wxAUI_NB_TAB_SPLIT)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -350,12 +342,12 @@ local function createBottomNotebook(frame)
|
||||
-- recreating it with the right control. This is complicated by the fact
|
||||
-- that tabs can be split, so if the destination is withing the area where
|
||||
-- splits happen, the tab is not removed.
|
||||
bottomnotebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_END_DRAG,
|
||||
notebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_END_DRAG,
|
||||
function (event)
|
||||
event:Skip()
|
||||
|
||||
local mgr = ide.frame.uimgr
|
||||
local win = mgr:GetPane(bottomnotebook).window
|
||||
local win = mgr:GetPane(notebook).window
|
||||
local x = win:GetScreenPosition():GetX()
|
||||
local y = win:GetScreenPosition():GetY()
|
||||
local w, h = win:GetSize():GetWidth(), win:GetSize():GetHeight()
|
||||
@@ -366,38 +358,37 @@ local function createBottomNotebook(frame)
|
||||
if mx >= x and mx <= x + w and my >= y and my <= y + h then return end
|
||||
|
||||
-- disallow split as the target is outside the notebook
|
||||
local flags = bottomnotebook:GetWindowStyleFlag()
|
||||
local flags = notebook:GetWindowStyleFlag()
|
||||
if bit.band(flags, wxaui.wxAUI_NB_TAB_SPLIT) ~= 0 then
|
||||
bottomnotebook:SetWindowStyleFlag(flags - wxaui.wxAUI_NB_TAB_SPLIT)
|
||||
notebook:SetWindowStyleFlag(flags - wxaui.wxAUI_NB_TAB_SPLIT)
|
||||
end
|
||||
|
||||
-- don't allow any dragging to the are of the pane header as it
|
||||
-- splits already split notebooks incorrectly (wxwidgets bug).
|
||||
if my >= y - 30 then return end
|
||||
|
||||
-- don't allow dragging out single tabs from tab ctrl
|
||||
-- as wxwidgets doesn't like removing pages from split notebooks.
|
||||
local tabctrl = event:GetEventObject():DynamicCast("wxAuiTabCtrl")
|
||||
if tabctrl:GetPageCount() == 1 then return end
|
||||
|
||||
local idx = event:GetSelection() -- index within the current tab ctrl
|
||||
local selection = bottomnotebook:GetPageIndex(tabctrl:GetPage(idx).window)
|
||||
local label = bottomnotebook:GetPageText(selection)
|
||||
local selection = notebook:GetPageIndex(tabctrl:GetPage(idx).window)
|
||||
local label = notebook:GetPageText(selection)
|
||||
local pane = ide:RestorePanelByLabel(label)
|
||||
if not pane then return end
|
||||
|
||||
-- names are translated on labels, so need to translate here as well
|
||||
local dragout = ({
|
||||
[TR("Watch")] = DebuggerAddWatchWindow,
|
||||
[TR("Stack")] = DebuggerAddStackWindow,
|
||||
})[label]
|
||||
if not dragout then return end
|
||||
|
||||
bottomnotebook:RemovePage(selection)
|
||||
|
||||
local pane = mgr:GetPane(dragout())
|
||||
pane:FloatingPosition(mx-10, my-10)
|
||||
pane:Show()
|
||||
notebook:RemovePage(selection)
|
||||
mgr:Update()
|
||||
end)
|
||||
end
|
||||
|
||||
local function createBottomNotebook(frame)
|
||||
-- bottomnotebook (errorlog,shellbox)
|
||||
local bottomnotebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE
|
||||
- wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER)
|
||||
|
||||
addDND(bottomnotebook)
|
||||
|
||||
-- disallow tabs closing
|
||||
bottomnotebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE,
|
||||
@@ -444,9 +435,11 @@ end
|
||||
local function createProjNotebook(frame)
|
||||
local projnotebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE
|
||||
- wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER)
|
||||
|
||||
addDND(projnotebook)
|
||||
|
||||
-- disallow tabs closing
|
||||
projnotebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE,
|
||||
function (event) event:Veto() end)
|
||||
@@ -471,14 +464,13 @@ do
|
||||
|
||||
mgr:AddPane(frame.toolBar, wxaui.wxAuiPaneInfo():
|
||||
Name("toolbar"):Caption("Toolbar"):
|
||||
MinSize(300,16):FloatingSize(800,48):
|
||||
ToolbarPane():Top():CloseButton(false):PaneBorder(false):
|
||||
LeftDockable(false):RightDockable(false))
|
||||
mgr:AddPane(frame.notebook, wxaui.wxAuiPaneInfo():
|
||||
Name("notebook"):
|
||||
CenterPane():PaneBorder(false))
|
||||
mgr:AddPane(frame.projnotebook, wxaui.wxAuiPaneInfo():
|
||||
Name("projpanel"):CaptionVisible(false):Caption(TR("Project")):
|
||||
Name("projpanel"):CaptionVisible(false):
|
||||
MinSize(200,200):FloatingSize(200,400):
|
||||
Left():Layer(1):Position(1):PaneBorder(false):
|
||||
CloseButton(true):MaximizeButton(false):PinButton(true))
|
||||
|
||||
@@ -14,6 +14,7 @@ end
|
||||
-- so don't use stock IDs on Linux
|
||||
local linux = ide.osname == 'Unix'
|
||||
|
||||
ID_SEPARATOR = NewID()
|
||||
-- File menu
|
||||
ID_NEW = linux and NewID() or wx.wxID_NEW
|
||||
ID_OPEN = linux and NewID() or wx.wxID_OPEN
|
||||
@@ -24,6 +25,9 @@ ID_NEWFILE = NewID()
|
||||
ID_NEWDIRECTORY = NewID()
|
||||
ID_RENAMEFILE = NewID()
|
||||
ID_DELETEFILE = NewID()
|
||||
ID_HIDEEXTENSION = NewID()
|
||||
ID_SHOWEXTENSION = NewID()
|
||||
ID_SHOWEXTENSIONALL = NewID()
|
||||
ID_OPENEXTENSION = NewID()
|
||||
ID_COPYFULLPATH = NewID()
|
||||
ID_SHOWLOCATION = NewID()
|
||||
@@ -78,6 +82,7 @@ ID_VIEWFILETREE = NewID()
|
||||
ID_VIEWOUTPUT = NewID()
|
||||
ID_VIEWCALLSTACK = NewID()
|
||||
ID_VIEWWATCHWINDOW = NewID()
|
||||
ID_VIEWOUTLINE = NewID()
|
||||
ID_VIEWTOOLBAR = NewID()
|
||||
ID_VIEWSTATUSBAR = NewID()
|
||||
ID_VIEWDEFAULTLAYOUT = NewID()
|
||||
@@ -123,6 +128,7 @@ ID_DELETEWATCH = NewID()
|
||||
-- Editor popup menu items
|
||||
ID_GOTODEFINITION = NewID()
|
||||
ID_RENAMEALLINSTANCES = NewID()
|
||||
ID_REPLACEALLSELECTIONS = NewID()
|
||||
ID_QUICKADDWATCH = NewID()
|
||||
ID_QUICKEVAL = NewID()
|
||||
ID_ADDTOSCRATCHPAD = NewID()
|
||||
|
||||
@@ -23,11 +23,15 @@ local function init()
|
||||
end
|
||||
end
|
||||
|
||||
function M.pos2line(pos)
|
||||
return pos and 1 + select(2, M.src:sub(1,pos):gsub(".-\n[^\n]*", ""))
|
||||
end
|
||||
|
||||
function M.warnings_from_string(src, file)
|
||||
init()
|
||||
|
||||
local ast, err, linenum, colnum = LA.ast_from_string(src, file)
|
||||
if err then return nil, err, linenum, colnum end
|
||||
if not ast and err then return nil, err, linenum, colnum end
|
||||
|
||||
if FAST then
|
||||
LI.inspect(ast, nil, src)
|
||||
@@ -44,41 +48,43 @@ function M.warnings_from_string(src, file)
|
||||
globinit[k] = true
|
||||
end
|
||||
|
||||
M.src, M.file = src, file
|
||||
return M.show_warnings(ast, globinit)
|
||||
end
|
||||
|
||||
local function cleanError(err)
|
||||
return err and err:gsub(".-:%d+: file%s+",""):gsub(", line (%d+), char %d+", ":%1")
|
||||
end
|
||||
|
||||
function AnalyzeFile(file)
|
||||
local warn, err, line, pos = M.warnings_from_string(FileRead(file), file)
|
||||
if err then
|
||||
err = err:gsub("line %d+, char %d+", "syntax error")
|
||||
end
|
||||
return warn, err, line, pos
|
||||
return warn, cleanError(err), line, pos
|
||||
end
|
||||
|
||||
function AnalyzeString(src)
|
||||
local warn, err, line, pos = M.warnings_from_string(src, "src")
|
||||
if err then
|
||||
err = err:gsub("line %d+, char %d+", "syntax error")
|
||||
end
|
||||
return warn, err, line, pos
|
||||
local warn, err, line, pos = M.warnings_from_string(src, "<string>")
|
||||
return warn, cleanError(err), line, pos
|
||||
end
|
||||
|
||||
function M.show_warnings(top_ast, globinit)
|
||||
local warnings = {}
|
||||
local function warn(msg, linenum, path)
|
||||
warnings[#warnings+1] = (path or "?") .. ":" .. (linenum or 0) .. ": " .. msg
|
||||
warnings[#warnings+1] = (path or M.file or "?") .. ":" .. (linenum or M.pos2line(M.ast.pos) or 0) .. ": " .. msg
|
||||
end
|
||||
local function known(o) return not T.istype[o] end
|
||||
local function index(f) -- build abc.def.xyz name recursively
|
||||
return (f[1].tag == 'Id' and f[1][1] or index(f[1])) .. '.' .. f[2][1] end
|
||||
local globseen, isseen, fieldseen = globinit or {}, {}, {}
|
||||
LA.walk(top_ast, function(ast)
|
||||
M.ast = ast
|
||||
local path, line = tostring(ast.lineinfo):gsub('<C|','<'):match('<([^|]+)|L(%d+)')
|
||||
local name = ast[1]
|
||||
-- check if we're masking a variable in the same scope
|
||||
if ast.localmasking and name ~= '_' and
|
||||
ast.level == ast.localmasking.level then
|
||||
local linenum = tostring(ast.localmasking.lineinfo.first):match('|L(%d+)')
|
||||
local linenum = ast.localmasking.lineinfo
|
||||
and tostring(ast.localmasking.lineinfo.first):match('|L(%d+)')
|
||||
or M.pos2line(ast.localmasking.pos)
|
||||
local parent = ast.parent and ast.parent.parent
|
||||
local func = parent and parent.tag == 'Localrec'
|
||||
warn("local " .. (func and 'function' or 'variable') .. " '" ..
|
||||
@@ -137,7 +143,7 @@ function M.show_warnings(top_ast, globinit)
|
||||
and (" in '"..index(ast.parent):gsub("%."..name.."$","").."'")
|
||||
or ""
|
||||
warn("first use of unknown field '" .. name .."'"..parent,
|
||||
tostring(ast.lineinfo.first):match('|L(%d+)'), path)
|
||||
ast.lineinfo and tostring(ast.lineinfo.first):match('|L(%d+)'), path)
|
||||
end
|
||||
elseif ast.tag == 'Id' and not ast.localdefinition and not ast.definedglobal then
|
||||
if not globseen[name] then
|
||||
@@ -178,29 +184,26 @@ function M.show_warnings(top_ast, globinit)
|
||||
end
|
||||
|
||||
local frame = ide.frame
|
||||
local menu = frame.menuBar:GetMenu(frame.menuBar:FindMenu(TR("&Project")))
|
||||
|
||||
-- insert after "Compile" item
|
||||
local _, compilepos = ide:FindMenuItem(menu, ID_COMPILE)
|
||||
local _, menu, compilepos = ide:FindMenuItem(ID_COMPILE)
|
||||
if compilepos then
|
||||
menu:Insert(compilepos+1, ID_ANALYZE, TR("Analyze")..KSC(ID_ANALYZE), TR("Analyze the source code"))
|
||||
end
|
||||
|
||||
local debugger = ide.debugger
|
||||
local openDocuments = ide.openDocuments
|
||||
|
||||
local function analyzeProgram(editor)
|
||||
local editorText = editor:GetText()
|
||||
local id = editor:GetId()
|
||||
local filePath = DebuggerMakeFileName(editor, openDocuments[id].filePath)
|
||||
|
||||
if frame.menuBar:IsChecked(ID_CLEAROUTPUT) then ClearOutput() end
|
||||
if ide:GetMenuBar():IsChecked(ID_CLEAROUTPUT) then ClearOutput() end
|
||||
DisplayOutput("Analyzing the source code")
|
||||
frame:Update()
|
||||
|
||||
local editorText = editor:GetText()
|
||||
local doc = ide:GetDocument(editor)
|
||||
local filePath = doc:GetFilePath() or doc:GetFileName()
|
||||
local warn, err = M.warnings_from_string(editorText, filePath)
|
||||
if err then -- report compilation error
|
||||
DisplayOutput(": not completed\n")
|
||||
DisplayOutput((": not completed.\n%s\n"):format(cleanError(err)))
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -215,7 +218,9 @@ frame:Connect(ID_ANALYZE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
ActivateOutput()
|
||||
local editor = GetEditor()
|
||||
if not analyzeProgram(editor) then CompileProgram(editor, { reportstats = false }) end
|
||||
if not analyzeProgram(editor) then
|
||||
CompileProgram(editor, { reportstats = false, keepoutput = true })
|
||||
end
|
||||
end)
|
||||
frame:Connect(ID_ANALYZE, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
|
||||
@@ -126,7 +126,4 @@ ide.config.editor.keymap = {
|
||||
-- Opt+Left/Right moves one word left (to the beginning)/right (to the end)
|
||||
{wxstc.wxSTC_KEY_LEFT, wxstc.wxSTC_SCMOD_ALT, wxstc.wxSTC_CMD_WORDLEFT, "Macintosh"},
|
||||
{wxstc.wxSTC_KEY_RIGHT, wxstc.wxSTC_SCMOD_ALT, wxstc.wxSTC_CMD_WORDRIGHTEND, "Macintosh"},
|
||||
-- Opt+Shift+Left/Right selects one word left (to the beginning)/right (to the end)
|
||||
{wxstc.wxSTC_KEY_LEFT, wxstc.wxSTC_SCMOD_ALT+wxstc.wxSTC_SCMOD_SHIFT, wxstc.wxSTC_CMD_WORDLEFTEXTEND, "Macintosh"},
|
||||
{wxstc.wxSTC_KEY_RIGHT, wxstc.wxSTC_SCMOD_ALT+wxstc.wxSTC_SCMOD_SHIFT, wxstc.wxSTC_CMD_WORDRIGHTENDEXTEND, "Macintosh"},
|
||||
}
|
||||
|
||||
@@ -62,8 +62,8 @@ function MarkupHotspotClick(pos, editor)
|
||||
local _,_,text = string.find(tx, q(MD_MARK_LINZ).."(%b"..MD_MARK_LINA..MD_MARK_LINT..")", pos)
|
||||
if text then
|
||||
text = text:gsub("^"..q(MD_MARK_LINA), ""):gsub(q(MD_MARK_LINT).."$", "")
|
||||
local filepath = ide.openDocuments[editor:GetId()].filePath
|
||||
or FileTreeGetDir()
|
||||
local doc = ide:GetDocument(editor)
|
||||
local filepath = doc and doc.filePath or FileTreeGetDir()
|
||||
local _,_,http = string.find(text, [[^(https?:%S+)$]])
|
||||
local _,_,command,code = string.find(text, [[^macro:(%w+)%((.*%S)%)$]])
|
||||
if not command then _,_,command = string.find(text, [[^macro:(%w+)$]]) end
|
||||
@@ -80,7 +80,7 @@ function MarkupHotspotClick(pos, editor)
|
||||
wx.wxLaunchDefaultBrowser(http, 0)
|
||||
elseif filepath then -- only check for saved files
|
||||
-- check if requested to open in a new window
|
||||
local newwindow = string.find(text, MD_LINK_NEWWINDOW, 1, true) -- plain search
|
||||
local newwindow = not doc or string.find(text, MD_LINK_NEWWINDOW, 1, true)
|
||||
if newwindow then text = string.gsub(text, "^%" .. MD_LINK_NEWWINDOW, "") end
|
||||
local filename = GetFullPathIfExists(
|
||||
wx.wxFileName(filepath):GetPath(wx.wxPATH_GET_VOLUME), text)
|
||||
@@ -99,7 +99,7 @@ local function ismarkup (tx)
|
||||
local marksep = "[%s!%?%.,;:%(%)]"
|
||||
while true do
|
||||
-- find a separator first
|
||||
local st,_,sep,more = string.find(tx, "(["..MD_MARK_PTRN.."])(.)", start)
|
||||
local st,_,sep,more = string.find(tx, "(["..MD_MARK_PTRN.."]+)(.)", start)
|
||||
if not st then return end
|
||||
|
||||
-- check if this is a first character of a multi-character separator
|
||||
|
||||
@@ -26,13 +26,13 @@ local editMenu = wx.wxMenu {
|
||||
}
|
||||
|
||||
editMenu:Append(ID_SOURCE, TR("Source"), wx.wxMenu {
|
||||
{ ID_COMMENT, TR("&Comment/Uncomment")..KSC(ID_COMMENT), TR("Comment or uncomment current or selected lines") },
|
||||
{ ID_COMMENT, TR("C&omment/Uncomment")..KSC(ID_COMMENT), TR("Comment or uncomment current or selected lines") },
|
||||
{ ID_REINDENT, TR("Correct &Indentation")..KSC(ID_REINDENT), TR("Re-indent selected lines") },
|
||||
{ ID_FOLD, TR("&Fold/Unfold All")..KSC(ID_FOLD), TR("Fold or unfold all code folds") },
|
||||
{ ID_SORT, TR("&Sort")..KSC(ID_SORT), TR("Sort selected lines") },
|
||||
})
|
||||
editMenu:Append(ID_BOOKMARK, TR("Bookmark"), wx.wxMenu {
|
||||
{ ID_BOOKMARKTOGGLE, TR("Toggle Bookmark")..KSC(ID_BOOKMARKTOGGLE) },
|
||||
{ ID_BOOKMARKTOGGLE, TR("Toggle Bookmark")..KSC(ID_BOOKMARKTOGGLE), TR("Toggle bookmark") },
|
||||
{ ID_BOOKMARKNEXT, TR("Go To Next Bookmark")..KSC(ID_BOOKMARKNEXT) },
|
||||
{ ID_BOOKMARKPREV, TR("Go To Previous Bookmark")..KSC(ID_BOOKMARKPREV) },
|
||||
})
|
||||
@@ -76,6 +76,19 @@ local function onEditMenu(event)
|
||||
end
|
||||
|
||||
local menu_id = event:GetId()
|
||||
local copytext
|
||||
if (menu_id == ID_CUT or menu_id == ID_COPY)
|
||||
and ide.wxver >= "2.9.5" and editor:GetSelections() > 1 then
|
||||
local main = editor:GetMainSelection()
|
||||
copytext = editor:GetTextRange(editor:GetSelectionNStart(main), editor:GetSelectionNEnd(main))
|
||||
for s = 0, editor:GetSelections()-1 do
|
||||
if copytext ~= editor:GetTextRange(editor:GetSelectionNStart(s), editor:GetSelectionNEnd(s)) then
|
||||
copytext = nil
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if menu_id == ID_CUT then
|
||||
if editor:GetSelectionStart() == editor:GetSelectionEnd()
|
||||
then editor:LineCut() else editor:Cut() end
|
||||
@@ -87,6 +100,8 @@ local function onEditMenu(event)
|
||||
elseif menu_id == ID_UNDO then editor:Undo()
|
||||
elseif menu_id == ID_REDO then editor:Redo()
|
||||
end
|
||||
|
||||
if copytext then editor:CopyText(#copytext, copytext) end
|
||||
end
|
||||
|
||||
for _, event in pairs({ID_CUT, ID_COPY, ID_PASTE, ID_SELECTALL, ID_UNDO, ID_REDO}) do
|
||||
@@ -168,11 +183,6 @@ frame:Connect(ID_COMMENT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
local lc = editor.spec.linecomment
|
||||
if not lc then return end
|
||||
|
||||
-- capture the current position in line to restore later
|
||||
local curline = editor:GetCurrentLine()
|
||||
local curlen = #editor:GetLine(curline)
|
||||
local curpos = editor:GetCurrentPos()-editor:PositionFromLine(curline)
|
||||
|
||||
-- for multi-line selection, always start the first line at the beginning
|
||||
local ssel, esel = editor:GetSelectionStart(), editor:GetSelectionEnd()
|
||||
local sline = editor:LineFromPosition(ssel)
|
||||
@@ -209,23 +219,18 @@ frame:Connect(ID_COMMENT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
editor:DeleteRange(cpos-#lc+editor:PositionFromLine(line), #lc)
|
||||
elseif comment and text:find("%S")
|
||||
and (line == sline or line < eline or esel-editor:PositionFromLine(line) > 0) then
|
||||
editor:InsertText(pos+editor:PositionFromLine(line)-1, lc)
|
||||
editor:SetTargetStart(pos+editor:PositionFromLine(line)-1)
|
||||
editor:SetTargetEnd(editor:GetTargetStart())
|
||||
editor:ReplaceTarget(lc)
|
||||
end
|
||||
end
|
||||
editor:EndUndoAction()
|
||||
|
||||
-- fix position if it was after where the selection started
|
||||
if editor:PositionFromLine(curline)+curpos > ssel then
|
||||
-- position the cursor exactly where its position was, which
|
||||
-- could have shifted depending on whether the text was added or removed.
|
||||
editor:GotoPos(editor:PositionFromLine(curline)
|
||||
+ math.max(0, curpos+#editor:GetLine(curline)-curlen))
|
||||
end
|
||||
end)
|
||||
|
||||
local function processSelection(editor, func)
|
||||
local text = editor:GetSelectedText()
|
||||
local pos = editor:GetCurrentPos()
|
||||
local line = editor:GetCurrentLine()
|
||||
local posinline = editor:GetCurrentPos() - editor:PositionFromLine(line)
|
||||
if #text == 0 then
|
||||
editor:SelectAll()
|
||||
text = editor:GetSelectedText()
|
||||
@@ -250,7 +255,8 @@ local function processSelection(editor, func)
|
||||
editor:ReplaceTarget(newtext)
|
||||
end
|
||||
end
|
||||
editor:GotoPos(pos)
|
||||
editor:GotoPosEnforcePolicy(math.min(
|
||||
editor:PositionFromLine(line)+posinline, editor:GetLineEndPosition(line)))
|
||||
end
|
||||
|
||||
frame:Connect(ID_SORT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
@@ -274,28 +280,36 @@ local function reIndent(editor, buf)
|
||||
local tw = ut and editor:GetTabWidth() or editor:GetIndent()
|
||||
|
||||
local indents = {}
|
||||
local isstatic = {}
|
||||
for line = 1, #buf+1 do
|
||||
local closed, blockend = decindent(text)
|
||||
local opened = incindent(text)
|
||||
local style = bit.band(editor:GetStyleAt(editor:PositionFromLine(line-1)), 31)
|
||||
-- don't reformat multi-line comments or strings
|
||||
isstatic[line] = editor.spec.iscomment[style] or editor.spec.isstring[style]
|
||||
if not isstatic[line] or line == 1 or not isstatic[line-1] then
|
||||
local closed, blockend = decindent(text)
|
||||
local opened = incindent(text)
|
||||
|
||||
-- ignore impact from initial block endings as they are already indented
|
||||
if line == 1 then blockend = 0 end
|
||||
-- ignore impact from initial block endings as they are already indented
|
||||
if line == 1 then blockend = 0 end
|
||||
|
||||
-- this only needs to be done for 2, #buf+1; do it and get out when done
|
||||
if line > 1 then indents[line-1] = indents[line-1] - tw * closed end
|
||||
if line > #buf then break end
|
||||
-- this only needs to be done for 2, #buf+1; do it and get out when done
|
||||
if line > 1 then indents[line-1] = indents[line-1] - tw * closed end
|
||||
if line > #buf then break end
|
||||
|
||||
indent = indent + tw * (opened - blockend)
|
||||
if indent < 0 then indent = 0 end
|
||||
indent = indent + tw * (opened - blockend)
|
||||
if indent < 0 then indent = 0 end
|
||||
end
|
||||
|
||||
indents[line] = indent
|
||||
text = buf[line]
|
||||
end
|
||||
|
||||
for line = 1, #buf do
|
||||
buf[line] = buf[line]:gsub("^[ \t]*",
|
||||
not buf[line]:match('%S') and ''
|
||||
or ut and ("\t"):rep(indents[line] / tw) or (" "):rep(indents[line]))
|
||||
if not isstatic[line] then
|
||||
buf[line] = buf[line]:gsub("^[ \t]*",
|
||||
not buf[line]:match('%S') and ''
|
||||
or ut and ("\t"):rep(indents[line] / tw) or (" "):rep(indents[line]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
local ide = ide
|
||||
local frame = ide.frame
|
||||
local menuBar = frame.menuBar
|
||||
local notebook = frame.notebook
|
||||
local openDocuments = ide.openDocuments
|
||||
|
||||
local fileMenu = wx.wxMenu({
|
||||
@@ -131,6 +130,9 @@ do -- recent file history
|
||||
|
||||
local items = 0
|
||||
updateRecentFiles = function (list)
|
||||
-- protect against recent files menu not being present
|
||||
if not ide:FindMenuItem(ID_RECENTFILES) then return end
|
||||
|
||||
for i=1, #list do
|
||||
local file = list[i].filename
|
||||
local id = ID("file.recentfiles."..i)
|
||||
@@ -207,7 +209,7 @@ frame:Connect(ID_SAVEALL, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
frame:Connect(ID_SAVEALL, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local atLeastOneModifiedDocument = false
|
||||
for id, document in pairs(openDocuments) do
|
||||
for _, document in pairs(openDocuments) do
|
||||
if document.isModified or not document.filePath then
|
||||
atLeastOneModifiedDocument = true
|
||||
break
|
||||
@@ -227,7 +229,6 @@ frame:Connect(ID_CLOSE, wx.wxEVT_UPDATE_UI,
|
||||
|
||||
frame:Connect(ID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
if not SaveOnExit(true) then return end
|
||||
frame:Close() -- this will trigger wxEVT_CLOSE_WINDOW
|
||||
end)
|
||||
|
||||
@@ -245,6 +246,7 @@ local recentprojects = 0
|
||||
frame:Connect(ID_RECENTPROJECTS, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
recentprojects = FileTreeProjectListUpdate(projecthistorymenu, recentprojects)
|
||||
if not recentprojects then return end
|
||||
local pos = 1 -- add shortcut for the previous project (if any)
|
||||
if recentprojects > pos then
|
||||
local item = projecthistorymenu:FindItemByPosition(pos)
|
||||
|
||||
@@ -33,7 +33,7 @@ local helpMenu = wx.wxMenu{
|
||||
menuBar:Append(helpMenu, ide.osname == 'Macintosh' and "&Help" or TR("&Help"))
|
||||
|
||||
local function DisplayAbout(event)
|
||||
local logo = ide.config.path.app.."/"..GetIDEString("logo")
|
||||
local logo = ide:GetAppName().."/"..GetIDEString("logo")
|
||||
local logoimg = wx.wxFileName(logo):FileExists() and
|
||||
([[<tr><td><img src="%s"></td></tr>]]):format(logo) or ""
|
||||
local page = ([[
|
||||
@@ -58,7 +58,7 @@ local function DisplayAbout(event)
|
||||
Christoph Kubisch, Eike Decker<br>
|
||||
Licensed under the MIT License.
|
||||
</td>
|
||||
<td><img align="right" src="zbstudio/res/estrela.png"></td>
|
||||
<td><img align="right" src="%s/res/estrela.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -77,7 +77,7 @@ local function DisplayAbout(event)
|
||||
</td></tr></table>
|
||||
</body>
|
||||
</html>]])
|
||||
:format(logoimg, ide.VERSION, mobdebug._VERSION,
|
||||
:format(logoimg, ide.VERSION, mobdebug._VERSION, ide:GetAppName(),
|
||||
wxlua.wxLUA_VERSION_STRING, wx.wxVERSION_STRING)
|
||||
|
||||
local dlg = wx.wxDialog(frame, wx.wxID_ANY, TR("About %s"):format(GetIDEString("editor")))
|
||||
|
||||
@@ -82,7 +82,7 @@ local function evSelectInterpreter(event)
|
||||
selectInterpreter(event:GetId())
|
||||
end
|
||||
|
||||
function UpdateInterpreters()
|
||||
function ProjectUpdateInterpreters()
|
||||
assert(ide.interpreters, "no interpreters defined")
|
||||
|
||||
-- delete all existing items (if any)
|
||||
@@ -117,8 +117,6 @@ function UpdateInterpreters()
|
||||
selectInterpreter(id)
|
||||
end
|
||||
|
||||
UpdateInterpreters()
|
||||
|
||||
-----------------------------
|
||||
-- Project directory handling
|
||||
|
||||
@@ -135,7 +133,6 @@ function ProjectUpdateProjectDir(projdir,skiptree)
|
||||
ide.filetree:updateProjectDir(projdir)
|
||||
end
|
||||
end
|
||||
ProjectUpdateProjectDir(ide.config.path.projectdir)
|
||||
|
||||
local function projChoose(event)
|
||||
local editor = GetEditor()
|
||||
@@ -143,8 +140,7 @@ local function projChoose(event)
|
||||
editor and openDocuments[editor:GetId()].filePath or "")
|
||||
fn:Normalize() -- want absolute path for dialog
|
||||
|
||||
local projectdir = ide.config.path.projectdir
|
||||
|
||||
local projectdir = ide:GetProject()
|
||||
local filePicker = wx.wxDirDialog(frame, TR("Choose a project directory"),
|
||||
projectdir ~= "" and projectdir or wx.wxGetCwd(), wx.wxDIRP_DIR_MUST_EXIST)
|
||||
if filePicker:ShowModal(true) == wx.wxID_OK then
|
||||
@@ -169,6 +165,11 @@ local function projFromFile(event)
|
||||
ProjectUpdateProjectDir(ide.interpreter:fprojdir(fn)) end
|
||||
end
|
||||
frame:Connect(ID_PROJECTDIRFROMFILE, wx.wxEVT_COMMAND_MENU_SELECTED, projFromFile)
|
||||
frame:Connect(ID_PROJECTDIRFROMFILE, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
event:Enable(editor ~= nil and ide:GetDocument(editor):GetFilePath() ~= nil)
|
||||
end)
|
||||
|
||||
----------------------
|
||||
-- Interpreter Running
|
||||
@@ -285,11 +286,11 @@ frame:Connect(ID_RUN, wx.wxEVT_UPDATE_UI,
|
||||
|
||||
frame:Connect(ID_RUNNOW, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
if event:IsChecked() then
|
||||
if not DebuggerScratchpadOn(GetEditor()) then
|
||||
menuBar:Check(ID_RUNNOW, false) -- disable if couldn't start scratchpad
|
||||
end
|
||||
else DebuggerScratchpadOff() end
|
||||
if debugger.scratchpad then
|
||||
DebuggerScratchpadOff()
|
||||
else
|
||||
DebuggerScratchpadOn(GetEditor())
|
||||
end
|
||||
end)
|
||||
frame:Connect(ID_RUNNOW, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
@@ -300,6 +301,13 @@ frame:Connect(ID_RUNNOW, wx.wxEVT_UPDATE_UI,
|
||||
(ide.interpreter.scratchextloop ~= nil) and -- nil == no scratchpad support
|
||||
(editor ~= nil) and ((debugger.server == nil or debugger.scratchable)
|
||||
and debugger.pid == nil or debugger.scratchpad ~= nil))
|
||||
local isscratchpad = debugger.scratchpad ~= nil
|
||||
menuBar:Check(ID_RUNNOW, isscratchpad)
|
||||
local tool = ide:GetToolBar():FindTool(ID_RUNNOW)
|
||||
if tool and tool:IsSticky() ~= isscratchpad then
|
||||
tool:SetSticky(isscratchpad)
|
||||
ide:GetToolBar():Refresh()
|
||||
end
|
||||
end)
|
||||
|
||||
frame:Connect(ID_ATTACHDEBUG, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
@@ -422,5 +430,6 @@ frame:Connect(wx.wxEVT_IDLE,
|
||||
if (debugger.scratchpad) then DebuggerRefreshScratchpad() end
|
||||
if IndicateIfNeeded() then event:RequestMore(true) end
|
||||
PackageEventHandleOnce("onIdleOnce", event)
|
||||
PackageEventHandle("onIdle", event)
|
||||
event:Skip() -- let other EVT_IDLE handlers to work on the event
|
||||
end)
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
local ide = ide
|
||||
local frame = ide.frame
|
||||
local menuBar = frame.menuBar
|
||||
local openDocuments = ide.openDocuments
|
||||
local unpack = table.unpack or unpack
|
||||
|
||||
--[=[
|
||||
@@ -19,17 +18,17 @@ tool = {
|
||||
-- quick exec action
|
||||
name = "",
|
||||
description = "",
|
||||
fn = function(wxfilename,projectdir),
|
||||
fn = function(filename, projectdir),
|
||||
}
|
||||
}
|
||||
|
||||
]=]
|
||||
|
||||
local toolArgs = {{},}
|
||||
local toolArgs = {}
|
||||
local cnt = 1
|
||||
|
||||
-- fill in tools that have a automatic execution
|
||||
-- function
|
||||
local function name2id(name) return ID("tools.exec."..name) end
|
||||
|
||||
do
|
||||
local maxcnt = 10
|
||||
|
||||
@@ -44,10 +43,10 @@ do
|
||||
table.sort(tools,function(a,b) return a.exec.name < b.exec.name end)
|
||||
|
||||
-- todo config specifc ignore/priority list
|
||||
for i,tool in ipairs(tools) do
|
||||
for _, tool in ipairs(tools) do
|
||||
local exec = tool.exec
|
||||
if (exec and cnt < maxcnt and exec.name and exec.fn and exec.description) then
|
||||
local id = ID("tools.exec."..tool.fname)
|
||||
local id = name2id(tool.fname)
|
||||
table.insert(toolArgs,{id, exec.name, exec.description})
|
||||
-- flag it
|
||||
tool._execid = id
|
||||
@@ -56,6 +55,20 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
local function addHandler(menu, id, command, updateui)
|
||||
menu:Connect(id, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
if (not editor) then return end
|
||||
|
||||
command(ide:GetDocument(editor):GetFilePath(), ide:GetProject())
|
||||
|
||||
return true
|
||||
end)
|
||||
menu:Connect(id, wx.wxEVT_UPDATE_UI,
|
||||
updateui or function(event) event:Enable(GetEditor() ~= nil) end)
|
||||
end
|
||||
|
||||
if (cnt > 1) then
|
||||
|
||||
-- Build Menu
|
||||
@@ -65,29 +78,34 @@ if (cnt > 1) then
|
||||
menuBar:Append(toolMenu, "&Tools")
|
||||
|
||||
-- connect auto execs
|
||||
for name,tool in pairs(ide.tools) do
|
||||
if (tool._execid) then
|
||||
frame:Connect(tool._execid, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
if (not editor) then return end
|
||||
|
||||
local id = editor:GetId()
|
||||
local saved = false
|
||||
local fn = wx.wxFileName(openDocuments[id].filePath or "")
|
||||
fn:Normalize()
|
||||
|
||||
tool.exec.fn(fn,ide.config.path.projectdir)
|
||||
|
||||
return true
|
||||
end)
|
||||
end
|
||||
for _, tool in pairs(ide.tools) do
|
||||
if tool._execid then addHandler(toolMenu, tool._execid, tool.exec.fn) end
|
||||
end
|
||||
end
|
||||
|
||||
-- Generate Custom Menus/Init
|
||||
for name,tool in pairs(ide.tools) do
|
||||
if (tool.fninit) then
|
||||
tool.fninit(frame,menuBar)
|
||||
for _, tool in pairs(ide.tools) do
|
||||
if tool.fninit then tool.fninit(frame, menuBar) end
|
||||
end
|
||||
|
||||
function ToolsAddTool(name, command, updateui)
|
||||
local toolMenu = ide:FindTopMenu('&Tools')
|
||||
if not toolMenu then
|
||||
local helpMenu, helpindex = ide:FindTopMenu('&Help')
|
||||
if not helpMenu then helpindex = ide:GetMenuBar():GetMenuCount() end
|
||||
|
||||
toolMenu = wx.wxMenu{}
|
||||
menuBar:Insert(helpindex, toolMenu, "&Tools")
|
||||
end
|
||||
local id = name2id(name)
|
||||
toolMenu:Append(id, name)
|
||||
addHandler(toolMenu, id, command, updateui)
|
||||
end
|
||||
|
||||
function ToolsRemoveTool(name)
|
||||
ide:RemoveMenuItem(name2id(name))
|
||||
local toolMenu, toolindex = ide:FindTopMenu('&Tools')
|
||||
if toolMenu and toolMenu:GetMenuItemCount() == 0 then
|
||||
ide:GetMenuBar():Remove(toolindex)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,6 +13,7 @@ local viewMenu = wx.wxMenu {
|
||||
{ ID_VIEWOUTPUT, TR("&Output/Console Window")..KSC(ID_VIEWOUTPUT), TR("View the output/console window"), wx.wxITEM_CHECK },
|
||||
{ ID_VIEWWATCHWINDOW, TR("&Watch Window")..KSC(ID_VIEWWATCHWINDOW), TR("View the watch window"), wx.wxITEM_CHECK },
|
||||
{ ID_VIEWCALLSTACK, TR("&Stack Window")..KSC(ID_VIEWCALLSTACK), TR("View the stack window"), wx.wxITEM_CHECK },
|
||||
{ ID_VIEWOUTLINE, TR("Outline Window")..KSC(ID_VIEWOUTLINE), TR("View the outline window"), wx.wxITEM_CHECK },
|
||||
{ },
|
||||
{ ID_VIEWTOOLBAR, TR("&Tool Bar")..KSC(ID_VIEWTOOLBAR), TR("Show/Hide the toolbar"), wx.wxITEM_CHECK },
|
||||
{ ID_VIEWSTATUSBAR, TR("&Status Bar")..KSC(ID_VIEWSTATUSBAR), TR("Show/Hide the status bar"), wx.wxITEM_CHECK },
|
||||
@@ -54,6 +55,7 @@ local panels = {
|
||||
[ID_VIEWFILETREE] = "projpanel",
|
||||
[ID_VIEWWATCHWINDOW] = "watchpanel",
|
||||
[ID_VIEWCALLSTACK] = "stackpanel",
|
||||
[ID_VIEWOUTLINE] = "outlinepanel",
|
||||
[ID_VIEWTOOLBAR] = "toolbar",
|
||||
}
|
||||
|
||||
@@ -68,7 +70,7 @@ end
|
||||
|
||||
local function checkPanel(event)
|
||||
local pane = uimgr:GetPane(panels[event:GetId()])
|
||||
menuBar:Enable(event:GetId(), pane:IsOk()) -- disable if doesn't exist
|
||||
event:Enable(pane:IsOk()) -- disable if doesn't exist
|
||||
menuBar:Check(event:GetId(), pane:IsOk() and pane:IsShown())
|
||||
end
|
||||
|
||||
@@ -89,6 +91,7 @@ frame:Connect(ID_VIEWFULLSCREEN, wx.wxEVT_UPDATE_UI,
|
||||
frame:Connect(ID_VIEWOUTPUT, wx.wxEVT_COMMAND_MENU_SELECTED, togglePanel)
|
||||
frame:Connect(ID_VIEWFILETREE, wx.wxEVT_COMMAND_MENU_SELECTED, togglePanel)
|
||||
frame:Connect(ID_VIEWTOOLBAR, wx.wxEVT_COMMAND_MENU_SELECTED, togglePanel)
|
||||
frame:Connect(ID_VIEWOUTLINE, wx.wxEVT_COMMAND_MENU_SELECTED, togglePanel)
|
||||
frame:Connect(ID_VIEWWATCHWINDOW, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event) if togglePanel(event) then DebuggerRefreshPanels() end end)
|
||||
frame:Connect(ID_VIEWCALLSTACK, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
|
||||
295
src/editor/outline.lua
Normal file
295
src/editor/outline.lua
Normal file
@@ -0,0 +1,295 @@
|
||||
-- Copyright 2014 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
local ide = ide
|
||||
ide.outline = {
|
||||
imglist = ide:CreateImageList("OUTLINE", "FILE-NORMAL", "VALUE-LCALL",
|
||||
"VALUE-GCALL", "VALUE-ACALL", "VALUE-SCALL", "VALUE-MCALL"),
|
||||
}
|
||||
|
||||
local image = { FILE = 0, LFUNCTION = 1, GFUNCTION = 2, AFUNCTION = 3,
|
||||
SMETHOD = 4, METHOD = 5,
|
||||
}
|
||||
local q = EscapeMagic
|
||||
local caches = {}
|
||||
|
||||
local function setData(ctrl, item, value)
|
||||
if ide.wxver >= "2.9.5" then
|
||||
local data = wx.wxLuaTreeItemData()
|
||||
data:SetData(value)
|
||||
ctrl:SetItemData(item, data)
|
||||
end
|
||||
end
|
||||
|
||||
local function outlineRefresh(editor, force)
|
||||
if not editor then return end
|
||||
local tokens = editor:GetTokenList()
|
||||
local text = editor:GetText()
|
||||
local sep = editor.spec.sep
|
||||
local varname = "([%w_][%w_"..q(sep:sub(1,1)).."]*)"
|
||||
local funcs = {}
|
||||
local var = {}
|
||||
local outcfg = ide.config.outline or {}
|
||||
for _, token in ipairs(tokens) do
|
||||
local op = token[1]
|
||||
if op == 'Var' or op == 'Id' then
|
||||
var = {name = token.name, fpos = token.fpos, global = token.context[token.name] == nil}
|
||||
elseif op == 'Function' then
|
||||
local depth = token.context['function'] or 1
|
||||
local name, pos = token.name, token.fpos
|
||||
local _, _, rname, params = text:find('([^%(]*)(%b())', pos)
|
||||
if name and rname:find(token.name, 1, true) ~= 1 then
|
||||
name = rname:gsub("%s+$","")
|
||||
end
|
||||
if not name then
|
||||
local s = editor:PositionFromLine(editor:LineFromPosition(pos-1))
|
||||
local rest
|
||||
rest, pos, name = text:sub(s+1, pos-1):match('%s*(.-)()'..varname..'%s*=%s*function%s*$')
|
||||
if rest then
|
||||
pos = s + pos
|
||||
-- guard against "foo, bar = function() end" as it would get "bar"
|
||||
if #rest>0 and rest:find(',') then name = nil end
|
||||
end
|
||||
end
|
||||
local ftype = image.LFUNCTION
|
||||
if not name then
|
||||
ftype = image.AFUNCTION
|
||||
elseif outcfg.showmethodindicator and name:find('['..q(sep)..']') then
|
||||
ftype = name:find(q(sep:sub(1,1))) and image.SMETHOD or image.METHOD
|
||||
elseif var.name == name and var.fpos == pos
|
||||
or var.name and name:find('^'..var.name..'['..q(sep)..']') then
|
||||
ftype = var.global and image.GFUNCTION or image.LFUNCTION
|
||||
end
|
||||
if name or outcfg.showanonymous then
|
||||
funcs[#funcs+1] = {
|
||||
name = (name or outcfg.showanonymous)..params,
|
||||
depth = depth,
|
||||
image = ftype,
|
||||
pos = name and pos or token.fpos,
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local ctrl = ide.outline.outlineCtrl
|
||||
local cache = caches[editor] or {}
|
||||
caches[editor] = cache
|
||||
|
||||
-- add file
|
||||
local filename = ide:GetDocument(editor):GetFileName()
|
||||
local fileitem = cache.fileitem
|
||||
if not fileitem then
|
||||
local root = ctrl:GetRootItem()
|
||||
if not root or not root:IsOk() then return end
|
||||
|
||||
if outcfg.showonefile then
|
||||
fileitem = root
|
||||
else
|
||||
fileitem = ctrl:AppendItem(root, filename, image.FILE)
|
||||
setData(ctrl, fileitem, editor)
|
||||
ctrl:SetItemBold(fileitem, true)
|
||||
ctrl:SortChildren(root)
|
||||
end
|
||||
cache.fileitem = fileitem
|
||||
end
|
||||
|
||||
do -- check if any changes in the cached function list
|
||||
local prevfuncs = cache.funcs or {}
|
||||
local nochange = #funcs == #prevfuncs
|
||||
if nochange then
|
||||
for n, func in ipairs(funcs) do
|
||||
func.item = prevfuncs[n].item -- carry over cached items
|
||||
if func.depth ~= prevfuncs[n].depth then
|
||||
nochange = false
|
||||
elseif nochange then
|
||||
if func.name ~= prevfuncs[n].name then
|
||||
ctrl:SetItemText(prevfuncs[n].item, func.name)
|
||||
end
|
||||
if func.image ~= prevfuncs[n].image then
|
||||
ctrl:SetItemImage(prevfuncs[n].item, func.image)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
cache.funcs = funcs -- set new cache as positions may change
|
||||
if nochange and not force then return end -- return if no visible changes
|
||||
end
|
||||
|
||||
-- refresh the tree
|
||||
-- refreshing shouldn't change the focus of the current element,
|
||||
-- but it appears that DeleteChildren (wxwidgets 2.9.5 on Windows)
|
||||
-- moves the focus from the current element to wxTreeCtrl.
|
||||
-- need to save the window having focus and restore after the refresh.
|
||||
local win = ide:GetMainFrame():FindFocus()
|
||||
|
||||
ctrl:Freeze()
|
||||
ctrl:DeleteChildren(fileitem)
|
||||
local stack = {fileitem}
|
||||
for n, func in ipairs(funcs) do
|
||||
local depth = func.depth
|
||||
local parent = stack[depth]
|
||||
while not parent do depth = depth - 1; parent = stack[depth] end
|
||||
local item = ctrl:AppendItem(parent, func.name, func.image)
|
||||
setData(ctrl, item, n)
|
||||
func.item = item
|
||||
stack[func.depth+1] = item
|
||||
end
|
||||
ctrl:ExpandAllChildren(fileitem)
|
||||
-- scroll to the fileitem, but only if it's not a root item (as it's hidden)
|
||||
if fileitem:GetValue() ~= ctrl:GetRootItem():GetValue() then
|
||||
ctrl:ScrollTo(fileitem)
|
||||
ctrl:SetScrollPos(wx.wxHORIZONTAL, 0, true)
|
||||
else -- otherwise, scroll to the top
|
||||
ctrl:SetScrollPos(wx.wxVERTICAL, 0, true)
|
||||
end
|
||||
ctrl:Thaw()
|
||||
|
||||
if win and win ~= ide:GetMainFrame():FindFocus() then win:SetFocus() end
|
||||
end
|
||||
|
||||
local function outlineCreateOutlineWindow()
|
||||
local width, height = 360, 200
|
||||
local ctrl = wx.wxTreeCtrl(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxSize(width, height),
|
||||
wx.wxTR_LINES_AT_ROOT + wx.wxTR_HAS_BUTTONS + wx.wxTR_SINGLE
|
||||
+ wx.wxTR_HIDE_ROOT)
|
||||
|
||||
ide.outline.outlineCtrl = ctrl
|
||||
ide.timers.outline = wx.wxTimer(ctrl)
|
||||
|
||||
ctrl:AddRoot("Outline")
|
||||
ctrl:SetImageList(ide.outline.imglist)
|
||||
ctrl:SetFont(ide.font.fNormal)
|
||||
|
||||
function ctrl:ActivateItem(item_id)
|
||||
ctrl:SelectItem(item_id, true)
|
||||
local data = ctrl:GetItemData(item_id)
|
||||
if ctrl:GetItemImage(item_id) == image.FILE then
|
||||
-- activate editor tab
|
||||
local editor = data:GetData()
|
||||
if not ide:GetEditorWithFocus(editor) then ide:GetDocument(editor):SetActive() end
|
||||
else
|
||||
-- activate tab and move cursor based on stored pos
|
||||
-- get file parent
|
||||
local onefile = (ide.config.outline or {}).showonefile
|
||||
local parent = ctrl:GetItemParent(item_id)
|
||||
if not onefile then -- find the proper parent
|
||||
while parent:IsOk() and ctrl:GetItemImage(parent) ~= image.FILE do
|
||||
parent = ctrl:GetItemParent(parent)
|
||||
end
|
||||
if not parent:IsOk() then return end
|
||||
end
|
||||
-- activate editor tab
|
||||
local editor = onefile and GetEditor() or ctrl:GetItemData(parent):GetData()
|
||||
local cache = caches[editor]
|
||||
if editor and cache then
|
||||
-- move to position in the file
|
||||
editor:GotoPosEnforcePolicy(cache.funcs[data:GetData()].pos-1)
|
||||
-- only set editor active after positioning as this may change focus,
|
||||
-- which may regenerate the outline, which may invalidate `data` value
|
||||
if not ide:GetEditorWithFocus(editor) then ide:GetDocument(editor):SetActive() end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function activateByPosition(event)
|
||||
-- only toggle if this is a folder and the click is on the item line
|
||||
-- (exclude the label as it's used for renaming and dragging)
|
||||
local mask = (wx.wxTREE_HITTEST_ONITEMINDENT + wx.wxTREE_HITTEST_ONITEMLABEL
|
||||
+ wx.wxTREE_HITTEST_ONITEMICON + wx.wxTREE_HITTEST_ONITEMRIGHT)
|
||||
local item_id, flags = ctrl:HitTest(event:GetPosition())
|
||||
|
||||
if item_id and item_id:IsOk() and bit.band(flags, mask) > 0 then
|
||||
ctrl:ActivateItem(item_id)
|
||||
else
|
||||
event:Skip()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
ctrl:Connect(wx.wxEVT_TIMER, function() outlineRefresh(GetEditor()) end)
|
||||
ctrl:Connect(wx.wxEVT_LEFT_DOWN, activateByPosition)
|
||||
ctrl:Connect(wx.wxEVT_LEFT_DCLICK, activateByPosition)
|
||||
ctrl:Connect(wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED, function(event)
|
||||
ctrl:ActivateItem(event:GetItem())
|
||||
end)
|
||||
|
||||
local function reconfigure(pane)
|
||||
pane:TopDockable(false):BottomDockable(false)
|
||||
:MinSize(150,-1):BestSize(300,-1):FloatingSize(200,300)
|
||||
end
|
||||
|
||||
local layout = ide:GetSetting("/view", "uimgrlayout")
|
||||
if not layout or not layout:find("outlinepanel") then
|
||||
ide:AddPanelDocked(ide.frame.projnotebook, ctrl, "outlinepanel", TR("Outline"), reconfigure, false)
|
||||
else
|
||||
ide:AddPanel(ctrl, "outlinepanel", TR("Outline"), reconfigure)
|
||||
end
|
||||
end
|
||||
|
||||
local function eachNode(eachFunc, root)
|
||||
local ctrl = ide.outline.outlineCtrl
|
||||
local item = ctrl:GetFirstChild(root or ctrl:GetRootItem())
|
||||
while true do
|
||||
if not item:IsOk() then break end
|
||||
if eachFunc and eachFunc(ctrl, item) then break end
|
||||
item = ctrl:GetNextSibling(item)
|
||||
end
|
||||
end
|
||||
|
||||
outlineCreateOutlineWindow()
|
||||
|
||||
ide:AddPackage('core.outline', {
|
||||
-- remove the editor from the list
|
||||
onEditorClose = function(self, editor)
|
||||
local cache = caches[editor]
|
||||
local fileitem = cache and cache.fileitem
|
||||
caches[editor] = nil -- remove from cache
|
||||
if (ide.config.outline or {}).showonefile then return end
|
||||
if fileitem then ide.outline.outlineCtrl:Delete(fileitem) end
|
||||
end,
|
||||
|
||||
-- handle rename of the file in the current editor
|
||||
onEditorSave = function(self, editor)
|
||||
if (ide.config.outline or {}).showonefile then return end
|
||||
local cache = caches[editor]
|
||||
local fileitem = cache and cache.fileitem
|
||||
local doc = ide:GetDocument(editor)
|
||||
local ctrl = ide.outline.outlineCtrl
|
||||
if doc and fileitem and ctrl:GetItemText(fileitem) ~= doc:GetFileName() then
|
||||
ctrl:SetItemText(fileitem, doc:GetFileName())
|
||||
end
|
||||
end,
|
||||
|
||||
-- go over the file items to turn bold on/off or collapse/expand
|
||||
onEditorFocusSet = function(self, editor)
|
||||
if (ide.config.outline or {}).showonefile then
|
||||
outlineRefresh(editor, true)
|
||||
return
|
||||
end
|
||||
|
||||
-- if the editor is not in the cache, which may happen if the user
|
||||
-- quickly switches between tabs that don't have outline generated,
|
||||
-- regenerate it manually
|
||||
if not caches[editor] then
|
||||
ide.timers.outline:Start(ide.config.outlineinactivity*1000, wx.wxTIMER_ONE_SHOT)
|
||||
end
|
||||
|
||||
local cache = caches[editor]
|
||||
local fileitem = cache and cache.fileitem
|
||||
eachNode(function(ctrl, item)
|
||||
local found = fileitem and item:GetValue() == fileitem:GetValue()
|
||||
if not found and ctrl:IsBold(item) then
|
||||
ctrl:SetItemBold(item, false)
|
||||
ctrl:CollapseAllChildren(item)
|
||||
end
|
||||
end)
|
||||
|
||||
local ctrl = ide.outline.outlineCtrl
|
||||
if fileitem and not ctrl:IsBold(fileitem) then
|
||||
ctrl:SetItemBold(fileitem, true)
|
||||
ctrl:ExpandAllChildren(fileitem)
|
||||
ctrl:ScrollTo(fileitem)
|
||||
ctrl:SetScrollPos(wx.wxHORIZONTAL, 0, true)
|
||||
end
|
||||
end,
|
||||
})
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
local ide = ide
|
||||
local frame = ide.frame
|
||||
local notebook = frame.notebook
|
||||
local bottomnotebook = frame.bottomnotebook
|
||||
local errorlog = bottomnotebook.errorlog
|
||||
|
||||
@@ -145,12 +144,31 @@ end
|
||||
|
||||
local function nameTab(tab, name)
|
||||
local index = bottomnotebook:GetPageIndex(tab)
|
||||
if index then bottomnotebook:SetPageText(index, name) end
|
||||
if index ~= -1 then bottomnotebook:SetPageText(index, name) end
|
||||
end
|
||||
|
||||
function OutputSetCallbacks(pid, proc, callback, endcallback)
|
||||
local streamin = proc and proc:GetInputStream()
|
||||
local streamerr = proc and proc:GetErrorStream()
|
||||
if streamin then
|
||||
streamins[pid] = {stream=streamin, callback=callback,
|
||||
proc=proc, check=proc and proc.IsInputAvailable}
|
||||
end
|
||||
if streamerr then
|
||||
streamerrs[pid] = {stream=streamerr, callback=callback,
|
||||
proc=proc, check=proc and proc.IsErrorAvailable}
|
||||
end
|
||||
customprocs[pid] = {proc=proc, endcallback=endcallback}
|
||||
end
|
||||
|
||||
function CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
if (not cmd) then return end
|
||||
|
||||
-- expand ~ at the beginning of the command
|
||||
if ide.oshome and cmd:find('~') then
|
||||
cmd = cmd:gsub([[^(['"]?)~]], '%1'..ide.oshome:gsub('[\\/]$',''), 1)
|
||||
end
|
||||
|
||||
-- try to extract the name of the executable from the command
|
||||
-- the executable may not have the extension and may be in quotes
|
||||
local exename = string.gsub(cmd, "\\", "/")
|
||||
@@ -182,9 +200,7 @@ function CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
local params = wx.wxEXEC_ASYNC + wx.wxEXEC_MAKE_GROUP_LEADER + (nohide and wx.wxEXEC_NOHIDE or 0)
|
||||
local pid = wx.wxExecute(cmd, params, proc)
|
||||
|
||||
if (oldcwd) then
|
||||
wx.wxFileName.SetCwd(oldcwd)
|
||||
end
|
||||
if oldcwd then wx.wxFileName.SetCwd(oldcwd) end
|
||||
|
||||
-- For asynchronous execution, the return value is the process id and
|
||||
-- zero value indicates that the command could not be executed.
|
||||
@@ -197,20 +213,13 @@ function CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
|
||||
DisplayOutputLn(TR("Program '%s' started in '%s' (pid: %d).")
|
||||
:format(uid, (wdir and wdir or wx.wxFileName.GetCwd()), pid))
|
||||
customprocs[pid] = {proc=proc, uid=uid, endcallback=endcallback, started = TimeGet()}
|
||||
|
||||
local streamin = proc and proc:GetInputStream()
|
||||
local streamerr = proc and proc:GetErrorStream()
|
||||
OutputSetCallbacks(pid, proc, stringcallback, endcallback)
|
||||
customprocs[pid].uid=uid
|
||||
customprocs[pid].started = TimeGet()
|
||||
|
||||
local streamout = proc and proc:GetOutputStream()
|
||||
if (streamin) then
|
||||
streamins[pid] = {stream=streamin, callback=stringcallback}
|
||||
end
|
||||
if (streamerr) then
|
||||
streamerrs[pid] = {stream=streamerr, callback=stringcallback}
|
||||
end
|
||||
if (streamout) then
|
||||
streamouts[pid] = {stream=streamout, callback=stringcallback, out=true}
|
||||
end
|
||||
if streamout then streamouts[pid] = {stream=streamout, callback=stringcallback, out=true} end
|
||||
|
||||
unHideWindow(pid)
|
||||
nameTab(errorlog, TR("Output (running)"))
|
||||
@@ -241,15 +250,19 @@ local function getStreams()
|
||||
for _,v in pairs(tab) do
|
||||
-- periodically stop reading to get a chance to process other events
|
||||
local processed = 0
|
||||
while (v.stream:CanRead() and processed <= maxread) do
|
||||
while (v.check(v.proc) and processed <= maxread) do
|
||||
local str = v.stream:Read(readonce)
|
||||
-- the buffer has readonce bytes, so cut it to the actual size
|
||||
str = str:sub(1, v.stream:LastRead())
|
||||
processed = processed + #str
|
||||
|
||||
local pfn
|
||||
if (v.callback) then
|
||||
str,pfn = v.callback(str)
|
||||
end
|
||||
if (v.toshell) then
|
||||
if not str then
|
||||
-- skip if nothing to display
|
||||
elseif (v.toshell) then
|
||||
DisplayShell(str)
|
||||
else
|
||||
DisplayOutputNoMarker(str)
|
||||
@@ -288,6 +301,15 @@ errorlog:Connect(wx.wxEVT_END_PROCESS, function(event)
|
||||
local pid = event:GetPid()
|
||||
if (pid ~= -1) then
|
||||
getStreams()
|
||||
streamins[pid] = nil
|
||||
streamerrs[pid] = nil
|
||||
streamouts[pid] = nil
|
||||
|
||||
if not customprocs[pid] then return end
|
||||
if customprocs[pid].endcallback then customprocs[pid].endcallback() end
|
||||
-- if this wasn't started with CommandLineRun, skip the rest
|
||||
if not customprocs[pid].uid then return end
|
||||
|
||||
-- delete markers and set focus to the editor if there is an input marker
|
||||
if errorlog:MarkerPrevious(errorlog:GetLineCount(), PROMPT_MARKER_VALUE) > -1 then
|
||||
errorlog:MarkerDeleteAll(PROMPT_MARKER)
|
||||
@@ -296,19 +318,12 @@ errorlog:Connect(wx.wxEVT_END_PROCESS, function(event)
|
||||
if editor then editor:SetFocus() end
|
||||
end
|
||||
nameTab(errorlog, TR("Output"))
|
||||
local runtime = TimeGet() - customprocs[pid].started
|
||||
|
||||
streamins[pid] = nil
|
||||
streamerrs[pid] = nil
|
||||
streamouts[pid] = nil
|
||||
if (customprocs[pid].endcallback) then
|
||||
customprocs[pid].endcallback()
|
||||
end
|
||||
customprocs[pid] = nil
|
||||
unHideWindow(0)
|
||||
DebuggerStop(true)
|
||||
DisplayOutputLn(TR("Program completed in %.2f seconds (pid: %d).")
|
||||
:format(runtime, pid))
|
||||
:format(TimeGet() - customprocs[pid].started, pid))
|
||||
customprocs[pid] = nil
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -324,6 +339,8 @@ local jumptopatterns = {
|
||||
"^%s*(.-)%((%d+).*%)%s*:",
|
||||
--[string "<filename>"]:line:
|
||||
'^.-%[string "([^"]+)"%]:(%d+)%s*:',
|
||||
-- <filename>:line:linepos
|
||||
"^%s*(.-):(%d+):(%d+):",
|
||||
-- <filename>:line:
|
||||
"^%s*(.-):(%d+)%s*:",
|
||||
}
|
||||
@@ -340,42 +357,41 @@ errorlog:Connect(wxstc.wxEVT_STC_DOUBLECLICK,
|
||||
if (fname and jumpline) then break end
|
||||
end
|
||||
|
||||
if (fname and jumpline) then
|
||||
-- fname may include name of executable, as in "path/to/lua: file.lua";
|
||||
-- strip it and try to find match again if needed.
|
||||
-- try the stripped name first as if it doesn't match, the longer
|
||||
-- name may have parts that may be interpreter as network path and
|
||||
-- may take few seconds to check.
|
||||
local name
|
||||
local fixedname = fname:match(":%s+(.+)")
|
||||
if fixedname then
|
||||
name = GetFullPathIfExists(FileTreeGetDir(), fixedname)
|
||||
or FileTreeFindByPartialName(fixedname)
|
||||
end
|
||||
name = name
|
||||
or GetFullPathIfExists(FileTreeGetDir(), fname)
|
||||
or FileTreeFindByPartialName(fname)
|
||||
if not (fname and jumpline) then return end
|
||||
|
||||
local editor = LoadFile(name or fname,nil,true)
|
||||
if not editor then
|
||||
local ed = GetEditor()
|
||||
if ed and ide:GetDocument(ed):GetFileName() == (name or fname) then
|
||||
editor = ed
|
||||
end
|
||||
end
|
||||
if editor then
|
||||
jumpline = tonumber(jumpline)
|
||||
jumplinepos = tonumber(jumplinepos)
|
||||
-- fname may include name of executable, as in "path/to/lua: file.lua";
|
||||
-- strip it and try to find match again if needed.
|
||||
-- try the stripped name first as if it doesn't match, the longer
|
||||
-- name may have parts that may be interpreter as network path and
|
||||
-- may take few seconds to check.
|
||||
local name
|
||||
local fixedname = fname:match(":%s+(.+)")
|
||||
if fixedname then
|
||||
name = GetFullPathIfExists(FileTreeGetDir(), fixedname)
|
||||
or FileTreeFindByPartialName(fixedname)
|
||||
end
|
||||
name = name
|
||||
or GetFullPathIfExists(FileTreeGetDir(), fname)
|
||||
or FileTreeFindByPartialName(fname)
|
||||
|
||||
editor:GotoPos(editor:PositionFromLine(math.max(0,jumpline-1))
|
||||
+ (jumplinepos and (math.max(0,jumplinepos-1)) or 0))
|
||||
editor:EnsureVisibleEnforcePolicy(jumpline)
|
||||
editor:SetFocus()
|
||||
local editor = LoadFile(name or fname,nil,true)
|
||||
if not editor then
|
||||
local ed = GetEditor()
|
||||
if ed and ide:GetDocument(ed):GetFileName() == (name or fname) then
|
||||
editor = ed
|
||||
end
|
||||
end
|
||||
if editor then
|
||||
jumpline = tonumber(jumpline)
|
||||
jumplinepos = tonumber(jumplinepos)
|
||||
|
||||
-- doubleclick can set selection, so reset it;
|
||||
-- for consistency, do it even when no pattern is detected.
|
||||
editor:GotoPos(editor:PositionFromLine(math.max(0,jumpline-1))
|
||||
+ (jumplinepos and (math.max(0,jumplinepos-1)) or 0))
|
||||
editor:EnsureVisibleEnforcePolicy(jumpline)
|
||||
editor:SetFocus()
|
||||
end
|
||||
|
||||
-- doubleclick can set selection, so reset it
|
||||
local pos = event:GetPosition()
|
||||
if pos == -1 then pos = errorlog:GetLineEndPosition(event:GetLine()) end
|
||||
errorlog:SetSelection(pos, pos)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
local ide = ide
|
||||
local iscaseinsensitive = wx.wxFileName("A"):SameAs(wx.wxFileName("a"))
|
||||
local unpack = table.unpack or unpack
|
||||
local q = EscapeMagic
|
||||
|
||||
function PackageEventHandle(event, ...)
|
||||
@@ -64,31 +65,59 @@ function PackageRegister(file, ...)
|
||||
return PackageEventHandleOne(file, "onRegister", ...)
|
||||
end
|
||||
|
||||
function ide:GetRootPath() return GetPathWithSep(ide.editorFilename) end
|
||||
function ide:GetRootPath(path)
|
||||
return MergeFullPath(GetPathWithSep(ide.editorFilename), path or '')
|
||||
end
|
||||
function ide:GetPackagePath(packname)
|
||||
return MergeFullPath(
|
||||
ide.oshome and MergeFullPath(ide.oshome, '.zbstudio/') or ide:GetRootPath(),
|
||||
ide.oshome and MergeFullPath(ide.oshome, '.'..ide:GetAppName()..'/') or ide:GetRootPath(),
|
||||
MergeFullPath('packages', packname or '')
|
||||
)
|
||||
end
|
||||
function ide:GetApp() return self.editorApp end
|
||||
function ide:GetAppName() return ide.appname end
|
||||
function ide:GetEditor(index) return GetEditor(index) end
|
||||
function ide:GetEditorWithFocus(ed) return GetEditorWithFocus(ed) end
|
||||
function ide:GetEditorWithLastFocus()
|
||||
-- make sure ide.infocus is still a valid component and not "some" userdata
|
||||
return (pcall(function() ide.infocus:GetId() end)
|
||||
and ide.infocus:GetClassInfo():GetClassName() == "wxStyledTextCtrl"
|
||||
and ide.infocus:DynamicCast("wxStyledTextCtrl") or nil)
|
||||
end
|
||||
function ide:GetMenuBar() return self.frame.menuBar end
|
||||
function ide:GetStatusBar() return self.frame.statusBar end
|
||||
function ide:GetToolBar() return self.frame.toolBar end
|
||||
function ide:GetDebugger() return self.debugger end
|
||||
function ide:GetMainFrame() return self.frame end
|
||||
function ide:GetUIManager() return self.frame.uimgr end
|
||||
function ide:GetDocument(ed) return self.openDocuments[ed:GetId()] end
|
||||
function ide:GetDocuments() return self.openDocuments end
|
||||
function ide:FindMenuItem(menu, itemid)
|
||||
function ide:GetKnownExtensions()
|
||||
local knownexts = {}
|
||||
for _, spec in pairs(ide.specs) do
|
||||
for _, ext in ipairs(spec.exts or {}) do table.insert(knownexts, ext) end
|
||||
end
|
||||
return knownexts
|
||||
end
|
||||
|
||||
function ide:FindTopMenu(item)
|
||||
local index = ide:GetMenuBar():FindMenu(TR(item))
|
||||
return ide:GetMenuBar():GetMenu(index), index
|
||||
end
|
||||
function ide:FindMenuItem(itemid, menu)
|
||||
local item, imenu = ide:GetMenuBar():FindItem(itemid, menu)
|
||||
if menu and not item then item = menu:FindItem(itemid) end
|
||||
if not item then return end
|
||||
menu = menu or imenu
|
||||
|
||||
for pos = 0, menu:GetMenuItemCount()-1 do
|
||||
if menu:FindItemByPosition(pos):GetId() == itemid then
|
||||
return menu:FindItemByPosition(pos), pos
|
||||
return item, menu, pos
|
||||
end
|
||||
end
|
||||
return nil
|
||||
return
|
||||
end
|
||||
|
||||
function ide:FindDocument(path)
|
||||
local fileName = wx.wxFileName(path)
|
||||
for _, doc in pairs(ide.openDocuments) do
|
||||
@@ -119,12 +148,16 @@ function ide:GetInterpreter() return self.interpreter end
|
||||
function ide:GetInterpreters() return self.interpreters end
|
||||
function ide:GetConfig() return self.config end
|
||||
function ide:GetOutput() return self.frame.bottomnotebook.errorlog end
|
||||
function ide:GetConsole() return self.frame.bottomnotebook.shellbox end
|
||||
function ide:GetEditorNotebook() return self.frame.notebook end
|
||||
function ide:GetOutputNotebook() return self.frame.bottomnotebook end
|
||||
function ide:GetProject() return FileTreeGetDir() end
|
||||
function ide:GetLaunchedProcess() return self.debugger and self.debugger.pid end
|
||||
function ide:GetProjectTree() return ide.filetree.projtree end
|
||||
function ide:GetWatch() return self.debugger and self.debugger.watchCtrl end
|
||||
function ide:GetStack() return self.debugger and self.debugger.watchCtrl end
|
||||
function ide:GetStack() return self.debugger and self.debugger.stackCtrl end
|
||||
function ide:Yield() wx.wxYield() end
|
||||
function ide:CreateBareEditor() return CreateEditor(true) end
|
||||
|
||||
function ide:GetSetting(path, setting)
|
||||
local settings = self.settings
|
||||
@@ -135,13 +168,129 @@ function ide:GetSetting(path, setting)
|
||||
return ok and value or nil
|
||||
end
|
||||
|
||||
function ide:RemoveMenuItem(id, menu)
|
||||
local _, menu, pos = ide:FindMenuItem(id, menu)
|
||||
if menu then
|
||||
ide:GetMainFrame():Disconnect(id, wx.wxID_ANY, wx.wxEVT_COMMAND_MENU_SELECTED)
|
||||
ide:GetMainFrame():Disconnect(id, wx.wxID_ANY, wx.wxEVT_UPDATE_UI)
|
||||
menu:Disconnect(id, wx.wxID_ANY, wx.wxEVT_COMMAND_MENU_SELECTED)
|
||||
menu:Disconnect(id, wx.wxID_ANY, wx.wxEVT_UPDATE_UI)
|
||||
menu:Remove(id)
|
||||
|
||||
local positem = menu:FindItemByPosition(pos)
|
||||
if (not positem or positem:GetKind() == wx.wxITEM_SEPARATOR)
|
||||
and pos > 0
|
||||
and (menu:FindItemByPosition(pos-1):GetKind() == wx.wxITEM_SEPARATOR) then
|
||||
menu:Destroy(menu:FindItemByPosition(pos-1))
|
||||
end
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function ide:ExecuteCommand(cmd, wdir, callback, endcallback)
|
||||
local proc = wx.wxProcess(ide:GetOutput())
|
||||
proc:Redirect()
|
||||
|
||||
local cwd
|
||||
if (wdir and #wdir > 0) then -- ignore empty directory
|
||||
cwd = wx.wxFileName.GetCwd()
|
||||
cwd = wx.wxFileName.SetCwd(wdir) and cwd
|
||||
end
|
||||
|
||||
local pid = wx.wxExecute(cmd, wx.wxEXEC_ASYNC, proc)
|
||||
pid = pid ~= -1 and pid ~= 0 and pid or nil
|
||||
if cwd then wx.wxFileName.SetCwd(cwd) end -- restore workdir
|
||||
if not pid then return pid, wx.wxSysErrorMsg() end
|
||||
|
||||
OutputSetCallbacks(pid, proc, callback or function() end, endcallback)
|
||||
return pid
|
||||
end
|
||||
|
||||
function ide:CreateImageList(group, ...)
|
||||
local log = wx.wxLogNull() -- disable error reporting in popup
|
||||
local size = wx.wxSize(16,16)
|
||||
local imglist = wx.wxImageList(16,16)
|
||||
for i = 1, select('#', ...) do
|
||||
local icon, file = self:GetBitmap(select(i, ...), group, size)
|
||||
if imglist:Add(icon) == -1 then
|
||||
DisplayOutputLn(("Failed to add image '%s' to the image list.")
|
||||
:format(file or select(i, ...)))
|
||||
end
|
||||
end
|
||||
return imglist
|
||||
end
|
||||
|
||||
local icons = {} -- icon cache to avoid reloading the same icons
|
||||
function ide:GetBitmap(id, client, size)
|
||||
local im = ide.config.imagemap
|
||||
local width = size:GetWidth()
|
||||
local key = width.."/"..id
|
||||
local keyclient = key.."-"..client
|
||||
local mapped = im[keyclient] or im[id.."-"..client] or im[key] or im[id]
|
||||
if im[id.."-"..client] then keyclient = width.."/"..im[id.."-"..client]
|
||||
elseif im[keyclient] then keyclient = im[keyclient]
|
||||
elseif im[id] then
|
||||
id = im[id]
|
||||
key = width.."/"..id
|
||||
keyclient = key.."-"..client
|
||||
end
|
||||
|
||||
local fileClient = ide:GetAppName() .. "/res/" .. keyclient .. ".png"
|
||||
local fileKey = ide:GetAppName() .. "/res/" .. key .. ".png"
|
||||
local file
|
||||
if mapped and wx.wxFileName(mapped):FileExists() then file = mapped
|
||||
elseif wx.wxFileName(fileClient):FileExists() then file = fileClient
|
||||
elseif wx.wxFileName(fileKey):FileExists() then file = fileKey
|
||||
else return wx.wxArtProvider.GetBitmap(id, client, size) end
|
||||
local icon = icons[file] or wx.wxBitmap(file)
|
||||
icons[file] = icon
|
||||
return icon, file
|
||||
end
|
||||
|
||||
function ide:AddPackage(name, package)
|
||||
ide.packages[name] = setmetatable(package, ide.proto.Plugin)
|
||||
ide.packages[name].fname = name
|
||||
return ide.packages[name]
|
||||
end
|
||||
function ide:RemovePackage(name) ide.packages[name] = nil end
|
||||
|
||||
function ide:AddWatch(watch, value)
|
||||
local mgr = ide.frame.uimgr
|
||||
local pane = mgr:GetPane("watchpanel")
|
||||
if (pane:IsOk() and not pane:IsShown()) then
|
||||
pane:Show()
|
||||
mgr:Update()
|
||||
end
|
||||
|
||||
local watchCtrl = ide.debugger.watchCtrl
|
||||
if not watchCtrl then return end
|
||||
|
||||
local root = watchCtrl:GetRootItem()
|
||||
if not root or not root:IsOk() then return end
|
||||
|
||||
local item = watchCtrl:GetFirstChild(root)
|
||||
while true do
|
||||
if not item:IsOk() then break end
|
||||
if watchCtrl:GetItemExpression(item) == watch then
|
||||
if value then watchCtrl:SetItemText(item, watch .. ' = ' .. tostring(value)) end
|
||||
return item
|
||||
end
|
||||
item = watchCtrl:GetNextSibling(item)
|
||||
end
|
||||
|
||||
item = watchCtrl:AppendItem(root, watch, 1)
|
||||
watchCtrl:SetItemExpression(item, watch, value)
|
||||
return item
|
||||
end
|
||||
|
||||
function ide:AddInterpreter(name, interpreter)
|
||||
self.interpreters[name] = setmetatable(interpreter, ide.proto.Interpreter)
|
||||
UpdateInterpreters()
|
||||
ProjectUpdateInterpreters()
|
||||
end
|
||||
function ide:RemoveInterpreter(name)
|
||||
self.interpreters[name] = nil
|
||||
UpdateInterpreters()
|
||||
ProjectUpdateInterpreters()
|
||||
end
|
||||
|
||||
function ide:AddSpec(name, spec)
|
||||
@@ -181,3 +330,52 @@ function ide:RemoveConfig(name)
|
||||
configcache[name] = nil -- clear the slot after use
|
||||
ReApplySpecAndStyles() -- apply current config to the UI
|
||||
end
|
||||
|
||||
local panels = {}
|
||||
function ide:AddPanel(ctrl, panel, name, conf)
|
||||
local width, height = 360, 200
|
||||
local notebook = wxaui.wxAuiNotebook(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE
|
||||
- wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER)
|
||||
notebook:AddPage(ctrl, name, true)
|
||||
notebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK,
|
||||
function() PaneFloatToggle(notebook) end)
|
||||
notebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE,
|
||||
function(event) event:Veto() end)
|
||||
|
||||
local mgr = ide.frame.uimgr
|
||||
mgr:AddPane(notebook, wxaui.wxAuiPaneInfo():
|
||||
Name(panel):Float():CaptionVisible(false):PaneBorder(false):
|
||||
MinSize(width/2,height/2):
|
||||
BestSize(width,height):FloatingSize(width,height):
|
||||
PinButton(true):Hide())
|
||||
if type(conf) == "function" then conf(mgr:GetPane(panel)) end
|
||||
mgr.defaultPerspective = mgr:SavePerspective() -- resave default perspective
|
||||
|
||||
panels[name] = {ctrl, panel, name, conf}
|
||||
return mgr:GetPane(panel), notebook
|
||||
end
|
||||
|
||||
function ide:AddPanelDocked(notebook, ctrl, panel, name, conf, activate)
|
||||
notebook:AddPage(ctrl, name, activate ~= false)
|
||||
panels[name] = {ctrl, panel, name, conf}
|
||||
return notebook
|
||||
end
|
||||
function ide:IsPanelDocked(panel)
|
||||
local layout = ide:GetSetting("/view", "uimgrlayout")
|
||||
return layout and not layout:find(panel)
|
||||
end
|
||||
|
||||
function ide:RestorePanelByLabel(name)
|
||||
if not panels[name] then return end
|
||||
return ide:AddPanel(unpack(panels[name]))
|
||||
end
|
||||
|
||||
function ide:AddTool(name, command, updateui)
|
||||
return ToolsAddTool(name, command, updateui)
|
||||
end
|
||||
|
||||
function ide:RemoveTool(name)
|
||||
return ToolsRemoveTool(name)
|
||||
end
|
||||
|
||||
@@ -4,12 +4,14 @@
|
||||
ide.proto.Document = {__index = {
|
||||
GetFileName = function(self) return self.fileName end,
|
||||
GetFilePath = function(self) return self.filePath end,
|
||||
GetFileExt = function(self) return GetFileExt(self.fileName) end,
|
||||
GetModTime = function(self) return self.modTime end,
|
||||
GetEditor = function(self) return self.editor end,
|
||||
GetTabIndex = function(self) return self.index end,
|
||||
IsModified = function(self) return self.isModified end,
|
||||
SetModified = function(self, modified) SetDocumentModified(self.editor:GetId(), modified) end,
|
||||
SetTabText = function(self, text) SetDocumentModified(self.editor:GetId(), self.isModified, text) end,
|
||||
SetActive = function(self) SetEditorSelection(self.index) end,
|
||||
}}
|
||||
|
||||
ide.proto.Plugin = {__index = {
|
||||
@@ -23,9 +25,19 @@ ide.proto.Plugin = {__index = {
|
||||
ide.proto.Interpreter = {__index = {
|
||||
GetName = function(self) return self.name end,
|
||||
GetFileName = function(self) return self.fname end,
|
||||
GetAPI = function(self) return self.api end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function (self,wfilename)
|
||||
local proj = ide:GetProject()
|
||||
return proj and proj:gsub("[\\/]$","") or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
}}
|
||||
|
||||
ide.proto.Debugger = {__index = {
|
||||
IsRunning = function(self) return self.running end,
|
||||
IsConnected = function(self) return self.server end,
|
||||
GetHostName = function(self) return self.hostname end,
|
||||
GetPortNumber = function(self) return self.portnumber end,
|
||||
}}
|
||||
|
||||
@@ -8,7 +8,8 @@ local ide = ide
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Initialize the wxConfig for loading/saving the preferences
|
||||
|
||||
local settings = wx.wxFileConfig(GetIDEString("settingsapp"),GetIDEString("settingsvendor"))
|
||||
local settings = wx.wxFileConfig(GetIDEString("settingsapp"),
|
||||
GetIDEString("settingsvendor"), ide.config.ini or "")
|
||||
ide.settings = settings
|
||||
|
||||
local function settingsReadSafe(settings,what,default)
|
||||
@@ -280,7 +281,7 @@ local function saveNotebook(nb)
|
||||
|
||||
local function sortedPages(tab)
|
||||
local t = {}
|
||||
for i,v in pairs(tab) do
|
||||
for i in pairs(tab) do
|
||||
table.insert(t,i)
|
||||
end
|
||||
table.sort(t)
|
||||
@@ -308,9 +309,9 @@ local function saveNotebook(nb)
|
||||
split = "<Y>"
|
||||
end
|
||||
|
||||
for i,v in ipairs(sortedUse) do
|
||||
for _, v in ipairs(sortedUse) do
|
||||
local pages = pagesUse[v]
|
||||
for n,id in ipairs(pages) do
|
||||
for _, id in ipairs(pages) do
|
||||
str = str..id.."|"
|
||||
end
|
||||
str = str..split.."|"
|
||||
@@ -391,7 +392,18 @@ function SettingsRestoreView()
|
||||
local layoutcur = uimgr:SavePerspective()
|
||||
local layout = settingsReadSafe(settings,"uimgrlayout",layoutcur)
|
||||
if (layout ~= layoutcur) then
|
||||
-- save the current toolbar besth and re-apply after perspective is loaded
|
||||
-- bestw and besth has two separate issues:
|
||||
-- (1) layout includes bestw that is only as wide as the toolbar size,
|
||||
-- this leaves default background on the right side of the toolbar;
|
||||
-- fix it by explicitly replacing with the screen width.
|
||||
-- (2) besth may be wrong after icon size changes.
|
||||
local toolbar = frame.uimgr:GetPane("toolbar")
|
||||
local besth = toolbar:IsOk() and tonumber(uimgr:SavePaneInfo(toolbar):match("besth=([^;]+)"))
|
||||
uimgr:LoadPerspective(layout, false)
|
||||
if toolbar:IsOk() then -- fix bestw and besth values
|
||||
toolbar:BestSize(wx.wxSystemSettings.GetMetric(wx.wxSYS_SCREEN_X), besth or -1)
|
||||
end
|
||||
|
||||
-- check if debugging panes are not mentioned and float them
|
||||
for _, name in pairs({"stackpanel", "watchpanel"}) do
|
||||
@@ -416,8 +428,8 @@ function SettingsRestoreView()
|
||||
|
||||
uimgr:Update()
|
||||
|
||||
local layoutcur = saveNotebook(frame.bottomnotebook)
|
||||
local layout = settingsReadSafe(settings,"nbbtmlayout",layoutcur)
|
||||
layoutcur = saveNotebook(frame.bottomnotebook)
|
||||
layout = settingsReadSafe(settings,"nbbtmlayout",layoutcur)
|
||||
if (layout ~= layoutcur) then
|
||||
loadNotebook(ide.frame.bottomnotebook,layout,
|
||||
-- treat "Output (running)" same as "Output"
|
||||
@@ -430,8 +442,8 @@ function SettingsRestoreView()
|
||||
local index = bottomnotebook:GetPageIndex(bottomnotebook.errorlog)
|
||||
if index >= 0 then bottomnotebook:SetSelection(index) end
|
||||
|
||||
local layoutcur = saveNotebook(frame.notebook)
|
||||
local layout = settingsReadSafe(settings,"nblayout",layoutcur)
|
||||
layoutcur = saveNotebook(frame.notebook)
|
||||
layout = settingsReadSafe(settings,"nblayout",layoutcur)
|
||||
if (layout ~= layoutcur) then
|
||||
loadNotebook(ide.frame.notebook,layout)
|
||||
local openDocuments = ide.openDocuments
|
||||
@@ -442,6 +454,23 @@ function SettingsRestoreView()
|
||||
end
|
||||
end
|
||||
|
||||
-- restore configuration for notebook pages that have been split;
|
||||
-- load saved dock_size values and update current values with saved ones
|
||||
-- where dock_size configuration matches
|
||||
for l, m in pairs({
|
||||
nbdocklayout = frame.notebook:GetAuiManager(),
|
||||
nbbtmdocklayout = frame.bottomnotebook:GetAuiManager(),
|
||||
}) do
|
||||
-- ...|dock_size(5,0,0)=20|dock_size(2,1,0)=200|...
|
||||
local prevlayout = settingsReadSafe(settings, l, "")
|
||||
local curlayout = m:SavePerspective()
|
||||
local newlayout = curlayout:gsub('(dock_size[^=]+=)(%d+)', function(t,v)
|
||||
local val = prevlayout:match(EscapeMagic(t)..'(%d+)')
|
||||
return t..(val or v)
|
||||
end)
|
||||
if newlayout ~= curlayout then m:LoadPerspective(newlayout) end
|
||||
end
|
||||
|
||||
local editor = GetEditor()
|
||||
if editor then editor:SetFocus() end
|
||||
|
||||
@@ -457,10 +486,12 @@ function SettingsSaveView()
|
||||
local frame = ide.frame
|
||||
local uimgr = frame.uimgr
|
||||
|
||||
settings:Write("uimgrlayout",uimgr:SavePerspective())
|
||||
settings:Write("nblayout", saveNotebook(frame.notebook))
|
||||
settings:Write("nbbtmlayout",saveNotebook(frame.bottomnotebook))
|
||||
settings:Write("statusbar",frame:GetStatusBar():IsShown())
|
||||
settings:Write("uimgrlayout", uimgr:SavePerspective())
|
||||
settings:Write("nblayout", saveNotebook(frame.notebook))
|
||||
settings:Write("nbbtmlayout", saveNotebook(frame.bottomnotebook))
|
||||
settings:Write("statusbar", frame:GetStatusBar():IsShown())
|
||||
settings:Write("nbdocklayout", frame.notebook:GetAuiManager():SavePerspective())
|
||||
settings:Write("nbbtmdocklayout", frame.bottomnotebook:GetAuiManager():SavePerspective())
|
||||
|
||||
settings:SetPath(path)
|
||||
end
|
||||
@@ -472,6 +503,8 @@ function SettingsRestoreEditorSettings()
|
||||
|
||||
ide.config.interpreter = settingsReadSafe(settings,"interpreter",ide.config.interpreter)
|
||||
ProjectSetInterpreter(ide.config.interpreter)
|
||||
|
||||
settings:SetPath(path)
|
||||
end
|
||||
|
||||
function SettingsSaveEditorSettings()
|
||||
|
||||
@@ -17,14 +17,11 @@ probably a pitfal: an instance is running but is not visible
|
||||
|
||||
if not ide.config.singleinstance then return end
|
||||
|
||||
require "socket"
|
||||
|
||||
local socket = require "socket"
|
||||
local port = ide.config.singleinstanceport
|
||||
local delay = tonumber(ide.config.singleinstance) or 1000 -- in ms
|
||||
local svr = socket.udp()
|
||||
|
||||
local success, errmsg = svr:setsockname("127.0.0.1",port) -- bind on local host
|
||||
|
||||
local success = svr:setsockname("127.0.0.1",port) -- bind on local host
|
||||
local protocol = {client = {}, server = {}}
|
||||
|
||||
protocol.client.greeting = "Is this you, my IDE? It's me, a new instance."
|
||||
@@ -37,15 +34,14 @@ if success then -- ok, server was started, we are solo
|
||||
ide.idletimer = wx.wxTimer(wx.wxGetApp())
|
||||
ide.idletimer:Start(delay,false)
|
||||
svr:settimeout(0) -- don't block
|
||||
wx.wxGetApp():Connect(wx.wxEVT_TIMER,function (evt)
|
||||
wx.wxGetApp():Connect(wx.wxEVT_TIMER, function()
|
||||
if ide.exitingProgram then -- if exiting, terminate the timer loop
|
||||
wx.wxGetApp():Disconnect(wx.wxEVT_TIMER)
|
||||
return
|
||||
end
|
||||
|
||||
local msg, err, port = svr:receivefrom() -- receive a msg
|
||||
local msg, ip, port = svr:receivefrom() -- receive a msg
|
||||
if msg then
|
||||
local ip = err -- the errmsg is actually the IP
|
||||
if msg == protocol.client.greeting then -- just send back hi
|
||||
svr:sendto(protocol.server.greeting,ip,port)
|
||||
elseif msg:match(protocol.client.requestloading:gsub("%%s",".+$")) then -- ok we need to open something
|
||||
@@ -53,16 +49,12 @@ if success then -- ok, server was started, we are solo
|
||||
local filename = msg:match(protocol.client.requestloading:gsub("%%s","(.+)$"))
|
||||
if filename then
|
||||
RequestAttention()
|
||||
local done = true
|
||||
if wx.wxDirExists(filename) then
|
||||
local dir = wx.wxFileName.DirName(filename)
|
||||
dir:Normalize() -- turn into absolute path if needed
|
||||
ProjectUpdateProjectDir(dir:GetFullPath())
|
||||
else
|
||||
done = LoadFile(filename, nil, true)
|
||||
end
|
||||
if not done then
|
||||
DisplayOutputLn("Can't open requested file '"..filename.."'.")
|
||||
elseif not ActivateFile(filename) then
|
||||
DisplayOutputLn(TR("Can't open file '%s': %s"):format(filename, wx.wxSysErrorMsg()))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -74,7 +66,7 @@ else -- something different is running on our port
|
||||
cln:settimeout(2)
|
||||
cln:send(protocol.client.greeting)
|
||||
|
||||
local msg,err = cln:receive()
|
||||
local msg = cln:receive()
|
||||
local arg = ide.arg
|
||||
if msg and msg == protocol.server.greeting then
|
||||
local failed = false
|
||||
@@ -85,7 +77,7 @@ else -- something different is running on our port
|
||||
and (ide.osname ~= 'Macintosh' or not fileName:find("^-psn")) then
|
||||
cln:send(protocol.client.requestloading:format(fileName))
|
||||
|
||||
local msg,err = cln:receive()
|
||||
local msg, err = cln:receive()
|
||||
if msg ~= protocol.server.answerok then
|
||||
failed = true
|
||||
print(err,msg)
|
||||
|
||||
@@ -89,9 +89,9 @@ function StylesGetDefault()
|
||||
end
|
||||
|
||||
local markers = {
|
||||
breakpoint = {0, wxstc.wxSTC_MARK_CIRCLE, wx.wxColour(220, 64, 64), wx.wxColour(220, 64, 64)},
|
||||
bookmark = {1, wxstc.wxSTC_MARK_SHORTARROW, wx.wxBLACK, wx.wxColour(96, 160, 220)},
|
||||
currentline = {2, wxstc.wxSTC_MARK_ARROW, wx.wxBLACK, wx.wxColour(64, 220, 64)},
|
||||
breakpoint = {0, wxstc.wxSTC_MARK_CIRCLE, wx.wxColour(196, 64, 64), wx.wxColour(220, 64, 64)},
|
||||
bookmark = {1, wxstc.wxSTC_MARK_SHORTARROW, wx.wxColour(16, 96, 128), wx.wxColour(96, 160, 220)},
|
||||
currentline = {2, wxstc.wxSTC_MARK_ARROW, wx.wxColour(16, 128, 16), wx.wxColour(64, 220, 64)},
|
||||
message = {3, wxstc.wxSTC_MARK_CHARACTER+(' '):byte(), wx.wxBLACK, wx.wxColour(220, 220, 220)},
|
||||
output = {4, wxstc.wxSTC_MARK_BACKGROUND, wx.wxBLACK, wx.wxColour(240, 240, 240)},
|
||||
prompt = {5, wxstc.wxSTC_MARK_ARROWS, wx.wxBLACK, wx.wxColour(220, 220, 220)},
|
||||
@@ -244,7 +244,12 @@ local specialmapping = {
|
||||
local panes = uimgr:GetAllPanes()
|
||||
for index = 0, panes:GetCount()-1 do
|
||||
local wind = uimgr:GetPane(panes:Item(index).name).window
|
||||
local children = wind:GetChildren()
|
||||
|
||||
-- wxlua compiled with STL doesn't provide GetChildren() method
|
||||
-- as per http://sourceforge.net/p/wxlua/mailman/message/32500995/
|
||||
local ok, children = pcall(function() return wind:GetChildren() end)
|
||||
if not ok then break end
|
||||
|
||||
for child = 0, children:GetCount()-1 do
|
||||
local data = children:Item(child):GetData()
|
||||
local _, window = pcall(function() return data:DynamicCast("wxWindow") end)
|
||||
@@ -311,8 +316,8 @@ function StylesApplyToEditor(styles,editor,font,fontitalic,lexerconvert)
|
||||
editor:StyleClearAll()
|
||||
|
||||
-- set the default linenumber font size based on the editor font size
|
||||
if styles.linenumber then
|
||||
styles.linenumber.fs = styles.linenumber.fs or ide.config.editor.fontsize - 1
|
||||
if styles.linenumber and not styles.linenumber.fs then
|
||||
styles.linenumber.fs = ide.config.editor.fontsize and (ide.config.editor.fontsize - 1) or nil
|
||||
end
|
||||
|
||||
for name,style in pairs(styles) do
|
||||
@@ -324,7 +329,7 @@ function StylesApplyToEditor(styles,editor,font,fontitalic,lexerconvert)
|
||||
|
||||
if (lexerconvert and lexerconvert[name]) then
|
||||
local targets = lexerconvert[name]
|
||||
for n,outid in pairs(targets) do
|
||||
for _, outid in pairs(targets) do
|
||||
applystyle(style,outid)
|
||||
end
|
||||
-- allow to specify style numbers, but exclude those styles
|
||||
@@ -373,11 +378,8 @@ function ReApplySpecAndStyles()
|
||||
SetupKeywords(shellbox,"lua",nil,ide.config.stylesoutshell,ide.font.oNormal,ide.font.oItalic)
|
||||
StylesApplyToEditor(ide.config.stylesoutshell,errorlog,ide.font.oNormal,ide.font.oItalic)
|
||||
|
||||
local openDocuments = ide.openDocuments
|
||||
for i,doc in pairs(openDocuments) do
|
||||
if (doc.editor.spec) then
|
||||
SetupKeywords(doc.editor,nil,doc.editor.spec)
|
||||
end
|
||||
for _, doc in pairs(ide:GetDocuments()) do
|
||||
if doc.editor.spec then doc.editor:SetupKeywords(nil, doc.editor.spec) end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
37
src/editor/toolbar.lua
Normal file
37
src/editor/toolbar.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
-- Copyright 2014 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
ide.config.toolbar.icons = {
|
||||
ID_NEW, ID_OPEN, ID_SAVE, ID_SAVEALL, ID_PROJECTDIRFROMFILE, ID_PROJECTDIRCHOOSE,
|
||||
ID_SEPARATOR,
|
||||
ID_FIND, ID_REPLACE, ID_FINDINFILES,
|
||||
ID_SEPARATOR,
|
||||
ID_RUN, ID_STARTDEBUG, ID_RUNNOW, ID_STOPDEBUG, ID_DETACHDEBUG, ID_BREAK, ID_STEP, ID_STEPOVER, ID_STEPOUT,
|
||||
ID_SEPARATOR,
|
||||
ID_TOGGLEBREAKPOINT, ID_BOOKMARKTOGGLE, ID_VIEWCALLSTACK, ID_VIEWWATCHWINDOW,
|
||||
[ID_FINDINFILES] = false,
|
||||
}
|
||||
|
||||
ide.config.toolbar.iconmap = {
|
||||
[ID_NEW] = {"FILE-NEW", "Create an empty document"},
|
||||
[ID_OPEN] = {"FILE-OPEN", "Open an existing document"},
|
||||
[ID_SAVE] = {"FILE-SAVE", "Save the current document"},
|
||||
[ID_SAVEALL] = {"FILE-SAVE-ALL", "Save all open documents"},
|
||||
[ID_PROJECTDIRFROMFILE]= {"DIR-SETUP-FILE", "Set project directory from current file"},
|
||||
[ID_PROJECTDIRCHOOSE] = {"DIR-SETUP", "Choose a project directory"},
|
||||
[ID_FIND] = {"FIND", "Find text"},
|
||||
[ID_REPLACE] = {"FIND-AND-REPLACE", "Find and replace text"},
|
||||
[ID_FINDINFILES] = {"FIND-IN-FILES", "Find in files"},
|
||||
[ID_RUN] = {"RUN", "Execute the current project/file"},
|
||||
[ID_RUNNOW] = {"RUN-NOW", "Run as Scratchpad"},
|
||||
[ID_STARTDEBUG] = {"DEBUG-START", "Start or continue debugging"},
|
||||
[ID_STOPDEBUG] = {"DEBUG-STOP", "Stop the currently running process"},
|
||||
[ID_DETACHDEBUG]= {"DEBUG-DETACH", "Stop debugging and continue running the process"},
|
||||
[ID_BREAK] = {"DEBUG-BREAK", "Break execution at the next executed line of code"},
|
||||
[ID_STEP] = {"DEBUG-STEP-INTO", "Step into"},
|
||||
[ID_STEPOVER] = {"DEBUG-STEP-OVER", "Step over"},
|
||||
[ID_STEPOUT] = {"DEBUG-STEP-OUT", "Step out of the current function"},
|
||||
[ID_TOGGLEBREAKPOINT] = {"DEBUG-BREAKPOINT-TOGGLE", "Toggle breakpoint"},
|
||||
[ID_BOOKMARKTOGGLE] = {"BOOKMARK-TOGGLE", "Toggle bookmark"},
|
||||
[ID_VIEWCALLSTACK] = {"DEBUG-CALLSTACK", "View the stack window"},
|
||||
[ID_VIEWWATCHWINDOW] = {"DEBUG-WATCH", "View the watch window"},
|
||||
}
|
||||
152
src/main.lua
152
src/main.lua
@@ -42,6 +42,19 @@ ide = {
|
||||
editor = {
|
||||
foldcompact = true,
|
||||
checkeol = true,
|
||||
saveallonrun = false,
|
||||
caretline = true,
|
||||
showfncall = true,
|
||||
autotabs = false,
|
||||
usetabs = false,
|
||||
tabwidth = 2,
|
||||
usewrap = true,
|
||||
calltipdelay = 500,
|
||||
smartindent = true,
|
||||
fold = true,
|
||||
autoreload = true,
|
||||
indentguide = true,
|
||||
backspaceunindent = true,
|
||||
},
|
||||
debugger = {
|
||||
verbose = false,
|
||||
@@ -55,11 +68,25 @@ ide = {
|
||||
fullname = 'untitled.lua',
|
||||
interpreter = 'luadeb',
|
||||
},
|
||||
outputshell = {},
|
||||
filetree = {},
|
||||
funclist = {},
|
||||
outputshell = {
|
||||
usewrap = true,
|
||||
},
|
||||
filetree = {
|
||||
mousemove = true,
|
||||
},
|
||||
outline = {
|
||||
showanonymous = '~',
|
||||
},
|
||||
|
||||
toolbar = {
|
||||
icons = {},
|
||||
iconmap = {},
|
||||
},
|
||||
|
||||
keymap = {},
|
||||
imagemap = {
|
||||
['VALUE-MCALL'] = 'VALUE-SCALL',
|
||||
},
|
||||
messages = {},
|
||||
language = "en",
|
||||
|
||||
@@ -69,10 +96,13 @@ ide = {
|
||||
autocomplete = true,
|
||||
autoanalyzer = true,
|
||||
acandtip = {
|
||||
shorttip = false,
|
||||
shorttip = true,
|
||||
nodynwords = true,
|
||||
ignorecase = false,
|
||||
symbols = true,
|
||||
strategy = 2,
|
||||
width = 60,
|
||||
maxlength = 450,
|
||||
},
|
||||
arg = {}, -- command line arguments
|
||||
|
||||
@@ -81,17 +111,20 @@ ide = {
|
||||
apptitle = "%T - %F",
|
||||
},
|
||||
|
||||
activateoutput = false, -- activate output/console on Run/Debug/Compile
|
||||
activateoutput = true, -- activate output/console on Run/Debug/Compile
|
||||
unhidewindow = false, -- to unhide a gui window
|
||||
allowinteractivescript = false, -- allow interaction in the output window
|
||||
allowinteractivescript = true, -- allow interaction in the output window
|
||||
projectautoopen = true,
|
||||
autorecoverinactivity = 10, -- seconds
|
||||
outlineinactivity = 0.250, -- seconds
|
||||
filehistorylength = 20,
|
||||
projecthistorylength = 15,
|
||||
projecthistorylength = 20,
|
||||
savebak = false,
|
||||
singleinstance = false,
|
||||
singleinstanceport = 0xe493,
|
||||
-- HiDPI/Retina display support;
|
||||
-- `false` by default because of issues with indicators with alpha setting
|
||||
hidpi = false,
|
||||
interpreter = "luadeb",
|
||||
hidpi = false, -- HiDPI/Retina display support
|
||||
hotexit = false,
|
||||
},
|
||||
specs = {
|
||||
none = {
|
||||
@@ -103,6 +136,7 @@ ide = {
|
||||
interpreters = {},
|
||||
packages = {},
|
||||
apis = {},
|
||||
timers = {},
|
||||
|
||||
proto = {}, -- prototypes for various classes
|
||||
|
||||
@@ -121,6 +155,7 @@ ide = {
|
||||
|
||||
-- misc
|
||||
exitingProgram = false, -- are we currently exiting, ID_EXIT
|
||||
infocus = nil, -- last component with a focus
|
||||
editorApp = wx.wxGetApp(),
|
||||
editorFilename = nil,
|
||||
openDocuments = {},-- open notebook editor documents[winId] = {
|
||||
@@ -137,7 +172,6 @@ ide = {
|
||||
oNormal = nil,
|
||||
oItalic = nil,
|
||||
fNormal = nil,
|
||||
dNormal = nil,
|
||||
},
|
||||
|
||||
osname = wx.wxPlatformInfo.Get():GetOperatingSystemFamilyName(),
|
||||
@@ -145,6 +179,8 @@ ide = {
|
||||
oshome = os.getenv("HOME") or (iswindows and os.getenv('HOMEDRIVE') and os.getenv('HOMEPATH')
|
||||
and (os.getenv('HOMEDRIVE')..os.getenv('HOMEPATH'))),
|
||||
wxver = string.match(wx.wxVERSION_STRING, "[%d%.]+"),
|
||||
|
||||
test = {}, -- local functions used for testing
|
||||
}
|
||||
|
||||
-- add wx.wxMOD_RAW_CONTROL as it's missing in wxlua 2.8.12.3;
|
||||
@@ -180,7 +216,7 @@ end
|
||||
|
||||
dofile "src/version.lua"
|
||||
|
||||
for _, file in ipairs({"ids", "style", "keymap", "proto"}) do
|
||||
for _, file in ipairs({"ids", "style", "keymap", "proto", "toolbar"}) do
|
||||
dofile("src/editor/"..file..".lua")
|
||||
end
|
||||
|
||||
@@ -194,11 +230,11 @@ local function setLuaPaths(mainpath, osname)
|
||||
local luadev_path = (luadev
|
||||
and ('LUA_DEV/?.lua;LUA_DEV/?/init.lua;LUA_DEV/lua/?.lua;LUA_DEV/lua/?/init.lua')
|
||||
:gsub('LUA_DEV', (luadev:gsub('[\\/]$','')))
|
||||
or "")
|
||||
or nil)
|
||||
local luadev_cpath = (luadev
|
||||
and ('LUA_DEV/?.dll;LUA_DEV/?51.dll;LUA_DEV/clibs/?.dll;LUA_DEV/clibs/?51.dll')
|
||||
:gsub('LUA_DEV', (luadev:gsub('[\\/]$','')))
|
||||
or "")
|
||||
or nil)
|
||||
|
||||
if luadev then
|
||||
local path, clibs = os.getenv('PATH'), luadev:gsub('[\\/]$','')..'\\clibs'
|
||||
@@ -211,22 +247,29 @@ local function setLuaPaths(mainpath, osname)
|
||||
-- if the path has an excamation mark, allow Lua to expand it as this
|
||||
-- expansion happens only once.
|
||||
if osname == "Windows" and mainpath:find('%!') then mainpath = "!/../" end
|
||||
wx.wxSetEnv("LUA_PATH", package.path .. ";"
|
||||
.. "./?.lua;./?/init.lua;./lua/?.lua;./lua/?/init.lua" .. ';'
|
||||
.. mainpath.."lualibs/?/?.lua;"..mainpath.."lualibs/?.lua" .. ';'
|
||||
.. luadev_path)
|
||||
|
||||
local clibs =
|
||||
-- if LUA_PATH or LUA_CPATH is not specified, then add ;;
|
||||
-- ;; will be replaced with the default (c)path by the Lua interpreter
|
||||
wx.wxSetEnv("LUA_PATH",
|
||||
(os.getenv("LUA_PATH") or ';') .. ';'
|
||||
.. "./?.lua;./?/init.lua;./lua/?.lua;./lua/?/init.lua" .. ';'
|
||||
.. mainpath.."lualibs/?/?.lua;"..mainpath.."lualibs/?.lua"
|
||||
.. (luadev_path and (';' .. luadev_path) or ''))
|
||||
|
||||
ide.osclibs = -- keep the list to use for other Lua versions
|
||||
osname == "Windows" and mainpath.."bin/?.dll;"..mainpath.."bin/clibs/?.dll" or
|
||||
osname == "Macintosh" and mainpath.."bin/lib?.dylib;"..mainpath.."bin/clibs/?.dylib" or
|
||||
osname == "Unix" and mainpath..("bin/linux/%s/lib?.so;"):format(arch)
|
||||
..mainpath..("bin/linux/%s/clibs/?.so"):format(arch) or
|
||||
nil
|
||||
if clibs then wx.wxSetEnv("LUA_CPATH",
|
||||
package.cpath .. ';' .. clibs .. ';' .. luadev_cpath) end
|
||||
ide.osclibs = clibs -- keep the list to use for other Lua versions
|
||||
assert(false, "Unexpected OS name")
|
||||
|
||||
wx.wxSetEnv("LUA_CPATH",
|
||||
(os.getenv("LUA_CPATH") or ';') .. ';' .. ide.osclibs
|
||||
.. (luadev_cpath and (';' .. luadev_cpath) or ''))
|
||||
end
|
||||
|
||||
ide.test.setLuaPaths = setLuaPaths
|
||||
|
||||
---------------
|
||||
-- process args
|
||||
local filenames = {}
|
||||
@@ -249,13 +292,15 @@ do
|
||||
end
|
||||
|
||||
ide.editorFilename = fullPath
|
||||
ide.config.path.app = fullPath:match("([%w_-%.]+)$"):gsub("%.[^%.]*$","")
|
||||
assert(ide.config.path.app, "no application path defined")
|
||||
ide.appname = fullPath:match("([%w_-%.]+)$"):gsub("%.[^%.]*$","")
|
||||
assert(ide.appname, "no application path defined")
|
||||
|
||||
for index = 2, #arg do
|
||||
if (arg[index] == "-cfg" and index+1 <= #arg) then
|
||||
table.insert(configs,arg[index+1])
|
||||
elseif arg[index-1] ~= "-cfg" then
|
||||
elseif arg[index-1] ~= "-cfg"
|
||||
-- on OSX command line includes -psn... parameter, don't include these
|
||||
and (ide.osname ~= 'Macintosh' or not arg[index]:find("^-psn")) then
|
||||
table.insert(filenames,arg[index])
|
||||
end
|
||||
end
|
||||
@@ -266,7 +311,7 @@ end
|
||||
----------------------
|
||||
-- process application
|
||||
|
||||
ide.app = dofile(ide.config.path.app.."/app.lua")
|
||||
ide.app = dofile(ide.appname.."/app.lua")
|
||||
local app = assert(ide.app)
|
||||
|
||||
local function loadToTab(filter, folder, tab, recursive, proto)
|
||||
@@ -294,7 +339,7 @@ end
|
||||
local function loadPackages(filter)
|
||||
loadToTab(filter, "packages", ide.packages, false, ide.proto.Plugin)
|
||||
if ide.oshome then
|
||||
local userpackages = MergeFullPath(ide.oshome, ".zbstudio/packages")
|
||||
local userpackages = MergeFullPath(ide.oshome, "."..ide.appname.."/packages")
|
||||
if wx.wxDirExists(userpackages) then
|
||||
loadToTab(filter, userpackages, ide.packages, false, ide.proto.Plugin)
|
||||
end
|
||||
@@ -303,13 +348,23 @@ local function loadPackages(filter)
|
||||
-- check dependencies and assign file names to each package
|
||||
local unload = {}
|
||||
for fname, package in pairs(ide.packages) do
|
||||
if type(package.dependencies) == 'table'
|
||||
and package.dependencies.osname
|
||||
and not package.dependencies.osname:find(ide.osname, 1, true) then
|
||||
(DisplayOutputLn or print)(
|
||||
("Package '%s' not loaded: requires %s platform, but you are running %s.")
|
||||
:format(fname, package.dependencies.osname, ide.osname)
|
||||
)
|
||||
table.insert(unload, fname)
|
||||
end
|
||||
|
||||
local needsversion = tonumber(package.dependencies)
|
||||
or type(package.dependencies) == 'table' and tonumber(package.dependencies[1])
|
||||
or -1
|
||||
local isversion = tonumber(ide.VERSION)
|
||||
if isversion and needsversion > isversion then
|
||||
(DisplayOutputLn or print)(
|
||||
("Package '%s' not loaded: requires version %s, but you are running version %s")
|
||||
("Package '%s' not loaded: requires version %s, but you are running version %s.")
|
||||
:format(fname, needsversion, ide.VERSION)
|
||||
)
|
||||
table.insert(unload, fname)
|
||||
@@ -373,8 +428,7 @@ end
|
||||
-- process config
|
||||
|
||||
-- set ide.config environment
|
||||
ide.config.os = os
|
||||
ide.config.wxstc = wxstc
|
||||
setmetatable(ide.config, {__index = {os = os, wxstc = wxstc, wx = wx}})
|
||||
ide.config.load = { interpreters = loadInterpreters, specs = loadSpecs,
|
||||
tools = loadTools }
|
||||
do
|
||||
@@ -388,7 +442,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
LoadLuaConfig(ide.config.path.app.."/config.lua")
|
||||
LoadLuaConfig(ide.appname.."/config.lua")
|
||||
|
||||
ide.editorApp:SetAppName(GetIDEString("settingsapp"))
|
||||
|
||||
@@ -418,7 +472,7 @@ loadTools()
|
||||
do
|
||||
ide.configs = {
|
||||
system = MergeFullPath("cfg", "user.lua"),
|
||||
user = ide.oshome and MergeFullPath(ide.oshome, ".zbstudio/user.lua"),
|
||||
user = ide.oshome and MergeFullPath(ide.oshome, "."..ide.appname.."/user.lua"),
|
||||
}
|
||||
|
||||
-- process configs
|
||||
@@ -442,7 +496,7 @@ loadPackages()
|
||||
|
||||
for _, file in ipairs({
|
||||
"markup", "settings", "singleinstance", "iofilters",
|
||||
"package", "gui", "filetree", "output", "debugger",
|
||||
"package", "gui", "filetree", "output", "debugger", "outline",
|
||||
"editor", "findreplace", "commands", "autocomplete", "shellbox",
|
||||
"menu_file", "menu_edit", "menu_search",
|
||||
"menu_view", "menu_project", "menu_tools", "menu_help",
|
||||
@@ -453,6 +507,9 @@ end
|
||||
-- register all the plugins
|
||||
PackageEventHandle("onRegister")
|
||||
|
||||
-- initialization that was delayed until configs processed and packages loaded
|
||||
ProjectUpdateInterpreters()
|
||||
|
||||
-- load rest of settings
|
||||
SettingsRestoreEditorSettings()
|
||||
SettingsRestoreFramePosition(ide.frame, "MainFrame")
|
||||
@@ -469,14 +526,14 @@ SettingsRestoreView()
|
||||
-- Load the filenames
|
||||
|
||||
do
|
||||
for _, fileName in ipairs(filenames) do
|
||||
if fileName ~= "--" then
|
||||
if wx.wxDirExists(fileName) then
|
||||
local dir = wx.wxFileName.DirName(fileName)
|
||||
for _, filename in ipairs(filenames) do
|
||||
if filename ~= "--" then
|
||||
if wx.wxDirExists(filename) then
|
||||
local dir = wx.wxFileName.DirName(filename)
|
||||
dir:Normalize() -- turn into absolute path if needed
|
||||
ProjectUpdateProjectDir(dir:GetFullPath())
|
||||
else
|
||||
LoadFile(fileName, nil, true)
|
||||
elseif not ActivateFile(filename) then
|
||||
DisplayOutputLn(("Can't open file '%s': %s"):format(filename, wx.wxSysErrorMsg()))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -501,6 +558,17 @@ local remap = {
|
||||
[ID_RENAMEFILE] = ide:GetProjectTree(),
|
||||
[ID_DELETEFILE] = ide:GetProjectTree(),
|
||||
}
|
||||
|
||||
local function rerouteMenuCommand(obj, id)
|
||||
-- check if the conflicting shortcut is enabled:
|
||||
-- (1) SetEnabled wasn't called or (2) Enabled was set to `true`.
|
||||
local uievent = wx.wxUpdateUIEvent(id)
|
||||
obj:ProcessEvent(uievent)
|
||||
if not uievent:GetSetEnabled() or uievent:GetEnabled() then
|
||||
obj:AddPendingEvent(wx.wxCommandEvent(wx.wxEVT_COMMAND_MENU_SELECTED, id))
|
||||
end
|
||||
end
|
||||
|
||||
local function remapkey(event)
|
||||
local keycode = event:GetKeyCode()
|
||||
local mod = event:GetModifiers()
|
||||
@@ -508,7 +576,7 @@ local function remapkey(event)
|
||||
if obj:FindFocus():GetId() == obj:GetId() then
|
||||
local ae = wx.wxAcceleratorEntry(); ae:FromString(KSC(id))
|
||||
if ae:GetFlags() == mod and ae:GetKeyCode() == keycode then
|
||||
obj:AddPendingEvent(wx.wxCommandEvent(wx.wxEVT_COMMAND_MENU_SELECTED, id))
|
||||
rerouteMenuCommand(obj, id)
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -534,7 +602,7 @@ local function resolveConflict(localid, globalid)
|
||||
end
|
||||
end
|
||||
end
|
||||
ide.frame:AddPendingEvent(wx.wxCommandEvent(wx.wxEVT_COMMAND_MENU_SELECTED, globalid))
|
||||
rerouteMenuCommand(ide.frame, globalid)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
23
src/util.lua
23
src/util.lua
@@ -7,6 +7,8 @@
|
||||
-- Equivalent to C's "cond ? a : b", all terms will be evaluated
|
||||
function iff(cond, a, b) if cond then return a else return b end end
|
||||
|
||||
function EscapeMagic(s) return s:gsub('([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end
|
||||
|
||||
-- Does the num have all the bits in value
|
||||
function HasBit(value, num)
|
||||
for n = 32, 0, -1 do
|
||||
@@ -135,8 +137,8 @@ function GetFileModTime(filePath)
|
||||
end
|
||||
|
||||
function GetFileExt(filePath)
|
||||
local match = filePath and filePath:match("%.([a-zA-Z_0-9]+)$")
|
||||
return match and (string.lower(match))
|
||||
local match = filePath and filePath:match("%.([^./\\]*)$")
|
||||
return match and match:lower() or ''
|
||||
end
|
||||
|
||||
function IsLuaFile(filePath)
|
||||
@@ -144,19 +146,13 @@ function IsLuaFile(filePath)
|
||||
(string.lower(string.sub(filePath, -4)) == ".lua")
|
||||
end
|
||||
|
||||
function GetFileNameExt(filePath)
|
||||
if (not filePath) then return end
|
||||
local wxn = wx.wxFileName(filePath)
|
||||
return (wxn:GetName()..(wxn:HasExt() and ("."..wxn:GetExt()) or ""))
|
||||
end
|
||||
|
||||
function GetPathWithSep(wxfn)
|
||||
if type(wxfn) == 'string' then wxfn = wx.wxFileName(wxfn) end
|
||||
return wxfn:GetPath(bit.bor(wx.wxPATH_GET_VOLUME, wx.wxPATH_GET_SEPARATOR))
|
||||
end
|
||||
|
||||
function FileSysHasContent(dir)
|
||||
local f = wx.wxFindFirstFile(dir,wx.wxFILE + wx.wxDIR)
|
||||
function FileDirHasContent(dir)
|
||||
local f = wx.wxFindFirstFile(dir, wx.wxFILE + wx.wxDIR)
|
||||
return #f>0
|
||||
end
|
||||
|
||||
@@ -182,7 +178,7 @@ function FileSysGetRecursive(path, recursive, spec, skip)
|
||||
-- check if this name already appears in the path earlier;
|
||||
-- Skip the processing if it does as it could lead to infinite
|
||||
-- recursion with circular references created by symlinks.
|
||||
if recursive and select(2, fname:gsub(file..sep,'')) <= 2 then
|
||||
if recursive and select(2, fname:gsub(EscapeMagic(file..sep),'')) <= 2 then
|
||||
getDir(fname, spec) end
|
||||
end
|
||||
found, file = dir:GetNext()
|
||||
@@ -269,7 +265,8 @@ function FileCopy(file1, file2)
|
||||
return wx.wxCopyFile(file1, file2), wx.wxSysErrorMsg()
|
||||
end
|
||||
|
||||
TimeGet = pcall(require, "socket") and socket.gettime or os.clock
|
||||
local ok, socket = pcall(require, "socket")
|
||||
TimeGet = ok and socket.gettime or os.clock
|
||||
|
||||
function isBinary(text) return text:find("[^\7\8\9\10\12\13\27\32-\255]") end
|
||||
|
||||
@@ -450,8 +447,6 @@ function LoadSafe(data)
|
||||
return ok, res
|
||||
end
|
||||
|
||||
function EscapeMagic(s) return s:gsub('([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end
|
||||
|
||||
local function isCtrlFocused(e)
|
||||
local ctrl = e and e:FindFocus()
|
||||
return ctrl and
|
||||
|
||||
@@ -31,8 +31,19 @@ is(editor:GetSelectionEnd(), selend, "Quick Find works based on previous search.
|
||||
ide.frame:ProcessEvent(wx.wxCommandEvent(wx.wxEVT_COMMAND_MENU_SELECTED, ID_FINDNEXT))
|
||||
is(editor:GetSelectionStart(), selend, "Quick Find finds next match.")
|
||||
|
||||
-- replace the text once
|
||||
-- check that text in "find" control is checked against selection with replacing
|
||||
findReplace.findText = "something else"
|
||||
findReplace.replaceText = replace
|
||||
findReplace.foundString = true
|
||||
findReplace:ReplaceString()
|
||||
is(select(2, editor:GetText():gsub(search, search)), 4, "Replace doesn't replace selection that doesn't match 'find' text.")
|
||||
|
||||
-- restore position and selection
|
||||
editor:GotoPos(4) -- reset current selection
|
||||
findReplace.findText = search
|
||||
findReplace:FindString()
|
||||
|
||||
-- replace the text once
|
||||
findReplace:ReplaceString()
|
||||
local _, replacements = editor:GetText():gsub(replace, replace)
|
||||
is(replacements, 1, "Replace replaces once.")
|
||||
|
||||
@@ -4,7 +4,7 @@ editor:SetText('print("select")')
|
||||
-- this is to set proper styles, which are needed for EditorCallTip
|
||||
editor:Colourise(0, -1)
|
||||
|
||||
local value
|
||||
local value = ''
|
||||
local CTS = editor.CallTipShow
|
||||
editor.CallTipShow = function(editor, pos, tip) value = tip end
|
||||
EditorCallTip(editor, 10)
|
||||
|
||||
84
t/6-path.lua
Normal file
84
t/6-path.lua
Normal file
@@ -0,0 +1,84 @@
|
||||
local LPATH = os.getenv('LUA_PATH')
|
||||
local LCPATH = os.getenv('LUA_CPATH')
|
||||
local LCPATH52 = os.getenv('LUA_CPATH_5_2')
|
||||
local mainpath = GetPathWithSep(ide.editorFilename)
|
||||
|
||||
-- LUA_(C)PATH is specified, no ;; is added
|
||||
wx.wxSetEnv('LUA_PATH', 'foo')
|
||||
wx.wxSetEnv('LUA_CPATH', 'bar')
|
||||
ide.test.setLuaPaths(mainpath, 'Windows')
|
||||
ok(os.getenv('LUA_PATH'), "LUA_PATH is set.")
|
||||
ok(os.getenv('LUA_CPATH'), "LUA_CPATH is set.")
|
||||
|
||||
ok(not (os.getenv('LUA_PATH') or ""):find(';;'),
|
||||
"No ;; is added when LUA_PATH is specified.")
|
||||
ok(not (os.getenv('LUA_CPATH') or ""):find(';;'),
|
||||
"No ;; is added when LUA_CPATH is specified.")
|
||||
|
||||
-- LUA_(C)PATH is not specified, ;; is added at the beginning
|
||||
wx.wxSetEnv('LUA_PATH', '')
|
||||
wx.wxSetEnv('LUA_CPATH', '')
|
||||
ide.test.setLuaPaths(mainpath, 'Windows')
|
||||
ok((os.getenv('LUA_PATH') or ""):find(';;'),
|
||||
";; is added when LUA_PATH is not specified.")
|
||||
ok((os.getenv('LUA_CPATH') or ""):find(';;'),
|
||||
";; is added when LUA_CPATH is not specified.")
|
||||
|
||||
-- ide.osclibs are added
|
||||
ok((os.getenv('LUA_CPATH') or ""):find(ide.osclibs, 1, true),
|
||||
"OS clibs is included in LUA_CPATH.")
|
||||
ok(ide.osclibs:find('/clibs/'),
|
||||
"OS clibs includes '/clibs/' folder.")
|
||||
|
||||
local luadev = MergeFullPath(GetPathWithSep(ide.editorFilename), '../'):gsub('[\\/]$','')
|
||||
|
||||
-- LUA_DEV is not used on non-Windows
|
||||
wx.wxSetEnv('LUA_PATH', 'foo')
|
||||
wx.wxSetEnv('LUA_CPATH', 'bar')
|
||||
ide.test.setLuaPaths(mainpath, 'Unix')
|
||||
ok(not os.getenv('LUA_PATH'):find(luadev..'/?.lua', 1, true),
|
||||
"LUA_DEV is not used in LUA_PATH on non-Windows.")
|
||||
ok(not os.getenv('LUA_CPATH'):find(luadev..'/?51.dll', 1, true),
|
||||
"LUA_DEV is not used in LUA_CPATH on non-Windows.")
|
||||
wx.wxSetEnv('LUA_DEV', '')
|
||||
|
||||
-- LUA_DEV is used on Windows
|
||||
wx.wxSetEnv('LUA_PATH', 'foo')
|
||||
wx.wxSetEnv('LUA_CPATH', 'bar')
|
||||
wx.wxSetEnv('LUA_DEV', luadev)
|
||||
ide.test.setLuaPaths(mainpath, 'Windows')
|
||||
ok(os.getenv('LUA_PATH'):find(luadev..'/?.lua', 1, true), "LUA_DEV is used in LUA_PATH on Windows.")
|
||||
ok(os.getenv('LUA_CPATH'):find(luadev..'/?51.dll', 1, true), "LUA_DEV is used in LUA_CPATH on Windows.")
|
||||
|
||||
-- stub CommandLineRun and check if interpreters set paths correctly
|
||||
local CLR = CommandLineRun
|
||||
local lp, lcp
|
||||
local fn = wx.wxFileName("foo")
|
||||
_G.CommandLineRun = function(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
lp, lcp, lcp52 = os.getenv('LUA_PATH'), os.getenv('LUA_CPATH'), os.getenv('LUA_CPATH_5_2')
|
||||
if endcallback then endcallback() end
|
||||
return
|
||||
end
|
||||
ide.interpreters.luadeb:frun(fn, "")
|
||||
ok(lcp:find(ide.osclibs, 1, true) == 1,
|
||||
"Prepend clibs to LUA_CPATH if path.lua is not set.")
|
||||
|
||||
local CPL = ide.config.path.lua
|
||||
ide.config.path.lua = "foo"
|
||||
ide.interpreters.luadeb:frun(fn, "")
|
||||
ok(lcp:find(ide.osclibs, 1, true) ~= 1,
|
||||
"Don't prepend clibs to LUA_CPATH if path.lua is set.")
|
||||
ide.config.path.lua = CPL
|
||||
|
||||
-- LUA_CPATH_5_2 modified if it's already set
|
||||
wx.wxSetEnv('LUA_CPATH_5_2', 'foo')
|
||||
ide.interpreters.luadeb52:frun(fn, "")
|
||||
ok(lcp:find(ide.osclibs, 1, true) ~= 1,
|
||||
"LUA_CPATH_5_2 is modified if it is already set.")
|
||||
|
||||
_G.CommandLineRun = CLR
|
||||
|
||||
wx.wxSetEnv('LUA_PATH', LPATH or "")
|
||||
wx.wxSetEnv('LUA_CPATH', LCPATH or "")
|
||||
wx.wxSetEnv('LUA_CPATH_5_2', LCPATH52 or "")
|
||||
ide.test.setLuaPaths(mainpath, ide.osname)
|
||||
@@ -50,13 +50,14 @@ local function ffiToApi(ffidef)
|
||||
|
||||
local description = header:match("|%s*(.*)")
|
||||
local descrprefixes = header:match("(.-)%s*|")
|
||||
if not descrprefixes then return end
|
||||
|
||||
local prefixes = {}
|
||||
for prefix in descrprefixes:gmatch("([_%w]+)") do
|
||||
table.insert(prefixes,prefix)
|
||||
end
|
||||
if (not prefixes[1]) then return end
|
||||
|
||||
local ns = prefixes[1]
|
||||
if not ns then return end
|
||||
|
||||
local lktypes = {
|
||||
["string"] = "string",
|
||||
@@ -284,11 +285,11 @@ end
|
||||
local function exec(wxfname,projectdir)
|
||||
-- get cur editor text
|
||||
local editor = GetEditor()
|
||||
if (not editor) then end
|
||||
if (not editor) then return end
|
||||
local tx = editor:GetText()
|
||||
tx = ffiToApi(tx)
|
||||
-- replace text
|
||||
editor:SetText(tx)
|
||||
if tx then editor:SetText(tx) end
|
||||
end
|
||||
|
||||
if (not ide) then
|
||||
|
||||
@@ -5,8 +5,8 @@ return {
|
||||
exec = {
|
||||
name = "Perforce edit",
|
||||
description = "does p4 edit",
|
||||
fn = function(wxfname,projectdir)
|
||||
local cmd = 'p4 edit "'..wxfname:GetFullPath()..'"'
|
||||
fn = function(fname,projectdir)
|
||||
local cmd = 'p4 edit "'..fname..'"'
|
||||
|
||||
CommandLineRun(cmd,nil,true)
|
||||
end,
|
||||
|
||||
@@ -5,8 +5,8 @@ return {
|
||||
exec = {
|
||||
name = "Perforce revert",
|
||||
description = "does p4 revert",
|
||||
fn = function(wxfname,projectdir)
|
||||
local cmd = 'p4 revert "'..wxfname:GetFullPath()..'"'
|
||||
fn = function(fname,projectdir)
|
||||
local cmd = 'p4 revert "'..fname..'"'
|
||||
|
||||
CommandLineRun(cmd,nil,true)
|
||||
end,
|
||||
|
||||
@@ -18,6 +18,10 @@ lualibs/lua_lexer_loose.lua
|
||||
lualibs/lua_parser_loose.lua
|
||||
lualibs/luainspect/*.lua
|
||||
lualibs/metalua/*.lua
|
||||
lualibs/metalua/compiler/*.lua
|
||||
lualibs/metalua/compiler/parser/*.lua
|
||||
lualibs/metalua/compiler/parser/annot/*.lua
|
||||
lualibs/metalua/grammar/*.lua
|
||||
lualibs/mobdebug/mobdebug.lua
|
||||
lualibs/ltn12.lua
|
||||
lualibs/luadist.lua
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user