1   /**
2    * QJ-Pro
3    * Copyright (c) 2004, http://qjpro.sourceforge.net
4    *
5    * This program is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU General Public License as published by the
7    * Free Software Foundation; either version 2 of the License, or
8    * (at your option) any later version.
9    *
10   * This program is distributed in the hope that it will be useful, but WITHOUT
11   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13   * details.
14   *
15   * You should have received a copy of the GNU General Public License along with
16   * this program; if not, write to the Free Software Foundation, Inc.,
17   * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18   */
19  package com.qasystems.qstudio.java.integration.eclipse.actions;
20  
21  import com.qasystems.qstudio.java.classloader.Trier;
22  
23  import org.eclipse.jface.action.Action;
24  
25  /**
26   * Set the debuglevel of the analyzer.
27   */
28  public class DebugLevelAction extends Action {
29    private int debugLevel = Trier.SILENT;
30  
31    /**
32     * Creates a new DebugLevelAction object.
33     *
34     * @param text DOCUMENT ME!
35     * @param level DOCUMENT ME!
36     */
37    public DebugLevelAction(String text, int level) {
38      setText(text);
39      debugLevel = level;
40    }
41  
42    /**
43     * DOCUMENT ME!
44     */
45    public void run() {
46      Trier.setDefaultDebugLevel(debugLevel);
47    }
48  }
49