workspaced.com.dcd

Undocumented in source.

Members

Functions

addImports
void addImports(string[] imports)

Manually adds import paths as string array

findAndSelectPort
void findAndSelectPort(AsyncCallback cb, ushort port)

Searches for an open port to spawn dcd-server in asynchronously starting with port, always increasing by one.

findDeclaration
void findDeclaration(AsyncCallback cb, string code, int pos)

Finds the declaration of the symbol at position pos in the code

getDocumentation
void getDocumentation(AsyncCallback cb, string code, int pos)

Finds the documentation of the symbol at position pos in the code

getRunningPort
ushort getRunningPort()

Returns the used running port. Throws an error if using unix sockets instead

getSocketFile
string getSocketFile()

Returns the used socket file. Only available on OSX, linux and BSD with DCD >= 0.8.0 Throws an error if not available.

killServer
void killServer()

This will kill the process associated with the dcd-server instance

listCompletion
void listCompletion(AsyncCallback cb, string code, int pos)

Queries for code completion at position pos in code

refreshImports
void refreshImports()

Reloads import paths from the current provider. Call reload there before calling it here.

restartServer
void restartServer(AsyncCallback cb)

This will stop the dcd-server safely and restart it again using setup-server asynchronously

searchSymbol
auto searchSymbol(AsyncCallback cb, string query)

Searches for a symbol across all files using dcd-client --search

serverStatus
auto serverStatus()

This will query the current dcd-server status

setupServer
void setupServer(string[] additionalImports)

This will start the dcd-server and load import paths from the current provider

start
void start(string dir, string clientPath, string serverPath, ushort port, bool autoStart)

Load function for dcd. Call with {"cmd": "load", "components": ["dcd"]} This will start dcd-server and load all import paths specified by previously loaded modules such as dub if autoStart is true. It also checks for the version. All dcd methods are used with "cmd": "dcd" Note: This will block any incoming requests while loading.

startServer
void startServer(string[] additionalImports)

This will start the dcd-server

stop
void stop()

This stops the dcd-server instance safely and waits for it to exit

stopServer
void stopServer(AsyncCallback cb)

This stops the dcd-server asynchronously

stopServerSync
void stopServerSync()
Undocumented in source. Be warned that the author may not have intended to support it.
supportsUnixDomainSockets
bool supportsUnixDomainSockets(string ver)
Undocumented in source. Be warned that the author may not have intended to support it.
updateImports
void updateImports()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta