Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » SelectionEvents
SelectionEvents [message #309279] Sun, 22 October 2006 19:05
Eclipse UserFriend
Originally posted by: zurowska_kar.poczta.onet.pl

Hello,

Does anyone know why after adding SelectionListener to MenuItems in
cascade menu listener do not properly handle events (means nothing
happens).

I have recursive method to find the items in cascade menu:
private void setMenuListeners(Menu menu) {
if (menu == null){
return;
}
//System.out.println(menu.getParentItem());
for (MenuItem item : menu.getItems()){
//System.out.println(item.getText());
Menu inner = item.getMenu();

if (inner!=null){
setMenuListeners(inner);
}
item.removeSelectionListener(MenuSelectionHandler.getInstanc e());
item.addSelectionListener(MenuSelectionHandler.getInstance() );
Previous Topic:How to open an editor programmatically in eclipse?
Next Topic:Performance difference between Editable and Uneditable Code ???
Goto Forum:
  


Current Time: Wed Jul 23 01:21:37 EDT 2025

Powered by FUDForum. Page generated in 0.03870 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top