workspaced.com.moduleman
-
Declaration
void
start
(stringprojectRoot
);Initializes the module & import parser. Call with
{"cmd": "load", "components": ["moduleman"]}
-
Declaration
void
stop
();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 willrename
submodules of the module too. For example when renaminglib.com
tolib.coms
this will alsorename
lib.com.*
tolib.coms.*
Return Value
all changes that need to happen to
rename
the 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
file
to match the majority of files in the folder.Parameters
file: File path to the
file
to normalizecode: Current
code
inside the text buffer -
Declaration
const(string)[]
getModule
(stringcode
);Returns the module name of a D
code