CallbackWrapper cbWrapper = new CallbackWrapper();
cbWrapper.delegate = context.getRequestFinishedCallback();
cbWrapper.methodName = method.getId();
// Create the view of the request editor and the single history item.
EmbeddedView view = new EmbeddedView(authManager,
context.getService(),
method,
context.getMethodParameters(),
cbWrapper,
HIDE_AUTH,
analytics);
cbWrapper.localView = view;
// If this context came bundled with a history item, that means the navigation references a
// previous executed request, and we should show the result.
List<HistoryItem> historyItems = context.getHistoryItems();
if (!historyItems.isEmpty()) {
view.showHistoryItem(generateHistoryItemView(Iterables.getLast(historyItems)));
}
detailPane.add(view);
}