callback.onSymbolsFetchFailed(ERROR_SYMBOL_FETCH_FAIL);
return;
}
final String symbolMapUrl = resourceSymbolInfo.getSymbolMapUrl();
JsSymbolMap symbolMap = get(symbolMapUrl);
// We only want to request and parse for symbolMaps we havn't already
// parsed.
if (symbolMap == null) {
// Create the XhrCallback to service this request.
XhrCallback xhrCallback = new XhrCallback() {
public void onFail(XMLHttpRequest xhr) {
callback.onSymbolsFetchFailed(ERROR_SYMBOL_FETCH_FAIL);
dequeuePendingXhrs(symbolMapUrl, xhr, false);
if (ClientConfig.isDebugMode()) {
Logging.getLogger().logText(
"Fetching symbol map: " + symbolMapUrl + " failed.");
}
}
public void onSuccess(XMLHttpRequest xhr) {
// Double check that another XHR didnt pull it down and parse it.
JsSymbolMap fetchedSymbolMap = get(symbolMapUrl);
if (fetchedSymbolMap == null) {
fetchedSymbolMap = JsSymbolMap.parse(
resourceSymbolInfo.getSourceServer(),
resourceSymbolInfo.getSourceViewerServer(),
resourceSymbolInfo.getType(), xhr.getResponseText());