Compare commits
143 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7df30614d | ||
|
|
5db556849b | ||
|
|
471eaa9087 | ||
|
|
e54ee64d79 | ||
|
|
45c83f73db | ||
|
|
0ffd472396 | ||
|
|
adaca47bf6 | ||
|
|
d2d477b8f5 | ||
|
|
3cfc5f65c2 | ||
|
|
1ce791700c | ||
|
|
c28ef5000a | ||
|
|
61bb92950a | ||
|
|
b14198161e | ||
|
|
ad2dd2e40e | ||
|
|
d9fdbe0745 | ||
|
|
905d9cd75d | ||
|
|
d68b84f862 | ||
|
|
1e7f5de4db | ||
|
|
87d116a1c3 | ||
|
|
33b4641b63 | ||
|
|
9efb4454e4 | ||
|
|
02f7e24d33 | ||
|
|
e001386383 | ||
|
|
9257c03b07 | ||
|
|
6216ac37a2 | ||
|
|
476aa9d90a | ||
|
|
c665a0cc5c | ||
|
|
96397e66c5 | ||
|
|
758c5a8187 | ||
|
|
52e02f087c | ||
|
|
a02437dee1 | ||
|
|
3cd754b6b9 | ||
|
|
9a8f870ae4 | ||
|
|
ea5b78707d | ||
|
|
1d8b02bb41 | ||
|
|
83f52d0a57 | ||
|
|
d807accec2 | ||
|
|
430469ab3a | ||
|
|
e8978d8e89 | ||
|
|
aa0a0f8520 | ||
|
|
c089037e26 | ||
|
|
cf67ab3b6a | ||
|
|
5beccc0498 | ||
|
|
1e0e286682 | ||
|
|
b895f51beb | ||
|
|
4e5356670b | ||
|
|
7cbf2f99f6 | ||
|
|
84d7928b94 | ||
|
|
37b73d6c49 | ||
|
|
f1b74b9c2f | ||
|
|
9449650d47 | ||
|
|
b3bc39a8d5 | ||
|
|
ab4ae3e281 | ||
|
|
18dadbc001 | ||
|
|
b4f0635ab7 | ||
|
|
9a4ed47179 | ||
|
|
c314996902 | ||
|
|
3a49e4c37d | ||
|
|
23a874b5ae | ||
|
|
92b88a8d26 | ||
|
|
3a8cb8aa42 | ||
|
|
08d1d9f1f8 | ||
|
|
95fcf4aa79 | ||
|
|
9c47414635 | ||
|
|
8969abb43f | ||
|
|
ce933f4f81 | ||
|
|
b8de606bed | ||
|
|
9c60c1e37c | ||
|
|
e9a8a8bd9c | ||
|
|
a91426eb5c | ||
|
|
ab5bec082d | ||
|
|
e384146089 | ||
|
|
a5df5d63b6 | ||
|
|
11729813a6 | ||
|
|
e577d96a4e | ||
|
|
d61be1cf77 | ||
|
|
6698f43f76 | ||
|
|
51cd41ceba | ||
|
|
0480e9ca39 | ||
|
|
b67c509f30 | ||
|
|
168d65b411 | ||
|
|
a667b75177 | ||
|
|
91a8518db9 | ||
|
|
eb68425a25 | ||
|
|
eaa9aba068 | ||
|
|
95452706a0 | ||
|
|
a5eaa2fd8a | ||
|
|
445d90f50d | ||
|
|
36b8a414d5 | ||
|
|
21d0991b9b | ||
|
|
483c70bef2 | ||
|
|
1613675b31 | ||
|
|
2cea675c10 | ||
|
|
2723801604 | ||
|
|
fa6e8d1442 | ||
|
|
037476ac49 | ||
|
|
a457ed62b9 | ||
|
|
ae3ddb59f7 | ||
|
|
78c44e6060 | ||
|
|
9284a24750 | ||
|
|
c8df92f8a0 | ||
|
|
1ae6ffe7f7 | ||
|
|
ae561ff880 | ||
|
|
da584b9e0a | ||
|
|
809ba33187 | ||
|
|
844626c6f4 | ||
|
|
b498140958 | ||
|
|
68ccda4ef5 | ||
|
|
5632913e40 | ||
|
|
7496040f34 | ||
|
|
2b7f0f4ad6 | ||
|
|
f323cc967b | ||
|
|
9cd361989c | ||
|
|
c5df05f03e | ||
|
|
3709f61fc4 | ||
|
|
59caf6cae5 | ||
|
|
44df223ac5 | ||
|
|
2dd3209682 | ||
|
|
0c52cde070 | ||
|
|
b734637eb5 | ||
|
|
4c01a530a0 | ||
|
|
8d965cca32 | ||
|
|
01eab250eb | ||
|
|
6b9adf1527 | ||
|
|
68a8fcec47 | ||
|
|
13f1174bb7 | ||
|
|
d370279d24 | ||
|
|
1bbefcbf7b | ||
|
|
dd3ce4d1e7 | ||
|
|
fdc17f1579 | ||
|
|
02bbdf17f8 | ||
|
|
8492df40de | ||
|
|
8b9197552c | ||
|
|
377a4861ee | ||
|
|
241a5d13c3 | ||
|
|
344ed6fd80 | ||
|
|
bd03b4c4d1 | ||
|
|
4ba03afa8c | ||
|
|
cb6971e37d | ||
|
|
9c3b35d8fe | ||
|
|
82f62d4d7d | ||
|
|
38c56c4d31 | ||
|
|
683218a909 |
167
CHANGELOG.md
@@ -1,5 +1,172 @@
|
||||
# ZeroBrane Studio Changelog
|
||||
|
||||
## v0.60 (May 11 2014)
|
||||
|
||||
### Highlights
|
||||
- Added support for switching breakpoints at run-time.
|
||||
- Added bookmark handling.
|
||||
- Added `Detach process` command to stop debugging and continue process.
|
||||
- Added detaching debugger server.
|
||||
- Added showing/hiding toolbar and status bar.
|
||||
- Simplified user interface and updated application icons.
|
||||
- Updated love2d API for v0.9.1.
|
||||
- Updated Moai API for v1.5 (thanks to @DanielSWolf).
|
||||
- Added `outputshell.usewrap` to set Output wrapping; on by default.
|
||||
- Added `editor.wrapflags` to configure line wrapping indicators.
|
||||
- Added `editor.foldflags`; set default to draw one line when folded.
|
||||
- Added `editor.foldtype` with box, cirle, arrow, and plus types.
|
||||
- Added `editor.extraascent` option to add line spacing.
|
||||
|
||||
### Special thanks
|
||||
- To @bartoleo for italian translation update.
|
||||
- To @riidom for german translation update.
|
||||
- To @sclark39 for Copy Full Path implementation.
|
||||
- To @DanielSWolf for Moai API update for v1.5.
|
||||
- To @madmaxoft for AnalyzeString patch.
|
||||
- To @crumblingstatue for Zoom update.
|
||||
- To @SiENcE for notepad++ colorscheme update.
|
||||
|
||||
### Improvements
|
||||
- Added new italian translations (thanks to @bartoleo)
|
||||
- Added Russian translation for new messages (#70).
|
||||
- Adding Copy Full Path to editor tabs, and a Clear Output Window option to the Output tab (thanks to @sclark39)
|
||||
- Added support for packages in config files (#166).
|
||||
- Added formatting for Recent Projects menu (#305).
|
||||
- Added `Detach process` command to stop debugging and continue process.
|
||||
- Added re/docking of Watch/Stack notebooks on tab background doubleclick (#305).
|
||||
- Added bookmark handling (closes #233).
|
||||
- Added `Clear items` to the Recent Files menu (ref #305).
|
||||
- Added recent files dropdown to the toolbar (ref #305).
|
||||
- Added applying new UI settings after upgrade (ref #305).
|
||||
- Added toolbar button dropdown with recent projects (ref #305).
|
||||
- Added `Choose Project Directory` to the toolbar (ref #305).
|
||||
- Added floating/docking of notebooks on tab background doubleclick (ref #305).
|
||||
- Added Recent Project menu refresh after switching projects (ref #305).
|
||||
- Added setting project directory by renaming the filetree root element (#305).
|
||||
- Added filetree popup menu with the list of projects (ref #305).
|
||||
- Added 'Recent Projects' menu (ref #305).
|
||||
- Added package `GetLaunchedProcess` call (ref #166).
|
||||
- Added `IsRunning` and `IsConnected` API calls for the debugger (ref #166).
|
||||
- Added `editor.wrapflags` to configure line wrapping indicators (ref #305).
|
||||
- Added explicit sorting of files in the filetree.
|
||||
- Added showing/hiding of the status bar (ref #305).
|
||||
- Added auto-showing toolbar when debugging starts (ref #305).
|
||||
- Added showing/hiding of the toolbar (ref #305).
|
||||
- Added `outputshell.usewrap` to set Output wrapping; on by default (ref #305).
|
||||
- Added `editor.foldflags`; set default to draw one line when folded (ref #305).
|
||||
- Added `editor.extraascent` option to add line spacing (ref #305).
|
||||
- Added explicit conversion to number for numeric settings.
|
||||
- Added `editor.foldtype` with box, cirle, arrow, and plus types (ref #305).
|
||||
- Added opening a new tab on double click on tab background (ref #305).
|
||||
- Added ActivateItem method to the filetree API (ref #166).
|
||||
- Added onFiletree* package events (ref #166).
|
||||
- Added setting margin mask to allow for different margin order.
|
||||
- Added support for switching breakpoints at run-time (closes #288).
|
||||
- Added stopping debugging when debugger server is detached/stopped.
|
||||
- Added opening file on one-click in icon/padding area in the filetree.
|
||||
- Added AnalyzeString function (thanks to @madmaxoft).
|
||||
- Added zooming for Output/Console windows (ref #290).
|
||||
- Added IDs for Zoom menu items (ref #290).
|
||||
- Add zoom actions with appropriate keyboard shortcuts to View menu (thanks to @crumblingstatue)
|
||||
- Added detaching debugger server.
|
||||
- Added skipping reporting for known globals in static analysis (closes #286).
|
||||
- Added support for running zbstudio script from any folder on OSX.
|
||||
- Adjusted `code` color in the comment markup for better visibility (#305).
|
||||
- Changed order of stopping debugger and saving settings (ref #305).
|
||||
- Cleaned unused variables and functions based on static analysis.
|
||||
- Disallowed closing Output/Console/Project tabs (fixes #310).
|
||||
- Disabled current project on the recent projects list (ref #305).
|
||||
- Disable function call indicator by default to reduce clutter (ref #305).
|
||||
- Disabled startng multiple find-in-files searches.
|
||||
- Disabled editing/dragging of the project directory in the filetree.
|
||||
- Enabled editor width auto-adjustment when wrapping is off.
|
||||
- Enable retina support (`hidpi=true`) by default on OSX (#305).
|
||||
- Increased default font size in the editor (ref #305).
|
||||
- Increased wait time for Gideros player to start for more reliable launching.
|
||||
- Made fold and marker margins wider (ref #305).
|
||||
- Made jump-to-line in the Output window to work faster and more reliably.
|
||||
- Moved `Project Directory` menu item lower to not activate on OSX (ref #305).
|
||||
- Moved code to populate `wx` and `wxstc` descriptions to API files.
|
||||
- Rearranged global functions in lua spec for simpler grouping (ref #79).
|
||||
- Reduced sash (border between subsections) in all notebooks (ref #305).
|
||||
- Reduced the line number margin width and default font size (ref #305).
|
||||
- Refactored editor config references.
|
||||
- Removed `Clear Dynamic Words` menu as it's rarely used.
|
||||
- Removed the gripper on the toolbar (ref #305).
|
||||
- Removed project selection dropdown from the filetree (ref #305).
|
||||
- Removed paragraph conversion from love2d API conversion script (ref #247).
|
||||
- Removed border around Output/Console panels (ref #305).
|
||||
- Removed deprecated `startfile` interpreter option.
|
||||
- Removed explicit margin numbers to make configuraton simpler.
|
||||
- Removed border around editor components.
|
||||
- Reordered markers to keep the curent line marker on top (#305).
|
||||
- Reorganized and updated configuration examples.
|
||||
- Set def linenumber font size as one smaller than editor font size (ref #305).
|
||||
- Switched to plain background for the toolbar (ref #305).
|
||||
- Switched to AuiToolBar as it provides buttons with dropdowns (ref #305).
|
||||
- Upgraded Mobdebug (0.56).
|
||||
- Upgraded debugger (mobdebug 0.553) to fix an issue with STEP command.
|
||||
- Upgraded copas to the current version (v1.2.1).
|
||||
- Updated default fonts for Windows and Linux for better looking ones (#305).
|
||||
- Update de.lua (thanks to @riidom)
|
||||
- Updated language files with new messages (#70).
|
||||
- Updated copyright messages.
|
||||
- Updated `Go To Line` menu item and its translations.
|
||||
- Updated build scripts with a fix for a wxlua compilation issue (#260).
|
||||
- Updated build prerequisites Linux install script.
|
||||
- Updated default indicator color to more neutral one (#305).
|
||||
- Updated OSX build script to use 10.7 SDK with 10.6 min-version (#260).
|
||||
- Updated Mobdebug (0.555) to add support for `pause` debugger call.
|
||||
- Updated lua interpreter to remove caching of executable path.
|
||||
- Updated resetting pid only after completing non-debbugged process.
|
||||
- Updated shortcut for Recent File navigation (ref #305).
|
||||
- Updated application icons (ref #305).
|
||||
- Updated stack/watch panel captions to be invisible (ref #305).
|
||||
- Updated interpreters to check `ProgramFiles` env variable on Windows.
|
||||
- Updated panel captions to be invisible (rev #305).
|
||||
- Updated 'window unhide' logic (Windows only) to be called less frequently.
|
||||
- Updated love2d interpreter to not hide the application window.
|
||||
- Updated file sorting to be case-insensitive on all platforms.
|
||||
- Updated filetree menu to use 'Edit Project Directory' on root element (#305).
|
||||
- Updated love2d API to fix typos in descriptions (ref #247).
|
||||
- Updated love2d API for v0.9.1 (ref #247).
|
||||
- Updated love2d API conversion script to handle top-level functions (ref #247).
|
||||
- Updated `PackageUnRegister` call to return the package on success (ref #166).
|
||||
- Updated fold/wrap flag handling to work with wxwidgets 2.8 (ref #305).
|
||||
- Updated breakpoint/currentline markers for less contrast colors (ref #305).
|
||||
- Updated default folding to use lighter colors (ref #305).
|
||||
- Updated default colors to have less contrast (ref #305).
|
||||
- Updated Open file dialog to use current file or project location (closes #303).
|
||||
- Updated Moai API for v1.5 (thanks to @DanielSWolf).
|
||||
- Updated `autoanalyzer` option to more common spelling (analizer -> analyzer).
|
||||
- Updated auto-complete to show in IDLE event for smoother processing.
|
||||
- -minor color changes to notepad++ colorscheme (thanks to @SiENcE).
|
||||
|
||||
### Incompatibilities
|
||||
- Added opening a new tab on double click on tab background.
|
||||
- Added re/docking of Watch/Stack notebooks on tab background doubleclick.
|
||||
- Enabled retina support (`hidpi=true`) by default on OSX.
|
||||
- Removed deprecated `startfile` interpreter option; use `startwith` option instead.
|
||||
- Updated file sorting to be case-insensitive on all platforms.
|
||||
- Updated `autoanalyzer` option to more common spelling (analizer -> analyzer).
|
||||
- wxwidgets 2.8 is no longer supported (wxwidgets 2.9.5+ required).
|
||||
|
||||
### Fixes
|
||||
- Fixed Corona interpreter to clean debugger in `plugin` folder (Win).
|
||||
- Fixed file tree activation of a deleted file.
|
||||
- Fixed switching to full screen and restoring status bar on OSX (ref #305).
|
||||
- Fixed right-click handling in filetree on OSX broken by 3709f61f (ref #166).
|
||||
- Fixed usage of `self` in one of package API calls (ref #166).
|
||||
- Fixed find dialog to stay on top after search directory selection on OSX.
|
||||
- Fixed search result navigation after clicking beyond the end of line.
|
||||
- Fixed an issue with running processes not terminated when closing IDE.
|
||||
- Fixed an error after manual canceling Find-in-files dialog.
|
||||
- Fixed an issue with deleting column-based selection (fixes #300).
|
||||
- Fixed an error in variable indicator processing.
|
||||
- Fixed looping when `valuetype` creates self-reference in APIs (ref #297).
|
||||
- Fixed `elseif` auto-indentation (fixes #294).
|
||||
- Fixed focus for Find field in the find dialog on some instances of OSX.
|
||||
|
||||
## v0.50 (Mar 10 2014)
|
||||
|
||||
### Highlights
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Project Description
|
||||
|
||||
[ZeroBrane Studio](http://studio.zerobrane.com/) is a lightweight Lua IDE with code completion, syntax
|
||||
highlighting, remote debugger, code analyzer, live coding, and debugging
|
||||
support for several Lua engines (LuaJIT,
|
||||
[ZeroBrane Studio](http://studio.zerobrane.com/) is a lightweight Lua IDE with code completion,
|
||||
syntax highlighting, remote debugger, code analyzer, live coding,
|
||||
and debugging support for several Lua engines (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),
|
||||
@@ -10,7 +10,8 @@ support for several Lua engines (LuaJIT,
|
||||
[Marmalade Quick](http://notebook.kulchenko.com/zerobrane/marmalade-quick-debugging-with-zerobrane-studio),
|
||||
[Cocos2d-x](http://notebook.kulchenko.com/zerobrane/cocos2d-x-simulator-and-on-device-debugging-with-zerobrane-studio),
|
||||
[GSL-shell](http://notebook.kulchenko.com/zerobrane/gsl-shell-debugging-with-zerobrane-studio),
|
||||
MobileLua, and others). It originated from the [Estrela Editor](http://www.luxinia.de/index.php/Estrela/).
|
||||
[Adobe Lightroom](http://notebook.kulchenko.com/zerobrane/debugging-lightroom-plugins-zerobrane-studio-ide),
|
||||
and others). It originated from the [Estrela Editor](http://www.luxinia.de/index.php/Estrela/).
|
||||
|
||||
## Features
|
||||
|
||||
|
||||
18168
api/lua/moai.lua
@@ -1,16 +1,24 @@
|
||||
local api = {}
|
||||
for key in pairs(wx) do
|
||||
api[key] = {
|
||||
type = (type(wx[key]) == "function" and "function" or "value"),
|
||||
description = "",
|
||||
returns = "",
|
||||
}
|
||||
local function populateAPI(t)
|
||||
local api = {}
|
||||
for k,v in pairs(t) do
|
||||
api[k] = {
|
||||
type = (type(v) == "function" and "function" or "value"),
|
||||
description = "",
|
||||
returns = "",
|
||||
}
|
||||
end
|
||||
return api
|
||||
end
|
||||
|
||||
return {
|
||||
wx = {
|
||||
type = "lib",
|
||||
description = "WX lib",
|
||||
childs = api
|
||||
}
|
||||
}
|
||||
wx = {
|
||||
type = "lib",
|
||||
description = "wx lib",
|
||||
childs = populateAPI(wx),
|
||||
},
|
||||
wxstc = {
|
||||
type = "lib",
|
||||
description = "wxSTC lib",
|
||||
childs = populateAPI(wxstc),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -7,3 +7,5 @@ sudo yum install git
|
||||
sudo yum install svn
|
||||
sudo yum install cmake
|
||||
sudo yum install gtk2-devel
|
||||
sudo yum install wget
|
||||
sudo yum install sqlite
|
||||
|
||||
@@ -164,6 +164,10 @@ if [ $BUILD_WXLUA ]; then
|
||||
# the following patches wxlua source to fix live coding support in wxlua apps
|
||||
# http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg03225.html
|
||||
sed -i 's/\(m_wxlState = wxLuaState(wxlState.GetLuaState(), wxLUASTATE_GETSTATE|wxLUASTATE_ROOTSTATE);\)/\/\/ removed by ZBS build process \/\/ \1/' modules/wxlua/wxlcallb.cpp
|
||||
|
||||
# (temporary) fix for compilation issue in wxlua using wxwidgets 3.1+ (r238)
|
||||
sed -i 's/{ "wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING", wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING },/\/\/ removed by ZBS build process/' modules/wxbind/src/wxstc_bind.cpp
|
||||
|
||||
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=FALSE \
|
||||
-DwxWidgets_CONFIG_EXECUTABLE="$INSTALL_DIR/bin/wx-config" \
|
||||
-DwxWidgets_COMPONENTS="stc;html;aui;adv;core;net;base" \
|
||||
|
||||
@@ -9,7 +9,7 @@ INSTALL_DIR="$PWD/deps"
|
||||
# Mac OS X global settings
|
||||
MACOSX_ARCH="i386"
|
||||
MACOSX_VERSION="10.6"
|
||||
MACOSX_SDK_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
|
||||
MACOSX_SDK_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
|
||||
|
||||
# number of parallel jobs used for building
|
||||
MAKEFLAGS="-j4"
|
||||
@@ -191,6 +191,10 @@ if [ $BUILD_WXLUA ]; then
|
||||
# the following patches wxlua source to fix live coding support in wxlua apps
|
||||
# http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg03225.html
|
||||
sed -i "" 's/\(m_wxlState = wxLuaState(wxlState.GetLuaState(), wxLUASTATE_GETSTATE|wxLUASTATE_ROOTSTATE);\)/\/\/ removed by ZBS build process \/\/ \1/' modules/wxlua/wxlcallb.cpp
|
||||
|
||||
# (temporary) fix for compilation issue in wxlua using wxwidgets 3.1+ (r238)
|
||||
sed -i 's/{ "wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING", wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING },/\/\/ removed by ZBS build process/' modules/wxbind/src/wxstc_bind.cpp
|
||||
|
||||
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_BUILD_TYPE=$WXLUABUILD -DBUILD_SHARED_LIBS=FALSE \
|
||||
-DCMAKE_OSX_ARCHITECTURES=$MACOSX_ARCH -DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOSX_VERSION $MINSDK \
|
||||
-DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DwxWidgets_CONFIG_EXECUTABLE="$INSTALL_DIR/bin/wx-config" \
|
||||
|
||||
@@ -202,6 +202,9 @@ if [ $BUILD_WXLUA ]; then
|
||||
# (temporary) fix for compilation issue in wxlua in Windows using mingw (r184)
|
||||
sed -i 's/defined(__MINGW32__) || defined(__GNUWIN32__)/0/' modules/wxbind/src/wxcore_bind.cpp
|
||||
|
||||
# (temporary) fix for compilation issue in wxlua using wxwidgets 3.1+ (r238)
|
||||
sed -i 's/{ "wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING", wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING },/\/\/ removed by ZBS build process/' modules/wxbind/src/wxstc_bind.cpp
|
||||
|
||||
[ -f "$INSTALL_DIR/lib/libwxscintilla-3.0.a" ] && cp "$INSTALL_DIR/lib/libwxscintilla-3.0.a" "$INSTALL_DIR/lib/libwx_mswu_scintilla-3.0.a"
|
||||
[ -f "$INSTALL_DIR/lib/libwxscintilla-3.1.a" ] && cp "$INSTALL_DIR/lib/libwxscintilla-3.1.a" "$INSTALL_DIR/lib/libwx_mswu_scintilla-3.1.a"
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ return {
|
||||
["&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 Watch"] = "编辑监视", -- src\editor\debugger.lua
|
||||
["&Edit"] = "编辑", -- src\editor\menu_edit.lua
|
||||
["&File"] = "文件", -- src\editor\menu_file.lua
|
||||
@@ -22,7 +23,7 @@ return {
|
||||
["&Fold/Unfold All"] = "全 折叠/展开", -- src\editor\menu_edit.lua
|
||||
["&Frequently Asked Questions"] = nil, -- src\editor\menu_help.lua
|
||||
["&Getting Started Guide"] = nil, -- src\editor\menu_help.lua
|
||||
["&Goto Line"] = "到...行", -- src\editor\menu_search.lua
|
||||
["&Go To Line..."] = "到...行", -- src\editor\menu_search.lua
|
||||
["&Help"] = "帮助", -- src\editor\menu_help.lua
|
||||
["&New Directory"] = nil, -- src\editor\filetree.lua
|
||||
["&New"] = "新建", -- src\editor\menu_file.lua
|
||||
@@ -41,7 +42,9 @@ return {
|
||||
["&Sort"] = "分类", -- src\editor\menu_edit.lua
|
||||
["&Stack Window"] = "叠视窗/堆栈视窗", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "开启除错器伺服机", -- src\editor\menu_project.lua
|
||||
["&Status Bar"] = nil, -- src\editor\menu_view.lua
|
||||
["&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
|
||||
["&Up"] = "往上", -- src\editor\findreplace.lua
|
||||
@@ -57,6 +60,7 @@ return {
|
||||
["Analyze"] = "分析", -- src\editor\inspect.lua
|
||||
["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
|
||||
["C&omment/Uncomment"] = "注释/消除注释", -- src\editor\menu_edit.lua
|
||||
@@ -67,11 +71,13 @@ return {
|
||||
["Can't start debugger server at %s:%d: %s."] = nil, -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "除错动作失败 '%s'.", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "不能启动除错,没有文档被开启或当前更改过的文档还没保存('%s')", -- src\editor\debugger.lua
|
||||
["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..."] = "请选...", -- src\editor\menu_project.lua
|
||||
["Choose a project directory"] = "选择项目文件夹", -- src\editor\findreplace.lua, src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "清除动态词汇", -- src\editor\menu_edit.lua
|
||||
["Choose a project directory"] = "选择项目文件夹", -- src\editor\findreplace.lua, src\editor\menu_project.lua, src\editor\gui.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
|
||||
["Clear the output window before compiling or debugging"] = "编译或除错前清除输出视窗", -- src\editor\menu_project.lua
|
||||
["Close &Other Pages"] = "关闭其他页面", -- src\editor\gui.lua
|
||||
["Close A&ll Pages"] = "关闭全部页面", -- src\editor\gui.lua
|
||||
@@ -94,9 +100,11 @@ return {
|
||||
["Cu&t"] = "剪切", -- src\editor\menu_edit.lua, src\editor\editor.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
|
||||
["Debugging session completed (%s)."] = "除错会话完成 (%s)", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "除错会话于 '%s' 起始", -- src\editor\debugger.lua
|
||||
["Debugging suspended at %s:%s (couldn't activate the file)."] = "除错挂起于 %s:%s (不能激活文档).", -- src\editor\debugger.lua
|
||||
["Detach &Process"] = nil, -- src\editor\menu_project.lua
|
||||
["Directory"] = "文件夹", -- src\editor\findreplace.lua
|
||||
["Do you want to delete '%s'?"] = nil, -- src\editor\filetree.lua
|
||||
["Do you want to overwrite it?"] = nil, -- src\editor\commands.lua
|
||||
@@ -140,8 +148,10 @@ return {
|
||||
["Found"] = "找到", -- src\editor\findreplace.lua
|
||||
["Full &Screen"] = "全屏", -- src\editor\menu_view.lua
|
||||
["Go To Definition"] = nil, -- src\editor\editor.lua
|
||||
["Go To Line"] = "到...行", -- src\editor\menu_search.lua
|
||||
["Go To Next Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Go To Previous Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "到所选的行", -- src\editor\menu_search.lua
|
||||
["Goto Line"] = "到...行", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["In Files"] = "在档案里", -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "跳到函数定义", -- src\editor\editor.lua
|
||||
@@ -171,13 +181,15 @@ return {
|
||||
["Program starting as '%s'."] = "程式以 '%s' 执行", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "程式停止 (pid: %d).", -- src\editor\debugger.lua
|
||||
["Program unable to run as '%s'."] = "程式不能以 '%s' 执行", -- src\editor\output.lua
|
||||
["Project Directory"] = "项目文件夹", -- src\editor\menu_project.lua
|
||||
["Project"] = "项目", -- src\editor\gui.lua, src\editor\settings.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/&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
|
||||
["Recent &Projects"] = nil, -- src\editor\menu_file.lua
|
||||
["Recent Files"] = "最近的文档", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "重做最后被取消的编辑", -- src\editor\menu_edit.lua
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "因为有另一个除错在进行,拒绝开启新的除错对话", -- src\editor\debugger.lua
|
||||
@@ -190,7 +202,6 @@ return {
|
||||
["Replaced"] = "更换", -- src\editor\findreplace.lua
|
||||
["Replacing"] = "更换中", -- src\editor\findreplace.lua
|
||||
["Reset to default layout"] = "重置缺省布局", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "为自动补全重置动态word list", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "以Scratchpad执行", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "停止除错", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "停止进程", -- src\editor\menu_project.lua
|
||||
@@ -206,6 +217,7 @@ return {
|
||||
["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 text in the editor"] = "选编辑器内的所有text", -- src\editor\menu_edit.lua
|
||||
["Select and Find Next"] = nil, -- src\editor\menu_search.lua
|
||||
@@ -215,12 +227,14 @@ return {
|
||||
["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 the interpreter to be used"] = "设置解释器", -- src\editor\menu_project.lua
|
||||
["Set the project directory 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
|
||||
["Settings: User"] = "设置: 用户", -- src\editor\menu_edit.lua
|
||||
["Show &Tooltip"] = "展现tooltip", -- src\editor\menu_edit.lua
|
||||
["Show Location"] = nil, -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "在当前的位置展现tooltip; 把游标放置于函数的开括号之后", -- src\editor\menu_edit.lua
|
||||
["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
|
||||
["Start &Debugging"] = "开始除错", -- src\editor\menu_project.lua
|
||||
@@ -232,10 +246,12 @@ return {
|
||||
["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
|
||||
["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
|
||||
["Tr&ace"] = "追踪", -- src\editor\menu_project.lua
|
||||
@@ -260,6 +276,10 @@ return {
|
||||
["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
|
||||
["Zoom In"] = nil, -- src\editor\menu_view.lua
|
||||
["Zoom Out"] = nil, -- src\editor\menu_view.lua
|
||||
["Zoom to 100%"] = nil, -- src\editor\menu_view.lua
|
||||
["Zoom"] = nil, -- src\editor\menu_view.lua
|
||||
["on line %d"] = "在 %d 行", -- src\editor\debugger.lua, src\editor\editor.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = "追踪 %d 指令", -- src\editor\debugger.lua
|
||||
["unknown error"] = nil, -- src\editor\debugger.lua
|
||||
|
||||
@@ -14,6 +14,7 @@ return {
|
||||
["&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 Watch"] = "&Beobachtungspunkt bearbeiten", -- src\editor\debugger.lua
|
||||
["&Edit"] = "&Bearbeiten", -- src\editor\menu_edit.lua
|
||||
["&File"] = "&Datei", -- src\editor\menu_file.lua
|
||||
@@ -23,7 +24,7 @@ return {
|
||||
["&Fold/Unfold All"] = "A&lles ein-/ausklappen", -- src\editor\menu_edit.lua
|
||||
["&Frequently Asked Questions"] = "&FAQ", -- src\editor\menu_help.lua
|
||||
["&Getting Started Guide"] = "&Anfängerleitfaden", -- src\editor\menu_help.lua
|
||||
["&Goto Line"] = "&Gehe zu Zeile", -- src\editor\menu_search.lua
|
||||
["&Go To Line..."] = "&Gehe zu Zeile...", -- src\editor\menu_search.lua
|
||||
["&Help"] = "&Hilfe", -- src\editor\menu_help.lua
|
||||
["&New Directory"] = "&Neuer Ordner", -- src\editor\filetree.lua
|
||||
["&New"] = "&Neu", -- src\editor\menu_file.lua
|
||||
@@ -42,7 +43,9 @@ return {
|
||||
["&Sort"] = "&Sortieren", -- src\editor\menu_edit.lua
|
||||
["&Stack Window"] = "&Stapel/Stack", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "De&bugserver starten", -- src\editor\menu_project.lua
|
||||
["&Status Bar"] = "S&tatuszeile", -- src\editor\menu_view.lua
|
||||
["&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
|
||||
["&Up"] = "&Hoch", -- src\editor\findreplace.lua
|
||||
@@ -58,6 +61,7 @@ return {
|
||||
["Analyze"] = "&Analyseroutine", -- src\editor\inspect.lua
|
||||
["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
|
||||
["C&omment/Uncomment"] = "(Aus-)/K&ommentieren", -- src\editor\menu_edit.lua
|
||||
@@ -68,11 +72,13 @@ return {
|
||||
["Can't start debugger server at %s:%d: %s."] = "Kann Debugserver nicht starten (%s:%d): %s.", -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "Debugging kann nicht gestartet werden wegen internem Fehler '%s'.", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Debugging kann ohne geöffnete Datei nicht gestartet werden oder wenn die aktuelle Datei nicht gespeichert ist ('%s').", -- src\editor\debugger.lua
|
||||
["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..."] = "Wählen...", -- src\editor\menu_project.lua
|
||||
["Choose a project directory"] = "Projektverzeichnis auswählen", -- src\editor\findreplace.lua, src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "&Dynamic Words löschen", -- src\editor\menu_edit.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..."] = "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
|
||||
["Clear the output window before compiling or debugging"] = "Vor Kompilieren oder Debuggen das Ausgabefenster löschen", -- src\editor\menu_project.lua
|
||||
["Close &Other Pages"] = "A&ndere Seiten schließen", -- src\editor\gui.lua
|
||||
["Close A&ll Pages"] = "&Alle Seiten schließen", -- src\editor\gui.lua
|
||||
@@ -95,9 +101,11 @@ return {
|
||||
["Cu&t"] = "A&usschneiden", -- src\editor\menu_edit.lua, src\editor\editor.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
|
||||
["Debugging session completed (%s)."] = "Debugging Session beendet (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Debugging Session gestartet '%s'.", -- src\editor\debugger.lua
|
||||
["Debugging suspended at %s:%s (couldn't activate the file)."] = "Debugging angehalten bei %s:%s (konnte Datei nicht aktivieren).", -- src\editor\debugger.lua
|
||||
["Detach &Process"] = "Prozeß abkoppeln", -- src\editor\menu_project.lua
|
||||
["Directory"] = "Verzeichnis", -- src\editor\findreplace.lua
|
||||
["Do you want to delete '%s'?"] = "Soll '%s' gelöscht werden?", -- src\editor\filetree.lua
|
||||
["Do you want to overwrite it?"] = "Überschreiben?", -- src\editor\commands.lua
|
||||
@@ -141,8 +149,10 @@ return {
|
||||
["Found"] = "Gefunden", -- src\editor\findreplace.lua
|
||||
["Full &Screen"] = "&Vollbild", -- src\editor\menu_view.lua
|
||||
["Go To Definition"] = "Gehe zu Definition", -- src\editor\editor.lua
|
||||
["Go To Line"] = "Gehe zu Zeile", -- src\editor\menu_search.lua
|
||||
["Go To Next Bookmark"] = "Zu nächstem Lesezeichen", -- src\editor\menu_edit.lua
|
||||
["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
|
||||
["Goto Line"] = "Gehe zu Zeile", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["In Files"] = "In Dateien", -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "Springe zu Funktions-Definition...", -- src\editor\editor.lua
|
||||
@@ -172,13 +182,15 @@ return {
|
||||
["Program starting as '%s'."] = "Programm gestartet als '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "Programm gestoppt (pid: %d).", -- src\editor\debugger.lua
|
||||
["Program unable to run as '%s'."] = "Programm kann nicht als '%s' laufen.", -- src\editor\output.lua
|
||||
["Project Directory"] = "&Projektverzeichnis", -- src\editor\menu_project.lua
|
||||
["Project"] = "Projekt", -- src\editor\gui.lua, src\editor\settings.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/&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
|
||||
["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
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "Starten einer neuen Debuggingsession abgelehnt, da bereits eine läuft.", -- src\editor\debugger.lua
|
||||
@@ -191,7 +203,6 @@ return {
|
||||
["Replaced"] = "Ersetzt:", -- src\editor\findreplace.lua
|
||||
["Replacing"] = "Am Ersetzen", -- src\editor\findreplace.lua
|
||||
["Reset to default layout"] = "Standard-Layout wiederherstellen", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "Zurücksetzen der Liste der dynamischen Wörter für Autovervollständigung", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "Als &Entwurf starten", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "Debugging a&nhalten", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "Prozeß &anhalten", -- src\editor\menu_project.lua
|
||||
@@ -207,6 +218,7 @@ return {
|
||||
["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 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
|
||||
@@ -216,12 +228,14 @@ return {
|
||||
["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 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
|
||||
["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
|
||||
["Settings: User"] = "Einstellungen: Nutzer", -- src\editor\menu_edit.lua
|
||||
["Show &Tooltip"] = "&Tooltip zeigen", -- src\editor\menu_edit.lua
|
||||
["Show Location"] = "Ordner öffnen", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Zeige Tooltip für aktuelle Position; setze Cursor hinter die öffnende Klammer der Funktion", -- src\editor\menu_edit.lua
|
||||
["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
|
||||
["Start &Debugging"] = "&Debugging starten", -- src\editor\menu_project.lua
|
||||
@@ -233,10 +247,12 @@ return {
|
||||
["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
|
||||
["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
|
||||
["Tr&ace"] = "Ablauf &verfolgen", -- src\editor\menu_project.lua
|
||||
@@ -261,6 +277,10 @@ return {
|
||||
["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
|
||||
["Zoom In"] = "Hineinzoomen", -- src\editor\menu_view.lua
|
||||
["Zoom Out"] = "Herauszoomen", -- src\editor\menu_view.lua
|
||||
["Zoom to 100%"] = "Zoom zurücksetzen (100%)", -- src\editor\menu_view.lua
|
||||
["Zoom"] = "Zoom", -- src\editor\menu_view.lua
|
||||
["on line %d"] = "in Zeile %d", -- src\editor\debugger.lua, src\editor\editor.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"%d Anweisung verfolgt", "%d Anweisungen verfolgt"}, -- src\editor\debugger.lua
|
||||
["unknown error"] = "Unbekannter Fehler", -- src\editor\debugger.lua
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
-- Traducción realiazada por Iñigo Sola
|
||||
-- para la versión ZeroBrane Studio 17bdb48
|
||||
-- 10 de Noviembre de 2012
|
||||
return {
|
||||
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
|
||||
["%d instance"] = nil, -- src\editor\findreplace.lua
|
||||
@@ -17,6 +15,7 @@ return {
|
||||
["&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 Watch"] = "Editar observación", -- src\editor\debugger.lua
|
||||
["&Edit"] = "Editar", -- src\editor\menu_edit.lua
|
||||
["&File"] = "Archivo", -- src\editor\menu_file.lua
|
||||
@@ -26,7 +25,7 @@ return {
|
||||
["&Fold/Unfold All"] = "Plegar/desplegar todo", -- src\editor\menu_edit.lua
|
||||
["&Frequently Asked Questions"] = nil, -- src\editor\menu_help.lua
|
||||
["&Getting Started Guide"] = nil, -- src\editor\menu_help.lua
|
||||
["&Goto Line"] = "Ir a línea", -- src\editor\menu_search.lua
|
||||
["&Go To Line..."] = "Ir a línea...", -- src\editor\menu_search.lua
|
||||
["&Help"] = "Ayuda", -- src\editor\menu_help.lua
|
||||
["&New Directory"] = nil, -- src\editor\filetree.lua
|
||||
["&New"] = "&Nuevo", -- src\editor\menu_file.lua
|
||||
@@ -45,7 +44,9 @@ return {
|
||||
["&Sort"] = "Clasificar", -- src\editor\menu_edit.lua
|
||||
["&Stack Window"] = "Ventana de la pila de ejecución", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "Lanzar servidor de depuración", -- src\editor\menu_project.lua
|
||||
["&Status Bar"] = nil, -- src\editor\menu_view.lua
|
||||
["&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
|
||||
["&Up"] = nil, -- src\editor\findreplace.lua
|
||||
@@ -61,6 +62,7 @@ return {
|
||||
["Analyze"] = "Analizar", -- src\editor\inspect.lua
|
||||
["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
|
||||
["C&omment/Uncomment"] = "Comentar/descomentar", -- src\editor\menu_edit.lua
|
||||
@@ -71,11 +73,13 @@ return {
|
||||
["Can't start debugger server at %s:%d: %s."] = nil, -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "No se puede iniciar la sesión de depuración debido a un error interno '%s'.'", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "No se puede iniciar la depuración sin abrir un archivo o si no ha sido guardado ('%s').", -- src\editor\debugger.lua
|
||||
["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..."] = nil, -- src\editor\menu_project.lua
|
||||
["Choose a project directory"] = "Elegir el directorio del proyecto", -- src\editor\findreplace.lua, src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "Limpiar las palabras dinámicas", -- src\editor\menu_edit.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..."] = 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
|
||||
["Clear the output window before compiling or debugging"] = "Limpiar la ventana de salida antes de compilar o depurar", -- src\editor\menu_project.lua
|
||||
["Close &Other Pages"] = nil, -- src\editor\gui.lua
|
||||
["Close A&ll Pages"] = nil, -- src\editor\gui.lua
|
||||
@@ -98,9 +102,11 @@ return {
|
||||
["Cu&t"] = "Cortar", -- src\editor\menu_edit.lua, src\editor\editor.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
|
||||
["Debugging session completed (%s)."] = "Sesión de depuración completada (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Sesión de depuración iniciada en '%s'.", -- src\editor\debugger.lua
|
||||
["Debugging suspended at %s:%s (couldn't activate the file)."] = nil, -- src\editor\debugger.lua
|
||||
["Detach &Process"] = nil, -- src\editor\menu_project.lua
|
||||
["Directory"] = nil, -- src\editor\findreplace.lua
|
||||
["Do you want to delete '%s'?"] = nil, -- src\editor\filetree.lua
|
||||
["Do you want to overwrite it?"] = nil, -- src\editor\commands.lua
|
||||
@@ -144,8 +150,10 @@ return {
|
||||
["Found"] = nil, -- src\editor\findreplace.lua
|
||||
["Full &Screen"] = "Pantalla completa", -- src\editor\menu_view.lua
|
||||
["Go To Definition"] = nil, -- src\editor\editor.lua
|
||||
["Go To Line"] = "Ir a línea", -- src\editor\menu_search.lua
|
||||
["Go To Next Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["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
|
||||
["Goto Line"] = "Ir a línea", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.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
|
||||
@@ -175,13 +183,15 @@ return {
|
||||
["Program starting as '%s'."] = "Programa iniciado como '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "Programa parado (pid: %d).", -- src\editor\debugger.lua
|
||||
["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
|
||||
["Project"] = "Proyecto", -- src\editor\gui.lua, src\editor\settings.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/&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
|
||||
["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
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "No se pudo lanzar una nueva sesión de depuración porque ya hay una en curso.", -- src\editor\debugger.lua
|
||||
@@ -194,7 +204,6 @@ return {
|
||||
["Replaced"] = nil, -- src\editor\findreplace.lua
|
||||
["Replacing"] = nil, -- src\editor\findreplace.lua
|
||||
["Reset to default layout"] = "Restablecer el diseño por defecto", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "Restablecer la lista dinámica de palabras para autocompletado", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "Ejecutar como borrador", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "Parar depuración", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "Parar proceso", -- src\editor\menu_project.lua
|
||||
@@ -210,6 +219,7 @@ return {
|
||||
["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 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
|
||||
@@ -219,12 +229,14 @@ return {
|
||||
["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 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
|
||||
["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
|
||||
["Settings: User"] = nil, -- src\editor\menu_edit.lua
|
||||
["Show &Tooltip"] = "Ver tooltip", -- src\editor\menu_edit.lua
|
||||
["Show Location"] = nil, -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Ver tooltip para la posición actual; posicionar el cursor después de abrir el paréntisis de los argumentos de la función", -- src\editor\menu_edit.lua
|
||||
["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
|
||||
["Start &Debugging"] = "Comenzar depuración", -- src\editor\menu_project.lua
|
||||
@@ -236,10 +248,12 @@ return {
|
||||
["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
|
||||
["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
|
||||
["Tr&ace"] = "Traza", -- src\editor\menu_project.lua
|
||||
@@ -264,6 +278,10 @@ return {
|
||||
["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
|
||||
["Zoom In"] = nil, -- src\editor\menu_view.lua
|
||||
["Zoom Out"] = nil, -- src\editor\menu_view.lua
|
||||
["Zoom to 100%"] = nil, -- src\editor\menu_view.lua
|
||||
["Zoom"] = nil, -- src\editor\menu_view.lua
|
||||
["on line %d"] = "en la línea %d", -- src\editor\debugger.lua, src\editor\editor.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"%d instrucción trazada", "%d instrucciones trazadas"}, -- src\editor\debugger.lua
|
||||
["unknown error"] = nil, -- src\editor\debugger.lua
|
||||
|
||||
@@ -14,6 +14,7 @@ return {
|
||||
["&Delete"] = "&Supprimer", -- src\editor\filetree.lua
|
||||
["&Documentation"] = "&Documentation", -- src\editor\menu_help.lua
|
||||
["&Down"] = "Vers le &bas", -- src\editor\findreplace.lua
|
||||
["&Edit Project Directory"] = nil, -- src\editor\filetree.lua
|
||||
["&Edit Watch"] = "&Modifier une expression", -- src\editor\debugger.lua
|
||||
["&Edit"] = "É&dition", -- src\editor\menu_edit.lua
|
||||
["&File"] = "&Fichier", -- src\editor\menu_file.lua
|
||||
@@ -23,7 +24,7 @@ return {
|
||||
["&Fold/Unfold All"] = "Re&plier/Déplier tout", -- src\editor\menu_edit.lua
|
||||
["&Frequently Asked Questions"] = "&Questions Fréquemment Posées" , -- src\editor\menu_help.lua
|
||||
["&Getting Started Guide"] = "&Guide de Prise en Main", -- src\editor\menu_help.lua
|
||||
["&Goto Line"] = "&Aller à la ligne", -- src\editor\menu_search.lua
|
||||
["&Go To Line..."] = "&Aller à la ligne...", -- src\editor\menu_search.lua
|
||||
["&Help"] = "Aid&e", -- src\editor\menu_help.lua
|
||||
["&New Directory"] = "&Nouveau Répertoire", -- src\editor\filetree.lua
|
||||
["&New"] = "&Nouveau", -- src\editor\menu_file.lua
|
||||
@@ -42,7 +43,9 @@ return {
|
||||
["&Sort"] = "&Trier", -- src\editor\menu_edit.lua
|
||||
["&Stack Window"] = "&Pile d'exécution", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "Lancer le &serveur de débogage", -- src\editor\menu_project.lua
|
||||
["&Status Bar"] = nil, -- src\editor\menu_view.lua
|
||||
["&Subdirectories"] = "&Sous-répertoires", -- src\editor\findreplace.lua
|
||||
["&Tool Bar"] = nil, -- src\editor\menu_view.lua
|
||||
["&Tutorials"] = "&Tutoriels", -- src\editor\menu_help.lua
|
||||
["&Undo"] = "&Annuler", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Up"] = "Vers le &haut", -- src\editor\findreplace.lua
|
||||
@@ -58,6 +61,7 @@ return {
|
||||
["Analyze"] = "Analyser", -- src\editor\inspect.lua
|
||||
["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"] = nil, -- 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
|
||||
["C&omment/Uncomment"] = "Co&mmenter/Décommenter", -- src\editor\menu_edit.lua
|
||||
@@ -68,11 +72,13 @@ return {
|
||||
["Can't start debugger server at %s:%d: %s."] = "Impossible de lancer le serveur de débogage à %s:%d: %s." , -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "Impossible de lancer la session de débogage : erreur interne '%s'.", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Impossible de lancer le débogage si aucun fichier n'est ouvert ou si le fichier courant n'a pas été enregistré ('%s').", -- src\editor\debugger.lua
|
||||
["Can't stop debugger server as it is not started."] = nil, -- src\editor\debugger.lua
|
||||
["Cancel"] = "Annuler", -- src\editor\findreplace.lua
|
||||
["Cancelled by the user."] = "Annulé par l'utilisateur.", -- src\editor\findreplace.lua
|
||||
["Choose..."] = "Choisir...", -- src\editor\menu_project.lua
|
||||
["Choose a project directory"] = "Choisissez un répertoire de projet", -- src\editor\findreplace.lua, src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "Effacer les mots &dynamiques", -- src\editor\menu_edit.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..."] = "Choisir...", -- 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
|
||||
["Clear the output window before compiling or debugging"] = "Effacer la fenêtre de sortie avant compilation ou débogage", -- src\editor\menu_project.lua
|
||||
["Close &Other Pages"] = "Fermer les &autres pages", -- src\editor\gui.lua
|
||||
["Close A&ll Pages"] = "Fermer &toutes les pages", -- src\editor\gui.lua
|
||||
@@ -95,9 +101,11 @@ return {
|
||||
["Cu&t"] = "&Couper", -- src\editor\menu_edit.lua, src\editor\editor.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."] = nil, -- src\editor\debugger.lua
|
||||
["Debugging session completed (%s)."] = "Session de débogage terminée (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Session de débogage démarrée dans '%s'.", -- src\editor\debugger.lua
|
||||
["Debugging suspended at %s:%s (couldn't activate the file)."] = "Débogage interrompu à %s:%s (impossible d'activer le fichier).", -- src\editor\debugger.lua
|
||||
["Detach &Process"] = nil, -- src\editor\menu_project.lua
|
||||
["Directory"] = "Répertoire ", -- src\editor\findreplace.lua
|
||||
["Do you want to delete '%s'?"] = "Voulez-vous effacer '%s'?", -- src\editor\filetree.lua
|
||||
["Do you want to overwrite it?"] = "Voulez-vous l'écraser?", -- src\editor\commands.lua
|
||||
@@ -141,8 +149,10 @@ return {
|
||||
["Found"] = "Occurrences trouvées :", -- src\editor\findreplace.lua
|
||||
["Full &Screen"] = "&Plein écran", -- src\editor\menu_view.lua
|
||||
["Go To Definition"] = "Aller à la définition", -- src\editor\editor.lua
|
||||
["Go To Line"] = "Aller à la ligne", -- src\editor\menu_search.lua
|
||||
["Go To Next Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Go To Previous Bookmark"] = nil, -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "Aller à la ligne sélectionnée", -- src\editor\menu_search.lua
|
||||
["Goto Line"] = "Aller à la ligne", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.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
|
||||
@@ -172,13 +182,15 @@ return {
|
||||
["Program starting as '%s'."] = "Programme démarré en tant que '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "Programme stoppé (pid : %d).", -- src\editor\debugger.lua
|
||||
["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
|
||||
["Project"] = "Projet", -- src\editor\gui.lua, src\editor\settings.lua
|
||||
["Project Directory"] = "Répertoire de projet", -- src\editor\menu_project.lua, src\editor\filetree.lua
|
||||
["Project history"] = nil, -- src\editor\menu_file.lua
|
||||
["Project"] = "Projet", -- src\editor\gui.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
|
||||
["Recent &Projects"] = nil, -- 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
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "Une requête de lancement de débogage a été refusée car une session de débogage est déjà en cours.", -- src\editor\debugger.lua
|
||||
@@ -191,7 +203,6 @@ return {
|
||||
["Replaced"] = "Occurrences remplacées :", -- src\editor\findreplace.lua
|
||||
["Replacing"] = "Remplacement de", -- src\editor\findreplace.lua
|
||||
["Reset to default layout"] = "Restaurer l'affichage par défaut", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "Réinitialiser la liste des mots dynamiques pour l'auto-complétion", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "Exécuter comme brouillon", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "&Arrêter le débogage", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "&Arrêter le processus", -- src\editor\menu_project.lua
|
||||
@@ -207,6 +218,7 @@ return {
|
||||
["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"] = nil, -- src\editor\editor.lua
|
||||
["Select &All"] = "Sélectionner &tout", -- src\editor\menu_edit.lua, src\editor\editor.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
|
||||
@@ -216,12 +228,14 @@ return {
|
||||
["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 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
|
||||
["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
|
||||
["Settings: User"] = "Paramètres : Utilisateur", -- src\editor\menu_edit.lua
|
||||
["Show &Tooltip"] = "Afficher l'info-&bulle", -- src\editor\menu_edit.lua
|
||||
["Show Location"] = "Afficher l'emplacement", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Afficher l'info-bulle pour la position actuelle ; placez le curseur après la parenthèse ouvrante de la fonction", -- src\editor\menu_edit.lua
|
||||
["Show/Hide the status bar"] = nil, -- src\editor\menu_view.lua
|
||||
["Show/Hide the toolbar"] = nil, -- 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
|
||||
["Start &Debugging"] = "Lancer le &débogage", -- src\editor\menu_project.lua
|
||||
@@ -233,10 +247,12 @@ return {
|
||||
["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"] = nil, -- 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
|
||||
["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"] = nil, -- 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
|
||||
["Tr&ace"] = "&Tracer", -- src\editor\menu_project.lua
|
||||
@@ -261,6 +277,10 @@ return {
|
||||
["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
|
||||
["Zoom In"] = nil, -- src\editor\menu_view.lua
|
||||
["Zoom Out"] = nil, -- src\editor\menu_view.lua
|
||||
["Zoom to 100%"] = nil, -- src\editor\menu_view.lua
|
||||
["Zoom"] = nil, -- src\editor\menu_view.lua
|
||||
["on line %d"] = "à la ligne %d", -- src\editor\debugger.lua, src\editor\editor.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"%d instruction tracée", "%d instructions tracées"}, -- src\editor\debugger.lua
|
||||
["unknown error"] = "erreur inconnue", -- src\editor\debugger.lua
|
||||
|
||||
@@ -14,6 +14,7 @@ return {
|
||||
["&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 Watch"] = "Modifica Espressione di Controllo", -- src\editor\debugger.lua
|
||||
["&Edit"] = "Modifica", -- src\editor\menu_edit.lua
|
||||
["&File"] = "File", -- src\editor\menu_file.lua
|
||||
@@ -23,7 +24,7 @@ return {
|
||||
["&Fold/Unfold All"] = "Apri/Chiudi tutto", -- src\editor\menu_edit.lua
|
||||
["&Frequently Asked Questions"] = "Domande &Frequenti", -- src\editor\menu_help.lua
|
||||
["&Getting Started Guide"] = "&Guida Introduttiva", -- src\editor\menu_help.lua
|
||||
["&Goto Line"] = "Vai a riga", -- src\editor\menu_search.lua
|
||||
["&Go To Line..."] = "Vai a riga...", -- src\editor\menu_search.lua
|
||||
["&Help"] = "Aiuto", -- src\editor\menu_help.lua
|
||||
["&New Directory"] = "&Nuova Directory", -- src\editor\filetree.lua
|
||||
["&New"] = "&Nuovo", -- src\editor\menu_file.lua
|
||||
@@ -42,7 +43,9 @@ return {
|
||||
["&Sort"] = "Ordina", -- src\editor\menu_edit.lua
|
||||
["&Stack Window"] = "Stack di chiamate", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "Avvia Debugger Server", -- src\editor\menu_project.lua
|
||||
["&Status Bar"] = "Barra di stato", -- src\editor\menu_view.lua
|
||||
["&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
|
||||
["&Up"] = "Verso l'alto", -- src\editor\findreplace.lua
|
||||
@@ -58,6 +61,7 @@ return {
|
||||
["Analyze"] = "Analizza", -- src\editor\inspect.lua
|
||||
["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
|
||||
["C&omment/Uncomment"] = "Commenta/Scommenta", -- src\editor\menu_edit.lua
|
||||
@@ -68,11 +72,13 @@ return {
|
||||
["Can't start debugger server at %s:%d: %s."] = "Impossibile lanciare il server debugger a %s:%d: %s.", -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "Impossibile lanciare la sessione di debug: errore interno '%s'.'", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Impossibile lanciare il debug senza aver aperto un file o se il file corrente non è stato salvato ('%s').", -- src\editor\debugger.lua
|
||||
["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..."] = "Scegli...", -- src\editor\menu_project.lua
|
||||
["Choose a project directory"] = "Scegli la directory di un progetto", -- src\editor\findreplace.lua, src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "Elimina le &Dynamic Words", -- src\editor\menu_edit.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..."] = "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
|
||||
["Clear the output window before compiling or debugging"] = "Pulisci la finestra di output prima di compilare o lanciare debug", -- src\editor\menu_project.lua
|
||||
["Close &Other Pages"] = "Chidi le Altre Pagine", -- src\editor\gui.lua
|
||||
["Close A&ll Pages"] = "Chiudi Tutte le Pagine", -- src\editor\gui.lua
|
||||
@@ -94,10 +100,12 @@ return {
|
||||
["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
|
||||
["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:%s", -- src\editor\debugger.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
|
||||
["Debugging session completed (%s)."] = "Sessione di debug completata (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Sessione di debug iniziata da '%s'.", -- src\editor\debugger.lua
|
||||
["Debugging suspended at %s:%s (couldn't activate the file)."] = "Debug sospeso a %s:%s (impossibile attivare il file).", -- src\editor\debugger.lua
|
||||
["Detach &Process"] = "Scollega Processo", -- src\editor\menu_project.lua
|
||||
["Directory"] = "Directory", -- src\editor\findreplace.lua
|
||||
["Do you want to delete '%s'?"] = "Vuoi eliminare '%s'?", -- src\editor\filetree.lua
|
||||
["Do you want to overwrite it?"] = "Vuoi sovrascrivere '%s'?", -- src\editor\commands.lua
|
||||
@@ -141,8 +149,10 @@ return {
|
||||
["Found"] = "Occorrenze trovate:", -- src\editor\findreplace.lua
|
||||
["Full &Screen"] = "Schermo intero", -- src\editor\menu_view.lua
|
||||
["Go To Definition"] = "Vai a Definizione", -- src\editor\editor.lua
|
||||
["Go To Line"] = "Vai alla riga", -- src\editor\menu_search.lua
|
||||
["Go To Next Bookmark"] = "Vai al Prossimo Segnalibro", -- src\editor\menu_edit.lua
|
||||
["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
|
||||
["Goto Line"] = "Vai alla riga", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["In Files"] = "Nei Files", -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "Salta alla definizione della funzione...", -- src\editor\editor.lua
|
||||
@@ -172,13 +182,15 @@ return {
|
||||
["Program starting as '%s'."] = "Programma partito da '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "Programma fermato (pid: %d).", -- src\editor\debugger.lua
|
||||
["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
|
||||
["Project"] = "Progetto", -- src\editor\gui.lua, src\editor\settings.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/&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
|
||||
["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
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "Impossibile aprire una nuova sessione di debug in quanto ne esiste una in corso", -- src\editor\debugger.lua
|
||||
@@ -191,7 +203,6 @@ return {
|
||||
["Replaced"] = "Sostituiti :", -- src\editor\findreplace.lua
|
||||
["Replacing"] = "Sostituzione", -- src\editor\findreplace.lua
|
||||
["Reset to default layout"] = "Ritorna al default layout", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "Azzera la lista di dynamic words per l'autocompletamento", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "Esegui in Scratchpad (Live coding)", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "Ferma il debugger", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "Ferma il processo", -- src\editor\menu_project.lua
|
||||
@@ -207,6 +218,7 @@ return {
|
||||
["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 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
|
||||
@@ -216,12 +228,14 @@ return {
|
||||
["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 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
|
||||
["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
|
||||
["Settings: User"] = "Impostazioni: Utente", -- src\editor\menu_edit.lua
|
||||
["Show &Tooltip"] = "Mos&tra i consigli", -- src\editor\menu_edit.lua
|
||||
["Show Location"] = "Mostra posizione", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Mostra i consigli per la posizione corrente; muovi il cursore dopo la parentesi o la funzione", -- src\editor\menu_edit.lua
|
||||
["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
|
||||
["Start &Debugging"] = "Inizia il &Debug", -- src\editor\menu_project.lua
|
||||
@@ -233,10 +247,12 @@ return {
|
||||
["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
|
||||
["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
|
||||
["Tr&ace"] = "Tr&ace", -- src\editor\menu_project.lua
|
||||
@@ -261,6 +277,10 @@ return {
|
||||
["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
|
||||
["Zoom In"] = "Zoom In", -- src\editor\menu_view.lua
|
||||
["Zoom Out"] = "Zoom Out", -- src\editor\menu_view.lua
|
||||
["Zoom to 100%"] = "Zoom a 100%", -- src\editor\menu_view.lua
|
||||
["Zoom"] = "Zoom", -- src\editor\menu_view.lua
|
||||
["on line %d"] = "alla linea %d", -- src\editor\debugger.lua, src\editor\editor.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"tracciata %d istruzione", "%d istruzioni tracciate"}, -- src\editor\debugger.lua
|
||||
["unknown error"] = "errore sconosciuto", -- src\editor\debugger.lua
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
[0] = function(c) c = (c-9)%100 < 9 and 9 or (c-1)%10 return c == 0 and 1 or c < 4 and 2 or 3 end, -- plural
|
||||
["%d instance"] = {"%d совпадение", "%d совпадения", "%d совпадений"}, -- src\editor\findreplace.lua
|
||||
["%s event failed: %s"] = nil, -- src\editor\package.lua
|
||||
["%s event failed: %s"] = "%s обработчик события вернул ошибку: %s", -- src\editor\package.lua
|
||||
["&About"] = "&О программе", -- src\editor\menu_help.lua
|
||||
["&Add Watch"] = "&Добавить выражение", -- src\editor\debugger.lua
|
||||
["&Break"] = "Пр&ервать", -- src\editor\menu_project.lua
|
||||
@@ -11,9 +11,10 @@ return {
|
||||
["&Copy"] = "&Копировать", -- src\editor\menu_edit.lua, src\editor\editor.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
|
||||
["&Delete"] = "&Удалить", -- src\editor\filetree.lua
|
||||
["&Documentation"] = "Документация", -- src\editor\menu_help.lua
|
||||
["&Down"] = "Вниз", -- src\editor\findreplace.lua
|
||||
["&Edit Project Directory"] = "&Редактировать папку проекта", -- src\editor\filetree.lua
|
||||
["&Edit Watch"] = "&Редактировать выражение", -- src\editor\debugger.lua
|
||||
["&Edit"] = "&Правка", -- src\editor\menu_edit.lua
|
||||
["&File"] = "&Файл", -- src\editor\menu_file.lua
|
||||
@@ -21,19 +22,19 @@ return {
|
||||
["&Find Next"] = "Найти далее", -- src\editor\findreplace.lua
|
||||
["&Find"] = "&Найти", -- src\editor\menu_search.lua
|
||||
["&Fold/Unfold All"] = "Св&ернуть/развернуть все", -- src\editor\menu_edit.lua
|
||||
["&Frequently Asked Questions"] = nil, -- src\editor\menu_help.lua
|
||||
["&Frequently Asked Questions"] = "&Часто задаваемые вопросы", -- src\editor\menu_help.lua
|
||||
["&Getting Started Guide"] = nil, -- src\editor\menu_help.lua
|
||||
["&Goto Line"] = "&Перейти к строке", -- src\editor\menu_search.lua
|
||||
["&Go To Line..."] = "&Перейти к строке...", -- src\editor\menu_search.lua
|
||||
["&Help"] = "&Справка", -- src\editor\menu_help.lua
|
||||
["&New Directory"] = nil, -- src\editor\filetree.lua
|
||||
["&New Directory"] = "&Новая папка", -- src\editor\filetree.lua
|
||||
["&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
|
||||
["&Project Page"] = nil, -- src\editor\menu_help.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
|
||||
["&Rename"] = nil, -- src\editor\filetree.lua
|
||||
["&Rename"] = "Переименовать", -- src\editor\filetree.lua
|
||||
["&Replace All"] = "Заменить всe", -- src\editor\findreplace.lua
|
||||
["&Replace"] = "За&менить", -- src\editor\findreplace.lua, src\editor\menu_search.lua
|
||||
["&Run"] = "За&пустить", -- src\editor\menu_project.lua
|
||||
@@ -42,8 +43,10 @@ return {
|
||||
["&Sort"] = "&Cортировать", -- src\editor\menu_edit.lua
|
||||
["&Stack Window"] = "Окно &стека", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "Запустить сервер отла&дки", -- src\editor\menu_project.lua
|
||||
["&Status Bar"] = "Панель состояния", -- src\editor\menu_view.lua
|
||||
["&Subdirectories"] = "В папках", -- src\editor\findreplace.lua
|
||||
["&Tutorials"] = nil, -- src\editor\menu_help.lua
|
||||
["&Tool Bar"] = "Панель инструментов", -- src\editor\menu_view.lua
|
||||
["&Tutorials"] = "&Обучающие материалы", -- src\editor\menu_help.lua
|
||||
["&Undo"] = "&Отменить", -- src\editor\menu_edit.lua, src\editor\editor.lua
|
||||
["&Up"] = "Вверх", -- src\editor\findreplace.lua
|
||||
["&View"] = "&Вид", -- src\editor\menu_view.lua
|
||||
@@ -58,6 +61,7 @@ return {
|
||||
["Analyze"] = "Анализировать", -- src\editor\inspect.lua
|
||||
["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
|
||||
["C&omment/Uncomment"] = "Зако&мментировать/раскомментировать", -- src\editor\menu_edit.lua
|
||||
@@ -65,14 +69,16 @@ return {
|
||||
["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 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."] = nil, -- src\editor\debugger.lua
|
||||
["Can't start debugger server at %s:%d: %s."] = "Невозможно запустить сервер отладки %s:%d: %s", -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "Невозможно начать отладочную сессию из-за внутренней ошибки '%s'.", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Невозможно начать отладку без открытого файла или с несохраненным текущим файлом ('%s').", -- src\editor\debugger.lua
|
||||
["Can't stop debugger server as it is not started."] = "Невозможно остановить сервер отладки пока он не запущен", -- src\editor\debugger.lua
|
||||
["Cancel"] = "Отмена", -- src\editor\findreplace.lua
|
||||
["Cancelled by the user."] = nil, -- src\editor\findreplace.lua
|
||||
["Choose..."] = "Выбрать...", -- src\editor\menu_project.lua
|
||||
["Choose a project directory"] = "Выберите папку проекта", -- src\editor\findreplace.lua, src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "Очистить &динамические слова", -- src\editor\menu_edit.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..."] = "Выбрать...", -- 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
|
||||
["Clear the output window before compiling or debugging"] = "Очистить окно вывода перед компиляцией или отладкой", -- src\editor\menu_project.lua
|
||||
["Close &Other Pages"] = "Закрыть &остальные вкладки", -- src\editor\gui.lua
|
||||
["Close A&ll Pages"] = "Закрыть &все вкладки", -- src\editor\gui.lua
|
||||
@@ -87,25 +93,27 @@ return {
|
||||
["Compile the current file"] = "Скомпилировать текущий файл", -- src\editor\menu_project.lua
|
||||
["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
|
||||
["Consider removing backslash from escape sequence '%s'."] = "Рассмотрите вариант удаления backslash из строки '%s'.", -- src\editor\commands.lua
|
||||
["Copy Full Path"] = "Скопировать полный путь", -- src\editor\filetree.lua
|
||||
["Copy selected text to clipboard"] = "Скопировать выделенный текст в буфер обмена", -- 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
|
||||
["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
|
||||
["Debugging session completed (%s)."] = "Отладочная сессия завершена (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Отладочная сессия запущена в '%s'.", -- src\editor\debugger.lua
|
||||
["Debugging suspended at %s:%s (couldn't activate the file)."] = "Отладка остановлена на %s:%s (невозможно открыть файл).", -- src\editor\debugger.lua
|
||||
["Detach &Process"] = "Отсоединить процесс", -- src\editor\menu_project.lua
|
||||
["Directory"] = "Папка", -- src\editor\findreplace.lua
|
||||
["Do you want to delete '%s'?"] = nil, -- src\editor\filetree.lua
|
||||
["Do you want to overwrite it?"] = nil, -- src\editor\commands.lua
|
||||
["Do you want to delete '%s'?"] = "Удалить '%s'?", -- src\editor\filetree.lua
|
||||
["Do you want to overwrite it?"] = "Переписать его?", -- src\editor\commands.lua
|
||||
["Do you want to reload it?"] = "Перезагрузить его?", -- src\editor\editor.lua
|
||||
["Do you want to save the changes to '%s'?"] = "Сохранить изменения в '%s'?", -- src\editor\commands.lua
|
||||
["E&xit"] = "Вы&ход", -- src\editor\menu_file.lua
|
||||
["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 command line parameters (use Cancel to clear)"] = "Введите параметры командной строки (Cancel чтобы очистить)", -- src\editor\menu_project.lua
|
||||
["Enter line number"] = "Введите номер строки", -- src\editor\menu_search.lua
|
||||
["Error while loading API file: %s"] = "Ошибка загрузки файла определений API: %s", -- src\editor\autocomplete.lua
|
||||
["Error while loading configuration file: %s"] = "Ошибка загрузки файла конфигурации: %s", -- src\editor\style.lua
|
||||
@@ -123,7 +131,7 @@ return {
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Файл '%s' имеет более позднее время модификации, чем восстановленный '%s'; пожалуйста просмотрите его перед сохранением.", -- 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
|
||||
["File already exists."] = "Файл уже существует.", -- src\editor\commands.lua
|
||||
["File history"] = "История файлов", -- src\editor\menu_file.lua
|
||||
["Find &In Files"] = "Н&айти в файлах", -- src\editor\menu_search.lua
|
||||
["Find &Next"] = "Найти &далее", -- src\editor\menu_search.lua
|
||||
@@ -140,9 +148,11 @@ return {
|
||||
["Found auto-recovery record and restored saved session."] = "Найдена запись авто-восстановления и восстановлена сохраненная сессия.", -- src\editor\commands.lua
|
||||
["Found"] = "Найдено", -- src\editor\findreplace.lua
|
||||
["Full &Screen"] = "Во весь экр&ан", -- src\editor\menu_view.lua
|
||||
["Go To Definition"] = nil, -- src\editor\editor.lua
|
||||
["Go To Definition"] = "Перейти к определению", -- src\editor\editor.lua
|
||||
["Go To Line"] = "Перейти к строке", -- src\editor\menu_search.lua
|
||||
["Go To Next Bookmark"] = "Перейти к следующей закладке", -- src\editor\menu_edit.lua
|
||||
["Go To Previous Bookmark"] = "Перейти к предыдущей закладке", -- src\editor\menu_edit.lua
|
||||
["Go to a selected line"] = "Перейти к заданной строке", -- src\editor\menu_search.lua
|
||||
["Goto Line"] = "Перейти к строке", -- src\editor\menu_search.lua
|
||||
["INS"] = "ВСТ", -- src\editor\editor.lua
|
||||
["In Files"] = "Установки файлов", -- src\editor\findreplace.lua
|
||||
["Jump to a function definition..."] = "Перейти к определению функции...", -- src\editor\editor.lua
|
||||
@@ -154,9 +164,9 @@ return {
|
||||
["Match &case"] = "Совпадение регистра", -- src\editor\findreplace.lua
|
||||
["Match &whole word"] = "Совпадение целого слова", -- src\editor\findreplace.lua
|
||||
["Mixed end-of-line encodings detected."] = "Обнаружены смешанные символы конца строки.", -- src\editor\commands.lua
|
||||
["New &File"] = nil, -- src\editor\filetree.lua
|
||||
["New &File"] = "Новый файл", -- src\editor\filetree.lua
|
||||
["OVR"] = "ЗАМ", -- src\editor\editor.lua
|
||||
["Open With Default Program"] = nil, -- src\editor\filetree.lua
|
||||
["Open With Default Program"] = "Открыть используя программу по умолчанию", -- src\editor\filetree.lua
|
||||
["Open an existing document"] = "Открыть существующий документ", -- src\editor\gui.lua, src\editor\menu_file.lua
|
||||
["Open file"] = "Открыть файл", -- src\editor\commands.lua
|
||||
["Options"] = "Установки", -- src\editor\findreplace.lua
|
||||
@@ -172,26 +182,27 @@ return {
|
||||
["Program starting as '%s'."] = "Программа запускается как '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "Программа завершена (pid: %d).", -- src\editor\debugger.lua
|
||||
["Program unable to run as '%s'."] = "Программа не может быть запущена как '%s'.", -- src\editor\output.lua
|
||||
["Project Directory"] = "Папка проекта", -- src\editor\menu_project.lua
|
||||
["Project"] = "Проект", -- src\editor\gui.lua, src\editor\settings.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/&FileTree Window"] = "Окно &проекта/списка файлов", -- src\editor\menu_view.lua
|
||||
["Provide command line parameters"] = nil, -- src\editor\menu_project.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
|
||||
["Recent &Projects"] = "Недавние &проекты", -- src\editor\menu_file.lua
|
||||
["Recent Files"] = "Недавние файлы", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Вернуть последнее отмененное изменение", -- src\editor\menu_edit.lua
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "Отказано в запросе на запуск новой отладочной сессии, поскольку одна сессия уже выполняется.", -- src\editor\debugger.lua
|
||||
["Regular &expression"] = "Регулярное выражение", -- src\editor\findreplace.lua
|
||||
["Remote console"] = "Удаленная консоль", -- src\editor\shellbox.lua
|
||||
["Rename All Instances"] = nil, -- src\editor\editor.lua
|
||||
["Rename All Instances"] = "Переименовать все совпадения", -- src\editor\editor.lua
|
||||
["Replace A&ll"] = "Заменить все", -- src\editor\findreplace.lua
|
||||
["Replace"] = "Заменить", -- src\editor\findreplace.lua
|
||||
["Replaced an invalid UTF8 character with %s."] = "Некорректный символ UTF8 заменен на %s.", -- src\editor\commands.lua
|
||||
["Replaced"] = "Заменено", -- src\editor\findreplace.lua
|
||||
["Replacing"] = "Замена", -- src\editor\findreplace.lua
|
||||
["Reset to default layout"] = "Установить расположение окон по умолчанию", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "Очистить список динамических слов для автодополнения", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "Запустить как черновик", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "&Завершить отладку", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "&Завершить процесс", -- src\editor\menu_project.lua
|
||||
@@ -207,44 +218,49 @@ return {
|
||||
["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 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"] = nil, -- src\editor\menu_search.lua
|
||||
["Select the word under cursor and find its previous occurrence"] = nil, -- 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 the interpreter to be used"] = "Установить используемый интерпретатор", -- src\editor\menu_project.lua
|
||||
["Set the project directory 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
|
||||
["Settings: User"] = "Установки: Пользователя", -- src\editor\menu_edit.lua
|
||||
["Show &Tooltip"] = "Показать &подсказку", -- src\editor\menu_edit.lua
|
||||
["Show Location"] = nil, -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Show Location"] = "Показать файл в папке", -- src\editor\gui.lua, src\editor\filetree.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Показать подсказку в текущей позиции; переместите курсор в позицию после открывающей скобки функции", -- src\editor\menu_edit.lua
|
||||
["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
|
||||
["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
|
||||
["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
|
||||
["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
|
||||
["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 create directory '%s'."] = "Ошибка создания папки '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to create file '%s'."] = "Ошибка создания файла '%s'.", -- 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 rename file '%s'."] = "Ошибка переименования файла '%s'.", -- src\editor\filetree.lua
|
||||
["Unable to save file '%s': %s"] = "Ошибка сохранения файла '%s': %s", -- src\editor\commands.lua
|
||||
["Unable to stop program (pid: %d), code %d."] = "Невозможно завершить программу (pid: %d), код %d.", -- src\editor\debugger.lua
|
||||
["Undo last edit"] = "Отменить последнее действие", -- src\editor\menu_edit.lua
|
||||
@@ -261,7 +277,11 @@ return {
|
||||
["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
|
||||
["Zoom In"] = "Приблизить", -- src\editor\menu_view.lua
|
||||
["Zoom Out"] = "Удалить", -- src\editor\menu_view.lua
|
||||
["Zoom to 100%"] = "Установить 100%", -- src\editor\menu_view.lua
|
||||
["Zoom"] = "Установить масштаб", -- src\editor\menu_view.lua
|
||||
["on line %d"] = "в строке %d", -- src\editor\debugger.lua, src\editor\editor.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"выполнена %d инструкция", "выполнено %d инструкции", "выполнено %d инструкций"}, -- src\editor\debugger.lua
|
||||
["unknown error"] = nil, -- src\editor\debugger.lua
|
||||
["unknown error"] = "неизвестная ошибка", -- src\editor\debugger.lua
|
||||
}
|
||||
|
||||
@@ -181,16 +181,16 @@ local colors = {
|
||||
NotepadPlusPlus = { -- contributed by Florian (https://github.com/SiENcE)
|
||||
Background = H'FFFFFF',
|
||||
CurrentLine = H'E9E2FF',
|
||||
Selection = H'ADADA1',
|
||||
Selection = H'C0C0C0',
|
||||
Foreground = H'000000',
|
||||
Comment = H'008000',
|
||||
Red = H'FF6900',
|
||||
Orange = H'00FF00',
|
||||
Orange = H'FF0000',
|
||||
Yellow = H'FF4E00',
|
||||
Green = H'808080',
|
||||
Aqua = H'260099',
|
||||
Aqua = H'000080',
|
||||
Blue = H'2123FF',
|
||||
Purple = H'FFFFFF',
|
||||
Purple = H'8000FF',
|
||||
},
|
||||
SciTeLuaIDE = { -- contributed by Jayanth Acharya
|
||||
Background = H'1B1D1E',
|
||||
@@ -268,7 +268,7 @@ return {
|
||||
edge = {},
|
||||
|
||||
indicator = {
|
||||
fncall = {fg = C.Purple, st = wxstc.wxSTC_INDIC_ROUNDBOX},
|
||||
fncall = {fg = C.Purple, st = wxstc.wxSTC_INDIC_HIDDEN},
|
||||
--[[ other possible values are:
|
||||
wxSTC_INDIC_PLAIN Single-line underline
|
||||
wxSTC_INDIC_SQUIGGLE Squiggly underline
|
||||
|
||||
@@ -9,7 +9,7 @@ See [configuration](http://studio.zerobrane.com/doc-configuration.html) page for
|
||||
|
||||
--]]--
|
||||
|
||||
-- an example of how loaded configuration can be modified from this file
|
||||
-- to modify loaded configuration for recognized extensions for lua files
|
||||
local G = ... -- this now points to the global environment in the script
|
||||
local luaspec = G.ide.specs['lua']
|
||||
luaspec.exts[#luaspec.exts+1] = "luaz"
|
||||
@@ -140,3 +140,16 @@ editor.nomousezoom = true
|
||||
-- you can also change it between runs from Local Console by executing
|
||||
-- `ide.config.corona = {skin = 'iPad'}`
|
||||
corona = { skin = "iPad" }
|
||||
|
||||
-- to style individual keywords; `return` and `break` are shown in red
|
||||
local G = ... -- this now points to the global environment in the script
|
||||
local luaspec = G.ide.specs.lua
|
||||
|
||||
local num = #luaspec.keywords
|
||||
-- take a new slot in the list of keywords (starting from 1)
|
||||
luaspec.keywords[num+1] = 'return break'
|
||||
-- remove 'return' from the list of "regular" keywords
|
||||
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}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
--[[-- Copy snippets from this file to `user.lua` --]]--
|
||||
|
||||
--[[ Add `Evaluate in Console` option to the Edit menu
|
||||
local G = ... -- this now points to the global environment in the script
|
||||
local ide, wx, TR, ID = G.ide, G.wx, G.TR, G.ID
|
||||
local postinit = ide.app.postinit
|
||||
ide.app.postinit = function()
|
||||
if postinit then postinit() end
|
||||
local menu = ide.frame.menuBar:GetMenu(ide.frame.menuBar:FindMenu(TR("&Edit")))
|
||||
menu:Append(ID "eval", "Evaluate in Console\tCtrl-E")
|
||||
ide.frame:Connect(ID "eval", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function () ShellExecuteCode(GetEditor():GetSelectedText()) end)
|
||||
ide.frame:Connect(ID "eval", wx.wxEVT_UPDATE_UI,
|
||||
function (event) event:Enable(GetEditor() and #GetEditor():GetSelectedText() > 0) end)
|
||||
end
|
||||
--]]
|
||||
|
||||
--[[ An example of how individual keywords can be styled
|
||||
local G = ... -- this now points to the global environment in the script
|
||||
local luaspec = G.ide.specs['lua']
|
||||
|
||||
local num = #luaspec.keywords
|
||||
-- take a new slot in the list of keywords (starting from 1)
|
||||
luaspec.keywords[num+1] = 'return'
|
||||
-- remove 'return' from the list of "regular" keywords
|
||||
luaspec.keywords[1] = luaspec.keywords[1]:gsub(' return', '')
|
||||
|
||||
-- assign new style to the added slot (starting from 0)
|
||||
styles["keywords"..num] = {fg = {240, 0, 0}, b = true}
|
||||
--]]
|
||||
@@ -53,7 +53,7 @@ return {
|
||||
local cmd = ('"%s" %s "%s"'):format(busted, options, file)
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() ide.debugger.pid = nil if rundebug then wx.wxRemoveFile(file) end end)
|
||||
function() if rundebug then wx.wxRemoveFile(file) end end)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
|
||||
@@ -13,10 +13,8 @@ return {
|
||||
if not corona then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\Corona SDK]]..sep..[[D:\Program Files\Corona SDK]]..sep..
|
||||
[[C:\Program Files\Corona Labs\Corona SDK]]..sep..[[D:\Program Files\Corona Labs\Corona SDK]]..sep..
|
||||
[[C:\Program Files (x86)\Corona SDK]]..sep..[[D:\Program Files (x86)\Corona SDK]]..sep..
|
||||
[[C:\Program Files (x86)\Corona Labs\Corona SDK]]..sep..[[D:\Program Files (x86)\Corona Labs\Corona SDK]]..sep)
|
||||
win and (GenerateProgramFilesPath('Corona SDK', sep)..sep..
|
||||
GenerateProgramFilesPath('Corona Labs\\Corona SDK', sep)..sep)
|
||||
or mac and ('/Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS'..sep)
|
||||
or ''
|
||||
local path = default
|
||||
@@ -56,12 +54,13 @@ return {
|
||||
or MergeFullPath(GetPathWithSep(corona), "Resources/mobdebug.lua")
|
||||
local mdbl = MergeFullPath(GetPathWithSep(ide.editorFilename), "lualibs/mobdebug/mobdebug.lua")
|
||||
local needed = needRefresh(mdbl, mdbc)
|
||||
local mdbcplugin = win and MergeFullPath(wx.wxStandardPaths.Get():GetUserLocalDataDir(),
|
||||
"../../Roaming/Corona Labs/Corona Simulator/Plugins/mobdebug.lua")
|
||||
if needed then
|
||||
local copied = FileCopy(mdbl, mdbc)
|
||||
-- couldn't copy to the Resources/ folder; not have permissions?
|
||||
if not copied and win then
|
||||
mdbc = MergeFullPath(wx.wxStandardPaths.Get():GetUserLocalDataDir(),
|
||||
"../../Roaming/Corona Labs/Corona Simulator/Plugins/mobdebug.lua")
|
||||
mdbc = mdbcplugin
|
||||
needed = needRefresh(mdbl, mdbc)
|
||||
copied = needed and FileCopy(mdbl, mdbc)
|
||||
end
|
||||
@@ -74,6 +73,10 @@ return {
|
||||
if not copied then return end
|
||||
end
|
||||
end
|
||||
-- remove debugger if copied to plugin directory as it may be obsolete
|
||||
if mdbcplugin and mdbcplugin ~= mdbc and wx.wxFileExists(mdbcplugin) then
|
||||
wx.wxRemoveFile(mdbcplugin)
|
||||
end
|
||||
end
|
||||
|
||||
local debugopt = mac and "-debug 1 -project " or "-debug "
|
||||
@@ -82,8 +85,7 @@ return {
|
||||
local cmd = ('"%s" %s"%s"%s')
|
||||
:format(corona, rundebug and debugopt or "", file, skin)
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() ide.debugger.pid = nil end)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
|
||||
@@ -29,8 +29,7 @@ return {
|
||||
if not gideros then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\Gideros]]..sep..[[D:\Program Files\Gideros]]..sep..
|
||||
[[C:\Program Files (x86)\Gideros]]..sep..[[D:\Program Files (x86)\Gideros]]..sep)
|
||||
win and (GenerateProgramFilesPath('Gideros', sep)..sep)
|
||||
or mac and ('/Applications/Gideros Studio/Gideros Player.app/Contents/MacOS'..sep)
|
||||
or ''
|
||||
local path = default
|
||||
@@ -90,15 +89,14 @@ return {
|
||||
else
|
||||
local cmd = ('"%s"'):format(gideros)
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
pid = CommandLineRun(cmd,self:fworkdir(wfilename),not mac,true,nil,nil,
|
||||
function() ide.debugger.pid = nil end)
|
||||
pid = CommandLineRun(cmd,self:fworkdir(wfilename),not mac,true)
|
||||
if not pid then return end
|
||||
end
|
||||
|
||||
do
|
||||
DisplayOutputLn("Starting the player and waiting for the bridge to connect at '"..gdrbridge.."'.")
|
||||
local cmd = ('"%s" %s'):format(gdrbridge, 'isconnected')
|
||||
local attempts, connected = 12
|
||||
local attempts, connected = 15
|
||||
for _ = 1, attempts do
|
||||
local proc = wx.wxProcess()
|
||||
proc:Redirect()
|
||||
@@ -107,7 +105,7 @@ return {
|
||||
if not isValidPid(bid, cmd) then return end
|
||||
|
||||
local streamin = proc:GetInputStream()
|
||||
for _ = 1, 20 do
|
||||
for _ = 1, 30 do
|
||||
if streamin:CanRead() then
|
||||
connected = tonumber(streamin:Read(4096)) == 1
|
||||
break end
|
||||
|
||||
@@ -11,10 +11,7 @@ return {
|
||||
gslshell = gslshell or ide.config.path.gslshell -- check if the path is configured
|
||||
if not gslshell then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\gsl-shell]]..sep..[[D:\Program Files\gsl-shell]]..sep..
|
||||
[[C:\Program Files (x86)\gsl-shell]]..sep..[[D:\Program Files (x86)\gsl-shell]]..sep)
|
||||
or ''
|
||||
local default = win and GenerateProgramFilesPath('gsl-shell', sep)..sep or ''
|
||||
local path = default
|
||||
..(os.getenv('PATH') or '')..sep
|
||||
..(GetPathWithSep(self:fworkdir(wfilename)))..sep
|
||||
@@ -82,7 +79,7 @@ return {
|
||||
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() ide.debugger.pid = nil if rundebug then wx.wxRemoveFile(filepath) end end)
|
||||
function() if rundebug then wx.wxRemoveFile(filepath) end end)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
|
||||
@@ -46,8 +46,7 @@ return {
|
||||
end
|
||||
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
local pid = CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() ide.debugger.pid = nil end)
|
||||
local pid = CommandLineRun(cmd,self:fworkdir(wfilename),true,false)
|
||||
|
||||
-- restore PATH
|
||||
wx.wxSetEnv("PATH", path)
|
||||
|
||||
@@ -13,8 +13,7 @@ return {
|
||||
if not love2d then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\love]]..sep..[[D:\Program Files\love]]..sep..
|
||||
[[C:\Program Files (x86)\love]]..sep..[[D:\Program Files (x86)\love]]..sep)
|
||||
win and (GenerateProgramFilesPath('love', sep)..sep)
|
||||
or mac and ('/Applications/love.app/Contents/MacOS'..sep)
|
||||
or ''
|
||||
local path = default
|
||||
@@ -46,8 +45,7 @@ return {
|
||||
local cmd = ('"%s" "%s"%s%s'):format(love2d, self:fworkdir(wfilename),
|
||||
params and " "..params or "", rundebug and ' -debug' or '')
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() ide.debugger.pid = nil end)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,true)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
function MakeLuaInterpreter(version, name)
|
||||
|
||||
local exe
|
||||
|
||||
local function exePath(self, version)
|
||||
local version = tostring(version):gsub('%.','')
|
||||
local mainpath = ide.editorFilename:gsub("[^/\\]+$","")
|
||||
@@ -19,7 +17,7 @@ return {
|
||||
luaversion = version or '5.1',
|
||||
fexepath = exePath,
|
||||
frun = function(self,wfilename,rundebug)
|
||||
exe = exe or self:fexepath(version or "")
|
||||
local exe = self:fexepath(version or "")
|
||||
local filepath = wfilename:GetFullPath()
|
||||
if rundebug then
|
||||
DebuggerAttachDefault({runstart = ide.config.debugger.runonstart == true})
|
||||
@@ -57,7 +55,7 @@ return {
|
||||
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
local pid = CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() ide.debugger.pid = nil if rundebug then wx.wxRemoveFile(filepath) end end)
|
||||
function() if rundebug then wx.wxRemoveFile(filepath) end end)
|
||||
|
||||
if version and cpath then wx.wxSetEnv("LUA_CPATH", cpath) end
|
||||
return pid
|
||||
|
||||
@@ -60,10 +60,7 @@ return {
|
||||
|
||||
local cmd = '"'..exe..'" '..args
|
||||
|
||||
local pid = CommandLineRun(cmd,wdir,true,true,nil,self:fuid(wfilename),
|
||||
function() ide.debugger.pid = nil end)
|
||||
|
||||
return pid
|
||||
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)
|
||||
|
||||
@@ -16,8 +16,7 @@ return {
|
||||
local sep = win and ';' or ':'
|
||||
local path =
|
||||
win and ([[C:\Marmalade]]..sep..[[D:\Marmalade]]..sep..
|
||||
[[C:\Program Files\Marmalade]]..sep..[[D:\Program Files\Marmalade]]..sep..
|
||||
[[C:\Program Files (x86)\Marmalade]]..sep..[[D:\Program Files (x86)\Marmalade]]..sep)
|
||||
GenerateProgramFilesPath('Marmalade', sep)..sep)
|
||||
or mac and ([[/Applications/Marmalade.app/Contents]]..sep..
|
||||
[[/Developer/Marmalade]]..sep)
|
||||
or ''
|
||||
@@ -113,8 +112,7 @@ return {
|
||||
|
||||
local cmd = ('"%s" %s'):format(quick, options)
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,GetPathWithSep(projdir),true,true,nil,nil,
|
||||
function() ide.debugger.pid = nil end)
|
||||
return CommandLineRun(cmd,GetPathWithSep(projdir),true,true)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
|
||||
@@ -11,10 +11,7 @@ return {
|
||||
moai = moai or ide.config.path.moai -- check if the path is configured
|
||||
if not moai then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\moai]]..sep..[[D:\Program Files\moai]]..sep..
|
||||
[[C:\Program Files (x86)\moai]]..sep..[[D:\Program Files (x86)\moai]]..sep)
|
||||
or ''
|
||||
local default = win and GenerateProgramFilesPath('moai', sep)..sep or ''
|
||||
local path = default
|
||||
..(os.getenv('PATH') or '')..sep
|
||||
..(os.getenv('MOAI_BIN') or '')..sep
|
||||
@@ -87,7 +84,7 @@ return {
|
||||
or ('"%s" "%s"'):format(moai, file)
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() ide.debugger.pid = nil if rundebug then wx.wxRemoveFile(file) end end)
|
||||
function() if rundebug then wx.wxRemoveFile(file) end end)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
|
||||
@@ -18,7 +18,7 @@ if package.loaded["socket.http"] then
|
||||
end
|
||||
|
||||
local socket = require "socket"
|
||||
|
||||
local gettime = socket.gettime
|
||||
local coxpcall = require "coxpcall"
|
||||
|
||||
local WATCH_DOG_TIMEOUT = 120
|
||||
@@ -60,7 +60,7 @@ local copas = {}
|
||||
-- Meta information is public even if beginning with an "_"
|
||||
copas._COPYRIGHT = "Copyright (C) 2005-2010 Kepler Project"
|
||||
copas._DESCRIPTION = "Coroutine Oriented Portable Asynchronous Services"
|
||||
copas._VERSION = "Copas 1.1.7"
|
||||
copas._VERSION = "Copas 1.2.1"
|
||||
|
||||
-- Close the socket associated with the current connection after the handler finishes
|
||||
copas.autoclose = true
|
||||
@@ -117,6 +117,65 @@ local function newset()
|
||||
return set
|
||||
end
|
||||
|
||||
local fnil = function()end
|
||||
local _sleeping = {
|
||||
times = {}, -- list with wake-up times
|
||||
cos = {}, -- list with coroutines, index matches the 'times' list
|
||||
lethargy = {}, -- list of coroutines sleeping without a wakeup time
|
||||
|
||||
insert = fnil,
|
||||
remove = fnil,
|
||||
push = function(self, sleeptime, co)
|
||||
if not co then return end
|
||||
if sleeptime<0 then
|
||||
--sleep until explicit wakeup through copas.wakeup
|
||||
self.lethargy[co] = true
|
||||
return
|
||||
else
|
||||
sleeptime = gettime() + sleeptime
|
||||
end
|
||||
local t, c = self.times, self.cos
|
||||
local i, cou = 1, #t
|
||||
--TODO: do a binary search
|
||||
while i<=cou and t[i]<=sleeptime do i=i+1 end
|
||||
table.insert(t, i, sleeptime)
|
||||
table.insert(c, i, co)
|
||||
end,
|
||||
getnext = function(self) -- returns delay until next sleep expires, or nil if there is none
|
||||
local t = self.times
|
||||
local delay = t[1] and t[1] - gettime() or nil
|
||||
|
||||
return delay and math.max(delay, 0) or nil
|
||||
end,
|
||||
-- find the thread that should wake up to the time
|
||||
pop = function(self, time)
|
||||
local t, c = self.times, self.cos
|
||||
if #t==0 or time<t[1] then return end
|
||||
local co = c[1]
|
||||
table.remove(t, 1)
|
||||
table.remove(c, 1)
|
||||
return co
|
||||
end,
|
||||
wakeup = function(self, co)
|
||||
local let = self.lethargy
|
||||
if let[co] then
|
||||
self:push(0, co)
|
||||
let[co] = nil
|
||||
else
|
||||
let = self.cos
|
||||
for i=1,#let do
|
||||
if let[i]==co then
|
||||
table.remove(let, i)
|
||||
local tm = self.times[i]
|
||||
table.remove(self.times, i)
|
||||
self:push(0, co)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
} --_sleeping
|
||||
|
||||
local _servers = newset() -- servers being handled
|
||||
local _reading_log = {}
|
||||
local _writing_log = {}
|
||||
@@ -140,7 +199,7 @@ function copas.receive(client, pattern, part)
|
||||
_reading_log[client] = nil
|
||||
return s, err, part
|
||||
end
|
||||
_reading_log[client] = os.time()
|
||||
_reading_log[client] = gettime()
|
||||
coroutine.yield(client, _reading)
|
||||
until false
|
||||
end
|
||||
@@ -156,7 +215,7 @@ function copas.receivefrom(client, size)
|
||||
_reading_log[client] = nil
|
||||
return s, err, port
|
||||
end
|
||||
_reading_log[client] = os.time()
|
||||
_reading_log[client] = gettime()
|
||||
coroutine.yield(client, _reading)
|
||||
until false
|
||||
end
|
||||
@@ -169,13 +228,13 @@ function copas.receivePartial(client, pattern)
|
||||
repeat
|
||||
s, err, part = client:receive(pattern)
|
||||
if s or ( (type(pattern)=="number") and part~="" and part ~=nil ) or
|
||||
err ~= "timeout" then
|
||||
_reading_log[client] = nil
|
||||
return s, err, part
|
||||
end
|
||||
_reading_log[client] = os.time()
|
||||
coroutine.yield(client, _reading)
|
||||
until false
|
||||
err ~= "timeout" then
|
||||
_reading_log[client] = nil
|
||||
return s, err, part
|
||||
end
|
||||
_reading_log[client] = gettime()
|
||||
coroutine.yield(client, _reading)
|
||||
until false
|
||||
end
|
||||
|
||||
-- sends data to a client. The operation is buffered and
|
||||
@@ -191,14 +250,14 @@ function copas.send(client, data, from, to)
|
||||
-- adds extra corrotine swap
|
||||
-- garantees that high throuput dont take other threads to starvation
|
||||
if (math.random(100) > 90) then
|
||||
_writing_log[client] = os.time()
|
||||
_writing_log[client] = gettime()
|
||||
coroutine.yield(client, _writing)
|
||||
end
|
||||
if s or err ~= "timeout" then
|
||||
_writing_log[client] = nil
|
||||
return s, err,lastIndex
|
||||
end
|
||||
_writing_log[client] = os.time()
|
||||
_writing_log[client] = gettime()
|
||||
coroutine.yield(client, _writing)
|
||||
until false
|
||||
end
|
||||
@@ -213,14 +272,14 @@ function copas.sendto(client, data, ip, port)
|
||||
-- adds extra corrotine swap
|
||||
-- garantees that high throuput dont take other threads to starvation
|
||||
if (math.random(100) > 90) then
|
||||
_writing_log[client] = os.time()
|
||||
_writing_log[client] = gettime()
|
||||
coroutine.yield(client, _writing)
|
||||
end
|
||||
if s or err ~= "timeout" then
|
||||
_writing_log[client] = nil
|
||||
return s, err
|
||||
end
|
||||
_writing_log[client] = os.time()
|
||||
_writing_log[client] = gettime()
|
||||
coroutine.yield(client, _writing)
|
||||
until false
|
||||
end
|
||||
@@ -235,7 +294,7 @@ function copas.connect(skt, host, port)
|
||||
_writing_log[skt] = nil
|
||||
return ret, err
|
||||
end
|
||||
_writing_log[skt] = os.time()
|
||||
_writing_log[skt] = gettime()
|
||||
coroutine.yield(skt, _writing)
|
||||
until false
|
||||
return ret, err
|
||||
@@ -385,6 +444,13 @@ function copas.addserver(server, handler, timeout)
|
||||
addTCPserver(server, handler, timeout)
|
||||
end
|
||||
end
|
||||
|
||||
function copas.removeserver(server)
|
||||
_servers[server] = nil
|
||||
_reading:remove(server)
|
||||
return server:close()
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Adds an new courotine thread to Copas dispatcher
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -464,6 +530,24 @@ local _writable_t = {
|
||||
}
|
||||
|
||||
addtaskWrite (_writable_t)
|
||||
--
|
||||
--sleeping threads task
|
||||
local _sleeping_t = {
|
||||
tick = function (self, time, ...)
|
||||
_doTick(_sleeping:pop(time), ...)
|
||||
end
|
||||
}
|
||||
|
||||
-- yields the current coroutine and wakes it after 'sleeptime' seconds.
|
||||
-- If sleeptime<0 then it sleeps until explicitly woken up using 'wakeup'
|
||||
function copas.sleep(sleeptime)
|
||||
coroutine.yield((sleeptime or 0), _sleeping)
|
||||
end
|
||||
|
||||
-- Wakes up a sleeping coroutine 'co'.
|
||||
function copas.wakeup(co)
|
||||
_sleeping:wakeup(co)
|
||||
end
|
||||
|
||||
local last_cleansing = 0
|
||||
|
||||
@@ -472,8 +556,8 @@ local last_cleansing = 0
|
||||
-------------------------------------------------------------------------------
|
||||
local function _select (timeout)
|
||||
local err
|
||||
local now = os.time()
|
||||
local duration = os.difftime
|
||||
local now = gettime()
|
||||
local duration = function(t2, t1) return t2-t1 end
|
||||
|
||||
_readable_t._evs, _writable_t._evs, err = socket.select(_reading, _writing, timeout)
|
||||
local r_evs, w_evs = _readable_t._evs, _writable_t._evs
|
||||
@@ -512,6 +596,14 @@ end
|
||||
-- handled (or nil + error message)
|
||||
-------------------------------------------------------------------------------
|
||||
function copas.step(timeout)
|
||||
_sleeping_t:tick(gettime())
|
||||
|
||||
-- Need to wake up the select call it time for the next sleeping event
|
||||
local nextwait = _sleeping:getnext()
|
||||
if nextwait then
|
||||
timeout = timeout and math.min(nextwait, timeout) or nextwait
|
||||
end
|
||||
|
||||
local err = _select (timeout)
|
||||
if err == "timeout" then return false end
|
||||
|
||||
@@ -537,4 +629,4 @@ function copas.loop(timeout)
|
||||
end
|
||||
end
|
||||
|
||||
return copas
|
||||
return copas
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--
|
||||
-- MobDebug 0.5511
|
||||
-- MobDebug 0.56
|
||||
-- Copyright 2011-14 Paul Kulchenko
|
||||
-- Based on RemDebug 1.0 Copyright Kepler Project 2005
|
||||
--
|
||||
@@ -18,10 +18,10 @@ end)("os")
|
||||
|
||||
local mobdebug = {
|
||||
_NAME = "mobdebug",
|
||||
_VERSION = 0.5511,
|
||||
_VERSION = 0.56,
|
||||
_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,
|
||||
port = os and os.getenv and tonumber(os.getenv("MOBDEBUG_PORT"), 10) or 8172,
|
||||
checkcount = 200,
|
||||
yieldtimeout = 0.02,
|
||||
}
|
||||
@@ -429,6 +429,46 @@ local function is_pending(peer)
|
||||
return buf
|
||||
end
|
||||
|
||||
local function readnext(peer, num)
|
||||
peer:settimeout(0) -- non-blocking
|
||||
local res, err, partial = peer:receive(num)
|
||||
peer:settimeout() -- back to blocking
|
||||
return res or partial or '', err
|
||||
end
|
||||
|
||||
local function handle_breakpoint(peer)
|
||||
-- check if the buffer has the beginning of SETB/DELB command;
|
||||
-- this is to avoid reading the entire line for commands that
|
||||
-- don't need to be handled here.
|
||||
if not buf or not (buf:sub(1,1) == 'S' or buf:sub(1,1) == 'D') then return end
|
||||
|
||||
-- check second character to avoid reading STEP or other S* and D* commands
|
||||
if #buf == 1 then buf = buf .. readnext(peer, 1) end
|
||||
if buf:sub(2,2) ~= 'E' then return end
|
||||
|
||||
-- need to read few more characters
|
||||
buf = buf .. readnext(peer, 5-#buf)
|
||||
if buf ~= 'SETB ' and buf ~= 'DELB ' then return end
|
||||
|
||||
res, err, partial = peer:receive() -- get the rest of the line; blocking
|
||||
if not res then
|
||||
if partial then buf = buf .. partial end
|
||||
return
|
||||
end
|
||||
|
||||
local _, _, cmd, file, line = (buf..res):find("^([A-Z]+)%s+(.-)%s+(%d+)%s*$")
|
||||
if cmd == 'SETB' then set_breakpoint(file, tonumber(line))
|
||||
elseif cmd == 'DELB' then remove_breakpoint(file, tonumber(line))
|
||||
else
|
||||
-- this looks like a breakpoint command, but something went wrong;
|
||||
-- return here to let the "normal" processing to handle,
|
||||
-- although this is likely to not go well.
|
||||
return
|
||||
end
|
||||
|
||||
buf = nil
|
||||
end
|
||||
|
||||
local function debug_hook(event, line)
|
||||
-- (1) LuaJIT needs special treatment. Because debug_hook is set for
|
||||
-- *all* coroutines, and not just the one being debugged as in regular Lua
|
||||
@@ -525,6 +565,8 @@ local function debug_hook(event, line)
|
||||
lastfile = file
|
||||
end
|
||||
|
||||
if is_pending(server) then handle_breakpoint(server) end
|
||||
|
||||
local vars, status, res
|
||||
if (watchescnt > 0) then
|
||||
vars = capture_vars()
|
||||
@@ -599,6 +641,30 @@ local function stringify_results(status, ...)
|
||||
return pcall(mobdebug.dump, t, {sparse = false})
|
||||
end
|
||||
|
||||
local function isrunning()
|
||||
return coro_debugger and coroutine.status(coro_debugger) == 'suspended'
|
||||
end
|
||||
|
||||
-- this is a function that removes all hooks and closes the socket to
|
||||
-- report back to the controller that the debugging is done.
|
||||
-- the script that called `done` can still continue.
|
||||
local function done()
|
||||
if not (isrunning() and server) then return end
|
||||
|
||||
if not jit then
|
||||
for co, debugged in pairs(coroutines) do
|
||||
if debugged then debug.sethook(co) end
|
||||
end
|
||||
end
|
||||
|
||||
debug.sethook()
|
||||
server:close()
|
||||
|
||||
coro_debugger = nil -- to make sure isrunning() returns `false`
|
||||
seen_hook = nil -- to make sure that the next start() call works
|
||||
abort = nil -- to make sure that callback calls use proper "abort" value
|
||||
end
|
||||
|
||||
local function debugger_loop(sev, svars, sfile, sline)
|
||||
local command
|
||||
local app, osname
|
||||
@@ -809,6 +875,10 @@ local function debugger_loop(sev, svars, sfile, sline)
|
||||
end
|
||||
elseif command == "SUSPEND" then
|
||||
-- do nothing; it already fulfilled its role
|
||||
elseif command == "DONE" then
|
||||
server:send("200 OK\n")
|
||||
done()
|
||||
return -- done with all the debugging
|
||||
elseif command == "STACK" then
|
||||
-- first check if we can execute the stack command
|
||||
-- as it requires yielding back to debug_hook it cannot be executed
|
||||
@@ -867,10 +937,6 @@ local function connect(controller_host, controller_port)
|
||||
return (socket.connect4 or socket.connect)(controller_host, controller_port)
|
||||
end
|
||||
|
||||
local function isrunning()
|
||||
return coro_debugger and coroutine.status(coro_debugger) == 'suspended'
|
||||
end
|
||||
|
||||
local lasthost, lastport
|
||||
|
||||
-- Starts a debug session by connecting to a controller
|
||||
@@ -1099,7 +1165,14 @@ local function handle(params, client, options)
|
||||
end
|
||||
if done then break end
|
||||
end
|
||||
elseif command == "setb" then
|
||||
elseif command == "done" then
|
||||
client:send(string.upper(command) .. "\n")
|
||||
if client:receive() ~= "200 OK" then
|
||||
print("Unknown error")
|
||||
os.exit(1, true)
|
||||
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*$")
|
||||
if file and line then
|
||||
-- if this is a file name, and not a file source
|
||||
@@ -1108,7 +1181,7 @@ local function handle(params, client, options)
|
||||
file = removebasedir(file, basedir)
|
||||
end
|
||||
client:send("SETB " .. file .. " " .. line .. "\n")
|
||||
if client:receive() == "200 OK" then
|
||||
if command == "asetb" or client:receive() == "200 OK" then
|
||||
set_breakpoint(file, line)
|
||||
else
|
||||
print("Error: breakpoint not inserted")
|
||||
@@ -1137,7 +1210,7 @@ local function handle(params, client, options)
|
||||
else
|
||||
print("Invalid command")
|
||||
end
|
||||
elseif command == "delb" then
|
||||
elseif command == "delb" or command == "adelb" then
|
||||
_, _, _, file, line = string.find(params, "^([a-z]+)%s+(.-)%s+(%d+)%s*$")
|
||||
if file and line then
|
||||
-- if this is a file name, and not a file source
|
||||
@@ -1146,7 +1219,7 @@ local function handle(params, client, options)
|
||||
file = removebasedir(file, basedir)
|
||||
end
|
||||
client:send("DELB " .. file .. " " .. line .. "\n")
|
||||
if client:receive() == "200 OK" then
|
||||
if command == "adelb" or client:receive() == "200 OK" then
|
||||
remove_breakpoint(file, line)
|
||||
else
|
||||
print("Error: breakpoint not removed")
|
||||
@@ -1380,7 +1453,8 @@ local function handle(params, client, options)
|
||||
print("stack -- reports stack trace")
|
||||
print("output stdout <d|c|r> -- capture and redirect io stream (default|copy|redirect)")
|
||||
print("basedir [<path>] -- sets the base path of the remote application, or shows the current one")
|
||||
print("exit -- exits debugger")
|
||||
print("done -- stops the debugger and continues application execution")
|
||||
print("exit -- exits debugger and the application")
|
||||
else
|
||||
local _, _, spaces = string.find(params, "^(%s*)$")
|
||||
if not spaces then
|
||||
@@ -1433,7 +1507,7 @@ local function coro()
|
||||
cocreate = cocreate or coroutine.create
|
||||
coroutine.create = function(f, ...)
|
||||
return cocreate(function(...)
|
||||
require("mobdebug").on()
|
||||
mobdebug.on()
|
||||
return f(...)
|
||||
end, ...)
|
||||
end
|
||||
@@ -1452,7 +1526,7 @@ local function moai()
|
||||
local patched = mt.run
|
||||
mt.run = function(self, f, ...)
|
||||
return patched(self, function(...)
|
||||
require("mobdebug").on()
|
||||
mobdebug.on()
|
||||
return f(...)
|
||||
end, ...)
|
||||
end
|
||||
@@ -1460,26 +1534,6 @@ local function moai()
|
||||
end
|
||||
end
|
||||
|
||||
-- this is a function that removes all hooks and closes the socket to
|
||||
-- report back to the controller that the debugging is done.
|
||||
-- the script that called `done` can still continue.
|
||||
local function done()
|
||||
if not (isrunning() and server) then return end
|
||||
|
||||
if not jit then
|
||||
for co, debugged in pairs(coroutines) do
|
||||
if debugged then debug.sethook(co) end
|
||||
end
|
||||
end
|
||||
|
||||
debug.sethook()
|
||||
server:close()
|
||||
|
||||
coro_debugger = nil -- to make sure isrunning() returns `false`
|
||||
seen_hook = nil -- to make sure that the next start() call works
|
||||
abort = nil -- to make sure that callback calls use proper "abort" value
|
||||
end
|
||||
|
||||
-- make public functions available
|
||||
mobdebug.setbreakpoint = set_breakpoint
|
||||
mobdebug.removebreakpoint = remove_breakpoint
|
||||
@@ -1494,6 +1548,7 @@ mobdebug.off = off
|
||||
mobdebug.moai = moai
|
||||
mobdebug.coro = coro
|
||||
mobdebug.done = done
|
||||
mobdebug.pause = function() step_into = true end
|
||||
mobdebug.yield = nil -- callback
|
||||
|
||||
-- this is needed to make "require 'modebug'" to work when mobdebug
|
||||
|
||||
@@ -11,6 +11,7 @@ local P = {
|
||||
-- abort further processing.
|
||||
-- For `onEditorPreSave` event it means that file saving will be aborted.
|
||||
-- For `onEditorKeyDown` event it means that the key will be "eaten".
|
||||
-- For `onFiletreeActivate` event it means that no further processing is done.
|
||||
-- For `onEditorCharAdded` event it means that no further processing is done
|
||||
-- (but the character is still added to the editor).
|
||||
|
||||
@@ -26,6 +27,9 @@ local events = {
|
||||
onEditorFocusSet = function(self, editor) end,
|
||||
onEditorKeyDown = function(self, editor, event) end, -- return false
|
||||
onEditorCharAdded = function(self, editor, event) 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,
|
||||
onMenuEditor = function(self, menu, editor, event) end,
|
||||
onMenuEditorTab = function(self, menu, notebook, event, index) end,
|
||||
onMenuFiletree = function(self, menu, tree, event) end,
|
||||
|
||||
@@ -38,7 +38,7 @@ return {
|
||||
isfndef = isfndef,
|
||||
isdecindent = function(str)
|
||||
-- this handles three different cases:
|
||||
local term = str:match("^%s*(%w+)%s*$")
|
||||
local term = str:match("^%s*(%w+)%s*$") or str:match("^%s*(elseif)%s")
|
||||
-- (1) 'end', 'elseif', 'else'
|
||||
local match = term and decindent[term]
|
||||
-- (2) 'end)' and 'end}'
|
||||
@@ -227,8 +227,7 @@ return {
|
||||
keywords = {
|
||||
[[and break do else elseif end for function goto if in local not or repeat return then until while]],
|
||||
|
||||
[[_G _VERSION _ENV false io.stderr io.stdin io.stdout nil math.huge math.pi package.config
|
||||
package.cpath package.loaded package.loaders package.path package.preload package.searchers self true]],
|
||||
[[_G _VERSION _ENV false io.stderr io.stdin io.stdout nil math.huge math.pi self true]],
|
||||
|
||||
[[assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring
|
||||
module next pairs pcall print rawequal rawget rawlen rawset require
|
||||
@@ -247,7 +246,8 @@ return {
|
||||
math.floor math.fmod math.frexp math.ldexp math.log math.log10 math.max math.min math.modf
|
||||
math.pow math.rad math.random math.randomseed math.sin math.sinh math.sqrt math.tan math.tanh
|
||||
os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename os.setlocale os.time os.tmpname
|
||||
package.loadlib package.searchpath package.seeall
|
||||
package.loadlib package.searchpath package.seeall package.config
|
||||
package.cpath package.loaded package.loaders package.path package.preload package.searchers
|
||||
string.byte string.char string.dump string.find string.format string.gmatch string.gsub string.len
|
||||
string.lower string.match string.rep string.reverse string.sub string.upper
|
||||
byte find format gmatch gsub len lower match rep reverse sub upper
|
||||
|
||||
@@ -145,7 +145,7 @@ config = {
|
||||
interpreter = "luadeb", -- the default "project" lua interpreter
|
||||
|
||||
autocomplete = true, -- whether autocomplete is on by default
|
||||
autoanalizer = true, -- whether auto syntax analizer is on by default
|
||||
autoanalyzer = true, -- whether auto syntax analyzer is on by default
|
||||
|
||||
acandtip = {
|
||||
shorttip = false, -- tooltips are compact during typing
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local statusBar = ide.frame.statusBar
|
||||
|
||||
@@ -121,7 +123,7 @@ local function formatUpToX(s, x)
|
||||
return table.concat(t, "\n")
|
||||
end
|
||||
|
||||
local function fillTips(api,apibasename,apiname)
|
||||
local function fillTips(api,apibasename)
|
||||
local apiac = api.ac
|
||||
local tclass = api.tip
|
||||
local tipwidth = math.max(20, ide.config.acandtip.width)
|
||||
@@ -220,7 +222,8 @@ local function resolveAssign(editor,tx)
|
||||
if (key and rest and tab.childs and tab.childs[key]) then
|
||||
return getclass(tab.childs[key],rest)
|
||||
end
|
||||
if (tab.valuetype) then
|
||||
-- process valuetype, but only if it doesn't reference the current tab
|
||||
if (tab.valuetype and tab ~= ac.childs[tab.valuetype]) then
|
||||
return getclass(ac,tab.valuetype.."."..a)
|
||||
end
|
||||
return tab,a
|
||||
@@ -269,7 +272,7 @@ function GetTipInfo(editor, content, short, fullmatch)
|
||||
|
||||
-- try to resolve the class
|
||||
content = content:gsub("%b[]",".0")
|
||||
local tab, rest = resolveAssign(editor, content)
|
||||
local tab = resolveAssign(editor, content)
|
||||
|
||||
local caller = content:match("([%w_]+)%(?%s*$")
|
||||
local class = (tab and tab.classname
|
||||
@@ -385,27 +388,26 @@ local function getEditorLines(editor,line,numlines)
|
||||
editor:PositionFromLine(line),editor:PositionFromLine(line+numlines+1))
|
||||
end
|
||||
|
||||
function DynamicWordsAdd(ev,editor,content,line,numlines)
|
||||
function DynamicWordsAdd(editor,content,line,numlines)
|
||||
if ide.config.acandtip.nodynwords then return end
|
||||
local api = editor.api
|
||||
local content = content or getEditorLines(editor,line,numlines)
|
||||
content = content or getEditorLines(editor,line,numlines)
|
||||
for word in content:gmatch "[%.:]?%s*([a-zA-Z_]+[a-zA-Z_0-9]+)" do
|
||||
addDynamicWord(api,word)
|
||||
end
|
||||
end
|
||||
|
||||
function DynamicWordsRem(ev,editor,content,line,numlines)
|
||||
function DynamicWordsRem(editor,content,line,numlines)
|
||||
if ide.config.acandtip.nodynwords then return end
|
||||
local api = editor.api
|
||||
local content = content or getEditorLines(editor,line,numlines)
|
||||
content = content or getEditorLines(editor,line,numlines)
|
||||
for word in content:gmatch "[%.:]?%s*([a-zA-Z_]+[a-zA-Z_0-9]+)" do
|
||||
removeDynamicWord(api,word)
|
||||
end
|
||||
end
|
||||
|
||||
function DynamicWordsRemoveAll (editor)
|
||||
local tx = editor:GetText()
|
||||
DynamicWordsRem("close",editor,tx)
|
||||
function DynamicWordsRemoveAll(editor)
|
||||
DynamicWordsRem(editor,editor:GetText())
|
||||
end
|
||||
|
||||
------------
|
||||
@@ -414,7 +416,6 @@ end
|
||||
local cachemain = {}
|
||||
local cachemethod = {}
|
||||
local laststrategy
|
||||
local lastmethod
|
||||
local function getAutoCompApiList(childs,fragment,method)
|
||||
fragment = fragment:lower()
|
||||
local strategy = ide.config.acandtip.strategy
|
||||
@@ -503,10 +504,6 @@ local function getAutoCompApiList(childs,fragment,method)
|
||||
return t
|
||||
end
|
||||
|
||||
function ClearAutoCompCache()
|
||||
cache = {}
|
||||
end
|
||||
|
||||
-- make syntype dependent
|
||||
function CreateAutoCompList(editor,key)
|
||||
local api = editor.api
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local frame = ide.frame
|
||||
local notebook = frame.notebook
|
||||
@@ -10,7 +12,6 @@ local unpack = table.unpack or unpack
|
||||
|
||||
local CURRENT_LINE_MARKER = StylesGetMarker("currentline")
|
||||
local CURRENT_LINE_MARKER_VALUE = 2^CURRENT_LINE_MARKER
|
||||
local BREAKPOINT_MARKER = StylesGetMarker("breakpoint")
|
||||
|
||||
function NewFile(filename)
|
||||
filename = filename or ide.config.default.fullname
|
||||
@@ -27,7 +28,7 @@ end
|
||||
-- Find an editor page that hasn't been used at all, eg. an untouched NewFile()
|
||||
local function findUnusedEditor()
|
||||
local editor
|
||||
for id, document in pairs(openDocuments) do
|
||||
for _, document in pairs(openDocuments) do
|
||||
if (document.editor:GetLength() == 0) and
|
||||
(not document.isModified) and (not document.filePath) and
|
||||
not (document.editor:GetReadOnly() == true) then
|
||||
@@ -195,9 +196,9 @@ end
|
||||
|
||||
local function getExtsString()
|
||||
local knownexts = ""
|
||||
for i,spec in pairs(ide.specs) do
|
||||
for _,spec in pairs(ide.specs) do
|
||||
if (spec.exts) then
|
||||
for n,ext in ipairs(spec.exts) do
|
||||
for _,ext in ipairs(spec.exts) do
|
||||
knownexts = knownexts.."*."..ext..";"
|
||||
end
|
||||
end
|
||||
@@ -213,11 +214,12 @@ function ReportError(msg)
|
||||
end
|
||||
|
||||
function OpenFile(event)
|
||||
local exts = getExtsString()
|
||||
local editor = GetEditor()
|
||||
local path = editor and ide:GetDocument(editor):GetFilePath() or nil
|
||||
local fileDialog = wx.wxFileDialog(ide.frame, TR("Open file"),
|
||||
(path and GetPathWithSep(path) or FileTreeGetDir() or ""),
|
||||
"",
|
||||
"",
|
||||
exts,
|
||||
getExtsString(),
|
||||
wx.wxFD_OPEN + wx.wxFD_FILE_MUST_EXIST)
|
||||
if fileDialog:ShowModal() == wx.wxID_OK then
|
||||
if not LoadFile(fileDialog:GetPath(), nil, true) then
|
||||
@@ -343,7 +345,7 @@ function SaveFileAs(editor)
|
||||
end
|
||||
|
||||
function SaveAll(quiet)
|
||||
for id, document in pairs(openDocuments) do
|
||||
for _, document in pairs(openDocuments) do
|
||||
local editor = document.editor
|
||||
local filePath = document.filePath
|
||||
|
||||
@@ -471,7 +473,7 @@ function SaveModifiedDialog(editor, allow_cancel)
|
||||
end
|
||||
|
||||
function SaveOnExit(allow_cancel)
|
||||
for id, document in pairs(openDocuments) do
|
||||
for _, document in pairs(openDocuments) do
|
||||
if (SaveModifiedDialog(document.editor, allow_cancel) == wx.wxID_CANCEL) then
|
||||
return false
|
||||
end
|
||||
@@ -547,9 +549,8 @@ function EnsureRangeVisible(posStart, posEnd)
|
||||
end
|
||||
|
||||
function SetAllEditorsReadOnly(enable)
|
||||
for id, document in pairs(openDocuments) do
|
||||
local editor = document.editor
|
||||
editor:SetReadOnly(enable)
|
||||
for _, document in pairs(openDocuments) do
|
||||
document.editor:SetReadOnly(enable)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -557,9 +558,8 @@ end
|
||||
-- Debug related
|
||||
|
||||
function ClearAllCurrentLineMarkers()
|
||||
for id, document in pairs(openDocuments) do
|
||||
local editor = document.editor
|
||||
editor:MarkerDeleteAll(CURRENT_LINE_MARKER)
|
||||
for _, document in pairs(openDocuments) do
|
||||
document.editor:MarkerDeleteAll(CURRENT_LINE_MARKER)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -640,7 +640,7 @@ end
|
||||
|
||||
function GetOpenFiles()
|
||||
local opendocs = {}
|
||||
for id, document in pairs(ide.openDocuments) do
|
||||
for _, document in pairs(ide.openDocuments) do
|
||||
if (document.filePath) then
|
||||
local wxfname = wx.wxFileName(document.filePath)
|
||||
wxfname:Normalize()
|
||||
@@ -659,7 +659,7 @@ function GetOpenFiles()
|
||||
end
|
||||
|
||||
function SetOpenFiles(nametab,params)
|
||||
for i,doc in ipairs(nametab) do
|
||||
for _, doc in ipairs(nametab) do
|
||||
local editor = LoadFile(doc.filename,nil,true,true) -- skip selection
|
||||
if editor then editor:GotoPosDelayed(doc.cursorpos or 0) end
|
||||
end
|
||||
@@ -668,6 +668,8 @@ function SetOpenFiles(nametab,params)
|
||||
end
|
||||
|
||||
local beforeFullScreenPerspective
|
||||
local statusbarShown
|
||||
|
||||
function ShowFullScreen(setFullScreen)
|
||||
if setFullScreen then
|
||||
beforeFullScreenPerspective = uimgr:SavePerspective()
|
||||
@@ -684,21 +686,24 @@ function ShowFullScreen(setFullScreen)
|
||||
beforeFullScreenPerspective = nil
|
||||
end
|
||||
|
||||
-- On OSX, toolbar and status bar are not hidden when switched to
|
||||
-- On OSX, status bar is not hidden when switched to
|
||||
-- full screen: http://trac.wxwidgets.org/ticket/14259; do manually.
|
||||
-- need to turn off before showing full screen and turn on after,
|
||||
-- otherwise the window is restored incorrectly and is reduced in size.
|
||||
if ide.osname == 'Macintosh' and setFullScreen then
|
||||
statusbarShown = frame:GetStatusBar():IsShown()
|
||||
frame:GetStatusBar():Hide()
|
||||
frame:GetToolBar():Hide()
|
||||
end
|
||||
|
||||
-- protect from systems that don't have ShowFullScreen (GTK on linux?)
|
||||
pcall(function() frame:ShowFullScreen(setFullScreen) end)
|
||||
|
||||
if ide.osname == 'Macintosh' and not setFullScreen then
|
||||
frame:GetStatusBar():Show()
|
||||
frame:GetToolBar():Show()
|
||||
if statusbarShown then
|
||||
frame:GetStatusBar():Show()
|
||||
-- refresh AuiManager as the statusbar may be shown below the border
|
||||
uimgr:Update()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -733,7 +738,7 @@ end
|
||||
|
||||
local function getOpenTabs()
|
||||
local opendocs = {}
|
||||
for id, document in pairs(ide.openDocuments) do
|
||||
for _, document in pairs(ide.openDocuments) do
|
||||
table.insert(opendocs, {
|
||||
filename = document.filePath,
|
||||
tabname = notebook:GetPageText(document.index),
|
||||
@@ -870,6 +875,12 @@ local function closeWindow(event)
|
||||
|
||||
PackageEventHandle("onAppClose")
|
||||
|
||||
-- first need to detach all processes IDE has launched as the current
|
||||
-- process is likely to terminate before child processes are terminated,
|
||||
-- which may lead to a crash when EVT_END_PROCESS event is called.
|
||||
DetachChildProcess()
|
||||
DebuggerShutdown()
|
||||
|
||||
SettingsSaveAll()
|
||||
ide.settings:Flush()
|
||||
|
||||
@@ -884,12 +895,6 @@ local function closeWindow(event)
|
||||
frame.uimgr:UnInit()
|
||||
frame:Hide() -- hide the main frame while the IDE exits
|
||||
|
||||
-- first need to detach all processes IDE has launched as the current
|
||||
-- process is likely to terminate before child processes are terminated,
|
||||
-- which may lead to a crash when EVT_END_PROCESS event is called.
|
||||
DetachChildProcess()
|
||||
DebuggerShutdown()
|
||||
|
||||
if ide.session.timer then ide.session.timer:Stop() end
|
||||
|
||||
event:Skip()
|
||||
@@ -923,3 +928,15 @@ if ide.config.autorecoverinactivity then
|
||||
-- check at least 5s to be never more than 5s off
|
||||
ide.session.timer:Start(math.min(5, ide.config.autorecoverinactivity)*1000)
|
||||
end
|
||||
|
||||
function PaneFloatToggle(window)
|
||||
local pane = uimgr:GetPane(window)
|
||||
if pane:IsFloating() then
|
||||
pane:Dock()
|
||||
else
|
||||
pane:Float()
|
||||
pane:FloatingPosition(pane.window:GetScreenPosition())
|
||||
pane:FloatingSize(pane.window:GetSize())
|
||||
end
|
||||
uimgr:Update()
|
||||
end
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
-- Integration with MobDebug
|
||||
-- Copyright 2011-13 Paul Kulchenko, ZeroBrane LLC
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- Original authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
-- Integration with MobDebug
|
||||
---------------------------------------------------------
|
||||
|
||||
local copas = require "copas"
|
||||
local socket = require "socket"
|
||||
@@ -9,14 +10,15 @@ local mobdebug = require "mobdebug"
|
||||
local unpack = table.unpack or unpack
|
||||
|
||||
local ide = ide
|
||||
local debugger = ide.debugger
|
||||
local debugger = setmetatable(ide.debugger, ide.proto.Debugger)
|
||||
debugger.server = nil -- DebuggerServer object when debugging, else nil
|
||||
debugger.running = false -- true when the debuggee is running
|
||||
debugger.listening = false -- true when the debugger is listening for a client
|
||||
debugger.portnumber = ide.config.debugger.port or mobdebug.port -- the port # to use for debugging
|
||||
debugger.watchCtrl = nil -- the watch ctrl that shows watch information
|
||||
debugger.stackCtrl = nil -- the stack ctrl that shows stack information
|
||||
debugger.toggleview = { stackpanel = false, watchpanel = false }
|
||||
debugger.toggleview = {
|
||||
stackpanel = false, watchpanel = false, toolbar = true }
|
||||
debugger.hostname = ide.config.debugger.hostname or (function()
|
||||
local hostname = socket.dns.gethostname()
|
||||
return hostname and socket.dns.toip(hostname) and hostname or "localhost"
|
||||
@@ -209,10 +211,12 @@ local function debuggerToggleViews(show)
|
||||
local mgr = ide.frame.uimgr
|
||||
local refresh = false
|
||||
for view, needed in pairs(debugger.toggleview) do
|
||||
local bar = view == 'toolbar'
|
||||
local pane = mgr:GetPane(view)
|
||||
if show then -- starting debugging and pane is not shown
|
||||
debugger.toggleview[view] = not pane:IsShown()
|
||||
if debugger.toggleview[view] and needed then
|
||||
if debugger.toggleview[view] and (needed or bar)
|
||||
and (not bar or not ide.frame:IsFullScreen()) then
|
||||
pane:Show()
|
||||
refresh = true
|
||||
end
|
||||
@@ -406,7 +410,6 @@ debugger.shell = function(expression, isstatement)
|
||||
DisplayShellErr(err)
|
||||
elseif addedret or #values > 0 then
|
||||
if forceexpression then -- display elements as multi-line
|
||||
local mobdebug = require "mobdebug"
|
||||
for i,v in pairs(values) do -- stringify each of the returned values
|
||||
local func = loadstring('return '..v) -- deserialize the value first
|
||||
if func then -- if it's deserialized correctly
|
||||
@@ -442,7 +445,20 @@ local function stoppedAtBreakpoint(file, line)
|
||||
return breakpoint > -1 and breakpoint == current
|
||||
end
|
||||
|
||||
debugger.listen = function()
|
||||
debugger.listen = function(start)
|
||||
if start == false then
|
||||
if debugger.listening then
|
||||
debugger.terminate() -- terminate if running
|
||||
copas.removeserver(debugger.listening)
|
||||
DisplayOutputLn(TR("Debugger server stopped at %s:%d.")
|
||||
:format(debugger.hostname, debugger.portnumber))
|
||||
debugger.listening = false
|
||||
else
|
||||
DisplayOutputLn(TR("Can't stop debugger server as it is not started."))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
local server, err = socket.bind("*", debugger.portnumber)
|
||||
if not server then
|
||||
DisplayOutputLn(TR("Can't start debugger server at %s:%d: %s.")
|
||||
@@ -487,7 +503,7 @@ debugger.listen = function()
|
||||
debugger.editormap = {}
|
||||
|
||||
local wxfilepath = GetEditorFileAndCurInfo()
|
||||
local startfile = options.startfile or options.startwith
|
||||
local startfile = options.startwith
|
||||
or (wxfilepath and wxfilepath:GetFullPath())
|
||||
|
||||
if not startfile then
|
||||
@@ -657,7 +673,7 @@ debugger.listen = function()
|
||||
end
|
||||
end
|
||||
end)
|
||||
debugger.listening = true
|
||||
debugger.listening = server
|
||||
end
|
||||
|
||||
debugger.handle = function(command, server, options)
|
||||
@@ -746,6 +762,18 @@ debugger.handleAsync = function(command)
|
||||
copas.addthread(function () debugger.handle(command) end)
|
||||
end
|
||||
end
|
||||
debugger.handleDirect = function(command)
|
||||
local sock = debugger.socket
|
||||
if debugger.server and sock then
|
||||
local running = debugger.running
|
||||
-- this needs to be short as it will block the UI
|
||||
sock:settimeout(0.25)
|
||||
debugger.handle(command, sock)
|
||||
sock:settimeout(0)
|
||||
-- restore running status
|
||||
debugger.running = running
|
||||
end
|
||||
end
|
||||
|
||||
debugger.loadfile = function(file)
|
||||
return debugger.handle("load " .. file)
|
||||
@@ -813,6 +841,7 @@ end
|
||||
debugger.over = function() debugger.exec("over") end
|
||||
debugger.out = function() debugger.exec("out") end
|
||||
debugger.run = function() debugger.exec("run") end
|
||||
debugger.detach = function() debugger.exec("done") end
|
||||
debugger.evaluate = function(expression) return debugger.handle('eval ' .. expression) end
|
||||
debugger.execute = function(expression) return debugger.handle('exec ' .. expression) end
|
||||
debugger.stack = function() return debugger.handle('stack') end
|
||||
@@ -839,7 +868,10 @@ debugger.breaknow = function(command)
|
||||
end
|
||||
end
|
||||
debugger.breakpoint = function(file, line, state)
|
||||
debugger.handleAsync((state and "setb " or "delb ") .. file .. " " .. line)
|
||||
if debugger.running then
|
||||
return debugger.handleDirect((state and "asetb " or "adelb ") .. file .. " " .. line)
|
||||
end
|
||||
return debugger.handleAsync((state and "setb " or "delb ") .. file .. " " .. line)
|
||||
end
|
||||
debugger.quickeval = function(var, callback)
|
||||
if debugger.server and not debugger.running
|
||||
@@ -876,10 +908,12 @@ function debuggerAddWindow(ctrl, panel, name)
|
||||
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 mgr = ide.frame.uimgr
|
||||
mgr:AddPane(notebook, wxaui.wxAuiPaneInfo():
|
||||
Name(panel):Float():
|
||||
Name(panel):Float():CaptionVisible(false):PaneBorder(false):
|
||||
MinSize(width/2,height/2):
|
||||
BestSize(width,height):FloatingSize(width,height):
|
||||
PinButton(true):Hide())
|
||||
@@ -1095,10 +1129,9 @@ function DebuggerShutdown()
|
||||
if debugger.pid then killClient() end
|
||||
end
|
||||
|
||||
function DebuggerStop()
|
||||
function DebuggerStop(resetpid)
|
||||
if (debugger.server) then
|
||||
debugger.server = nil
|
||||
debugger.pid = nil
|
||||
SetAllEditorsReadOnly(false)
|
||||
ShellSupportRemote(nil)
|
||||
ClearAllCurrentLineMarkers()
|
||||
@@ -1112,6 +1145,8 @@ function DebuggerStop()
|
||||
-- no debugger.server, but scratchpad may still be on. Turn it off.
|
||||
DebuggerScratchpadOff()
|
||||
end
|
||||
-- reset pid for "running" (not debugged) processes
|
||||
if resetpid then debugger.pid = nil end
|
||||
end
|
||||
|
||||
function DebuggerMakeFileName(editor, filePath)
|
||||
@@ -1119,8 +1154,6 @@ function DebuggerMakeFileName(editor, filePath)
|
||||
end
|
||||
|
||||
function DebuggerToggleBreakpoint(editor, line)
|
||||
-- ignore requests to toggle when the debugger is running
|
||||
if debugger.server and debugger.running then return end
|
||||
local markers = editor:MarkerGet(line)
|
||||
local id = editor:GetId()
|
||||
local filePath = debugger.editormap and debugger.editormap[editor]
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
-- Copyright 2011-13 Paul Kulchenko, ZeroBrane LLC
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
local wxkeywords = nil -- a string of the keywords for scintilla of wxLua's wx.XXX items
|
||||
|
||||
local editorID = 100 -- window id to create editor pages with, incremented for new editors
|
||||
|
||||
@@ -14,8 +13,24 @@ local edcfg = ide.config.editor
|
||||
local styles = ide.config.styles
|
||||
local unpack = table.unpack or unpack
|
||||
|
||||
local DEFAULT_STYLE = 32
|
||||
local margin = { LINENUMBER = 0, MARKER = 1, FOLD = 2 }
|
||||
local linenummask = "99999"
|
||||
local foldtypes = {
|
||||
[0] = { wxstc.wxSTC_MARKNUM_FOLDEROPEN, wxstc.wxSTC_MARKNUM_FOLDER,
|
||||
wxstc.wxSTC_MARKNUM_FOLDERSUB, wxstc.wxSTC_MARKNUM_FOLDERTAIL, wxstc.wxSTC_MARKNUM_FOLDEREND,
|
||||
wxstc.wxSTC_MARKNUM_FOLDEROPENMID, wxstc.wxSTC_MARKNUM_FOLDERMIDTAIL,
|
||||
},
|
||||
box = { wxstc.wxSTC_MARK_BOXMINUS, wxstc.wxSTC_MARK_BOXPLUS,
|
||||
wxstc.wxSTC_MARK_VLINE, wxstc.wxSTC_MARK_LCORNER, wxstc.wxSTC_MARK_BOXPLUSCONNECTED,
|
||||
wxstc.wxSTC_MARK_BOXMINUSCONNECTED, wxstc.wxSTC_MARK_TCORNER,
|
||||
},
|
||||
circle = { wxstc.wxSTC_MARK_CIRCLEMINUS, wxstc.wxSTC_MARK_CIRCLEPLUS,
|
||||
wxstc.wxSTC_MARK_VLINE, wxstc.wxSTC_MARK_LCORNERCURVE, wxstc.wxSTC_MARK_CIRCLEPLUSCONNECTED,
|
||||
wxstc.wxSTC_MARK_CIRCLEMINUSCONNECTED, wxstc.wxSTC_MARK_TCORNERCURVE,
|
||||
},
|
||||
plus = { wxstc.wxSTC_MARK_MINUS, wxstc.wxSTC_MARK_PLUS },
|
||||
arrow = { wxstc.wxSTC_MARK_ARROWDOWN, wxstc.wxSTC_MARK_ARROW },
|
||||
}
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Update the statusbar text of the frame using the given editor.
|
||||
@@ -453,7 +468,7 @@ function IndicateIfNeeded()
|
||||
local editor = GetEditor()
|
||||
-- do the current one first
|
||||
if delayed[editor] then return IndicateAll(editor) end
|
||||
for editor in pairs(delayed) do return IndicateAll(editor) end
|
||||
for ed in pairs(delayed) do return IndicateAll(ed) end
|
||||
end
|
||||
|
||||
-- find all instances of a symbol at pos
|
||||
@@ -547,9 +562,12 @@ function IndicateAll(editor, lines, linee)
|
||||
while vars do
|
||||
for name, var in pairs(vars) do
|
||||
-- remove all variables that are created later than the current pos
|
||||
while type(var) == 'table' and var.fpos and (var.fpos > pos) do
|
||||
var = var.masked -- restored a masked var
|
||||
vars[name] = var
|
||||
-- skip all non-variable elements from the vars table
|
||||
if type(name) == 'string' then
|
||||
while type(var) == 'table' and var.fpos and (var.fpos > pos) do
|
||||
var = var.masked -- restored a masked var
|
||||
vars[name] = var
|
||||
end
|
||||
end
|
||||
end
|
||||
vars = getmetatable(vars) and getmetatable(vars).__index
|
||||
@@ -614,7 +632,7 @@ function IndicateAll(editor, lines, linee)
|
||||
end
|
||||
|
||||
-- clear indicators till the end of processed fragment
|
||||
local pos = delayed[editor] and delayed[editor][1] or editor:GetLength()+1
|
||||
pos = delayed[editor] and delayed[editor][1] or editor:GetLength()+1
|
||||
|
||||
-- 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);
|
||||
@@ -624,7 +642,7 @@ function IndicateAll(editor, lines, linee)
|
||||
return delayed[editor] ~= nil -- request more events if still need to work
|
||||
end
|
||||
|
||||
if ide.wxver < "2.9.5" or not ide.config.autoanalizer then
|
||||
if ide.wxver < "2.9.5" or not ide.config.autoanalyzer then
|
||||
IndicateAll = indicateFunctionsOnly end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
@@ -632,7 +650,7 @@ if ide.wxver < "2.9.5" or not ide.config.autoanalizer then
|
||||
function CreateEditor()
|
||||
local editor = wxstc.wxStyledTextCtrl(notebook, editorID,
|
||||
wx.wxDefaultPosition, wx.wxSize(0, 0),
|
||||
wx.wxBORDER_STATIC)
|
||||
wx.wxBORDER_NONE)
|
||||
|
||||
editorID = editorID + 1 -- increment so they're always unique
|
||||
|
||||
@@ -650,7 +668,7 @@ function CreateEditor()
|
||||
end
|
||||
|
||||
-- populate editor keymap with configured combinations
|
||||
for _, map in ipairs(ide.config.editor.keymap) do
|
||||
for _, map in ipairs(edcfg.keymap) do
|
||||
local key, mod, cmd, os = unpack(map)
|
||||
if not os or os == ide.osname then
|
||||
if cmd then
|
||||
@@ -667,46 +685,57 @@ function CreateEditor()
|
||||
editor:SetFont(ide.font.eNormal)
|
||||
editor:StyleSetFont(wxstc.wxSTC_STYLE_DEFAULT, ide.font.eNormal)
|
||||
|
||||
editor:SetTabWidth(ide.config.editor.tabwidth or 2)
|
||||
editor:SetIndent(ide.config.editor.tabwidth or 2)
|
||||
editor:SetUseTabs(ide.config.editor.usetabs and true or false)
|
||||
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:SetViewWhiteSpace(ide.config.editor.whitespace and true or false)
|
||||
editor:SetViewWhiteSpace(edcfg.whitespace and true or false)
|
||||
|
||||
if (ide.config.editor.usewrap) then
|
||||
if (edcfg.usewrap) then
|
||||
editor:SetWrapMode(wxstc.wxSTC_WRAP_WORD)
|
||||
editor:SetWrapStartIndent(0)
|
||||
editor:SetWrapVisualFlagsLocation(wxstc.wxSTC_WRAPVISUALFLAGLOC_END_BY_TEXT)
|
||||
if ide.wxver >= "2.9.5" and edcfg.wrapflags then
|
||||
editor:SetWrapVisualFlags(tonumber(edcfg.wrapflags) or wxstc.wxSTC_WRAPVISUALFLAG_NONE)
|
||||
end
|
||||
else
|
||||
editor:SetScrollWidth(100) -- set default width
|
||||
editor:SetScrollWidthTracking(1) -- enable width auto-adjustment
|
||||
end
|
||||
|
||||
if (ide.config.editor.defaulteol == wxstc.wxSTC_EOL_CRLF
|
||||
or ide.config.editor.defaulteol == wxstc.wxSTC_EOL_LF) then
|
||||
editor:SetEOLMode(ide.config.editor.defaulteol)
|
||||
if edcfg.defaulteol == wxstc.wxSTC_EOL_CRLF
|
||||
or edcfg.defaulteol == wxstc.wxSTC_EOL_LF then
|
||||
editor:SetEOLMode(edcfg.defaulteol)
|
||||
-- else: keep wxStyledTextCtrl default behavior (CRLF on Windows, LF on Unix)
|
||||
end
|
||||
|
||||
editor:SetCaretLineVisible(ide.config.editor.caretline and 1 or 0)
|
||||
editor:SetCaretLineVisible(edcfg.caretline and true or false)
|
||||
|
||||
editor:SetVisiblePolicy(wxstc.wxSTC_VISIBLE_STRICT, 3)
|
||||
|
||||
editor:SetMarginWidth(margin.LINENUMBER, editor:TextWidth(DEFAULT_STYLE, "99999_"))
|
||||
editor:SetMarginWidth(margin.LINENUMBER,
|
||||
editor:TextWidth(wxstc.wxSTC_STYLE_DEFAULT, linenummask))
|
||||
|
||||
editor:SetMarginWidth(margin.MARKER, 16)
|
||||
editor:SetMarginWidth(margin.MARKER, 18)
|
||||
editor:SetMarginType(margin.MARKER, wxstc.wxSTC_MARGIN_SYMBOL)
|
||||
editor:SetMarginMask(margin.MARKER, bit.bnot(wxstc.wxSTC_MASK_FOLDERS))
|
||||
editor:SetMarginSensitive(margin.MARKER, true)
|
||||
|
||||
editor:MarkerDefine(StylesGetMarker("currentline"))
|
||||
editor:MarkerDefine(StylesGetMarker("breakpoint"))
|
||||
editor:MarkerDefine(StylesGetMarker("bookmark"))
|
||||
|
||||
if ide.config.editor.fold then
|
||||
editor:SetMarginWidth(margin.FOLD, 16)
|
||||
if edcfg.fold then
|
||||
editor:SetMarginWidth(margin.FOLD, 18)
|
||||
editor:SetMarginType(margin.FOLD, wxstc.wxSTC_MARGIN_SYMBOL)
|
||||
editor:SetMarginMask(margin.FOLD, wxstc.wxSTC_MASK_FOLDERS)
|
||||
editor:SetMarginSensitive(margin.FOLD, true)
|
||||
end
|
||||
|
||||
editor:SetFoldFlags(wxstc.wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED +
|
||||
wxstc.wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED)
|
||||
editor:SetFoldFlags(tonumber(edcfg.foldflags) or wxstc.wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED)
|
||||
|
||||
if ide.wxver >= "2.9.5" then
|
||||
editor:SetExtraAscent(tonumber(edcfg.extraascent) or 0)
|
||||
end
|
||||
|
||||
-- allow multiple selection and multi-cursor editing if supported
|
||||
if ide.wxver >= "2.9.5" then
|
||||
@@ -717,18 +746,16 @@ function CreateEditor()
|
||||
|
||||
do
|
||||
local fg, bg = wx.wxWHITE, wx.wxColour(128, 128, 128)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPEN, wxstc.wxSTC_MARK_BOXMINUS, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDER, wxstc.wxSTC_MARK_BOXPLUS, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERSUB, wxstc.wxSTC_MARK_VLINE, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERTAIL, wxstc.wxSTC_MARK_LCORNER, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEREND, wxstc.wxSTC_MARK_BOXPLUSCONNECTED, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPENMID, wxstc.wxSTC_MARK_BOXMINUSCONNECTED, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERMIDTAIL, wxstc.wxSTC_MARK_TCORNER, fg, bg)
|
||||
local foldtype = foldtypes[edcfg.foldtype] or foldtypes.box
|
||||
local foldmarkers = foldtypes[0]
|
||||
for m = 1, #foldmarkers do
|
||||
editor:MarkerDefine(foldmarkers[m], foldtype[m] or wxstc.wxSTC_MARK_EMPTY, fg, bg)
|
||||
end
|
||||
bg:delete()
|
||||
end
|
||||
|
||||
if ide.config.editor.calltipdelay and ide.config.editor.calltipdelay > 0 then
|
||||
editor:SetMouseDwellTime(ide.config.editor.calltipdelay)
|
||||
if edcfg.calltipdelay and edcfg.calltipdelay > 0 then
|
||||
editor:SetMouseDwellTime(edcfg.calltipdelay)
|
||||
end
|
||||
|
||||
editor:AutoCompSetIgnoreCase(ide.config.acandtip.ignorecase)
|
||||
@@ -769,10 +796,10 @@ function CreateEditor()
|
||||
editor:Connect(wxstc.wxEVT_STC_MARGINCLICK,
|
||||
function (event)
|
||||
local line = editor:LineFromPosition(event:GetPosition())
|
||||
local margin = event:GetMargin()
|
||||
if margin == 1 then
|
||||
local marginno = event:GetMargin()
|
||||
if marginno == margin.MARKER then
|
||||
DebuggerToggleBreakpoint(editor, line)
|
||||
elseif margin == 2 then
|
||||
elseif marginno == margin.FOLD then
|
||||
if wx.wxGetKeyState(wx.WXK_SHIFT) and wx.wxGetKeyState(wx.WXK_CONTROL) then
|
||||
FoldSome()
|
||||
else
|
||||
@@ -793,22 +820,22 @@ function CreateEditor()
|
||||
if (bit.band(evtype,wxstc.wxSTC_MOD_INSERTTEXT) ~= 0) then
|
||||
SetAutoRecoveryMark()
|
||||
table.insert(editor.ev,{event:GetPosition(),event:GetLinesAdded()})
|
||||
DynamicWordsAdd("post",editor,nil,editor:LineFromPosition(event:GetPosition()),event:GetLinesAdded())
|
||||
DynamicWordsAdd(editor,nil,editor:LineFromPosition(event:GetPosition()),event:GetLinesAdded())
|
||||
end
|
||||
if (bit.band(evtype,wxstc.wxSTC_MOD_DELETETEXT) ~= 0) then
|
||||
SetAutoRecoveryMark()
|
||||
table.insert(editor.ev,{event:GetPosition(),0})
|
||||
DynamicWordsAdd("post",editor,nil,editor:LineFromPosition(event:GetPosition()),0)
|
||||
DynamicWordsAdd(editor,nil,editor:LineFromPosition(event:GetPosition()),0)
|
||||
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("pre",editor,nil,editor:LineFromPosition(event:GetPosition()), numlines)
|
||||
DynamicWordsRem(editor,nil,editor:LineFromPosition(event:GetPosition()), numlines)
|
||||
end
|
||||
if (bit.band(evtype,wxstc.wxSTC_MOD_BEFOREINSERT) ~= 0) then
|
||||
DynamicWordsRem("pre",editor,nil,editor:LineFromPosition(event:GetPosition()), 0)
|
||||
DynamicWordsRem(editor,nil,editor:LineFromPosition(event:GetPosition()), 0)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -842,7 +869,7 @@ function CreateEditor()
|
||||
local ut = editor:GetUseTabs()
|
||||
local tw = ut and editor:GetTabWidth() or editor:GetIndent()
|
||||
|
||||
if ide.config.editor.smartindent
|
||||
if edcfg.smartindent
|
||||
and editor.spec.isdecindent and editor.spec.isincindent then
|
||||
local closed, blockend = editor.spec.isdecindent(linedone)
|
||||
local opened = editor.spec.isincindent(linedone)
|
||||
@@ -873,9 +900,9 @@ function CreateEditor()
|
||||
|
||||
elseif ide.config.autocomplete then -- code completion prompt
|
||||
local trigger = linetxtopos:match("["..editor.spec.sep.."%w_]+$")
|
||||
if (trigger and (#trigger > 1 or trigger:match("["..editor.spec.sep.."]"))) then
|
||||
editor.autocomplete = true
|
||||
end
|
||||
-- make sure .autocomplete is never `nil` or editor.autocomplete fails
|
||||
editor.autocomplete = trigger and (#trigger > 1 or trigger:match("["..editor.spec.sep.."]"))
|
||||
and true or false
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -978,7 +1005,7 @@ function CreateEditor()
|
||||
if ide.osname == 'Windows' then
|
||||
updateStatusText(editor)
|
||||
|
||||
if ide.config.editor.usewrap ~= true and editor:AutoCompActive() then
|
||||
if edcfg.usewrap ~= true and editor:AutoCompActive() then
|
||||
-- showing auto-complete list leaves artifacts on the screen,
|
||||
-- which can only be fixed by a forced refresh.
|
||||
-- shows with wxSTC 3.21 and both wxwidgets 2.9.5 and 3.1
|
||||
@@ -1009,7 +1036,10 @@ function CreateEditor()
|
||||
firstvisible)
|
||||
MarkupStyle(editor,minupdated or firstline,lastline)
|
||||
editor.ev = {}
|
||||
end)
|
||||
|
||||
editor:Connect(wx.wxEVT_IDLE,
|
||||
function (event)
|
||||
-- show auto-complete if needed
|
||||
if editor.autocomplete then
|
||||
EditorAutoComplete(editor)
|
||||
@@ -1041,7 +1071,7 @@ function CreateEditor()
|
||||
event:Skip()
|
||||
end)
|
||||
|
||||
if ide.config.editor.nomousezoom then
|
||||
if edcfg.nomousezoom then
|
||||
-- disable zoom using mouse wheel as it triggers zooming when scrolling
|
||||
-- on OSX with kinetic scroll and then pressing CMD.
|
||||
editor:Connect(wx.wxEVT_MOUSEWHEEL,
|
||||
@@ -1093,8 +1123,18 @@ function CreateEditor()
|
||||
and (mod == wx.wxMOD_NONE) then
|
||||
-- Delete and Backspace behave the same way for selected text
|
||||
if #(editor:GetSelectedText()) > 0 then
|
||||
editor:SetTargetStart(editor:GetSelectionStart())
|
||||
editor:SetTargetEnd(editor:GetSelectionEnd())
|
||||
local length = editor:GetLength()
|
||||
local selections = ide.wxver >= "2.9.5" and editor:GetSelections() or 1
|
||||
editor:Clear() -- remove selected fragments
|
||||
|
||||
-- check if the modification has failed, which may happen
|
||||
-- if there is "invisible" text in the selected fragment.
|
||||
-- if there is only one selection, then delete manually.
|
||||
if length == editor:GetLength() and selections == 1 then
|
||||
editor:SetTargetStart(editor:GetSelectionStart())
|
||||
editor:SetTargetEnd(editor:GetSelectionEnd())
|
||||
editor:ReplaceTarget("")
|
||||
end
|
||||
else
|
||||
local pos = editor:GetCurrentPos()
|
||||
if keycode == wx.WXK_BACK then
|
||||
@@ -1114,8 +1154,8 @@ function CreateEditor()
|
||||
|
||||
editor:SetTargetStart(pos)
|
||||
editor:SetTargetEnd(pos+1)
|
||||
editor:ReplaceTarget("")
|
||||
end
|
||||
editor:ReplaceTarget("")
|
||||
elseif mod == wx.wxMOD_ALT and keycode == wx.WXK_LEFT then
|
||||
-- if no "jump back" is needed, then do normal processing as this
|
||||
-- combination can be mapped to some action
|
||||
@@ -1135,7 +1175,7 @@ function CreateEditor()
|
||||
local function selectAllInstances(instances, name, curpos)
|
||||
local this
|
||||
local idx = 0
|
||||
for i, pos in pairs(instances) do
|
||||
for _, pos in pairs(instances) do
|
||||
pos = pos - 1 -- positions are 0-based in Scintilla
|
||||
if idx == 0 then
|
||||
-- clear selections first as there seems to be a bug (Scintilla 3.2.3)
|
||||
@@ -1171,11 +1211,12 @@ function CreateEditor()
|
||||
|
||||
editor:Connect(wxstc.wxEVT_STC_ZOOM,
|
||||
function(event)
|
||||
editor:SetMarginWidth(margin.LINENUMBER, editor:TextWidth(DEFAULT_STYLE, "99999_"))
|
||||
editor:SetMarginWidth(margin.LINENUMBER,
|
||||
editor:TextWidth(wxstc.wxSTC_STYLE_DEFAULT, linenummask))
|
||||
-- if Shift+Zoom is used, then zoom all editors, not just the current one
|
||||
if wx.wxGetKeyState(wx.WXK_SHIFT) then
|
||||
local zoom = editor:GetZoom()
|
||||
for id, doc in pairs(openDocuments) do
|
||||
for _, doc in pairs(openDocuments) do
|
||||
-- check the editor zoom level to avoid recursion
|
||||
if doc.editor:GetZoom() ~= zoom then doc.editor:SetZoom(zoom) end
|
||||
end
|
||||
@@ -1317,25 +1358,6 @@ function SetupKeywords(editor, ext, forcespec, styles, font, fontitalic)
|
||||
end
|
||||
end
|
||||
|
||||
if (spec.api == "lua") then
|
||||
-- Get the items in the global "wx" table for autocompletion
|
||||
if not wxkeywords then
|
||||
local keyword_table = {}
|
||||
for index in pairs(wx) do
|
||||
table.insert(keyword_table, "wx."..index.." ")
|
||||
end
|
||||
|
||||
for index in pairs(wxstc) do
|
||||
table.insert(keyword_table, "wxstc."..index.." ")
|
||||
end
|
||||
|
||||
table.sort(keyword_table)
|
||||
wxkeywords = table.concat(keyword_table)
|
||||
end
|
||||
local offset = spec.keywords and #spec.keywords or 5
|
||||
editor:SetKeyWords(offset, wxkeywords)
|
||||
end
|
||||
|
||||
editor.api = GetApi(spec.apitype or "none")
|
||||
editor.spec = spec
|
||||
else
|
||||
@@ -1348,10 +1370,10 @@ function SetupKeywords(editor, ext, forcespec, styles, font, fontitalic)
|
||||
|
||||
-- need to set folding property after lexer is set, otherwise
|
||||
-- the folds are not shown (wxwidgets 2.9.5)
|
||||
if ide.config.editor.fold then
|
||||
if edcfg.fold then
|
||||
editor:SetProperty("fold", "1")
|
||||
editor:SetProperty("fold.html", "1")
|
||||
editor:SetProperty("fold.compact", ide.config.editor.foldcompact and "1" or "0")
|
||||
editor:SetProperty("fold.compact", edcfg.foldcompact and "1" or "0")
|
||||
editor:SetProperty("fold.comment", "1")
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
--
|
||||
-- filetree, treectrl for drive & project
|
||||
@@ -78,9 +80,11 @@ local function treeAddDir(tree,parent_id,rootdir)
|
||||
end
|
||||
|
||||
-- cache the mapping from names to tree items
|
||||
local data = wx.wxLuaTreeItemData()
|
||||
data:SetData(cache)
|
||||
tree:SetItemData(parent_id, data)
|
||||
if ide.wxver >= "2.9.5" then
|
||||
local data = wx.wxLuaTreeItemData()
|
||||
data:SetData(cache)
|
||||
tree:SetItemData(parent_id, data)
|
||||
end
|
||||
|
||||
tree:SetItemHasChildren(parent_id,
|
||||
tree:GetChildrenCount(parent_id, false) > 0)
|
||||
@@ -136,6 +140,13 @@ end
|
||||
local function treeSetConnectorsAndIcons(tree)
|
||||
tree:SetImageList(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:IsRoot(item_id) return not tree:GetItemParent(item_id):IsOk() end
|
||||
|
||||
function tree:GetItemFullName(item_id)
|
||||
local tree = self
|
||||
local str = tree:GetItemText(item_id)
|
||||
@@ -166,6 +177,24 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
tree:SetEvtHandlerEnabled(true)
|
||||
end
|
||||
|
||||
function tree:ActivateItem(item_id)
|
||||
local name = tree:GetItemFullName(item_id)
|
||||
|
||||
local event = wx.wxTreeEvent(wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED, item_id:GetValue())
|
||||
if PackageEventHandle("onFiletreeActivate", tree, event, item_id) == false then
|
||||
return
|
||||
end
|
||||
|
||||
-- refresh the folder
|
||||
if (tree:IsDirectory(item_id)) then
|
||||
if wx.wxDirExists(name) then treeAddDir(tree,item_id,name)
|
||||
else refreshAncestors(tree:GetItemParent(item_id)) end -- stale content
|
||||
else -- open file
|
||||
if wx.wxFileExists(name) then LoadFile(name,nil,true)
|
||||
else refreshAncestors(tree:GetItemParent(item_id)) end -- stale content
|
||||
end
|
||||
end
|
||||
|
||||
local empty = ""
|
||||
local function renameItem(itemsrc, target)
|
||||
local isdir = tree:GetItemImage(itemsrc) == IMG_DIRECTORY
|
||||
@@ -261,16 +290,7 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
end)
|
||||
tree:Connect(wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
|
||||
function (event)
|
||||
local item_id = event:GetItem()
|
||||
local name = tree:GetItemFullName(item_id)
|
||||
-- refresh the folder
|
||||
if (tree:GetItemImage(item_id) == IMG_DIRECTORY) then
|
||||
if wx.wxDirExists(name) then treeAddDir(tree,item_id,name)
|
||||
else refreshAncestors(tree:GetItemParent(item_id)) end -- stale content
|
||||
else -- open file
|
||||
if wx.wxFileExists(name) then LoadFile(name,nil,true)
|
||||
else refreshAncestors(tree:GetItemParent(item_id)) end -- stale content
|
||||
end
|
||||
tree:ActivateItem(event:GetItem())
|
||||
end)
|
||||
-- handle context menu
|
||||
tree:Connect(wx.wxEVT_COMMAND_TREE_ITEM_MENU,
|
||||
@@ -278,17 +298,28 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
local item_id = event:GetItem()
|
||||
tree:SelectItem(item_id)
|
||||
|
||||
local renamelabel = tree:IsRoot(item_id) and
|
||||
TR("&Edit Project Directory") or TR("&Rename")
|
||||
local menu = wx.wxMenu {
|
||||
{ ID_NEWFILE, TR("New &File") },
|
||||
{ ID_NEWDIRECTORY, TR("&New Directory") },
|
||||
{ },
|
||||
{ ID_RENAMEFILE, TR("&Rename")..KSC(ID_RENAMEFILE) },
|
||||
{ ID_RENAMEFILE, renamelabel..KSC(ID_RENAMEFILE) },
|
||||
{ ID_DELETEFILE, TR("&Delete")..KSC(ID_DELETEFILE) },
|
||||
{ },
|
||||
{ ID_OPENEXTENSION, TR("Open With Default Program") },
|
||||
{ ID_COPYFULLPATH, TR("Copy Full Path") },
|
||||
{ ID_SHOWLOCATION, TR("Show Location") },
|
||||
}
|
||||
local projectdirectorymenu = wx.wxMenu({
|
||||
{ },
|
||||
{ID_PROJECTDIRCHOOSE, TR("Choose...")..KSC(ID_PROJECTDIRCHOOSE), TR("Choose a project directory")},
|
||||
})
|
||||
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)
|
||||
FileTreeProjectListUpdate(projectdirectorymenu, 0)
|
||||
|
||||
local function addItem(item_id, name, image)
|
||||
local isdir = tree:GetItemImage(item_id) == IMG_DIRECTORY
|
||||
@@ -365,6 +396,15 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
|
||||
tree:PopupMenu(menu)
|
||||
end)
|
||||
tree:Connect(wx.wxEVT_RIGHT_DOWN,
|
||||
function (event)
|
||||
local item_id = tree:HitTest(event:GetPosition())
|
||||
if PackageEventHandle("onFiletreeRDown", tree, event, item_id) == false then
|
||||
return
|
||||
end
|
||||
event:Skip()
|
||||
end)
|
||||
|
||||
-- toggle a folder on a single click
|
||||
tree:Connect(wx.wxEVT_LEFT_DOWN,
|
||||
function (event)
|
||||
@@ -373,15 +413,31 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
local mask = wx.wxTREE_HITTEST_ONITEMINDENT
|
||||
+ wx.wxTREE_HITTEST_ONITEMICON + wx.wxTREE_HITTEST_ONITEMRIGHT
|
||||
local item_id, flags = tree:HitTest(event:GetPosition())
|
||||
if item_id and tree:GetItemImage(item_id) == IMG_DIRECTORY
|
||||
and bit.band(flags, mask) > 0 then
|
||||
tree:Toggle(item_id)
|
||||
tree:SelectItem(item_id)
|
||||
|
||||
if PackageEventHandle("onFiletreeLDown", tree, event, item_id) == false then
|
||||
return
|
||||
end
|
||||
|
||||
if item_id and bit.band(flags, mask) > 0 then
|
||||
if tree:GetItemImage(item_id) == IMG_DIRECTORY then
|
||||
tree:Toggle(item_id)
|
||||
tree:SelectItem(item_id)
|
||||
else
|
||||
local name = tree:GetItemFullName(item_id)
|
||||
if wx.wxFileExists(name) then LoadFile(name,nil,true) end
|
||||
end
|
||||
else
|
||||
event:Skip()
|
||||
end
|
||||
return true
|
||||
end)
|
||||
local parent
|
||||
tree:Connect(wx.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT,
|
||||
function (event)
|
||||
local itemsrc = event:GetItem()
|
||||
parent = tree:GetItemParent(itemsrc)
|
||||
if not itemsrc:IsOk() then event:Veto() end
|
||||
end)
|
||||
tree:Connect(wx.wxEVT_COMMAND_TREE_END_LABEL_EDIT,
|
||||
function (event)
|
||||
-- veto the event to keep the original label intact as the tree
|
||||
@@ -389,14 +445,24 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
event:Veto()
|
||||
|
||||
local itemsrc = event:GetItem()
|
||||
if itemsrc == tree:GetRootItem() then return end -- don't edit root
|
||||
if not itemsrc:IsOk() then return end
|
||||
|
||||
local sourcedir = tree:GetItemFullName(tree:GetItemParent(itemsrc))
|
||||
local label = event:GetLabel():gsub("^%s+$","") -- clean all spaces
|
||||
|
||||
-- edited the root element; set the new project directory if needed
|
||||
if tree:IsRoot(itemsrc) then
|
||||
if not event:IsEditCancelled() and wx.wxDirExists(label) then
|
||||
ProjectUpdateProjectDir(label)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if not parent or not parent:IsOk() then return end
|
||||
local sourcedir = tree:GetItemFullName(parent)
|
||||
local target = MergeFullPath(sourcedir, label)
|
||||
if event:IsEditCancelled() or label == empty
|
||||
or target and not renameItem(itemsrc, target)
|
||||
then refreshAncestors(tree:GetItemParent(itemsrc)) end
|
||||
then refreshAncestors(parent) end
|
||||
end)
|
||||
tree:Connect(wx.wxEVT_KEY_DOWN,
|
||||
function (event)
|
||||
@@ -414,7 +480,7 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
local itemsrc
|
||||
tree:Connect(wx.wxEVT_COMMAND_TREE_BEGIN_DRAG,
|
||||
function (event)
|
||||
if event:GetItem() ~= tree:GetRootItem() then
|
||||
if tree:GetItemParent(event:GetItem()):IsOk() then
|
||||
itemsrc = event:GetItem()
|
||||
event:Allow()
|
||||
end
|
||||
@@ -422,7 +488,7 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
tree:Connect(wx.wxEVT_COMMAND_TREE_END_DRAG,
|
||||
function (event)
|
||||
local itemdst = event:GetItem()
|
||||
if not itemdst:IsOk() then return end
|
||||
if not itemdst:IsOk() or not itemsrc:IsOk() then return end
|
||||
|
||||
-- check if itemdst is a folder
|
||||
local target = tree:GetItemFullName(itemdst)
|
||||
@@ -436,83 +502,23 @@ local function treeSetConnectorsAndIcons(tree)
|
||||
end
|
||||
|
||||
-- project
|
||||
-- panel
|
||||
-- (combobox, button)
|
||||
-- (treectrl)
|
||||
local projpanel = ide.frame.projpanel
|
||||
local projcombobox = wx.wxComboBox(projpanel, ID "filetree.proj.drivecb",
|
||||
filetree.projdir,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
filetree.projdirlist, wx.wxTE_PROCESS_ENTER)
|
||||
|
||||
local projbutton = wx.wxButton(projpanel, ID_PROJECTDIRCHOOSE,
|
||||
"...", wx.wxDefaultPosition, wx.wxSize(26,20))
|
||||
|
||||
local projtree = wx.wxTreeCtrl(projpanel, wx.wxID_ANY,
|
||||
local projtree = wx.wxTreeCtrl(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wx.wxTR_HAS_BUTTONS + wx.wxTR_SINGLE + wx.wxTR_LINES_AT_ROOT
|
||||
+ wx.wxTR_EDIT_LABELS)
|
||||
|
||||
-- use the same font in the combobox as is used in the filetree
|
||||
projtree:SetFont(ide.font.fNormal)
|
||||
projcombobox:SetFont(ide.font.fNormal)
|
||||
|
||||
local projTopSizer = wx.wxBoxSizer( wx.wxHORIZONTAL );
|
||||
projTopSizer:Add(projcombobox, 1, wx.wxALL + wx.wxALIGN_LEFT + wx.wxGROW, 0)
|
||||
projTopSizer:Add(projbutton, 0, wx.wxALL + wx.wxALIGN_RIGHT + wx.wxADJUST_MINSIZE + wx.wxALIGN_CENTER_VERTICAL, 0)
|
||||
|
||||
local projSizer = wx.wxBoxSizer( wx.wxVERTICAL );
|
||||
projSizer:Add(projTopSizer, 0, wx.wxALL + wx.wxALIGN_CENTER_HORIZONTAL + wx.wxGROW, 0)
|
||||
projSizer:Add(projtree, 1, wx.wxALL + wx.wxALIGN_LEFT + wx.wxGROW, 0)
|
||||
|
||||
projpanel:SetSizer(projSizer)
|
||||
local projnotebook = ide.frame.projnotebook
|
||||
projnotebook:AddPage(projtree, "Project", true)
|
||||
|
||||
-- proj connectors
|
||||
-- ---------------
|
||||
|
||||
local inupdate = false
|
||||
local function projcomboboxUpdate(event)
|
||||
if inupdate then return end
|
||||
local cur = projcombobox:GetValue()
|
||||
local fn = wx.wxFileName(filetree.projdirmap[cur] or cur)
|
||||
fn:Normalize()
|
||||
|
||||
-- on Windows, wxwidgets (2.9.5+) generates two COMMAND_COMBOBOX_SELECTED
|
||||
-- events when the selection is done with ENTER, which causes recursive
|
||||
-- call of updateProjectDir. To prevent this the second call is ignored.
|
||||
inupdate = true
|
||||
filetree:updateProjectDir(fn:GetFullPath())
|
||||
inupdate = false
|
||||
end
|
||||
|
||||
projpanel:Connect(ID "filetree.proj.drivecb", wx.wxEVT_COMMAND_COMBOBOX_SELECTED, projcomboboxUpdate)
|
||||
projpanel:Connect(ID "filetree.proj.drivecb", wx.wxEVT_COMMAND_TEXT_ENTER, projcomboboxUpdate)
|
||||
|
||||
treeSetConnectorsAndIcons(projtree)
|
||||
|
||||
-- proj functions
|
||||
-- ---------------
|
||||
|
||||
local function abbreviateProjList(projdirlist)
|
||||
filetree.projdirmap = {}
|
||||
local sep = "\t"
|
||||
local dirs = table.concat(projdirlist, sep)..sep
|
||||
local projlist = {}
|
||||
for _, v in ipairs(projdirlist) do
|
||||
-- using FileName because the path doesn't have trailing slash
|
||||
local parts = wx.wxFileName(v..pathsep):GetDirs()
|
||||
local name = table.remove(parts, #parts) or v
|
||||
while #parts > 0
|
||||
and select(2, dirs:gsub("%f[^".. pathsep .."]"..q(name)..sep, "")) > 1 do
|
||||
name = table.remove(parts, #parts) .. pathsep .. name
|
||||
end
|
||||
local abbrev = ("%s (%s)"):format(name, v)
|
||||
filetree.projdirmap[abbrev] = v
|
||||
table.insert(projlist, abbrev)
|
||||
end
|
||||
return projlist
|
||||
end
|
||||
|
||||
function filetree:updateProjectDir(newdir)
|
||||
if (not newdir) or not wx.wxDirExists(newdir) then return end
|
||||
local dirname = wx.wxFileName.DirName(newdir)
|
||||
@@ -540,9 +546,6 @@ function filetree:updateProjectDir(newdir)
|
||||
newdir,
|
||||
ide.config.projecthistorylength,
|
||||
function(s1, s2) return dirname:SameAs(wx.wxFileName.DirName(s2)) end)
|
||||
projcombobox:Clear()
|
||||
projcombobox:Append(abbreviateProjList(filetree.projdirlist))
|
||||
projcombobox:Select(0)
|
||||
|
||||
ProjectUpdateProjectDir(newdir,true)
|
||||
treeSetRoot(projtree,newdir)
|
||||
@@ -556,16 +559,15 @@ function filetree:updateProjectDir(newdir)
|
||||
end
|
||||
end
|
||||
|
||||
-- refresh Recent Projects menu item
|
||||
ide.frame:AddPendingEvent(wx.wxUpdateUIEvent(ID_RECENTPROJECTS))
|
||||
|
||||
PackageEventHandle("onProjectLoad", newdir)
|
||||
end
|
||||
|
||||
projpanel.projbutton = projbutton
|
||||
projpanel.projcombobox = projcombobox
|
||||
projpanel.projtree = projtree
|
||||
|
||||
function FileTreeGetDir()
|
||||
return filetree.projdir and #filetree.projdir > 0
|
||||
and wx.wxFileName.DirName(filetree.projdir):GetFullPath()
|
||||
and wx.wxFileName.DirName(filetree.projdir):GetFullPath() or nil
|
||||
end
|
||||
|
||||
function FileTreeSetProjects(tab)
|
||||
@@ -579,6 +581,49 @@ function FileTreeGetProjects()
|
||||
return filetree.projdirlist
|
||||
end
|
||||
|
||||
local function getProjectLabels()
|
||||
local labels = {}
|
||||
local fmt = ide.config.menuformatrecentprojects or '%f'
|
||||
for i, proj in ipairs(FileTreeGetProjects()) do
|
||||
local config = ide.session.projects[proj]
|
||||
local intfname = config and config[2] and config[2].interpreter or ide.interpreter:GetFileName()
|
||||
local interpreter = intfname and ide.interpreters[intfname]
|
||||
local parts = wx.wxFileName(proj..pathsep):GetDirs()
|
||||
table.insert(labels, (fmt
|
||||
:gsub('%%f', proj)
|
||||
:gsub('%%i', interpreter and interpreter:GetName() or '?')
|
||||
:gsub('%%s', parts[#parts] or '')))
|
||||
end
|
||||
return labels
|
||||
end
|
||||
|
||||
function FileTreeProjectListClear()
|
||||
-- remove all items from the list except the current one
|
||||
filetree.projdirlist = {FileTreeGetDir()}
|
||||
end
|
||||
|
||||
function FileTreeProjectListUpdate(menu, items)
|
||||
local list = getProjectLabels()
|
||||
for i=#list, 1, -1 do
|
||||
local id = ID("file.recentprojects."..i)
|
||||
local label = list[i]
|
||||
if i <= items then -- this is an existing item; update the label
|
||||
menu:FindItem(id):SetItemLabel(label)
|
||||
else -- need to add an item
|
||||
local item = wx.wxMenuItem(menu, id, label, "")
|
||||
menu:Insert(items, item)
|
||||
ide.frame:Connect(id, wx.wxEVT_COMMAND_MENU_SELECTED, function()
|
||||
ProjectUpdateProjectDir(FileTreeGetProjects()[i]) end)
|
||||
end
|
||||
-- disable the currently selected project
|
||||
if i == 1 then menu:Enable(id, false) end
|
||||
end
|
||||
for i=items, #list+1, -1 do -- delete the rest if the list got shorter
|
||||
menu:Delete(menu:FindItemByPosition(i-1))
|
||||
end
|
||||
return #list
|
||||
end
|
||||
|
||||
local curr_file
|
||||
function FileTreeMarkSelected(file)
|
||||
if not file or not filetree.projdir or #filetree.projdir == 0 then return end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
ide.findReplace = {
|
||||
dialog = nil, -- the wxDialog for find/replace
|
||||
@@ -16,6 +18,8 @@ ide.findReplace = {
|
||||
fSubDirs = true, -- search in subdirectories
|
||||
fMakeBak = true, -- make bak files for replace in files
|
||||
|
||||
buttons = {},
|
||||
|
||||
findTextArray = {}, -- array of last entered find text
|
||||
findText = "", -- string to find
|
||||
replaceTextArray = {}, -- array of last entered replace text
|
||||
@@ -303,7 +307,7 @@ function findReplace:RunInFiles(replace)
|
||||
if not findReplace:HasText() then return end
|
||||
|
||||
findReplace.oveditor = wxstc.wxStyledTextCtrl(findReplace.dialog, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxSize(1,1), wx.wxBORDER_STATIC)
|
||||
wx.wxDefaultPosition, wx.wxSize(1,1), wx.wxBORDER_NONE)
|
||||
findReplace.occurrences = 0
|
||||
|
||||
ActivateOutput()
|
||||
@@ -544,6 +548,7 @@ function findReplace:createDialog(replace,infiles)
|
||||
function()
|
||||
TransferDataFromWindow()
|
||||
if (findReplace.infiles) then
|
||||
for _, b in pairs(findReplace.buttons) do b:Disable() end
|
||||
findReplace:RunInFiles()
|
||||
findReplace.dialog:Destroy()
|
||||
findReplace.dialog = nil
|
||||
@@ -558,6 +563,7 @@ function findReplace:createDialog(replace,infiles)
|
||||
event:Skip()
|
||||
if findReplace.replace then
|
||||
if (findReplace.infiles) then
|
||||
for _, b in pairs(findReplace.buttons) do b:Disable() end
|
||||
findReplace:RunInFiles(true)
|
||||
findReplace.dialog:Destroy()
|
||||
findReplace.dialog = nil
|
||||
@@ -588,24 +594,32 @@ function findReplace:createDialog(replace,infiles)
|
||||
if res == wx.wxID_OK then
|
||||
infilesDirCombo:SetValue(FixDir(filePicker:GetPath()))
|
||||
end
|
||||
-- when the dropdown is used to select the directory on OSX,
|
||||
-- the find dialog moves to the background; this keeps it on top.
|
||||
if ide.osname == 'Macintosh' then findDialog:Raise() end
|
||||
end)
|
||||
end
|
||||
|
||||
-- if on OSX then select the current value of the default dropdown
|
||||
-- and don't set the default as it doesn't make Enter to work, but
|
||||
-- prevents associated hotkey (Cmd-F) from working (wx2.9.5).
|
||||
if mac then
|
||||
findTextCombo:SetSelection(-1, -1)
|
||||
findTextCombo:SetFocus() -- force focus on the Find
|
||||
else
|
||||
findButton:SetDefault()
|
||||
end
|
||||
|
||||
-- reset search when re-creating dialog to avoid modifying selected
|
||||
-- fragment after successful search and updated replacement
|
||||
findReplace.foundString = false
|
||||
findReplace.dialog = findDialog
|
||||
findDialog:Show(true)
|
||||
|
||||
-- if on OSX then select the current value of the default dropdown
|
||||
-- and don't set the default as it doesn't make Enter to work, but
|
||||
-- prevents associated hotkey (Cmd-F) from working (wx2.9.5).
|
||||
-- SetFocus has to be done after :Show on OSX as it doesn't put
|
||||
-- the focus on the Find field on some instances of OSX 10.9.2.
|
||||
if mac then
|
||||
findTextCombo:SetSelection(-1, -1)
|
||||
findTextCombo:SetFocus() -- force focus on the Find
|
||||
else
|
||||
findButton:SetDefault()
|
||||
end
|
||||
|
||||
findReplace.buttons = {findButton, replaceButton}
|
||||
|
||||
return findDialog
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
-- Lomtik Software (J. Winwood & John Labenski)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
|
||||
-- Pick some reasonable fixed width fonts to use for the editor
|
||||
@@ -71,8 +73,15 @@ local function SCinB(id) -- shortcut in brackets
|
||||
return shortcut and #shortcut > 0 and (" ("..shortcut..")") or ""
|
||||
end
|
||||
|
||||
local function menuDropDownPosition(event)
|
||||
local tb = event:GetEventObject():DynamicCast('wxAuiToolBar')
|
||||
local rect = tb:GetToolRect(event:GetId())
|
||||
return ide.frame:ScreenToClient(tb:ClientToScreen(rect:GetBottomLeft()))
|
||||
end
|
||||
|
||||
local function createToolBar(frame)
|
||||
local toolBar = frame:CreateToolBar(wx.wxTB_FLAT + wx.wxTB_NODIVIDER, wx.wxID_ANY)
|
||||
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))
|
||||
@@ -85,7 +94,8 @@ local function createToolBar(frame)
|
||||
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_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))
|
||||
@@ -93,6 +103,7 @@ local function createToolBar(frame)
|
||||
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))
|
||||
@@ -104,8 +115,32 @@ local function createToolBar(frame)
|
||||
end
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddControl(funclist)
|
||||
|
||||
toolBar:SetToolDropDown(ID_OPEN, true)
|
||||
toolBar:Connect(ID_OPEN, wxaui.wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, function(event)
|
||||
if event:IsDropDownClicked() then
|
||||
local menu = wx.wxMenu()
|
||||
FileRecentListUpdate(menu)
|
||||
toolBar:PopupMenu(menu, menuDropDownPosition(event))
|
||||
else
|
||||
event:Skip()
|
||||
end
|
||||
end)
|
||||
|
||||
toolBar:SetToolDropDown(ID_PROJECTDIRCHOOSE, true)
|
||||
toolBar:Connect(ID_PROJECTDIRCHOOSE, wxaui.wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, function(event)
|
||||
if event:IsDropDownClicked() then
|
||||
local menu = wx.wxMenu()
|
||||
FileTreeProjectListUpdate(menu, 0)
|
||||
toolBar:PopupMenu(menu, menuDropDownPosition(event))
|
||||
else
|
||||
event:Skip()
|
||||
end
|
||||
end)
|
||||
|
||||
toolBar:GetArtProvider():SetElementSize(wxaui.wxAUI_TBART_GRIPPER_SIZE, 0)
|
||||
toolBar:Realize()
|
||||
|
||||
|
||||
toolBar.funclist = funclist
|
||||
frame.toolBar = toolBar
|
||||
return toolBar
|
||||
@@ -154,6 +189,24 @@ local function createNotebook(frame)
|
||||
event:Veto() -- don't propagate the event as the page is already closed
|
||||
end)
|
||||
|
||||
notebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK,
|
||||
function (event)
|
||||
-- as this event can be on different tab controls,
|
||||
-- need to find the control to add the page to
|
||||
local tabctrl = event:GetEventObject():DynamicCast("wxAuiTabCtrl")
|
||||
-- check if the active page is in the current control
|
||||
local active = tabctrl:GetActivePage()
|
||||
if active >= 0 and tabctrl:GetPage(active).window
|
||||
~= notebook:GetPage(notebook:GetSelection()) then
|
||||
-- if not, need to activate the control that was clicked on;
|
||||
-- find the last window and switch to it (assuming there is always one)
|
||||
assert(tabctrl:GetPageCount() >= 1, "Expected at least one page in a notebook tab control.")
|
||||
local lastwin = tabctrl:GetPage(tabctrl:GetPageCount()-1).window
|
||||
notebook:SetSelection(notebook:GetPageIndex(lastwin))
|
||||
end
|
||||
NewFile()
|
||||
end)
|
||||
|
||||
-- tabs can be dragged around which may change their indexes;
|
||||
-- when this happens stored indexes need to be updated to reflect the change.
|
||||
-- there is DRAG_DONE event that I'd prefer to use, but it
|
||||
@@ -191,6 +244,7 @@ local function createNotebook(frame)
|
||||
{ ID_SAVE, TR("&Save") },
|
||||
{ ID_SAVEAS, TR("Save &As...") },
|
||||
{ },
|
||||
{ ID_COPYFULLPATH, TR("Copy Full Path") },
|
||||
{ ID_SHOWLOCATION, TR("Show Location") },
|
||||
}
|
||||
|
||||
@@ -234,6 +288,14 @@ local function createNotebook(frame)
|
||||
ShowLocation(ide:GetDocument(GetEditor(selection)):GetFilePath())
|
||||
end)
|
||||
notebook:Connect(ID_SHOWLOCATION, wx.wxEVT_UPDATE_UI, IfAtLeastOneTab)
|
||||
|
||||
notebook:Connect(ID_COPYFULLPATH, wx.wxEVT_COMMAND_MENU_SELECTED, function()
|
||||
local tdo = wx.wxTextDataObject(ide:GetDocument(GetEditor(selection)):GetFilePath())
|
||||
if wx.wxClipboard:Get():Open() then
|
||||
wx.wxClipboard:Get():SetData(tdo)
|
||||
wx.wxClipboard:Get():Close()
|
||||
end
|
||||
end)
|
||||
|
||||
frame.notebook = notebook
|
||||
return notebook
|
||||
@@ -341,26 +403,60 @@ local function createBottomNotebook(frame)
|
||||
mgr:Update()
|
||||
end)
|
||||
|
||||
-- disallow tabs closing
|
||||
bottomnotebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE,
|
||||
function (event) event:Veto() end)
|
||||
|
||||
local errorlog = wxstc.wxStyledTextCtrl(bottomnotebook, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxBORDER_STATIC)
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxBORDER_NONE)
|
||||
|
||||
errorlog:Connect(wx.wxEVT_CONTEXT_MENU,
|
||||
function (event)
|
||||
errorlog:PopupMenu(
|
||||
wx.wxMenu {
|
||||
{ ID_UNDO, TR("&Undo") },
|
||||
{ ID_REDO, TR("&Redo") },
|
||||
{ },
|
||||
{ ID_CUT, TR("Cu&t") },
|
||||
{ ID_COPY, TR("&Copy") },
|
||||
{ ID_PASTE, TR("&Paste") },
|
||||
{ ID_SELECTALL, TR("Select &All") },
|
||||
{ },
|
||||
{ ID_CLEAROUTPUT, TR("C&lear Output Window") },
|
||||
}
|
||||
)
|
||||
end)
|
||||
|
||||
errorlog:Connect(ID_CLEAROUTPUT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function(event)
|
||||
ClearOutput()
|
||||
end)
|
||||
|
||||
local shellbox = wxstc.wxStyledTextCtrl(bottomnotebook, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxBORDER_STATIC)
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxBORDER_NONE)
|
||||
|
||||
bottomnotebook:AddPage(errorlog, TR("Output"), true)
|
||||
bottomnotebook:AddPage(shellbox, TR("Local console"), false)
|
||||
|
||||
frame.bottomnotebook = bottomnotebook
|
||||
bottomnotebook.errorlog = errorlog
|
||||
bottomnotebook.shellbox = shellbox
|
||||
|
||||
frame.bottomnotebook = bottomnotebook
|
||||
return bottomnotebook
|
||||
end
|
||||
|
||||
local function createProjpanel(frame)
|
||||
local projpanel = wx.wxPanel(frame,wx.wxID_ANY)
|
||||
frame.projpanel = projpanel
|
||||
return projpanel
|
||||
local function createProjNotebook(frame)
|
||||
local projnotebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE
|
||||
- wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER)
|
||||
|
||||
-- disallow tabs closing
|
||||
projnotebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE,
|
||||
function (event) event:Veto() end)
|
||||
|
||||
frame.projnotebook = projnotebook
|
||||
return projnotebook
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
@@ -370,26 +466,41 @@ local frame = createFrame()
|
||||
ide.frame = frame
|
||||
createToolBar(frame)
|
||||
createNotebook(frame)
|
||||
createProjpanel(frame)
|
||||
createProjNotebook(frame)
|
||||
createBottomNotebook(frame)
|
||||
|
||||
do
|
||||
local frame = ide.frame
|
||||
local mgr = frame.uimgr
|
||||
|
||||
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.projpanel, wxaui.wxAuiPaneInfo():
|
||||
Name("projpanel"):Caption(TR("Project")):
|
||||
mgr:AddPane(frame.projnotebook, wxaui.wxAuiPaneInfo():
|
||||
Name("projpanel"):CaptionVisible(false):Caption(TR("Project")):
|
||||
MinSize(200,200):FloatingSize(200,400):
|
||||
Left():Layer(1):Position(1):
|
||||
Left():Layer(1):Position(1):PaneBorder(false):
|
||||
CloseButton(true):MaximizeButton(false):PinButton(true))
|
||||
mgr:AddPane(frame.bottomnotebook, wxaui.wxAuiPaneInfo():
|
||||
Name("bottomnotebook"):
|
||||
Name("bottomnotebook"):CaptionVisible(false):
|
||||
MinSize(100,100):BestSize(200,200):FloatingSize(400,200):
|
||||
Bottom():Layer(1):Position(1):
|
||||
Bottom():Layer(1):Position(1):PaneBorder(false):
|
||||
CloseButton(true):MaximizeButton(false):PinButton(true))
|
||||
|
||||
for _, uimgr in pairs {mgr, frame.notebook:GetAuiManager(),
|
||||
frame.bottomnotebook:GetAuiManager(), frame.projnotebook:GetAuiManager()} do
|
||||
uimgr:GetArtProvider():SetMetric(wxaui.wxAUI_DOCKART_SASH_SIZE, 2)
|
||||
end
|
||||
|
||||
for _, nb in pairs {frame.bottomnotebook, frame.projnotebook} do
|
||||
nb:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK,
|
||||
function() PaneFloatToggle(nb) end)
|
||||
end
|
||||
|
||||
mgr.defaultPerspective = mgr:SavePerspective()
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
@@ -30,8 +31,12 @@ ID_SAVE = linux and NewID() or wx.wxID_SAVE
|
||||
ID_SAVEAS = linux and NewID() or wx.wxID_SAVEAS
|
||||
ID_SAVEALL = NewID()
|
||||
ID_RECENTFILES = NewID()
|
||||
ID_RECENTFILESCLEAR = NewID()
|
||||
ID_RECENTFILESPREV = NewID()
|
||||
ID_RECENTFILESNEXT = NewID()
|
||||
ID_RECENTPROJECTS = NewID()
|
||||
ID_RECENTPROJECTSCLEAR = NewID()
|
||||
ID_RECENTPROJECTSPREV = NewID()
|
||||
ID_EXIT = linux and NewID() or wx.wxID_EXIT
|
||||
-- Edit menu
|
||||
ID_CUT = linux and NewID() or wx.wxID_CUT
|
||||
@@ -46,6 +51,10 @@ ID_AUTOCOMPLETEENABLE = NewID()
|
||||
ID_COMMENT = NewID()
|
||||
ID_FOLD = NewID()
|
||||
ID_CLEARDYNAMICWORDS = NewID()
|
||||
ID_BOOKMARK = NewID()
|
||||
ID_BOOKMARKTOGGLE = NewID()
|
||||
ID_BOOKMARKNEXT = NewID()
|
||||
ID_BOOKMARKPREV = NewID()
|
||||
-- don't use wx.wxID_PREFERENCES to avoid merging with OSX app menu, because
|
||||
-- Apple guidelines describe Preferences as a "normal" item without submenus.
|
||||
ID_PREFERENCES = NewID()
|
||||
@@ -67,9 +76,15 @@ ID_VIEWFILETREE = NewID()
|
||||
ID_VIEWOUTPUT = NewID()
|
||||
ID_VIEWCALLSTACK = NewID()
|
||||
ID_VIEWWATCHWINDOW = NewID()
|
||||
ID_VIEWTOOLBAR = NewID()
|
||||
ID_VIEWSTATUSBAR = NewID()
|
||||
ID_VIEWDEFAULTLAYOUT = NewID()
|
||||
ID_VIEWFULLSCREEN = NewID()
|
||||
ID_VIEWMINIMIZE = NewID()
|
||||
ID_ZOOM = NewID()
|
||||
ID_ZOOMRESET = NewID()
|
||||
ID_ZOOMIN = NewID()
|
||||
ID_ZOOMOUT = NewID()
|
||||
-- Project menu
|
||||
ID_TOGGLEBREAKPOINT = NewID()
|
||||
ID_COMPILE = NewID()
|
||||
@@ -79,6 +94,7 @@ ID_RUNNOW = NewID()
|
||||
ID_ATTACHDEBUG = NewID()
|
||||
ID_STARTDEBUG = NewID()
|
||||
ID_STOPDEBUG = NewID()
|
||||
ID_DETACHDEBUG = NewID()
|
||||
ID_STEP = NewID()
|
||||
ID_STEPOVER = NewID()
|
||||
ID_STEPOUT = NewID()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
-- Copyright 2012-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- Integration with LuaInspect
|
||||
-- (C) 2012 Paul Kulchenko
|
||||
---------------------------------------------------------
|
||||
|
||||
local M, LA, LI, T = {}
|
||||
local FAST = true
|
||||
@@ -33,7 +34,13 @@ function M.warnings_from_string(src, file)
|
||||
LI.mark_related_keywords(ast, tokenlist, src)
|
||||
end
|
||||
|
||||
return M.show_warnings(ast)
|
||||
local globinit = {}
|
||||
local spec = GetSpec(wx.wxFileName(file):GetExt())
|
||||
for k in pairs(spec and GetApi(spec.apitype or "none").ac.childs or {}) do
|
||||
globinit[k] = true
|
||||
end
|
||||
|
||||
return M.show_warnings(ast, globinit)
|
||||
end
|
||||
|
||||
function AnalyzeFile(file)
|
||||
@@ -44,7 +51,15 @@ function AnalyzeFile(file)
|
||||
return warn, err, line, pos
|
||||
end
|
||||
|
||||
function M.show_warnings(top_ast)
|
||||
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
|
||||
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
|
||||
@@ -52,7 +67,7 @@ function M.show_warnings(top_ast)
|
||||
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 isseen, globseen, fieldseen = {}, {}, {}
|
||||
local globseen, isseen, fieldseen = globinit or {}, {}, {}
|
||||
LA.walk(top_ast, function(ast)
|
||||
local line = ast.lineinfo and ast.lineinfo.first[1] or 0
|
||||
local path = ast.lineinfo and ast.lineinfo.first[4] or '?'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
|
||||
ide.iofilters["GermanUtf8Ascii"] = {
|
||||
|
||||
@@ -32,9 +32,10 @@ ide.config.keymap = {
|
||||
[ID_SAVEAS] = "Alt-Shift-S",
|
||||
[ID_SAVEALL] = "",
|
||||
[ID_RECENTFILES] = "",
|
||||
[ID_RECENTFILESPREV] = "Ctrl-<",
|
||||
[ID_RECENTFILESNEXT] = "Ctrl->",
|
||||
[ID_RECENTFILESPREV] = "Ctrl-,",
|
||||
[ID_RECENTFILESNEXT] = "Ctrl-.",
|
||||
[ID_EXIT] = "Ctrl-Q",
|
||||
[ID_RECENTPROJECTSPREV] = "Ctrl-Shift-<",
|
||||
-- Edit menu
|
||||
[ID_CUT] = "Ctrl-X",
|
||||
[ID_COPY] = "Ctrl-C",
|
||||
@@ -48,6 +49,9 @@ ide.config.keymap = {
|
||||
[ID_COMMENT] = "Ctrl-U",
|
||||
[ID_FOLD] = "F12",
|
||||
[ID_CLEARDYNAMICWORDS] = "",
|
||||
[ID_BOOKMARKTOGGLE] = "Ctrl-F2",
|
||||
[ID_BOOKMARKNEXT] = "F2",
|
||||
[ID_BOOKMARKPREV] = "Shift-F2",
|
||||
-- Search menu
|
||||
[ID_FIND] = "Ctrl-F",
|
||||
[ID_FINDNEXT] = "F3",
|
||||
@@ -66,6 +70,9 @@ ide.config.keymap = {
|
||||
[ID_VIEWCALLSTACK] = "Ctrl-Shift-S",
|
||||
[ID_VIEWDEFAULTLAYOUT] = "",
|
||||
[ID_VIEWFULLSCREEN] = "Ctrl-Shift-A",
|
||||
[ID_ZOOMRESET] = "Ctrl-0",
|
||||
[ID_ZOOMIN] = "Ctrl-+",
|
||||
[ID_ZOOMOUT] = "Ctrl--",
|
||||
-- Project menu
|
||||
[ID_RUN] = "F6",
|
||||
[ID_RUNNOW] = "Ctrl-F6",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
-- Copyright (C) Paul Kulchenko 2011-2012
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- styles for comment markup
|
||||
---------------------------------------------------------
|
||||
|
||||
local MD_MARK_ITAL = '_' -- italic
|
||||
local MD_MARK_BOLD = '**' -- bold
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- Create the Edit menu and attach the callback functions
|
||||
@@ -21,14 +23,22 @@ local editMenu = wx.wxMenu{
|
||||
{ ID_AUTOCOMPLETE, TR("Complete &Identifier")..KSC(ID_AUTOCOMPLETE), TR("Complete the current identifier") },
|
||||
{ ID_AUTOCOMPLETEENABLE, TR("Auto Complete Identifiers")..KSC(ID_AUTOCOMPLETEENABLE), TR("Auto complete while typing"), wx.wxITEM_CHECK },
|
||||
{ },
|
||||
{ ID_COMMENT, TR("C&omment/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_FOLD, TR("&Fold/Unfold All")..KSC(ID_FOLD), TR("Fold or unfold all code folds") },
|
||||
{ ID_CLEARDYNAMICWORDS, TR("Clear &Dynamic Words")..KSC(ID_CLEARDYNAMICWORDS), TR("Resets the dynamic word list for autocompletion") },
|
||||
{ ID_SORT, TR("&Sort")..KSC(ID_SORT), TR("Sort selected lines") },
|
||||
{ },
|
||||
}
|
||||
|
||||
local bookmarkmenu = wx.wxMenu{
|
||||
{ID_BOOKMARKTOGGLE, TR("Toggle Bookmark")..KSC(ID_BOOKMARKTOGGLE)},
|
||||
{ID_BOOKMARKNEXT, TR("Go To Next Bookmark")..KSC(ID_BOOKMARKNEXT)},
|
||||
{ID_BOOKMARKPREV, TR("Go To Previous Bookmark")..KSC(ID_BOOKMARKPREV)},
|
||||
}
|
||||
local bookmark = wx.wxMenuItem(editMenu, ID_BOOKMARK,
|
||||
TR("Bookmark")..KSC(ID_BOOKMARK), TR("Bookmark"), wx.wxITEM_NORMAL, bookmarkmenu)
|
||||
editMenu:Insert(12, bookmark)
|
||||
|
||||
local preferencesMenu = wx.wxMenu{
|
||||
{ID_PREFERENCESSYSTEM, TR("Settings: System")..KSC(ID_PREFERENCESSYSTEM)},
|
||||
{ID_PREFERENCESUSER, TR("Settings: User")..KSC(ID_PREFERENCESUSER)},
|
||||
@@ -38,20 +48,8 @@ menuBar:Append(editMenu, TR("&Edit"))
|
||||
|
||||
editMenu:Check(ID_AUTOCOMPLETEENABLE, ide.config.autocomplete)
|
||||
|
||||
local function getControlWithFocus()
|
||||
local editor = GetEditor()
|
||||
for _,e in pairs({frame.bottomnotebook.shellbox, frame.bottomnotebook.errorlog}) do
|
||||
local ctrl = e:FindFocus()
|
||||
if ctrl and
|
||||
(ctrl:GetId() == e:GetId()
|
||||
or ide.osname == 'Macintosh' and
|
||||
ctrl:GetParent():GetId() == e:GetId()) then editor = e end
|
||||
end
|
||||
return editor or nil
|
||||
end
|
||||
|
||||
local function onUpdateUIEditMenu(event)
|
||||
local editor = getControlWithFocus()
|
||||
local editor = GetEditorWithFocus()
|
||||
if editor == nil then event:Enable(false); return end
|
||||
|
||||
local cancomment = pcall(function() return editor.spec end) and editor.spec
|
||||
@@ -76,8 +74,10 @@ local function onUpdateUIEditMenu(event)
|
||||
event:Enable(enable)
|
||||
end
|
||||
|
||||
function OnEditMenu(event)
|
||||
local editor = getControlWithFocus()
|
||||
local function onUpdateUIisEditor(event) event:Enable(GetEditor() ~= nil) end
|
||||
|
||||
local function onEditMenu(event)
|
||||
local editor = GetEditorWithFocus()
|
||||
|
||||
-- if there is no editor, or if it's not the editor we care about,
|
||||
-- then allow normal processing to take place
|
||||
@@ -101,7 +101,7 @@ function OnEditMenu(event)
|
||||
end
|
||||
|
||||
for _, event in pairs({ID_CUT, ID_COPY, ID_PASTE, ID_SELECTALL, ID_UNDO, ID_REDO}) do
|
||||
frame:Connect(event, wx.wxEVT_COMMAND_MENU_SELECTED, OnEditMenu)
|
||||
frame:Connect(event, wx.wxEVT_COMMAND_MENU_SELECTED, onEditMenu)
|
||||
frame:Connect(event, wx.wxEVT_UPDATE_UI, onUpdateUIEditMenu)
|
||||
end
|
||||
|
||||
@@ -145,8 +145,7 @@ frame:Connect(ID_SHOWTOOLTIP, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
|
||||
EditorCallTip(editor, editor:GetCurrentPos())
|
||||
end)
|
||||
frame:Connect(ID_SHOWTOOLTIP, wx.wxEVT_UPDATE_UI,
|
||||
function (event) event:Enable(GetEditor() ~= nil) end)
|
||||
frame:Connect(ID_SHOWTOOLTIP, wx.wxEVT_UPDATE_UI, onUpdateUIisEditor)
|
||||
|
||||
frame:Connect(ID_AUTOCOMPLETE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
@@ -244,3 +243,37 @@ frame:Connect(ID_FOLD, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
FoldSome()
|
||||
end)
|
||||
frame:Connect(ID_FOLD, wx.wxEVT_UPDATE_UI, onUpdateUIEditMenu)
|
||||
|
||||
local BOOKMARK_MARKER = StylesGetMarker("bookmark")
|
||||
local BOOKMARK_MARKER_VALUE = 2^BOOKMARK_MARKER
|
||||
|
||||
local function bookmarkToggle()
|
||||
local editor = GetEditor()
|
||||
local line = editor:GetCurrentLine()
|
||||
local markers = editor:MarkerGet(line)
|
||||
if bit.band(markers, BOOKMARK_MARKER_VALUE) > 0 then
|
||||
editor:MarkerDelete(line, BOOKMARK_MARKER)
|
||||
else
|
||||
editor:MarkerAdd(line, BOOKMARK_MARKER)
|
||||
end
|
||||
end
|
||||
|
||||
local function bookmarkNext()
|
||||
local editor = GetEditor()
|
||||
local line = editor:MarkerNext(editor:GetCurrentLine()+1, BOOKMARK_MARKER_VALUE)
|
||||
if line ~= -1 then editor:GotoLine(line) end
|
||||
end
|
||||
|
||||
local function bookmarkPrev()
|
||||
local editor = GetEditor()
|
||||
local line = editor:MarkerPrevious(editor:GetCurrentLine()-1, BOOKMARK_MARKER_VALUE)
|
||||
if line ~= -1 then editor:GotoLine(line) end
|
||||
end
|
||||
|
||||
for _, event in pairs({ID_BOOKMARKTOGGLE, ID_BOOKMARKNEXT, ID_BOOKMARKPREV}) do
|
||||
frame:Connect(event, wx.wxEVT_UPDATE_UI, onUpdateUIisEditor)
|
||||
end
|
||||
|
||||
frame:Connect(ID_BOOKMARKTOGGLE, wx.wxEVT_COMMAND_MENU_SELECTED, bookmarkToggle)
|
||||
frame:Connect(ID_BOOKMARKNEXT, wx.wxEVT_COMMAND_MENU_SELECTED, bookmarkNext)
|
||||
frame:Connect(ID_BOOKMARKPREV, wx.wxEVT_COMMAND_MENU_SELECTED, bookmarkPrev)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local frame = ide.frame
|
||||
local menuBar = frame.menuBar
|
||||
@@ -16,16 +18,27 @@ local fileMenu = wx.wxMenu({
|
||||
{ ID_SAVEAS, TR("Save &As...")..KSC(ID_SAVEAS), TR("Save the current document to a file with a new name") },
|
||||
{ ID_SAVEALL, TR("Save A&ll")..KSC(ID_SAVEALL), TR("Save all open documents") },
|
||||
{ },
|
||||
-- placeholder for ID_RECENTFILES
|
||||
-- placeholder for ID_RECENTFILES and ID_RECENTPROJECTS
|
||||
{ },
|
||||
{ ID_EXIT, TR("E&xit")..KSC(ID_EXIT), TR("Exit program") }})
|
||||
menuBar:Append(fileMenu, TR("&File"))
|
||||
|
||||
local filehistorymenu = wx.wxMenu({})
|
||||
local filehistorymenu = wx.wxMenu({
|
||||
{ },
|
||||
{ ID_RECENTFILESCLEAR, TR("Clear Items")..KSC(ID_RECENTFILESCLEAR), TR("Clear items from this list") },
|
||||
})
|
||||
local filehistory = wx.wxMenuItem(fileMenu, ID_RECENTFILES,
|
||||
TR("Recent Files")..KSC(ID_RECENTFILES), TR("File history"), wx.wxITEM_NORMAL, filehistorymenu)
|
||||
fileMenu:Insert(8,filehistory)
|
||||
|
||||
local projecthistorymenu = wx.wxMenu({
|
||||
{ },
|
||||
{ ID_RECENTPROJECTSCLEAR, TR("Clear Items")..KSC(ID_RECENTPROJECTSCLEAR), TR("Clear items from this list") },
|
||||
})
|
||||
local projecthistory = wx.wxMenuItem(fileMenu, ID_RECENTPROJECTS,
|
||||
TR("Recent &Projects")..KSC(ID_RECENTPROJECTS), TR("Project history"), wx.wxITEM_NORMAL, projecthistorymenu)
|
||||
fileMenu:Insert(9,projecthistory)
|
||||
|
||||
do -- recent file history
|
||||
local iscaseinsensitive = wx.wxFileName("A"):SameAs(wx.wxFileName("a"))
|
||||
local function isSameAs(f1, f2)
|
||||
@@ -116,8 +129,8 @@ do -- recent file history
|
||||
end
|
||||
end
|
||||
|
||||
local items = 0
|
||||
updateRecentFiles = function (list)
|
||||
local items = filehistorymenu:GetMenuItemCount()
|
||||
for i=1, #list do
|
||||
local file = list[i].filename
|
||||
local id = ID("file.recentfiles."..i)
|
||||
@@ -129,13 +142,14 @@ do -- recent file history
|
||||
filehistorymenu:FindItem(id):SetItemLabel(label)
|
||||
else -- need to add an item
|
||||
local item = wx.wxMenuItem(filehistorymenu, id, label, "")
|
||||
filehistorymenu:Append(item)
|
||||
filehistorymenu:Insert(i-1, item)
|
||||
frame:Connect(id, wx.wxEVT_COMMAND_MENU_SELECTED, loadRecent)
|
||||
end
|
||||
end
|
||||
for i=items, #list+1, -1 do -- delete the rest if the list got shorter
|
||||
filehistorymenu:Delete(filehistorymenu:FindItemByPosition(i-1))
|
||||
end
|
||||
items = #list -- update the number of items for the next refresh
|
||||
|
||||
-- enable if there are any recent files
|
||||
fileMenu:Enable(ID_RECENTFILES, #list > 0)
|
||||
@@ -152,6 +166,17 @@ do -- recent file history
|
||||
addFileHistory(filename)
|
||||
updateRecentFiles(filehistory)
|
||||
end
|
||||
|
||||
function FileRecentListUpdate(menu)
|
||||
local list = filehistory
|
||||
for i=#list, 1, -1 do
|
||||
local id = ID("file.recentfiles."..i)
|
||||
local label = list[i].filename
|
||||
local item = wx.wxMenuItem(menu, id, label, "")
|
||||
menu:Insert(0, item)
|
||||
ide.frame:Connect(id, wx.wxEVT_COMMAND_MENU_SELECTED, loadRecent)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
frame:Connect(ID_NEW, wx.wxEVT_COMMAND_MENU_SELECTED, function() return NewFile() end)
|
||||
@@ -205,3 +230,25 @@ frame:Connect(ID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
if not SaveOnExit(true) then return end
|
||||
frame:Close() -- this will trigger wxEVT_CLOSE_WINDOW
|
||||
end)
|
||||
|
||||
frame:Connect(ID_RECENTPROJECTSCLEAR, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event) FileTreeProjectListClear() end)
|
||||
|
||||
frame:Connect(ID_RECENTFILESCLEAR, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
SetFileHistory({})
|
||||
local ed = ide:GetEditor()
|
||||
if ed then AddToFileHistory(ide:GetDocument(ed):GetFilePath()) end
|
||||
end)
|
||||
|
||||
local recentprojects = 0
|
||||
frame:Connect(ID_RECENTPROJECTS, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
recentprojects = FileTreeProjectListUpdate(projecthistorymenu, recentprojects)
|
||||
local pos = 1 -- add shortcut for the previous project (if any)
|
||||
if recentprojects > pos then
|
||||
local item = projecthistorymenu:FindItemByPosition(pos)
|
||||
item:SetItemLabel(item:GetItemLabelText()..KSC(ID_RECENTPROJECTSPREV))
|
||||
end
|
||||
event:Enable(recentprojects > 0)
|
||||
end)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
-- author: Paul Kulchenko
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- Create the Help menu and attach the callback functions
|
||||
@@ -45,7 +46,7 @@ local function DisplayAbout(event)
|
||||
<tr>
|
||||
<td>
|
||||
<b>ZeroBrane Studio (%s; MobDebug %s)</b><br>
|
||||
<b>Copyright © 2011-2013 ZeroBrane LLC</b><br>
|
||||
<b>Copyright © 2011-2014 ZeroBrane LLC</b><br>
|
||||
Paul Kulchenko<br>
|
||||
Licensed under the MIT License.
|
||||
</td>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local frame = ide.frame
|
||||
local menuBar = frame.menuBar
|
||||
@@ -17,9 +19,10 @@ local debugTab = {
|
||||
{ ID_RUNNOW, TR("Run as Scratchpad")..KSC(ID_RUNNOW), TR("Execute the current project/file and keep updating the code to see immediate results"), wx.wxITEM_CHECK },
|
||||
{ ID_COMPILE, TR("&Compile")..KSC(ID_COMPILE), TR("Compile the current file") },
|
||||
{ ID_STARTDEBUG, TR("Start &Debugging")..KSC(ID_STARTDEBUG), TR("Start or continue debugging") },
|
||||
{ ID_ATTACHDEBUG, TR("&Start Debugger Server")..KSC(ID_ATTACHDEBUG), TR("Allow external process to start debugging") },
|
||||
{ ID_ATTACHDEBUG, TR("&Start Debugger Server")..KSC(ID_ATTACHDEBUG), TR("Allow external process to start debugging"), wx.wxITEM_CHECK },
|
||||
{ },
|
||||
{ ID_STOPDEBUG, TR("S&top Debugging")..KSC(ID_STOPDEBUG), TR("Stop the currently running process") },
|
||||
{ ID_DETACHDEBUG, TR("Detach &Process")..KSC(ID_DETACHDEBUG), TR("Stop debugging and continue running the process") },
|
||||
{ ID_STEP, TR("Step &Into")..KSC(ID_STEP), TR("Step into") },
|
||||
{ ID_STEPOVER, TR("Step &Over")..KSC(ID_STEPOVER), TR("Step over") },
|
||||
{ ID_STEPOUT, TR("Step O&ut")..KSC(ID_STEPOUT), TR("Step out of the current function") },
|
||||
@@ -257,7 +260,7 @@ frame:Connect(ID_TOGGLEBREAKPOINT, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
event:Enable((ide.interpreter) and (ide.interpreter.hasdebugger) and (editor ~= nil)
|
||||
and (not debugger.running) and (not debugger.scratchpad))
|
||||
and (not debugger.scratchpad))
|
||||
end)
|
||||
|
||||
frame:Connect(ID_COMPILE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
@@ -299,15 +302,18 @@ frame:Connect(ID_RUNNOW, wx.wxEVT_UPDATE_UI,
|
||||
end)
|
||||
|
||||
frame:Connect(ID_ATTACHDEBUG, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
if (ide.interpreter.fattachdebug) then ide.interpreter:fattachdebug() end
|
||||
function (event)
|
||||
if event:IsChecked() then
|
||||
if (ide.interpreter.fattachdebug) then ide.interpreter:fattachdebug() end
|
||||
else
|
||||
debugger.listen(false) -- stop listening
|
||||
end
|
||||
end)
|
||||
frame:Connect(ID_ATTACHDEBUG, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
event:Enable((ide.interpreter) and (ide.interpreter.fattachdebug)
|
||||
and (not debugger.listening) and (debugger.server == nil)
|
||||
and (editor ~= nil) and (not debugger.scratchpad))
|
||||
event:Enable(ide.interpreter and ide.interpreter.fattachdebug and true or false)
|
||||
ide.frame.menuBar:Check(event:GetId(), debugger.listening and true or false)
|
||||
end)
|
||||
|
||||
frame:Connect(ID_STARTDEBUG, wx.wxEVT_COMMAND_MENU_SELECTED, function () ProjectDebug() end)
|
||||
@@ -337,10 +343,16 @@ frame:Connect(ID_STOPDEBUG, wx.wxEVT_UPDATE_UI,
|
||||
end
|
||||
end)
|
||||
|
||||
frame:Connect(ID_STEP, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
debugger.step()
|
||||
frame:Connect(ID_DETACHDEBUG, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function () debugger.detach() end)
|
||||
frame:Connect(ID_DETACHDEBUG, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
event:Enable((debugger.server ~= nil) and (not debugger.running)
|
||||
and (not debugger.scratchpad))
|
||||
end)
|
||||
|
||||
frame:Connect(ID_STEP, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function () debugger.step() end)
|
||||
frame:Connect(ID_STEP, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
@@ -349,9 +361,7 @@ frame:Connect(ID_STEP, wx.wxEVT_UPDATE_UI,
|
||||
end)
|
||||
|
||||
frame:Connect(ID_STEPOVER, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
debugger.over()
|
||||
end)
|
||||
function () debugger.over() end)
|
||||
frame:Connect(ID_STEPOVER, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
@@ -360,9 +370,7 @@ frame:Connect(ID_STEPOVER, wx.wxEVT_UPDATE_UI,
|
||||
end)
|
||||
|
||||
frame:Connect(ID_STEPOUT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
debugger.out()
|
||||
end)
|
||||
function () debugger.out() end)
|
||||
frame:Connect(ID_STEPOUT, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
@@ -371,9 +379,7 @@ frame:Connect(ID_STEPOUT, wx.wxEVT_UPDATE_UI,
|
||||
end)
|
||||
|
||||
frame:Connect(ID_TRACE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
debugger.trace()
|
||||
end)
|
||||
function () debugger.trace() end)
|
||||
frame:Connect(ID_TRACE, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
-- Create the Search menu and attach the callback functions
|
||||
|
||||
@@ -20,7 +22,7 @@ local findMenu = wx.wxMenu{
|
||||
{ ID_FINDINFILES, TR("Find &In Files")..KSC(ID_FINDINFILES), TR("Find text in files") },
|
||||
{ ID_REPLACEINFILES, TR("Re&place In Files")..KSC(ID_REPLACEINFILES), TR("Find and replace text in files") },
|
||||
{ },
|
||||
{ ID_GOTOLINE, TR("&Goto Line")..KSC(ID_GOTOLINE), TR("Go to a selected line") },
|
||||
{ ID_GOTOLINE, TR("&Go To Line...")..KSC(ID_GOTOLINE), TR("Go to a selected line") },
|
||||
}
|
||||
menuBar:Append(findMenu, TR("&Search"))
|
||||
|
||||
@@ -136,7 +138,7 @@ frame:Connect(ID_GOTOLINE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
local linemax = editor:LineFromPosition(editor:GetLength()) + 1
|
||||
local linenum = wx.wxGetNumberFromUser(TR("Enter line number"),
|
||||
"1 .. "..tostring(linemax),
|
||||
TR("Goto Line"),
|
||||
TR("Go To Line"),
|
||||
linecur, 1, linemax,
|
||||
frame)
|
||||
if linenum > 0 then
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local frame = ide.frame
|
||||
local menuBar = frame.menuBar
|
||||
@@ -46,7 +48,7 @@ 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)
|
||||
table.insert(toolArgs,{id , exec.name, exec.description})
|
||||
table.insert(toolArgs,{id, exec.name, exec.description})
|
||||
-- flag it
|
||||
tool._execid = id
|
||||
cnt = cnt + 1
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local frame = ide.frame
|
||||
local menuBar = frame.menuBar
|
||||
@@ -12,33 +14,62 @@ local viewMenu = wx.wxMenu {
|
||||
{ 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_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 },
|
||||
{ },
|
||||
{ ID_VIEWDEFAULTLAYOUT, TR("&Default Layout")..KSC(ID_VIEWDEFAULTLAYOUT), TR("Reset to default layout") },
|
||||
{ ID_VIEWFULLSCREEN, TR("Full &Screen")..KSC(ID_VIEWFULLSCREEN), TR("Switch to or from full screen mode") },
|
||||
}
|
||||
|
||||
do -- Add zoom submenu
|
||||
local zoomMenu = wx.wxMenu{
|
||||
{ID_ZOOMRESET, TR("Zoom to 100%")..KSC(ID_ZOOMRESET)},
|
||||
{ID_ZOOMIN, TR("Zoom In")..KSC(ID_ZOOMIN)},
|
||||
{ID_ZOOMOUT, TR("Zoom Out")..KSC(ID_ZOOMOUT)},
|
||||
}
|
||||
|
||||
frame:Connect(ID_ZOOMRESET, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function() local editor = GetEditorWithFocus()
|
||||
if editor then editor:SetZoom(0) end end)
|
||||
frame:Connect(ID_ZOOMIN, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function() local editor = GetEditorWithFocus()
|
||||
if editor then editor:SetZoom(editor:GetZoom()+1) end end)
|
||||
frame:Connect(ID_ZOOMOUT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function() local editor = GetEditorWithFocus()
|
||||
if editor then editor:SetZoom(editor:GetZoom()-1) end end)
|
||||
|
||||
-- only enable if there is an editor
|
||||
local iseditor = function (event) event:Enable(GetEditorWithFocus() ~= nil) end
|
||||
for _, id in ipairs({ID_ZOOMRESET, ID_ZOOMIN, ID_ZOOMOUT}) do
|
||||
frame:Connect(id, wx.wxEVT_UPDATE_UI, iseditor)
|
||||
end
|
||||
|
||||
viewMenu:Append(ID_ZOOM, TR("Zoom"), zoomMenu)
|
||||
end
|
||||
|
||||
menuBar:Append(viewMenu, TR("&View"))
|
||||
|
||||
local panels = {
|
||||
[ID_VIEWOUTPUT] = "bottomnotebook",
|
||||
[ID_VIEWFILETREE] = "projpanel",
|
||||
[ID_VIEWWATCHWINDOW] = "watchpanel",
|
||||
[ID_VIEWCALLSTACK] = "stackpanel"
|
||||
[ID_VIEWCALLSTACK] = "stackpanel",
|
||||
[ID_VIEWTOOLBAR] = "toolbar",
|
||||
}
|
||||
|
||||
local function togglePanel(event)
|
||||
local panel = panels[event:GetId()]
|
||||
local mgr = ide.frame.uimgr
|
||||
local shown = not mgr:GetPane(panel):IsShown()
|
||||
mgr:GetPane(panel):Show(shown)
|
||||
mgr:Update()
|
||||
local shown = not uimgr:GetPane(panel):IsShown()
|
||||
uimgr:GetPane(panel):Show(shown)
|
||||
uimgr:Update()
|
||||
|
||||
return shown
|
||||
end
|
||||
|
||||
local function checkPanel(event)
|
||||
local menubar = ide.frame.menuBar
|
||||
local pane = ide.frame.uimgr:GetPane(panels[event:GetId()])
|
||||
menubar:Enable(event:GetId(), pane:IsOk()) -- disable if doesn't exist
|
||||
menubar:Check(event:GetId(), pane:IsOk() and pane:IsShown())
|
||||
local pane = uimgr:GetPane(panels[event:GetId()])
|
||||
menuBar:Enable(event:GetId(), pane:IsOk()) -- disable if doesn't exist
|
||||
menuBar:Check(event:GetId(), pane:IsOk() and pane:IsShown())
|
||||
end
|
||||
|
||||
frame:Connect(ID_VIEWDEFAULTLAYOUT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
@@ -50,16 +81,25 @@ frame:Connect(ID_VIEWMINIMIZE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event) ide.frame:Iconize(true) end)
|
||||
|
||||
frame:Connect(ID_VIEWFULLSCREEN, wx.wxEVT_COMMAND_MENU_SELECTED, function ()
|
||||
pcall(function() ShowFullScreen(not frame:IsFullScreen()) end)
|
||||
ShowFullScreen(not frame:IsFullScreen())
|
||||
end)
|
||||
frame:Connect(ID_VIEWFULLSCREEN, wx.wxEVT_UPDATE_UI,
|
||||
function (event) event:Enable(GetEditor() ~= nil) end)
|
||||
|
||||
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_VIEWWATCHWINDOW, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event) if togglePanel(event) then DebuggerRefreshPanels() end end)
|
||||
frame:Connect(ID_VIEWCALLSTACK, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event) if togglePanel(event) then DebuggerRefreshPanels() end end)
|
||||
|
||||
frame:Connect(ID_VIEWSTATUSBAR, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
frame:GetStatusBar():Show(menuBar:IsChecked(event:GetId()))
|
||||
uimgr:Update()
|
||||
end)
|
||||
frame:Connect(ID_VIEWSTATUSBAR, wx.wxEVT_UPDATE_UI,
|
||||
function (event) menuBar:Check(event:GetId(), frame:GetStatusBar():IsShown()) end)
|
||||
|
||||
for id in pairs(panels) do frame:Connect(id, wx.wxEVT_UPDATE_UI, checkPanel) end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local frame = ide.frame
|
||||
local notebook = frame.notebook
|
||||
@@ -23,6 +25,13 @@ errorlog:SetMarginType(1, wxstc.wxSTC_MARGIN_SYMBOL)
|
||||
errorlog:MarkerDefine(StylesGetMarker("message"))
|
||||
errorlog:MarkerDefine(StylesGetMarker("prompt"))
|
||||
errorlog:SetReadOnly(true)
|
||||
if (ide.config.outputshell.usewrap) then
|
||||
errorlog:SetWrapMode(wxstc.wxSTC_WRAP_WORD)
|
||||
errorlog:SetWrapStartIndent(0)
|
||||
errorlog:SetWrapVisualFlags(wxstc.wxSTC_WRAPVISUALFLAG_END)
|
||||
errorlog:SetWrapVisualFlagsLocation(wxstc.wxSTC_WRAPVISUALFLAGLOC_END_BY_TEXT)
|
||||
end
|
||||
|
||||
StylesApplyToEditor(ide.config.stylesoutshell,errorlog,ide.font.oNormal,ide.font.oItalic)
|
||||
|
||||
function ClearOutput()
|
||||
@@ -91,7 +100,8 @@ function CommandLineToShell(uid,state)
|
||||
end
|
||||
|
||||
-- logic to "unhide" wxwidget window using winapi
|
||||
pcall(function () return require 'winapi' end)
|
||||
pcall(require, 'winapi')
|
||||
local checkstart, checknext, checkperiod
|
||||
local pid = nil
|
||||
local function unHideWindow(pidAssign)
|
||||
-- skip if not configured to do anything
|
||||
@@ -100,6 +110,18 @@ local function unHideWindow(pidAssign)
|
||||
pid = pidAssign > 0 and pidAssign or nil
|
||||
end
|
||||
if pid and winapi then
|
||||
local now = TimeGet()
|
||||
if pidAssign and pidAssign > 0 then
|
||||
checkstart, checknext, checkperiod = now, now, 0.02
|
||||
end
|
||||
if now - checkstart > 1 and checkperiod < 0.5 then
|
||||
checkperiod = checkperiod * 2
|
||||
end
|
||||
if now >= checknext then
|
||||
checknext = now + checkperiod
|
||||
else
|
||||
return
|
||||
end
|
||||
local wins = winapi.find_all_windows(function(w)
|
||||
return w:get_process():get_pid() == pid
|
||||
end)
|
||||
@@ -284,7 +306,7 @@ errorlog:Connect(wx.wxEVT_END_PROCESS, function(event)
|
||||
end
|
||||
customprocs[pid] = nil
|
||||
unHideWindow(0)
|
||||
DebuggerStop()
|
||||
DebuggerStop(true)
|
||||
DisplayOutputLn(TR("Program completed in %.2f seconds (pid: %d).")
|
||||
:format(runtime, pid))
|
||||
end
|
||||
@@ -292,7 +314,7 @@ errorlog:Connect(wx.wxEVT_END_PROCESS, function(event)
|
||||
|
||||
errorlog:Connect(wx.wxEVT_IDLE, function()
|
||||
if (#streamins or #streamerrs) then getStreams() end
|
||||
unHideWindow()
|
||||
if ide.osname == 'Windows' then unHideWindow() end
|
||||
end)
|
||||
|
||||
local jumptopatterns = {
|
||||
@@ -319,16 +341,20 @@ errorlog:Connect(wxstc.wxEVT_STC_DOUBLECLICK,
|
||||
end
|
||||
|
||||
if (fname and jumpline) then
|
||||
local name = GetFullPathIfExists(FileTreeGetDir(), fname)
|
||||
or FileTreeFindByPartialName(fname)
|
||||
|
||||
-- fname may include name of executable, as in "path/to/lua: file.lua";
|
||||
-- strip it and try to find match again if needed
|
||||
local fixedname = fname:match(": (.+)")
|
||||
if not name and fixedname then
|
||||
-- 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)
|
||||
|
||||
local editor = LoadFile(name or fname,nil,true)
|
||||
if (editor) then
|
||||
@@ -338,12 +364,14 @@ errorlog:Connect(wxstc.wxEVT_STC_DOUBLECLICK,
|
||||
editor:GotoPos(editor:PositionFromLine(math.max(0,jumpline-1))
|
||||
+ (jumplinepos and (math.max(0,jumplinepos-1)) or 0))
|
||||
editor:SetFocus()
|
||||
|
||||
-- doubleclick can set selection, so reset it
|
||||
errorlog:SetSelection(event:GetPosition(), event:GetPosition())
|
||||
event:Skip()
|
||||
end
|
||||
end
|
||||
|
||||
-- doubleclick can set selection, so reset it;
|
||||
-- for consistency, do it even when no pattern is detected.
|
||||
local pos = event:GetPosition()
|
||||
if pos == -1 then pos = errorlog:GetLineEndPosition(event:GetLine()) end
|
||||
errorlog:SetSelection(pos, pos)
|
||||
end)
|
||||
|
||||
local function positionInLine(line)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
-- Copyright 2013 Paul Kulchenko, ZeroBrane LLC
|
||||
-- Copyright 2013-14 Paul Kulchenko, ZeroBrane LLC
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local iscaseinsensitive = wx.wxFileName("A"):SameAs(wx.wxFileName("a"))
|
||||
@@ -46,7 +47,9 @@ end
|
||||
function PackageUnRegister(file, ...)
|
||||
PackageEventHandleOne(file, "onUnRegister", ...)
|
||||
-- remove from the list of installed packages
|
||||
local package = ide.packages[file]
|
||||
ide.packages[file] = nil
|
||||
return package
|
||||
end
|
||||
|
||||
function PackageRegister(file, ...)
|
||||
@@ -112,11 +115,12 @@ function ide:FindDocumentsByPartialPath(path)
|
||||
return docs
|
||||
end
|
||||
function ide:GetInterpreter() return self.interpreter end
|
||||
function ide:GetInterpreters() return ide.interpreters 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:GetEditorNotebook() return self.frame.notebook end
|
||||
function ide:GetProject() return FileTreeGetDir() end
|
||||
function ide:GetLaunchedProcess() return self.debugger and self.debugger.pid end
|
||||
|
||||
function ide:GetSetting(path, setting)
|
||||
local settings = self.settings
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
-- Copyright 2013 Paul Kulchenko, ZeroBrane LLC
|
||||
-- Copyright 2013-14 Paul Kulchenko, ZeroBrane LLC
|
||||
---------------------------------------------------------
|
||||
|
||||
ide.proto.Document = {__index = {
|
||||
GetFileName = function(self) return self.fileName end,
|
||||
@@ -23,3 +24,8 @@ ide.proto.Interpreter = {__index = {
|
||||
GetName = function(self) return self.name end,
|
||||
GetFileName = function(self) return self.fname end,
|
||||
}}
|
||||
|
||||
ide.proto.Debugger = {__index = {
|
||||
IsRunning = function(self) return self.running end,
|
||||
IsConnected = function(self) return self.server end,
|
||||
}}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
@@ -392,16 +394,26 @@ function SettingsRestoreView()
|
||||
uimgr:LoadPerspective(layout, false)
|
||||
|
||||
-- check if debugging panes are not mentioned and float them
|
||||
local panes = frame.uimgr:GetAllPanes()
|
||||
for _, name in pairs({"stackpanel", "watchpanel"}) do
|
||||
local pane = frame.uimgr:GetPane(name)
|
||||
if pane:IsOk() and not layout:find(name) then pane:Float() end
|
||||
end
|
||||
-- unfortunately need to explicitly (re-)assign the caption,
|
||||
-- as it's going to be restored from the config regardless of how
|
||||
-- it is set now (which affects its translation)
|
||||
uimgr:GetPane("projpanel"):Caption(TR("Project"))
|
||||
|
||||
-- check if the toolbar is not mentioned in the layout and show it
|
||||
for _, name in pairs({"toolbar"}) do
|
||||
local pane = frame.uimgr:GetPane(name)
|
||||
if pane:IsOk() and not layout:find(name) then pane:Show() end
|
||||
end
|
||||
|
||||
-- remove captions from all panes
|
||||
local panes = frame.uimgr:GetAllPanes()
|
||||
for index = 0, panes:GetCount()-1 do
|
||||
uimgr:GetPane(panes:Item(index).name):CaptionVisible(false)
|
||||
end
|
||||
end
|
||||
|
||||
frame:GetStatusBar():Show(settingsReadSafe(settings,"statusbar",true))
|
||||
|
||||
uimgr:Update()
|
||||
|
||||
local layoutcur = saveNotebook(frame.bottomnotebook)
|
||||
@@ -448,6 +460,7 @@ function SettingsSaveView()
|
||||
settings:Write("uimgrlayout",uimgr:SavePerspective())
|
||||
settings:Write("nblayout", saveNotebook(frame.notebook))
|
||||
settings:Write("nbbtmlayout",saveNotebook(frame.bottomnotebook))
|
||||
settings:Write("statusbar",frame:GetStatusBar():IsShown())
|
||||
|
||||
settings:SetPath(path)
|
||||
end
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
local unpack = table.unpack or unpack
|
||||
--
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local ide = ide
|
||||
--[[ single instance
|
||||
open an UDP port - if it fails it is either because
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Copyright 2011-13 Paul Kulchenko, ZeroBrane LLC
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
----------
|
||||
@@ -24,37 +24,37 @@ local unpack = table.unpack or unpack
|
||||
function StylesGetDefault()
|
||||
return {
|
||||
-- lexer specific (inherit fg/bg from text)
|
||||
lexerdef = {fg = {128, 128, 128}},
|
||||
comment = {fg = {32, 127, 32}, bg = {250, 250, 240}, fill= true},
|
||||
stringtxt = {fg = {127, 0, 127}},
|
||||
stringeol = {fg = {0, 0, 0}, bg = {224, 192, 224}, fill = true},
|
||||
preprocessor = {fg = {127, 127, 0}},
|
||||
operator = {fg = {0, 0, 0}},
|
||||
number = {fg = {90, 0, 255}},
|
||||
lexerdef = {fg = {160, 160, 160}},
|
||||
comment = {fg = {128, 128, 128}},
|
||||
stringtxt = {fg = {128, 32, 16}},
|
||||
stringeol = {fg = {128, 32, 16}, bg = {224, 192, 224}, fill = true},
|
||||
preprocessor = {fg = {128, 128, 0}},
|
||||
operator = {fg = {64, 64, 64}},
|
||||
number = {fg = {80, 112, 255}},
|
||||
|
||||
keywords0 = {fg = {0, 0, 127}, b = true},
|
||||
keywords1 = {fg = {127, 0, 0}, b = true},
|
||||
keywords2 = {fg = {0, 127, 0}, b = true},
|
||||
keywords3 = {fg = {0, 0, 127}, b = true},
|
||||
keywords4 = {fg = {127, 0, 95}, b = true},
|
||||
keywords5 = {fg = {35, 95, 175}, b = true},
|
||||
keywords6 = {fg = {0, 127, 127}, b = true},
|
||||
keywords7 = {fg = {240, 255, 255}, b = true},
|
||||
keywords0 = {fg = {32, 32, 192}},
|
||||
keywords1 = {fg = {127, 32, 96}},
|
||||
keywords2 = {fg = {32, 127, 96}},
|
||||
keywords3 = {fg = {64, 32, 96}},
|
||||
keywords4 = {fg = {127, 0, 95}},
|
||||
keywords5 = {fg = {35, 95, 175}},
|
||||
keywords6 = {fg = {0, 127, 127}},
|
||||
keywords7 = {fg = {240, 255, 255}},
|
||||
|
||||
-- common (inherit fg/bg from text)
|
||||
text = nil, -- let os pick
|
||||
linenumber = {fg = {90, 90, 80}, bg = {240, 240, 240}},
|
||||
bracematch = {fg = {0, 0, 255}, b = true},
|
||||
bracemiss = {fg = {255, 0, 0 }, b = true},
|
||||
text = {fg = {64, 64, 64}, bg = {250, 250, 250}},
|
||||
linenumber = {fg = {128, 128, 128}, bg = {250, 250, 250}},
|
||||
bracematch = {fg = {32, 128, 255}, b = true},
|
||||
bracemiss = {fg = {255, 128, 32}, b = true},
|
||||
ctrlchar = nil,
|
||||
indent = {fg = {192, 192, 230}, bg = {255, 255, 255}},
|
||||
calltip = nil,
|
||||
|
||||
-- common special (need custom fg & bg)
|
||||
sel = {bg = {192, 192, 192}},
|
||||
sel = {bg = {208, 208, 208}},
|
||||
caret = {fg = {0, 0, 0}},
|
||||
caretlinebg = {bg = {240, 240, 230}},
|
||||
fold = {fg = {90, 90, 80}, bg = {250, 250, 250}, sel = {90+96, 90, 80}},
|
||||
fold = {fg = {192, 192, 192}, bg = {250, 250, 250}, sel = {160, 128, 224}},
|
||||
whitespace = nil,
|
||||
edge = {},
|
||||
|
||||
@@ -64,7 +64,7 @@ function StylesGetDefault()
|
||||
|
||||
-- markup
|
||||
['|'] = {fg = {127, 0, 127}},
|
||||
['`'] = {fg = {127, 127, 127}},
|
||||
['`'] = {fg = {64, 128, 64}},
|
||||
['['] = {hs = {32, 32, 127}},
|
||||
|
||||
-- markers
|
||||
@@ -79,7 +79,7 @@ function StylesGetDefault()
|
||||
|
||||
-- indicators
|
||||
indicator = {
|
||||
fncall = {},
|
||||
fncall = {st = wxstc.wxSTC_INDIC_HIDDEN}, -- hide by default
|
||||
varlocal = {},
|
||||
varglobal = {},
|
||||
varmasking = {},
|
||||
@@ -89,8 +89,9 @@ function StylesGetDefault()
|
||||
end
|
||||
|
||||
local markers = {
|
||||
breakpoint = {1, wxstc.wxSTC_MARK_CIRCLE, wx.wxColour(220, 0, 0), wx.wxColour(220, 0, 0)},
|
||||
currentline = {2, wxstc.wxSTC_MARK_ARROW, wx.wxBLACK, wx.wxColour(0, 220, 0)},
|
||||
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)},
|
||||
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)},
|
||||
@@ -309,6 +310,11 @@ function StylesApplyToEditor(styles,editor,font,fontitalic,lexerconvert)
|
||||
end
|
||||
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
|
||||
end
|
||||
|
||||
for name,style in pairs(styles) do
|
||||
if (specialmapping[name]) then
|
||||
specialmapping[name](editor,style)
|
||||
@@ -336,7 +342,7 @@ function StylesApplyToEditor(styles,editor,font,fontitalic,lexerconvert)
|
||||
if styles.calltip then editor:CallTipUseStyle(2) end
|
||||
|
||||
do
|
||||
local defaultfg = styles.text and styles.text.fg or {127,127,127}
|
||||
local defaultfg = {127,127,127}
|
||||
local indic = styles.indicator or {}
|
||||
|
||||
-- use styles.fncall if not empty and if indic.fncall is empty
|
||||
@@ -417,31 +423,3 @@ function ApplyStyleConfig(config, style)
|
||||
ReApplySpecAndStyles()
|
||||
end
|
||||
end
|
||||
|
||||
function LoadStyleConfig()
|
||||
local fileDialog = wx.wxFileDialog(ide.frame, "Open Config File",
|
||||
"/cfg",
|
||||
"",
|
||||
"Lua file (*.lua)|*.lua|All files (*)|*",
|
||||
wx.wxFD_OPEN + wx.wxFD_FILE_MUST_EXIST)
|
||||
if fileDialog:ShowModal() == wx.wxID_OK then
|
||||
ApplyStyleConfig(fileDialog:GetPath())
|
||||
end
|
||||
fileDialog:Destroy()
|
||||
end
|
||||
|
||||
--[[
|
||||
wxSTC_LUA_DEFAULT 0
|
||||
wxSTC_LUA_COMMENT 1
|
||||
wxSTC_LUA_COMMENTLINE 2
|
||||
wxSTC_LUA_COMMENTDOC 3
|
||||
wxSTC_LUA_NUMBER 4
|
||||
wxSTC_LUA_WORD 5
|
||||
wxSTC_LUA_STRING 6
|
||||
wxSTC_LUA_CHARACTER 7
|
||||
wxSTC_LUA_LITERALSTRING 8
|
||||
wxSTC_LUA_PREPROCESSOR 9
|
||||
wxSTC_LUA_OPERATOR 10
|
||||
wxSTC_LUA_IDENTIFIER 11
|
||||
wxSTC_LUA_STRINGEOL 12
|
||||
--]]
|
||||
|
||||
30
src/main.lua
@@ -1,3 +1,4 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
@@ -66,7 +67,7 @@ ide = {
|
||||
stylesoutshell = nil,
|
||||
|
||||
autocomplete = true,
|
||||
autoanalizer = true,
|
||||
autoanalyzer = true,
|
||||
acandtip = {
|
||||
shorttip = false,
|
||||
ignorecase = false,
|
||||
@@ -152,6 +153,7 @@ end
|
||||
if not wx.wxMOD_SHIFT then wx.wxMOD_SHIFT = 0x04 end
|
||||
-- wxDIR_NO_FOLLOW is missing in wxlua 2.8.12 as well
|
||||
if not wx.wxDIR_NO_FOLLOW then wx.wxDIR_NO_FOLLOW = 0x10 end
|
||||
if not wxaui.wxAUI_TB_PLAIN_BACKGROUND then wxaui.wxAUI_TB_PLAIN_BACKGROUND = 2^8 end
|
||||
|
||||
if not setfenv then -- Lua 5.2
|
||||
-- based on http://lua-users.org/lists/lua-l/2010-06/msg00314.html
|
||||
@@ -288,7 +290,9 @@ local function loadPackages(filter)
|
||||
loadToTab(filter, "packages", ide.packages, false, ide.proto.Plugin)
|
||||
if ide.oshome then
|
||||
local userpackages = MergeFullPath(ide.oshome, ".zbstudio/packages")
|
||||
loadToTab(filter, userpackages, ide.packages, false, ide.proto.Plugin)
|
||||
if wx.wxDirExists(userpackages) then
|
||||
loadToTab(filter, userpackages, ide.packages, false, ide.proto.Plugin)
|
||||
end
|
||||
end
|
||||
|
||||
-- check dependencies and assign file names to each package
|
||||
@@ -368,6 +372,16 @@ ide.config.os = os
|
||||
ide.config.wxstc = wxstc
|
||||
ide.config.load = { interpreters = loadInterpreters, specs = loadSpecs,
|
||||
tools = loadTools }
|
||||
do
|
||||
local num = 0
|
||||
ide.config.package = function(p)
|
||||
if p then
|
||||
num = num + 1
|
||||
local name = 'config'..num..'package'
|
||||
ide.packages[name] = setmetatable(p, ide.proto.Plugin)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
LoadLuaConfig(ide.config.path.app.."/config.lua")
|
||||
|
||||
@@ -477,15 +491,21 @@ end
|
||||
-- app-specific menus (Help/About), which are not recognized by MacOS
|
||||
-- as special items unless SetMenuBar is done after menus are populated.
|
||||
ide.frame:SetMenuBar(ide.frame.menuBar)
|
||||
if ide.wxver < "2.9.5" and ide.osname == 'Macintosh' then -- force refresh to fix the filetree
|
||||
pcall(function() ide.frame:ShowFullScreen(true) ide.frame:ShowFullScreen(false) end)
|
||||
end
|
||||
|
||||
resumePrint()
|
||||
|
||||
PackageEventHandle("onAppLoad")
|
||||
|
||||
-- The status bar content is drawn incorrectly if it is shown
|
||||
-- after being initially hidden.
|
||||
-- Show the statusbar and hide it after showing the frame, which fixes the issue.
|
||||
local statusbarfix = ide.osname == 'Windows' and not ide.frame:GetStatusBar():IsShown()
|
||||
if statusbarfix then ide.frame:GetStatusBar():Show(true) end
|
||||
|
||||
ide.frame:Show(true)
|
||||
|
||||
if statusbarfix then ide.frame:GetStatusBar():Show(false) end
|
||||
|
||||
wx.wxGetApp():MainLoop()
|
||||
|
||||
-- There are several reasons for this call:
|
||||
|
||||
38
src/util.lua
@@ -1,3 +1,4 @@
|
||||
-- Copyright 2011-14 Paul Kulchenko, ZeroBrane LLC
|
||||
-- authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
-- David Manura
|
||||
@@ -196,16 +197,12 @@ function FileSysGetRecursive(path, recursive, spec, skip)
|
||||
end
|
||||
getDir(path, spec)
|
||||
|
||||
-- explicitly sort files on Linux; directories first
|
||||
if ide.osname == 'Unix' then
|
||||
table.sort(content, function(a,b)
|
||||
local ad, bd = a:sub(-1) == sep, b:sub(-1) == sep
|
||||
-- both are folders or both are files
|
||||
if ad and bd or not ad and not bd then return a < b
|
||||
-- only one is folder; return true if it's the first one
|
||||
else return ad end
|
||||
end)
|
||||
local prefix = '\001' -- prefix to sort directories first
|
||||
local shadow = {}
|
||||
for _, v in ipairs(content) do
|
||||
shadow[v] = (v:sub(-1) == sep and prefix or '')..v:lower()
|
||||
end
|
||||
table.sort(content, function(a,b) return shadow[a] < shadow[b] end)
|
||||
|
||||
return content
|
||||
end
|
||||
@@ -451,3 +448,26 @@ function LoadSafe(data)
|
||||
end
|
||||
|
||||
function EscapeMagic(s) return s:gsub('([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end
|
||||
|
||||
function GetEditorWithFocus()
|
||||
local editor = GetEditor()
|
||||
local bnb = ide.frame.bottomnotebook
|
||||
for _,e in pairs({bnb.shellbox, bnb.errorlog}) do
|
||||
local ctrl = e:FindFocus()
|
||||
if ctrl and
|
||||
(ctrl:GetId() == e:GetId()
|
||||
or ide.osname == 'Macintosh' and
|
||||
ctrl:GetParent():GetId() == e:GetId()) then editor = e end
|
||||
end
|
||||
return editor or nil
|
||||
end
|
||||
|
||||
function GenerateProgramFilesPath(exec, sep)
|
||||
local env = os.getenv('ProgramFiles')
|
||||
return
|
||||
(env and env..'\\'..exec..sep or '')..
|
||||
[[C:\Program Files\]]..exec..sep..
|
||||
[[D:\Program Files\]]..exec..sep..
|
||||
[[C:\Program Files (x86)\]]..exec..sep..
|
||||
[[D:\Program Files (x86)\]]..exec
|
||||
end
|
||||
|
||||
@@ -52,6 +52,23 @@ editor:AddText([[
|
||||
ok(limit(10000, function() EditorAutoComplete(editor) end),
|
||||
"Auto-complete doesn't loop for classes that reference '...'.")
|
||||
|
||||
-- create a valuetype self-reference
|
||||
-- this is to test "s = Scan(); s:" fragment
|
||||
ide.apis.lua.baselib.io.valuetype = "io"
|
||||
ReloadLuaAPI()
|
||||
|
||||
editor:SetText('')
|
||||
editor:AddText([[
|
||||
s = io;
|
||||
s:]])
|
||||
|
||||
ok(limitdepth(1000, function() EditorAutoComplete(editor) end),
|
||||
"Auto-complete doesn't loop for classes that self-reference with 'valuetype'.")
|
||||
|
||||
-- restore valuetype
|
||||
ide.apis.lua.baselib.io.valuetype = nil
|
||||
ReloadLuaAPI()
|
||||
|
||||
local interpreter = ide:GetInterpreter():GetFileName()
|
||||
ProjectSetInterpreter("gideros")
|
||||
|
||||
|
||||
14
t/test.lua
@@ -24,6 +24,20 @@ ide.app.postinit = function()
|
||||
return ok, res
|
||||
end
|
||||
|
||||
function limitdepth (limit, func)
|
||||
local n = 0
|
||||
debug.sethook(function(event)
|
||||
if event == 'call' then n = n + 1
|
||||
elseif event == 'return' or event == 'tail return' then n = n - 1
|
||||
end
|
||||
if n > limit then error("exceeded") end
|
||||
end, "cr")
|
||||
local ok, res = pcall(func)
|
||||
n = 0
|
||||
debug.sethook()
|
||||
return ok, res
|
||||
end
|
||||
|
||||
-- find all test files and load them
|
||||
local files = FileSysGetRecursive("t", true, "*.lua")
|
||||
for k, v in ipairs(files) do
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Thanks to StackOverflow wiki (http://stackoverflow.com/a/246128)
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [[ $(uname) == 'Darwin' ]]; then
|
||||
open zbstudio/ZeroBraneStudio.app --args "$@"
|
||||
(cd "$DIR"; open zbstudio/ZeroBraneStudio.app --args "$@")
|
||||
else
|
||||
if [[ "$(uname -m)" == "x86_64" ]]; then ARCH="x64"; else ARCH="x86"; fi
|
||||
# Special thanks to StackOverflow wiki (http://stackoverflow.com/a/246128)
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
(cd "$DIR"; bin/linux/$ARCH/lua src/main.lua zbstudio "$@") &
|
||||
fi
|
||||
|
||||
@@ -9,26 +9,37 @@ editor.smartindent = true
|
||||
editor.fold = true
|
||||
|
||||
local G = ... -- this now points to the global environment
|
||||
if G.ide.osname == 'Macintosh' then
|
||||
local mac = G.ide.osname == 'Macintosh'
|
||||
local win = G.ide.osname == "Windows"
|
||||
if mac then
|
||||
local defaultsize = 11
|
||||
filetree.fontsize = defaultsize
|
||||
funclist.fontsize = defaultsize
|
||||
if G.ide.wxver >= "2.9.5" then
|
||||
editor.fontsize = defaultsize
|
||||
editor.fontname = "Monaco"
|
||||
outputshell.fontsize = editor.fontsize
|
||||
outputshell.fontname = editor.fontname
|
||||
editor.fontsize = defaultsize+1
|
||||
outputshell.fontsize = defaultsize
|
||||
end
|
||||
|
||||
editor.fontname = "Monaco"
|
||||
outputshell.fontname = editor.fontname
|
||||
else
|
||||
-- set Courier New in all other cases (Linux and Windows), otherwise
|
||||
-- a proportional font gets used by default, which doesn't look right.
|
||||
editor.fontname = "Courier New"
|
||||
local defaultsize = 10
|
||||
editor.fontsize = defaultsize+1
|
||||
outputshell.fontsize = defaultsize
|
||||
|
||||
local sysid, major, minor = G.wx.wxGetOsVersion()
|
||||
editor.fontname =
|
||||
win and (major == 5 and "Courier New" or "Consolas") or "Monospace"
|
||||
outputshell.fontname = editor.fontname
|
||||
end
|
||||
|
||||
outputshell.usewrap = true
|
||||
filehistorylength = 20
|
||||
menuformatrecentprojects = "%f | %i"
|
||||
|
||||
singleinstance = G.ide.osname ~= 'Macintosh'
|
||||
hidpi = mac -- support Retina displays by default (OSX)
|
||||
|
||||
singleinstance = not mac
|
||||
singleinstanceport = 0xe493
|
||||
|
||||
acandtip.shorttip = true
|
||||
@@ -43,8 +54,9 @@ interpreter = "luadeb"
|
||||
unhidewindow = { -- allow unhiding of GUI windows
|
||||
-- 1 - show if hidden, 0 - ignore, 2 -- hide if shown
|
||||
ConsoleWindowClass = 2,
|
||||
-- ignore the following windows when "showing all"
|
||||
IME = 0,
|
||||
['MSCTFIME UI'] = 0,
|
||||
-- GLUT/opengl/SDL applications (for example, moai)
|
||||
-- GLUT/opengl/SDL applications (for example, moai or love2d)
|
||||
GLUT = 1, FREEGLUT = 1, SDL_app = 1,
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 374 B |
BIN
zbstudio/res/16/wxART_DEBUG_DETACH.png
Normal file
|
After Width: | Height: | Size: 583 B |
|
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 594 B |
|
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 786 B |
BIN
zbstudio/res/16/wxART_DIR_SETUP.png
Normal file
|
After Width: | Height: | Size: 738 B |
|
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 602 B |
|
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 662 B |
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 451 B |
BIN
zbstudio/res/16/wxART_FIND_IN_FOLDER.png
Normal file
|
After Width: | Height: | Size: 671 B |
|
Before Width: | Height: | Size: 646 B After Width: | Height: | Size: 615 B |
|
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 778 B |
|
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 623 B |
|
Before Width: | Height: | Size: 783 B After Width: | Height: | Size: 698 B |
|
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 652 B |
|
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 753 B |
|
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 473 B |
BIN
zbstudio/res/24/wxART_DEBUG_DETACH.png
Normal file
|
After Width: | Height: | Size: 755 B |
|
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 799 B |
|
Before Width: | Height: | Size: 854 B After Width: | Height: | Size: 1008 B |
BIN
zbstudio/res/24/wxART_DIR_SETUP.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 780 B |
|
Before Width: | Height: | Size: 684 B After Width: | Height: | Size: 775 B |
|
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 495 B |
BIN
zbstudio/res/24/wxART_FIND_IN_FOLDER.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 905 B After Width: | Height: | Size: 1.3 KiB |