parent
841b76b916
commit
0c72afcead
2 changed files with 33 additions and 30 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 empty_line_regex = RegEx.create_from_string(r"^\s+$")
|
||||
var lines := code.split('\n')
|
||||
var modified_lines: Array[String] = []
|
||||
var modified_lines: PackedStringArray = []
|
||||
|
||||
for line: String in lines:
|
||||
# Spaces between functions & classes
|
||||
|
|
|
@ -8,10 +8,12 @@ const TodoItem := preload("res://addons/Todo_Manager/todoItem_class.gd")
|
|||
|
||||
var _dockUI: Dock
|
||||
|
||||
|
||||
class TodoCacheValue:
|
||||
var todos: Array
|
||||
var last_modified_time: int
|
||||
|
||||
|
||||
func _init(todos: Array, last_modified_time: int):
|
||||
self.todos = todos
|
||||
self.last_modified_time = last_modified_time
|
||||
|
@ -19,7 +21,7 @@ class TodoCacheValue:
|
|||
var todo_cache: Dictionary # { key: script_path, value: TodoCacheValue }
|
||||
var remove_queue: Array
|
||||
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
|
||||
|
||||
|
@ -51,7 +53,7 @@ func queue_remove(file: String):
|
|||
_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:
|
||||
var file := FileAccess.open(script_path, FileAccess.READ)
|
||||
var contents := file.get_as_text()
|
||||
|
@ -178,8 +180,8 @@ func _on_filesystem_changed() -> void:
|
|||
rescan_files(false)
|
||||
|
||||
|
||||
func find_scripts() -> Array[String]:
|
||||
var scripts : Array[String]
|
||||
func find_scripts() -> PackedStringArray:
|
||||
var scripts: PackedStringArray
|
||||
var directory_queue: Array[String]
|
||||
var dir := DirAccess.open("res://")
|
||||
if dir.get_open_error() == OK:
|
||||
|
@ -210,7 +212,8 @@ func get_cached_todos(script_path: String) -> Array:
|
|||
return cached_value.todos
|
||||
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_hidden = false
|
||||
dir.list_dir_begin()
|
||||
|
|
Loading…
Reference in a new issue