workspaced.com.moduleman
-
Declaration
voidstart(stringprojectRoot);Initializes the module & import parser. Call with
{"cmd": "load", "components": ["moduleman"]} -
Declaration
voidstop();Has no purpose right now.
-
Declaration
FileChanges[]rename(stringmod, stringrename, boolrenameSubmodules= true);Renames a module to something else (only in the project root).
Parameters
renameSubmodules: when
true, this willrenamesubmodules of the module too. For example when renaminglib.comtolib.comsthis will alsorenamelib.com.*tolib.coms.*Return Value
all changes that need to happen to
renamethe module. If no module statement could be found this will return an empty array.Call With:
{"subcmd": "rename"} -
Declaration
CodeReplacement[]normalizeModules(stringfile, stringcode);Renames/adds/removes a module from a
fileto match the majority of files in the folder.Parameters
file: File path to the
fileto normalizecode: Current
codeinside the text buffer -
Declaration
const(string)[]getModule(stringcode);Returns the module name of a D
code