title: Java swt treeview popup menu
body: <p>Hiho,</p>
  
  <p>currently I have a working popup menu which appears when I click on a treeview item.
  But I want to show different popups for different tree view entries. I don't get a idea how to do so...</p>
  
  <p>Here is my code for creating the menu:</p>
  
  <pre><code> MenuManager menuMgr = new MenuManager("#PopupMenu"); 
   menuMgr.setRemoveAllWhenShown(true);
   menuMgr.addMenuListener(new IMenuListener() {
       @Override
       public void menuAboutToShow(IMenuManager manager) {
           Action action = new Action() {
        public void run() {
                  // So something
        }
    };
    action.setText("Set as working file");
    manager.add(action);
   }
  
   });
  
   Menu menu = menuMgr.createContextMenu(getTree());
   getTree().setMenu(menu);
  </code></pre>