return browser;
}
private void hookMenu() {
MenuManager manager = new MenuManager();
manager.setRemoveAllWhenShown(true);
manager.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
/* Back */
manager.add(new Action("Back") {
@Override
public void run() {
fBrowser.back();
}
@Override
public boolean isEnabled() {
return fBrowser.isBackEnabled();
}
@Override
public ImageDescriptor getImageDescriptor() {
return OwlUI.getImageDescriptor("icons/etool16/backward.gif");
}
});
/* Forward */
manager.add(new Action("Forward") {
@Override
public void run() {
fBrowser.forward();
}
@Override
public boolean isEnabled() {
return fBrowser.isForwardEnabled();
}
@Override
public ImageDescriptor getImageDescriptor() {
return OwlUI.getImageDescriptor("icons/etool16/forward.gif");
}
});
/* Reload */
manager.add(new Separator());
manager.add(new Action("Reload") {
@Override
public void run() {
fBrowser.refresh();
}
@Override
public ImageDescriptor getImageDescriptor() {
return OwlUI.getImageDescriptor("icons/elcl16/reload.gif");
}
});
/* Stop */
manager.add(new Action("Stop") {
@Override
public void run() {
fBrowser.stop();
}
@Override
public ImageDescriptor getImageDescriptor() {
return OwlUI.getImageDescriptor("icons/etool16/cancel.gif");
}
});
}
});
Menu menu = manager.createContextMenu(fBrowser);
fBrowser.setMenu(menu);
}