Compare commits
2 commits
d114c5f300
...
0c72afcead
Author | SHA1 | Date | |
---|---|---|---|
0c72afcead | |||
841b76b916 |
1391 changed files with 34 additions and 31 deletions
|
@ -23,7 +23,7 @@ static func _blank_for_func_class(code: String) -> String:
|
||||||
var comment_line_regex = RegEx.create_from_string(r"^\s*#")
|
var comment_line_regex = RegEx.create_from_string(r"^\s*#")
|
||||||
var empty_line_regex = RegEx.create_from_string(r"^\s+$")
|
var empty_line_regex = RegEx.create_from_string(r"^\s+$")
|
||||||
var lines := code.split('\n')
|
var lines := code.split('\n')
|
||||||
var modified_lines: Array[String] = []
|
var modified_lines: PackedStringArray = []
|
||||||
|
|
||||||
for line: String in lines:
|
for line: String in lines:
|
||||||
# Spaces between functions & classes
|
# Spaces between functions & classes
|
||||||
|
|
|
@ -8,10 +8,12 @@ const TodoItem := preload("res://addons/Todo_Manager/todoItem_class.gd")
|
||||||
|
|
||||||
var _dockUI: Dock
|
var _dockUI: Dock
|
||||||
|
|
||||||
|
|
||||||
class TodoCacheValue:
|
class TodoCacheValue:
|
||||||
var todos: Array
|
var todos: Array
|
||||||
var last_modified_time: int
|
var last_modified_time: int
|
||||||
|
|
||||||
|
|
||||||
func _init(todos: Array, last_modified_time: int):
|
func _init(todos: Array, last_modified_time: int):
|
||||||
self.todos = todos
|
self.todos = todos
|
||||||
self.last_modified_time = last_modified_time
|
self.last_modified_time = last_modified_time
|
||||||
|
@ -19,7 +21,7 @@ class TodoCacheValue:
|
||||||
var todo_cache: Dictionary # { key: script_path, value: TodoCacheValue }
|
var todo_cache: Dictionary # { key: script_path, value: TodoCacheValue }
|
||||||
var remove_queue: Array
|
var remove_queue: Array
|
||||||
var combined_pattern: String
|
var combined_pattern: String
|
||||||
var cased_patterns : Array[String]
|
var cased_patterns: PackedStringArray
|
||||||
|
|
||||||
var refresh_lock := false # makes sure _on_filesystem_changed only triggers once
|
var refresh_lock := false # makes sure _on_filesystem_changed only triggers once
|
||||||
|
|
||||||
|
@ -51,7 +53,7 @@ func queue_remove(file: String):
|
||||||
_dockUI.todo_items.remove_at(i)
|
_dockUI.todo_items.remove_at(i)
|
||||||
|
|
||||||
|
|
||||||
func find_tokens_from_path(scripts: Array[String]) -> void:
|
func find_tokens_from_path(scripts: PackedStringArray) -> void:
|
||||||
for script_path in scripts:
|
for script_path in scripts:
|
||||||
var file := FileAccess.open(script_path, FileAccess.READ)
|
var file := FileAccess.open(script_path, FileAccess.READ)
|
||||||
var contents := file.get_as_text()
|
var contents := file.get_as_text()
|
||||||
|
@ -178,8 +180,8 @@ func _on_filesystem_changed() -> void:
|
||||||
rescan_files(false)
|
rescan_files(false)
|
||||||
|
|
||||||
|
|
||||||
func find_scripts() -> Array[String]:
|
func find_scripts() -> PackedStringArray:
|
||||||
var scripts : Array[String]
|
var scripts: PackedStringArray
|
||||||
var directory_queue: Array[String]
|
var directory_queue: Array[String]
|
||||||
var dir := DirAccess.open("res://")
|
var dir := DirAccess.open("res://")
|
||||||
if dir.get_open_error() == OK:
|
if dir.get_open_error() == OK:
|
||||||
|
@ -210,7 +212,8 @@ func get_cached_todos(script_path: String) -> Array:
|
||||||
return cached_value.todos
|
return cached_value.todos
|
||||||
return []
|
return []
|
||||||
|
|
||||||
func get_dir_contents(dir: DirAccess, scripts: Array[String], directory_queue: Array[String]) -> void:
|
|
||||||
|
func get_dir_contents(dir: DirAccess, scripts: PackedStringArray, directory_queue: PackedStringArray) -> void:
|
||||||
dir.include_navigational = false
|
dir.include_navigational = false
|
||||||
dir.include_hidden = false
|
dir.include_hidden = false
|
||||||
dir.list_dir_begin()
|
dir.list_dir_begin()
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue