/* (non-Javadoc)
  * @see model.observer.Observer#update(model.observer.Observable, java.lang.Object)
  */
 @Override
 public void update(Observable<List<Plugin>> source, List<Plugin> newPlugins) {
   menuBar.removePluginsMenu();
   System.out.println("Modifications in plugins folder !");
   for (Plugin plugin : newPlugins) {
     menuBar.createMenu(plugin);
     System.out.println("Added " + plugin.getLabel());
   }
 }
Ejemplo n.º 2
0
 /**
  * method update will update the list of items of the tools menu with the list of plugins found by
  * the finder
  *
  * @param finderPlugins
  */
 public void update(ArrayList<Plugin> finderPlugins) {
   this.removeAll();
   for (Plugin p : finderPlugins) {
     final Plugin plugAdd = p;
     JMenuItem plug = new JMenuItem(p.getLabel());
     plug.addActionListener(
         new ActionListener() {
           public void actionPerformed(ActionEvent event) {
             transformTextArea(plugAdd);
           }
         });
     this.add(plug);
   }
 }