@Override
public void onMessage(String msg) {
view.setStatusMessage(msg);
}
};
final BodyPopupMenu bpm = new BodyPopupMenu(se_response, listener, true);
this.bodyPopupMenu = bpm;
// Attach popup menu
if (se_response.getEditorComponent() instanceof RSyntaxTextArea) {
se_response.getEditorComponent().addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
showPopup(e);
}
@Override
public void mouseReleased(MouseEvent e) {
showPopup(e);
}
private void showPopup(final MouseEvent e) {
if("".equals(se_response.getText().trim())){
// No response body
return;
}
if (e.isPopupTrigger()) {
bpm.show(e.getComponent(), e.getX(), e.getY());
}
}
});
}