Commit Graph

167 Commits

Author SHA1 Message Date
Francesco Abbate fb1e08840e Merge branch 'dmon-1' into dmon-debug 2021-09-30 14:24:50 -07:00
Francesco Abbate 991b014a5f Remove calls to reschedule_project_scan 2021-09-29 22:16:44 +02:00
Francesco Abbate 4e58e8be28 Use new dmon version win watch_add/rm
Include changes in dmon not yet merged into master.
2021-09-29 14:08:05 +02:00
Francesco Abbate 2e59aaad3e Fix files limited project with dir monintoring
Changed approach to files limited project. Now we keep into the
top-level dir a list of subdirectories to be shown. When in file
limited mode we will not scan subdirectories unless they are in
the list of shown subdirectories.

With the new mechanism the function get_subdirectory_files always
recurse into subdirectories by default but is able to figure out
to stop recursing into subdirectories for files limited project.

The new mechanism is more robust of the previous one. Now the
rescan of subdirectories is compatible with files limited project.
2021-09-29 14:08:05 +02:00
Francesco Abbate 5a5fc04da4 Fix a new things about project rescan
Add a flag core.redraw to force redraw when rescan is done.

Inhibit recursion when files_limit is reached.

Still doesn't work correctly for files limited directories.
2021-09-29 14:08:05 +02:00
Francesco Abbate aa37f2b149 Fix several problem with directory update
When scanning a subdirectory on-demand ensure files aready present
are not added twice. Files or directory can be already present due
to dir monitoring create message.

Fix check for ignore files when adding a file to respond to a dir monitor
event to use each part of the file's path.

Fix C function to compare files for treeview placement.
2021-09-29 14:08:04 +02:00
Francesco Abbate ad7bdeb129 Fix bug with expanding directory when file limited
Introduce a new field in items generated by TreeView:each_item()
to point "dir" to the toplevel directory entry.

In this was we can simplify the code and know if the toplevel
directory is files limited.
2021-09-29 14:08:04 +02:00
Francesco Abbate 0d1bec8e35 Remove the treeview check for modified files
In the treeview the implementation was checking the files list
to detect if it changed because of a project scan. Since we removed
the project scan we no longer need the check.

Removed the TreeView's self.last table that stores previous files
object by top-level directories.
2021-09-29 14:08:04 +02:00
Francesco Abbate 7ee00c3317 Remove the project scan thread
Since the directory monitoring is now basically working we remove the
project scan thread periodically scanning the project directory.

Each project's directory is scanned only once at the beginning when
calling the function `core.add_project_directory` and is updated
incrementally when directory change events are treated.

The config variable `project_scan_rate` is removed as well as the
function `core.reschedule_project_scan`.
2021-09-29 14:08:04 +02:00
Francesco Abbate 1ba385eb5e First integration of dmon for directory monitoring 2021-09-29 14:07:34 +02:00
Francesco Abbate 5c4bfd9a77 Remove files from project list when collapsed
Only in limited files mode. We now symmetrically add the files if
a folder is expanded and remove them if it is collapsed.
2021-09-26 22:45:00 +02:00
Guldoman 0a36e66aba Fix `treeview:open-in-system` command on Windows
The first argument is the title for the `CMD` window.
2021-09-07 22:35:56 +02:00
Guldoman 3278eebdad Avoid exposing `treeview` commands when not usable 2021-09-07 15:03:00 +02:00
Guldoman 9887dd4746 Make open files follow renames 2021-09-07 15:03:00 +02:00
Francesco Abbate 68c1cc606f Bring back min len autocomplete default to 3 2021-09-07 15:03:00 +02:00
Guldoman e93bbc559c Fix crash in project search when project has no files 2021-09-07 15:03:00 +02:00
takase1121 e25ea1196a add context menu options for logview 2021-09-07 14:59:03 +02:00
Daniel Rocha 2b1c157a36 Refactored minimum scale bug fix code 2021-08-28 16:00:41 +02:00
Daniel Rocha 49ec7c88e8 Fix the additional four spaces to two spaces in the indent 2021-08-28 16:00:41 +02:00
Daniel Rocha dac3a9cba5 Fix minimal scale possible 2021-08-28 16:00:41 +02:00
Francesco Abbate d46475532f Introduce View objects context property
Used to determine if an instance of the given class should
be closed or not when a project session is terminated.
2021-08-27 23:55:17 +02:00
Adam Harrison b6af395fc7 2.0 changelog and modversion updates. 2021-08-17 20:24:44 +02:00
luarocks 205b52b08a Revert language_lua 2021-08-11 23:33:00 +02:00
luarocks 0bafece6a6 Add textadept theme and correct language_lua just a bit 2021-08-11 23:33:00 +02:00
Francesco Abbate 62bcc6abc2 Fix missing commas in autocomplete module 2021-08-02 10:07:43 +02:00
Francesco Abbate 26873d59a3 DEBUG: more debug messages 2021-07-25 20:57:54 +02:00
Francesco Abbate 219b2a1d5c Fix files limited project with dir monintoring
Changed approach to files limited project. Now we keep into the
top-level dir a list of subdirectories to be shown. When in file
limited mode we will not scan subdirectories unless they are in
the list of shown subdirectories.

With the new mechanism the function get_subdirectory_files always
recurse into subdirectories by default but is able to figure out
to stop recursing into subdirectories for files limited project.

