KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > tasklist > checkstyle > options > CheckstyleSettings


1 /*
2  * Sun Public License Notice
3  *
4  * The contents of this file are subject to the Sun Public License
5  * Version 1.0 (the "License"). You may not use this file except in
6  * compliance with the License. A copy of the License is available at
7  * http://www.sun.com/
8  *
9  * The Original Code is NetBeans. The Initial Developer of the Original
10  * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
11  * Microsystems, Inc. All Rights Reserved.
12  */

13
14 package org.netbeans.modules.tasklist.checkstyle.options;
15
16 import org.openide.options.SystemOption;
17 import org.openide.util.NbBundle;
18
19 /**
20  * checkstyle module settings
21  * @author hair
22  * @version $Id: CheckstyleSettings.java,v 1.1 2006/07/12 15:23:35 hair Exp $
23  */

24 public final class CheckstyleSettings extends SystemOption {
25
26     private static final long serialVersionUID = 1;
27
28     public static final String JavaDoc PROP_SCAN_CHECKSTYLE = "checkstyle"; //NOI18N
29

30     /**
31      * @return The url to the checkstyle rules to use
32      * copyright problems.
33      */

34     public String JavaDoc getCheckstyle() {
35         String JavaDoc c = (String JavaDoc) getProperty(PROP_SCAN_CHECKSTYLE);
36         if( c == null ){
37             return getClass().getResource("checkstyle_checks.xml").toExternalForm();
38         }
39         return c;
40     }
41
42     /** Sets the checkstyle property
43      * @param checkstyle The rules to use
44      * copyright problems.
45      */

46     public void setCheckstyle(String JavaDoc checkstyle) {
47         putProperty(PROP_SCAN_CHECKSTYLE, checkstyle, true);
48     }
49
50     public String JavaDoc displayName() {
51         return NbBundle.getMessage(CheckstyleSettings.class, "DisplayName");
52     }
53
54 }
55
Popular Tags