Search in sources :

Example 1 with HeaderViewer

use of org.eclipse.wst.internet.monitor.ui.internal.viewers.HeaderViewer in project webtools.servertools by eclipse.

the class SendModifiedMessageAction method run.

/* (non-Javadoc)
	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
	 */
public void run(IAction action) {
    if (selection != null) {
        Object element = ((StructuredSelection) selection).getFirstElement();
        if (element != null && element instanceof ResendHTTPRequest) {
            ResendHTTPRequest req = (ResendHTTPRequest) element;
            ContentViewer curViewer = MonitorView.view.vm.getCurrentRequestViewer();
            HeaderViewer curHeaderViewer = MonitorView.view.vm.getCurrentRequestHeaderViewer();
            req.setRequest(curViewer.getContent(), Request.CONTENT);
            if (curHeaderViewer != null)
                req.setRequest(curHeaderViewer.getContent(), Request.TRANSPORT);
            req.sendRequest();
        }
    }
}
Also used : ResendHTTPRequest(org.eclipse.wst.internet.monitor.core.internal.http.ResendHTTPRequest) ContentViewer(org.eclipse.wst.internet.monitor.ui.internal.provisional.ContentViewer) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) HeaderViewer(org.eclipse.wst.internet.monitor.ui.internal.viewers.HeaderViewer)

Aggregations

StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1 ResendHTTPRequest (org.eclipse.wst.internet.monitor.core.internal.http.ResendHTTPRequest)1 ContentViewer (org.eclipse.wst.internet.monitor.ui.internal.provisional.ContentViewer)1 HeaderViewer (org.eclipse.wst.internet.monitor.ui.internal.viewers.HeaderViewer)1