Java Code Examples for org.eclipse.lsp4j.jsonrpc.messages.ResponseErrorCode#serverNotInitialized()

The following examples show how to use org.eclipse.lsp4j.jsonrpc.messages.ResponseErrorCode#serverNotInitialized() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XWorkspaceManager.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @return the workspace configuration
 * @throws ResponseErrorException
 *             if the workspace is not yet initialized
 */
public IWorkspaceConfig getWorkspaceConfig() throws ResponseErrorException {
	if (workspaceConfig == null) {
		ResponseError error = new ResponseError(ResponseErrorCode.serverNotInitialized,
				"Workspace has not been initialized yet.", null);
		throw new ResponseErrorException(error);
	}
	return workspaceConfig;
}
 
Example 2
Source File: WorkspaceManager.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @return the workspace configuration
 * @throws ResponseErrorException
 *             if the workspace is not yet initialized
 */
protected IWorkspaceConfig getWorkspaceConfig() throws ResponseErrorException {
	if (workspaceConfig == null) {
		ResponseError error = new ResponseError(ResponseErrorCode.serverNotInitialized,
				"Workspace has not been initialized yet.", null);
		throw new ResponseErrorException(error);
	}
	return workspaceConfig;
}