cvs commit: jakarta-jmeter/src/core/org/apache/jmeter/plugin PluginManager.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cvs commit: jakarta-jmeter/src/core/org/apache/jmeter/plugin PluginManager.java

sebb-3
sebb        2005/06/14 17:04:31

  Modified:    src/core/org/apache/jmeter/plugin PluginManager.java
  Log:
  Pick up second icon names from getIconMappings() and store as disabledIcons
  [Original idea by Peter]
 
  Revision  Changes    Path
  1.8       +14 -3     jakarta-jmeter/src/core/org/apache/jmeter/plugin/PluginManager.java
 
  Index: PluginManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/plugin/PluginManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PluginManager.java 13 Feb 2004 02:40:54 -0000 1.7
  +++ PluginManager.java 15 Jun 2005 00:04:31 -0000 1.8
  @@ -23,6 +23,8 @@
   import javax.swing.ImageIcon;
   
   import org.apache.jmeter.gui.GUIFactory;
  +import org.apache.jorphan.logging.LoggingManager;
  +import org.apache.log.Logger;
   
   /**
    * @author Oliver Rossmueller
  @@ -32,6 +34,7 @@
   {
       private static final PluginManager instance = new PluginManager();
   
  +    private static final Logger log = LoggingManager.getLoggerForClass();
       private PluginManager()
       {
       }
  @@ -60,11 +63,19 @@
   
               if (resource == null)
               {
  -                // todo: log or throw exception
  +                log.warn("Can't find icon for "+icons[i][0]+" - "+icons[i][1]);
               }
               else
               {
                   GUIFactory.registerIcon(icons[i][0], new ImageIcon(resource));
  +                if (icons[i].length > 2 && icons[i][2] != null){
  +                    URL resource2 = classloader.getResource(icons[i][2].trim());
  +                    if (resource2 == null) {
  +                        log.info("Can't find disabled icon for "+icons[i][0]+" - "+icons[i][2]);
  +                    } else {
  +                        GUIFactory.registerDisabledIcon(icons[i][0], new ImageIcon(resource2));
  +                    }
  +                }
               }
           }
       }
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]