KickJava   Java API By Example, From Geeks To Geeks.

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


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 import java.util.Set JavaDoc;
24 import org.netbeans.api.project.Project;
25 import org.netbeans.spi.project.AuxiliaryConfiguration;
26 import org.netbeans.spi.project.support.ant.AntProjectHelper;
27 import org.netbeans.spi.project.support.ant.PropertyEvaluator;
28 import org.openide.filesystems.FileObject;
29 import org.openide.nodes.Node;
30 import org.openide.util.Lookup;
31
32 /**
33  * Description of base freeform project extension. Instances should be
34  * registered into default lookup. Freeform project will always call all
35  * registered implementations of this interface and it is up to the
36  * implementation to decide (based on the project's metadata) whether they
37  * want or should enhance the project or not.
38  *
39  * @author David Konecny, Jesse Glick
40  */

41 public interface ProjectNature {
42
43     /**
44      * Check project and provide additional build targets to be shown in
45      * target mapping customizer panel if it is project of your type. Order
46      * of targets is important.
47      * @return a list of {@link TargetDescriptor}s (can be empty but not null)
48      */

49     List JavaDoc<TargetDescriptor> getExtraTargets(Project project, AntProjectHelper projectHelper, PropertyEvaluator projectEvaluator, AuxiliaryConfiguration aux);
50     
51     /**
52      * Returns set of XML schemas describing syntax of <code>project.xml</code> defined by this project extension.
53      * @return set of <code>String</code>s whose value is URL of XML schema file
54      */

55     Set JavaDoc<String JavaDoc> getSchemas();
56     
57     /**
58      * Get a set of view styles supported by the nature for displaying source folders in the logical view.
59      * @return a set of <code>String</code> style names (may be empty but not null)
60      */

61     Set JavaDoc<String JavaDoc> getSourceFolderViewStyles();
62     
63     /**
64      * Produce a logical view of a source folder in a style supported by the nature.
65      * @param project a project displaying the view
66      * @param folder a file folder (typically part of the project but not necessarily) to produce a view of
67      * @param includes an Ant-style includes list, or null
68      * @param excludes an Ant-style excludes list, or null
69      * @param style a view style; will be one of {@link #getSourceFolderViewStyles}
70      * @param name a suggested code name for the new node
71      * @param displayName a suggested display name for the new node (may be null, in which case provider is free to pick an appropriate display name)
72      * @return a logical view of that folder
73      * @throws IllegalArgumentException if the supplied style is not one of {@link #getSourceFolderViewStyles}
74      * @see org.netbeans.spi.project.support.ant.PathMatcher
75      * @since org.netbeans.modules.ant.freeform/1 1.15
76      */

77     Node createSourceFolderView(Project project, FileObject folder, String JavaDoc includes, String JavaDoc excludes, String JavaDoc style, String JavaDoc name, String JavaDoc displayName) throws IllegalArgumentException JavaDoc;
78     
79     /**
80      * Try to find a node selection in a source folder logical view.
81      * @param project a project displaying the view
82      * @param root a source folder view node which may have been returned by {@link #createSourceFolderView} (or not)
83      * @param target a lookup entry indicating the node to find (e.g. a {@link FileObject})
84      * @return a subnode of the root node representing the target, or null if either the target could not be found, or the root node was not recognized
85      * @see org.netbeans.spi.project.ui.LogicalViewProvider#findPath
86      */

87     Node findSourceFolderViewPath(Project project, Node root, Object JavaDoc target);
88     
89 }
90
Popular Tags