initWidget(containerPanel);
}
public static void listRequest(final MethodNode method, final TreeItem methodTreeItem) {
Vector buttonTreeItems = WadlTreeRoot.removeChildrenXKeepButtons(methodTreeItem, WadlXml.requestNode);
RequestNode request = method.getRequest();
if (request == null) {
Button addRequestButton = new Button(GuiFactory.strings.addRequest());
addRequestButton.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
method.addRequest(new RequestNode(method, method.getApplication()));
listRequest(method, methodTreeItem);
}
});
TreeItem addRequestTreeItem = new TreeItem(addRequestButton);
addRequestTreeItem.setUserObject(WadlXml.requestNode);
methodTreeItem.addItem(addRequestTreeItem);
return;
}
RequestItem requestItem = new RequestItem(method, methodTreeItem);
TreeItem requestTreeItem = new TreeItem(requestItem);
requestTreeItem.setUserObject(WadlXml.requestNode);
methodTreeItem.addItem(requestTreeItem);
methodTreeItem.setState(SettingsDialog.treeItemsAlwaysOpen);
// check whether the request came from an analyzed uri...
String requestString = "";
if (request.getApplication() != null) {
requestString = request.getApplication().getAnalyzer().getRequestString();
}
ParamItem.listParams(
request,
requestTreeItem,
requestString);