The new mechanism is more robust of the previous one. Now the
rescan of subdirectories is compatible with files limited project.
2021-07-25 20:49:35 +02:00
Francesco Abbate 45a6c22b18 Fix a new things about project rescan
Add a flag core.redraw to force redraw when rescan is done.

Inhibit recursion when files_limit is reached.

Still doesn't work correctly for files limited directories.
2021-07-25 15:16:01 +02:00
Adam Harrison 0777a6f0b8 Merged dev to master. 2021-07-20 14:39:50 -04:00
Francesco Abbate 7605b626e8 Add language_cpp plugins
Brought form the 1.16.12 release.

It provides support for C++ using multi-part syntax patterns. Take
the priority over C language plugins for header files.
2021-07-19 08:18:38 +02:00
Adam Harrison 423cd33810 Typo. 2021-07-15 17:58:14 -04:00
Adam Harrison e539310e6d Namespace plugin-specific configuration settings. 2021-07-15 17:58:14 -04:00
Francesco Abbate 8e7d3c0f66 Fix several problem with directory update
When scanning a subdirectory on-demand ensure files aready present
are not added twice. Files or directory can be already present due
to dir monitoring create message.

Fix check for ignore files when adding a file to respond to a dir monitor
event to use each part of the file's path.

Fix C function to compare files for treeview placement.
2021-07-15 18:49:18 +02:00
Francesco Abbate d3c7a43a60 Fix bug with expanding directory when file limited
Introduce a new field in items generated by TreeView:each_item()
to point "dir" to the toplevel directory entry.

In this was we can simplify the code and know if the toplevel
directory is files limited.
2021-07-15 12:17:18 +02:00
Francesco Abbate 3e6b9fedfe Remove the treeview check for modified files
In the treeview the implementation was checking the files list
to detect if it changed because of a project scan. Since we removed
the project scan we no longer need the check.

Removed the TreeView's self.last table that stores previous files
object by top-level directories.
2021-07-14 23:15:05 +02:00
Francesco Abbate fb1f4af7d5 Remove the project scan thread
Since the directory monitoring is now basically working we remove the
project scan thread periodically scanning the project directory.

Each project's directory is scanned only once at the beginning when
calling the function `core.add_project_directory` and is updated
incrementally when directory change events are treated.

The config variable `project_scan_rate` is removed as well as the
function `core.reschedule_project_scan`.
2021-07-14 23:03:52 +02:00
Francesco Abbate b2affddf32 WIP: advance implementation bot not yet complete
Now we request a watch on the directory and we manage sending
and receiving directory change events.

The mechanism to update on the fly the directory scan is not complete.
The code to remove a file is there but we need to implement the code
to add a new file.
2021-07-13 17:40:26 +02:00
jgmdev afa0c175e8 Added delete confirmation using NagView. 2021-07-12 11:41:31 -04:00
jgmdev a4d5622eda Make use of core.reschedule_project_scan() 2021-07-11 23:03:33 -04:00
jgmdev 68459a9199 Added context menu to treeview. 2021-06-28 11:11:49 -04:00
Adam Harrison f9edca712d Added in lineguide to core. 2021-06-21 23:21:07 +02:00
jgmdev e9e1214e59 [plugin/scale] fixed wrong increase and decrease
If the user manually set the desired scale by calling scale.set(1.60)
the scale_level was not set accordingly which meant that later doing
a Scale:Increase/Decrease command yielded incorrect scale amount.
2021-06-17 20:58:22 -04:00
Francesco Abbate 1ad4289e76 Do not try to update topdir folder in treeview
If the directory expanded is a project's top directory
do not attempt to update its content.

Fix again issue #275
2021-06-17 19:07:32 +02:00
Francesco Abbate 4c9083398a Fix error in dirname computation in TreeView
In TreeView:on_mouse_pressed() we need to find the directory a
relative filename belongs to from its absolute filename.
The code was using string.find to locate the relative filename
within the absolute path but in some very specific cases we can
find a pattern which is not the right-most one leading to a
wrong directory name.

Fix the error by adding a loop to make sure we find the right-most
match. The standard Lua library has not a string.rfind to make a
reverse search.

Close #275
2021-06-17 18:23:30 +02:00
Francesco Abbate b39db791f9 Do not duplicate RootView method in contextmenu
The method RootView:on_mouse_pressed was copied in the contextmenu plugin with
a small modification to intercept the mouse clicks of the active view.

This approach is problematic because a relatively large portion of code is
duplicated.

We introduced a function named RootView.on_view_mouse_pressed to let plugins
like contextmenu intercepts mouse clicks in the active area without duplicating
the function RootView:on_mouse_pressed.
2021-06-17 10:22:31 +02:00
Adam Harrison 2fc245eb69 Added in an interface to the scale plugin. 2021-06-14 20:33:15 -04:00
Adam Harrison aed643893e Fixed contextmenu to play nice with dragging nodes. 2021-06-14 09:23:04 -04:00
Francesco Abbate e7d0709828 Fix error in workspace file error reporting 2021-06-08 12:06:54 +02:00
Jefferson González b4896ed69e
[plugin/contextmenu] Append itemsets that where registered. (#258) 2021-06-07 23:29:03 +02:00
takase1121 cd5c64fe8c prevent mouse movement from propagating when context menu is open 2021-06-05 08:51:17 +08:00