KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > ant > freeform > spi > TargetDescriptor


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.ant.freeform.spi;
21
22 import java.util.List JavaDoc;
23
24 /**
25  * Description of the build target to be shown in Target Mappings customizer
26  * panel.
27  * @see ProjectNature#getExtraTargets
28  * @author David Konecny
29  */

30 public final class TargetDescriptor {
31
32     private String JavaDoc actionName;
33     private List JavaDoc<String JavaDoc> defaultTargets;
34     private String JavaDoc actionLabel;
35     private String JavaDoc accessibleLabel;
36
37     /**
38      * Constructor.
39      * @param actionName IDE action name (see {@link org.netbeans.spi.project.ActionProvider})
40      * @param defaultTargets list of regular expressions to match name of the
41      * Ant target to which this IDE action usually maps
42      * @param actionLabel localized label of this action. To be shown in UI customizer
43      * @param accessibleLabel accessible label. Used together with actionLabel
44      */

45     public TargetDescriptor(String JavaDoc actionName, List JavaDoc<String JavaDoc> defaultTargets, String JavaDoc actionLabel, String JavaDoc accessibleLabel) {
46         this.actionName = actionName;
47         this.defaultTargets = defaultTargets;
48         this.actionLabel = actionLabel;
49         this.accessibleLabel = accessibleLabel;
50     }
51     
52     /**
53      * Name of the IDE action which is mapped to an Ant script.
54      */

55     public String JavaDoc getIDEActionName() {
56         return actionName;
57     }
58     
59     /**
60      * List of regular expressions to match name of the target in Ant script
61      * which usually maps to the IDE action. List will be processed in the
62      * given order so it is recommended to list the most specific ones first.
63      * @return cannot be null; can be empty array
64      */

65     public List JavaDoc<String JavaDoc> getDefaultTargets() {
66         return defaultTargets;
67     }
68
69     /**
70      * Label name under which this IDE action will be presented in the
71      * Target Mapping customizer panel.
72      */

73     public String JavaDoc getIDEActionLabel() {
74         return actionLabel;
75     }
76     
77     /**
78      * Accessibility of the getIDEActionLabel().
79      */

80     public String JavaDoc getAccessibleLabel() {
81         return accessibleLabel;
82     }
83     
84 }
85
Popular Tags