This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 210465
Collapse All | Expand All

(-)projectapi/apichanges.xml (+24 lines)
Lines 107-112 Link Here
107
    <!-- ACTUAL CHANGES BEGIN HERE: -->
107
    <!-- ACTUAL CHANGES BEGIN HERE: -->
108
108
109
    <changes>
109
    <changes>
110
        
111
        <change id="DependencyProjectProvider">
112
            <api name="general"/>
113
            <summary></summary>
114
            <version major="1" minor="53"/>
115
            <date day="22" month="3" year="2013"/>
116
            <author login="mkleint"/>
117
            <compatibility semantic="no" addition="yes"/>
118
            <description>
119
                <p>
120
                    Newly introduced interface <code>DependencyProjectProvider</code> is meant as less general replacement for <code>SubprojectProvider</code>
121
                    as it's explicitly declaring it's contract to be the project's dependency projects. Code using <code>SubprojectProvider</code> currently
122
                    should evaluate if <code>DependencyProjectProvider</code> contract suits their usage. Please note that <code>DependencyProjectProvider</code> is not
123
                    mandatory for project types to implement and if it's missing, <code>SubprojectProvider</code> should be used.
124
                </p>
125
                <p>
126
                    Implementation note: In Maven based projects, <code>SubprojectProvider</code> no longer returns project dependendencies and only returns submodules for 
127
                    projects with pom packaging. <code>DependencyProjectProvider</code> is now the one returning project dependencies as the list depends on currently opened project list.
128
                </p>
129
            </description>
130
            <class package="org.netbeans.spi.project" name="DependencyProjectProvider"/>
131
            <issue number="210465"/>
132
        </change>
133
        
110
        <change id="LookupProviderSupport.multi">
134
        <change id="LookupProviderSupport.multi">
111
            <api name="general"/>
135
            <api name="general"/>
112
            <summary>New method createCompositeLookup(Lookup, Lookup) in LookupProviderSupport</summary>
136
            <summary>New method createCompositeLookup(Lookup, Lookup) in LookupProviderSupport</summary>
(-)projectapi/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.projectapi/1
2
OpenIDE-Module: org.netbeans.modules.projectapi/1
3
OpenIDE-Module-Specification-Version: 1.52
3
OpenIDE-Module-Specification-Version: 1.53
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/projectapi/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/projectapi/Bundle.properties
5
OpenIDE-Module-Layer: org/netbeans/modules/projectapi/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/projectapi/layer.xml
6
6
(-)projectapi/src/org/netbeans/spi/project/DependencyProjectProvider.java (+74 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2013 Sun Microsystems, Inc.
41
 */
42
43
package org.netbeans.spi.project;
44
45
import java.util.Set;
46
import javax.swing.event.ChangeListener;
47
import org.netbeans.api.project.Project;
48
49
/**
50
 * This is a less vague variant of the <code>SubprojectProvider</code> for code
51
 * that wants to access project's dependencies that are also projects.
52
 * Unlike some java level API this doesn't distinguish between compile, runtime, test level dependencies.
53
 * The implementation by project types is nonmandatory and if it's missing in the project's lookup, users should fallback to <code>SubprojectProvider</code>
54
 * @see Project#getLookup
55
 * @author mkleint
56
 * @since 1.53
57
 */
58
public interface DependencyProjectProvider {
59
60
    Set<? extends Project> getDependencyProjects();
61
    
62
 /**
63
     * Add a listener to changes in the set of dependency projects.
64
     * @param listener a listener to add
65
     */
66
    void addChangeListener(ChangeListener listener);
67
    
68
    /**
69
     * Remove a listener to changes in the set of dependency projects.
70
     * @param listener a listener to remove
71
     */
72
    void removeChangeListener(ChangeListener listener);
73
        
74
}
(-)projectapi/src/org/netbeans/spi/project/SubprojectProvider.java (+3 lines)
Lines 54-59 Link Here
54
 * but typically subprojects would be "built" as part of this project or somehow
54
 * but typically subprojects would be "built" as part of this project or somehow
55
 * used in it as dependencies; or they may just be contained or agglomerated in
55
 * used in it as dependencies; or they may just be contained or agglomerated in
56
 * it somehow.
56
 * it somehow.
57
 * <b>Note:</b>Since 1.53, there is a more specifically defined variant <code>DependencyProjectProvider</code> that if defined in project provides a list of
58
 * projects the current project depends on. In some project types ( currently maven support) that is the preferred and supported way of getting project's dependency projects. 
59
 * The SubprojectProvider implementation is then used just to point to aggregator's module projects that are built together but have no direct dependencies on)
57
 * @see Project#getLookup
60
 * @see Project#getLookup
58
 * @see <a href="@org-netbeans-modules-project-ant@/org/netbeans/spi/project/support/ant/ReferenceHelper.html#createSubprojectProvider()"><code>ReferenceHelper.createSubprojectProvider</code></a>
61
 * @see <a href="@org-netbeans-modules-project-ant@/org/netbeans/spi/project/support/ant/ReferenceHelper.html#createSubprojectProvider()"><code>ReferenceHelper.createSubprojectProvider</code></a>
59
 * @author Jesse Glick
62
 * @author Jesse Glick

Return to bug 210465