Index: DefaultJScriptingLauncher.java
===================================================================
--- DefaultJScriptingLauncher.java	(revision 951)
+++ DefaultJScriptingLauncher.java	(revision 952)
@@ -21,20 +21,20 @@
 import org.gvsig.scripting.swing.api.JScriptingLauncher;
 import org.gvsig.scripting.swing.api.ScriptingUIManager;
 import org.gvsig.scripting.swing.impl.DefaultJScriptingBrowser.DefaultBrowserActionEvent;
+import org.gvsig.tools.swing.api.ActionListenerSupport;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.util.CancelledException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class DefaultJScriptingLauncher extends JPanel implements JScriptingLauncher, ActionListener {
 
     private static final Logger LOG = LoggerFactory.getLogger(DefaultJScriptingLauncher.class);
-    /**
-     *
-     */
+
     private static final long serialVersionUID = -2612734398104678920L;
 
-    protected ActionListener defaultActionlistener = null;
-//    protected ActionListener selectionActionlistener = null;
-//    protected ActionListener dropDownActionlistener = null;
+    
+    protected ActionListenerSupport defaultActionlisteners = null;
     JTabbedPane pestana;
     ScriptingUIManager uimanager;
     ScriptingManager manager;
@@ -43,6 +43,7 @@
         this.uimanager = uimanager;
         this.manager = uimanager.getManager();
 
+        this.defaultActionlisteners = ToolsSwingLocator.getToolsSwingManager().createActionListenerSupport();
         List<ScriptingFolder> folders = new ArrayList<>();
         folders.add(manager.getUserFolder());
         folders.addAll(manager.getAlternativeUserFolders());
@@ -80,40 +81,43 @@
 
     @Override
     public void addDefaultActionListener(ActionListener actionlistener) {
-        this.defaultActionlistener = actionlistener;
+        this.defaultActionlisteners.addActionListener(actionlistener);
     }
 
     @Override
     public void actionPerformed(ActionEvent e) {
-        BrowserActionEvent e2 = (BrowserActionEvent) e;
-
-        switch (e.getID()) {
-            case DefaultJScriptingBrowser.DEFAULT_ACTION:
-                if (this.defaultActionlistener == null) {
-                    ScriptingUnit unit = e2.getUnit();
-                    if( unit instanceof ScriptingBaseScript ) {
-                        ScriptingBaseScript script = (ScriptingBaseScript) unit;
-                        try {
-                            script.compile();
-                            script.runAsTask(null);
-                        } catch (ScriptingRunningException ex) {
-                            LOG.warn("Problems launching script '" + script.getName() + "'", ex);
+        try {
+            BrowserActionEvent e2 = (BrowserActionEvent) e;
+            switch (e.getID()) {
+                case DefaultJScriptingBrowser.DEFAULT_ACTION:
+                    if( this.defaultActionlisteners.hasActionListeners() ) {
+                        this.defaultActionlisteners.fireActionEvent(
+                            new DefaultBrowserActionEvent(this, DEFAULT_ACTION, "default", e2.getUnit())
+                        );
+                    } else {
+                        ScriptingUnit unit = e2.getUnit();
+                        if( unit instanceof ScriptingBaseScript ) {
+                            ScriptingBaseScript script = (ScriptingBaseScript) unit;
+                            try {
+                                script.compile();
+                                script.runAsTask(null);
+                            } catch (ScriptingRunningException ex) {
+                                LOG.warn("Problems launching script '" + script.getName() + "'", ex);
+                            }
                         }
                     }
-                } else {
-                    this.defaultActionlistener.actionPerformed(
-                            new DefaultBrowserActionEvent(this, DEFAULT_ACTION, "default", e2.getUnit())
+                    break;
+                case DefaultJScriptingBrowser.DROPDOWN_ACTION:
+                case DefaultJScriptingBrowser.SELECTION_ACTION:
+                    this.defaultActionlisteners.fireActionEvent(
+                            new DefaultBrowserActionEvent(this, e.getID(), "default", e2.getUnit())
                     );
-                }
-                break;
-            case DefaultJScriptingBrowser.DROPDOWN_ACTION:
-            case DefaultJScriptingBrowser.SELECTION_ACTION:
-                if (this.defaultActionlistener != null) {
-                    this.defaultActionlistener.actionPerformed(
-                            new DefaultBrowserActionEvent(this, DEFAULT_ACTION, "default", e2.getUnit())
-                    );
-                }
-                break;
+                    break;
+            }
+        } catch( CancelledException ex) {
+            // Do norhing
+        } catch(Throwable th) {
+            LOG.warn("",th);
         }
     }
 }
