Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 210465 | Differences between
and this patch

Collapse All | Expand All

(-)j2ee.common/src/org/netbeans/modules/j2ee/common/project/WhiteListUpdater.java (+1 lines)
 Lines 105-110    Link Here 
105
        List<Project> projs = new ArrayList<Project>();
105
        List<Project> projs = new ArrayList<Project>();
106
        projs.add(p);
106
        projs.add(p);
107
        //mkleint: see subprojectprovider for official contract, maybe classpath should be checked instead? see #210465
107
        //mkleint: see subprojectprovider for official contract, maybe classpath should be checked instead? see #210465
108
        //XXX since projectapi/1.53 there is a more specialized contract (ProjectDependenciesProvider and ProjectUtils.getDependencyProjects()) that might be more useful especially in maven projects.
108
        projs.addAll(p.getLookup().lookup(SubprojectProvider.class).getSubprojects());
109
        projs.addAll(p.getLookup().lookup(SubprojectProvider.class).getSubprojects());
109
        for (Project pp : projs) {
110
        for (Project pp : projs) {
110
            if (oldWhiteListId != null) {
111
            if (oldWhiteListId != null) {
(-)j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/session/SessionEJBWizardDescriptor.java (+1 lines)
 Lines 230-235    Link Here 
230
            return false;
230
            return false;
231
        }
231
        }
232
        //mkleint: see subprojectprovider for official contract, maybe classpath should be checked instead? see #210465
232
        //mkleint: see subprojectprovider for official contract, maybe classpath should be checked instead? see #210465
233
        //XXX since projectapi/1.53 there is a more specialized contract (ProjectDependenciesProvider and ProjectUtils.getDependencyProjects()) that might be more useful especially in maven projects.
233
        SubprojectProvider subprojectProvider = projectToCheck.getLookup().lookup(SubprojectProvider.class);
234
        SubprojectProvider subprojectProvider = projectToCheck.getLookup().lookup(SubprojectProvider.class);
234
        if (subprojectProvider != null) {
235
        if (subprojectProvider != null) {
235
            Set<? extends Project> subprojects = subprojectProvider.getSubprojects();
236
            Set<? extends Project> subprojects = subprojectProvider.getSubprojects();
(-)j2ee.ejbrefactoring/src/org/netbeans/modules/j2ee/ejbrefactoring/EjbRefactoringFactory.java (+1 lines)
 Lines 193-198    Link Here 
193
                }
193
                }
194
                //mkleint: see subprojectprovider for official contract, maybe classpath should be checked instead? see #210465
194
                //mkleint: see subprojectprovider for official contract, maybe classpath should be checked instead? see #210465
195
                //in this case J2eeApplicationprovider might provide the same results though.
195
                //in this case J2eeApplicationprovider might provide the same results though.
196
                //XXX since projectapi/1.53 there is a more specialized contract (ProjectDependenciesProvider and ProjectUtils.getDependencyProjects()) that might be more useful especially in maven projects.
196
                Object obj = project.getLookup().lookup(SubprojectProvider.class);
197
                Object obj = project.getLookup().lookup(SubprojectProvider.class);
197
                if ((obj != null) && (obj instanceof SubprojectProvider)) {
198
                if ((obj != null) && (obj instanceof SubprojectProvider)) {
198
                    Set subprojects = ((SubprojectProvider) obj).getSubprojects();
199
                    Set subprojects = ((SubprojectProvider) obj).getSubprojects();
(-)maven.apisupport/manifest.mf (-1 / +1 lines)
 Lines 2-6    Link Here 
2
OpenIDE-Module: org.netbeans.modules.maven.apisupport/1
2
OpenIDE-Module: org.netbeans.modules.maven.apisupport/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/apisupport/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/apisupport/Bundle.properties
4
AutoUpdate-Show-In-Client: false
4
AutoUpdate-Show-In-Client: false
5
OpenIDE-Module-Specification-Version: 1.40
5
OpenIDE-Module-Specification-Version: 1.41
6
6
(-)maven.apisupport/nbproject/project.xml (-1 / +1 lines)
 Lines 197-203    Link Here 
197
                    <compile-dependency/>
197
                    <compile-dependency/>
198
                    <run-dependency>
198
                    <run-dependency>
199
                        <release-version>1</release-version>
199
                        <release-version>1</release-version>
200
                        <specification-version>1.18</specification-version>
200
                        <specification-version>1.53</specification-version>
201
                    </run-dependency>
201
                    </run-dependency>
202
                </dependency>
202
                </dependency>
203
                <dependency>
203
                <dependency>
(-)maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java (-3 / +14 lines)
 Lines 45-57    Link Here 
45
import java.util.Arrays;
45
import java.util.Arrays;
46
import java.util.HashSet;
46
import java.util.HashSet;
47
import java.util.List;
47
import java.util.List;
48
import java.util.Set;
48
import org.netbeans.modules.maven.api.classpath.ProjectSourcesClassPathProvider;
49
import org.netbeans.modules.maven.api.classpath.ProjectSourcesClassPathProvider;
49
import org.netbeans.modules.maven.api.output.OutputProcessor;
50
import org.netbeans.modules.maven.api.output.OutputProcessor;
50
import org.netbeans.modules.maven.api.output.OutputUtils;
51
import org.netbeans.modules.maven.api.output.OutputUtils;
51
import org.netbeans.modules.maven.api.output.OutputVisitor;
52
import org.netbeans.modules.maven.api.output.OutputVisitor;
52
import org.netbeans.api.java.classpath.ClassPath;
53
import org.netbeans.api.java.classpath.ClassPath;
53
import org.netbeans.api.project.Project;
54
import org.netbeans.api.project.Project;
55
import org.netbeans.api.project.ProjectUtils;
54
import org.netbeans.spi.java.classpath.support.ClassPathSupport;
56
import org.netbeans.spi.java.classpath.support.ClassPathSupport;
57
import org.netbeans.spi.project.DependencyProjectProvider;
55
import org.netbeans.spi.project.SubprojectProvider;
58
import org.netbeans.spi.project.SubprojectProvider;
56
import org.openide.windows.OutputListener;
59
import org.openide.windows.OutputListener;
57
60
 Lines 68-74    Link Here 
68
        "mojo-execute#nbm:run-ide", //NOI18N
71
        "mojo-execute#nbm:run-ide", //NOI18N
69
        "mojo-execute#nbm:run-platform" //NOI18N
72
        "mojo-execute#nbm:run-platform" //NOI18N
70
    };
73
    };
71
    private Project project;
74
    private final Project project;
72
    private ClassPath classpath;
75
    private ClassPath classpath;
73
    
76
    
74
    /** Creates a new instance of TestOutputListenerProvider */
77
    /** Creates a new instance of TestOutputListenerProvider */
 Lines 84-91    Link Here 
84
        list.addAll(Arrays.asList(cp));
87
        list.addAll(Arrays.asList(cp));
85
        //for pom packaging projects subprojects/modules matter
88
        //for pom packaging projects subprojects/modules matter
86
        SubprojectProvider spp = prj.getLookup().lookup(SubprojectProvider.class);
89
        SubprojectProvider spp = prj.getLookup().lookup(SubprojectProvider.class);
90
        Set<Project> dpp = ProjectUtils.getDependencyProjects(prj, true);
91
        Set<Project> prjs = new HashSet<Project>();
92
        
87
        if (spp != null) {
93
        if (spp != null) {
88
            for (Project sub : spp.getSubprojects()) {
94
            prjs.addAll(spp.getSubprojects());
95
        }
96
        if (dpp != null) {
97
            prjs.addAll(dpp);
98
        }
99
        
100
        for (Project sub : prjs) {
89
                if (parents.contains(sub)) {
101
                if (parents.contains(sub)) {
90
                    continue;
102
                    continue;
91
                }
103
                }
 Lines 94-100    Link Here 
94
                    list.add(c);
106
                    list.add(c);
95
                }
107
                }
96
            }
108
            }
97
        }
98
        if (list.size() > 0) {
109
        if (list.size() > 0) {
99
            return ClassPathSupport.createProxyClassPath(list.toArray(new ClassPath[list.size()]));
110
            return ClassPathSupport.createProxyClassPath(list.toArray(new ClassPath[list.size()]));
100
        }
111
        }
(-)maven.j2ee/src/org/netbeans/modules/maven/j2ee/ExecutionChecker.java (-5 / +20 lines)
 Lines 44-49    Link Here 
44
import java.io.File;
44
import java.io.File;
45
import java.io.IOException;
45
import java.io.IOException;
46
import java.net.URL;
46
import java.net.URL;
47
import java.util.HashSet;
47
import java.util.List;
48
import java.util.List;
48
import java.util.Set;
49
import java.util.Set;
49
import java.util.logging.Level;
50
import java.util.logging.Level;
 Lines 70-75    Link Here 
70
import org.netbeans.modules.maven.spi.debug.MavenDebugger;
71
import org.netbeans.modules.maven.spi.debug.MavenDebugger;
71
import org.netbeans.modules.web.browser.spi.URLDisplayerImplementation;
72
import org.netbeans.modules.web.browser.spi.URLDisplayerImplementation;
72
import org.netbeans.spi.project.AuxiliaryProperties;
73
import org.netbeans.spi.project.AuxiliaryProperties;
74
import org.netbeans.spi.project.DependencyProjectProvider;
73
import org.netbeans.spi.project.ProjectConfiguration;
75
import org.netbeans.spi.project.ProjectConfiguration;
74
import org.netbeans.spi.project.ProjectConfigurationProvider;
76
import org.netbeans.spi.project.ProjectConfigurationProvider;
75
import org.netbeans.spi.project.ProjectServiceProvider;
77
import org.netbeans.spi.project.ProjectServiceProvider;
 Lines 356-366    Link Here 
356
        MavenProjectSupport.changeServer(project, true);
358
        MavenProjectSupport.changeServer(project, true);
357
359
358
        // refresh all subprojects
360
        // refresh all subprojects
359
        SubprojectProvider spp = targetPrj.getLookup().lookup(SubprojectProvider.class);
361
        Set<Project> childrenProjs = new HashSet<Project>();
360
        //mkleint: we are assuming complete result (transitive projects included)
362
        recurseSubProjects(targetPrj, childrenProjs);
361
        //that's ok as far as the current maven impl goes afaik, but not according to the
363
        Set<Project> res = ProjectUtils.getDependencyProjects(targetPrj, true);
362
        //documentation for SubProjectprovider
364
        if (res != null) {
363
        Set<? extends Project> childrenProjs = spp.getSubprojects();
365
            childrenProjs.addAll(res);
366
        }
367
        
364
        if (!childrenProjs.contains(project)) {
368
        if (!childrenProjs.contains(project)) {
365
            NbMavenProject.fireMavenProjectReload(project);
369
            NbMavenProject.fireMavenProjectReload(project);
366
        }
370
        }
 Lines 369-372    Link Here 
369
        }
373
        }
370
374
371
    }
375
    }
376
    
377
    private static void recurseSubProjects(Project prj, Set<Project> collected) {
378
        SubprojectProvider subs = prj.getLookup().lookup(SubprojectProvider.class);
379
        if (subs != null) {
380
            Set<? extends Project> prjs = subs.getSubprojects();
381
            collected.addAll(prjs);
382
            for (Project p : prjs) {
383
                recurseSubProjects(p, collected);
372
}
384
}
385
        }
386
    }
387
}
(-)maven/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.maven/2
2
OpenIDE-Module: org.netbeans.modules.maven/2
3
OpenIDE-Module-Specification-Version: 2.74
3
OpenIDE-Module-Specification-Version: 2.75
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/Bundle.properties
5
OpenIDE-Module-Layer: org/netbeans/modules/maven/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/maven/layer.xml
6
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
(-)maven/nbproject/project.xml (-1 / +1 lines)
 Lines 257-263    Link Here 
257
                    <compile-dependency/>
257
                    <compile-dependency/>
258
                    <run-dependency>
258
                    <run-dependency>
259
                        <release-version>1</release-version>
259
                        <release-version>1</release-version>
260
                        <specification-version>1.49</specification-version>
260
                        <specification-version>1.53</specification-version>
261
                    </run-dependency>
261
                    </run-dependency>
262
                </dependency>
262
                </dependency>
263
                <dependency>
263
                <dependency>
(-)maven/src/org/netbeans/modules/maven/ActionProviderImpl.java (-2 / +13 lines)
 Lines 589-599    Link Here 
589
                @Override
589
                @Override
590
                public void run() {
590
                public void run() {
591
                    //mkleint: usage of subprojectprovider is correct here
591
                    //mkleint: usage of subprojectprovider is correct here
592
                    SubprojectProvider subs = project.getLookup().lookup(SubprojectProvider.class);
592
                    Set<Project> lst = new HashSet<Project>();
593
                    Set<? extends Project> lst = subs.getSubprojects();
593
                    recurse(project, lst);
594
                    Project[] arr = lst.toArray(new Project[lst.size()]);
594
                    Project[] arr = lst.toArray(new Project[lst.size()]);
595
                    OpenProjects.getDefault().close(arr);
595
                    OpenProjects.getDefault().close(arr);
596
                }
596
                }
597
                
598
                private void recurse(Project prj, Set<Project> collected) {
599
                    SubprojectProvider subs = prj.getLookup().lookup(SubprojectProvider.class);
600
                    if (subs != null) {
601
                        Set<? extends Project> prjs = subs.getSubprojects();
602
                        collected.addAll(prjs);
603
                        for (Project p : prjs) {
604
                            recurse(p, collected);
605
                        }
606
                    }
607
                }
597
            });
608
            });
598
            
609
            
599
        }
610
        }
(-)maven/src/org/netbeans/modules/maven/DependencyProviderImpl.java (-84 / +8 lines)
 Lines 45-54    Link Here 
45
import java.beans.PropertyChangeEvent;
45
import java.beans.PropertyChangeEvent;
46
import java.beans.PropertyChangeListener;
46
import java.beans.PropertyChangeListener;
47
import java.io.File;
47
import java.io.File;
48
import java.io.IOException;
49
import java.util.Collections;
50
import java.util.HashSet;
48
import java.util.HashSet;
51
import java.util.List;
52
import java.util.Set;
49
import java.util.Set;
53
import javax.swing.event.ChangeEvent;
50
import javax.swing.event.ChangeEvent;
54
import javax.swing.event.ChangeListener;
51
import javax.swing.event.ChangeListener;
 Lines 56-67    Link Here 
56
import org.netbeans.modules.maven.api.NbMavenProject;
53
import org.netbeans.modules.maven.api.NbMavenProject;
57
import org.netbeans.modules.maven.queries.MavenFileOwnerQueryImpl;
54
import org.netbeans.modules.maven.queries.MavenFileOwnerQueryImpl;
58
import org.netbeans.api.project.Project;
55
import org.netbeans.api.project.Project;
59
import org.netbeans.api.project.ProjectManager;
56
import org.netbeans.spi.project.DependencyProjectProvider;
60
import org.netbeans.spi.project.ProjectServiceProvider;
57
import org.netbeans.spi.project.ProjectServiceProvider;
61
import org.netbeans.spi.project.SubprojectProvider;
62
import org.openide.ErrorManager;
63
import org.openide.filesystems.FileObject;
64
import org.openide.filesystems.FileUtil;
65
import org.openide.util.ChangeSupport;
58
import org.openide.util.ChangeSupport;
66
import org.openide.util.Utilities;
59
import org.openide.util.Utilities;
67
import org.openide.util.WeakListeners;
60
import org.openide.util.WeakListeners;
 Lines 71-85    Link Here 
71
 * and can be build as one unit. Uses maven multiproject infrastructure. (maven.multiproject.includes)
64
 * and can be build as one unit. Uses maven multiproject infrastructure. (maven.multiproject.includes)
72
 * @author  Milos Kleint
65
 * @author  Milos Kleint
73
 */
66
 */
74
@ProjectServiceProvider(service=SubprojectProvider.class, projectType="org-netbeans-modules-maven")
67
@ProjectServiceProvider(service=DependencyProjectProvider.class, projectType="org-netbeans-modules-maven")
75
public class SubprojectProviderImpl implements SubprojectProvider {
68
public class DependencyProviderImpl implements DependencyProjectProvider {
76
69
77
    private final Project project;
70
    private final Project project;
78
    private final ChangeSupport cs = new ChangeSupport(this);
71
    private final ChangeSupport cs = new ChangeSupport(this);
79
    private final ChangeListener listener2;
72
    private final ChangeListener listener2;
80
    private final PropertyChangeListener propertyChange;
73
    private final PropertyChangeListener propertyChange;
81
74
82
    public SubprojectProviderImpl(Project proj) {
75
    public DependencyProviderImpl(Project proj) {
83
        project = proj;
76
        project = proj;
84
        propertyChange = new PropertyChangeListener() {
77
        propertyChange = new PropertyChangeListener() {
85
            @Override public void propertyChange(PropertyChangeEvent evt) {
78
            @Override public void propertyChange(PropertyChangeEvent evt) {
 Lines 99-121    Link Here 
99
    }
92
    }
100
93
101
94
102
    @Override public Set<? extends Project> getSubprojects() {
95
    @Override public DependencyProjectProvider.Result getDependencyProjects() {
103
        Set<Project> projects = new HashSet<Project>();
96
        Set<Project> projects = new HashSet<Project>();
104
        File basedir = FileUtil.toFile(project.getProjectDirectory());
105
        try {
106
            addProjectModules(basedir, projects, project.getLookup().lookup(NbMavenProject.class).getMavenProject().getModules());
107
        } catch (InterruptedException x) {
108
            // can be interrupted in the open project dialog..
109
            return Collections.emptySet();
110
        }
111
        addKnownOwners(projects);
97
        addKnownOwners(projects);
112
        projects.remove(project);
98
        projects.remove(project);
113
        return projects;
99
        return new DependencyProjectProvider.Result(projects, true);
114
    }
100
    }
115
101
116
    private void addKnownOwners(Set<Project> resultset) {
102
    private void addKnownOwners(Set<Project> resultset) {
117
        List<Artifact> compileArtifacts = project.getLookup().lookup(NbMavenProject.class).getMavenProject().getCompileArtifacts();
103
        Set<Artifact> artifacts = project.getLookup().lookup(NbMavenProject.class).getMavenProject().getDependencyArtifacts();
118
        for (Artifact ar : compileArtifacts) {
104
        for (Artifact ar : artifacts) {
119
            File f = ar.getFile();
105
            File f = ar.getFile();
120
            if (f != null) {
106
            if (f != null) {
121
                Project p = MavenFileOwnerQueryImpl.getInstance().getOwner(Utilities.toURI(f));
107
                Project p = MavenFileOwnerQueryImpl.getInstance().getOwner(Utilities.toURI(f));
 Lines 126-193    Link Here 
126
        }
112
        }
127
    }
113
    }
128
114
129
    private boolean isProcessed(Set<Project> resultset, FileObject projectDir) {
130
131
        for (Project p : resultset) {
132
            if (p.getProjectDirectory().equals(projectDir)) {
133
                return true;
134
            }
135
        }
136
137
        return false;
138
    }
139
140
    private void addProjectModules(File basedir, Set<Project> resultset, List<String> modules) throws InterruptedException {
141
        if (modules == null) {
142
            return;
143
        }
144
        for (String path : modules) {
145
            if (Thread.interrupted()) {
146
                throw new InterruptedException();
147
            }
148
            if (path.trim().length() == 0) {
149
                //#175331
150
                continue;
151
            }
152
            File sub = new File(basedir, path);
153
            File projectFile = FileUtil.normalizeFile(sub);
154
            if (!projectFile.equals(basedir) //#175331
155
                 && projectFile.exists()) {
156
                FileObject projectDir = FileUtil.toFileObject(projectFile);
157
                if (projectDir != null && projectDir.isFolder() && !isProcessed(resultset, projectDir)) {
158
                    Project proj = processOneSubproject(projectDir);
159
                    NbMavenProjectImpl mv = proj != null ? proj.getLookup().lookup(NbMavenProjectImpl.class) : null;
160
                    if (mv != null) {
161
                        // ignore the pom type projects when resolving subprojects..
162
                        // maybe make an user settable option??
163
                        if (!NbMavenProject.TYPE_POM.equalsIgnoreCase(mv.getProjectWatcher().getPackagingType())) {
164
                            resultset.add(proj);
165
                        }
166
                        addProjectModules(FileUtil.toFile(mv.getProjectDirectory()),
167
                                resultset, mv.getOriginalMavenProject().getModules());
168
                    }
169
                } else {
170
                    // HUH?
171
                    ErrorManager.getDefault().log("fileobject not found=" + sub); //NOI18N
172
                }
173
            } else {
174
                ErrorManager.getDefault().log("project file not found=" + sub); //NOI18N
175
            }
176
        }
177
    }
178
179
    private Project processOneSubproject(FileObject projectDir) {
180
181
182
        try {
183
            return ProjectManager.getDefault().findProject(projectDir);
184
        } catch (IOException exc) {
185
            ErrorManager.getDefault().notify(exc);
186
        }
187
188
        return null;
189
    }
190
191
    @Override public synchronized void addChangeListener(ChangeListener changeListener) {
115
    @Override public synchronized void addChangeListener(ChangeListener changeListener) {
192
        if (!cs.hasListeners()) {
116
        if (!cs.hasListeners()) {
193
            project.getLookup().lookup(NbMavenProject.class).addPropertyChangeListener(propertyChange);
117
            project.getLookup().lookup(NbMavenProject.class).addPropertyChangeListener(propertyChange);
(-)maven/src/org/netbeans/modules/maven/SubprojectProviderImpl.java (-35 / +4 lines)
 Lines 50-60    Link Here 
50
import java.util.HashSet;
50
import java.util.HashSet;
51
import java.util.List;
51
import java.util.List;
52
import java.util.Set;
52
import java.util.Set;
53
import javax.swing.event.ChangeEvent;
54
import javax.swing.event.ChangeListener;
53
import javax.swing.event.ChangeListener;
55
import org.apache.maven.artifact.Artifact;
56
import org.netbeans.modules.maven.api.NbMavenProject;
54
import org.netbeans.modules.maven.api.NbMavenProject;
57
import org.netbeans.modules.maven.queries.MavenFileOwnerQueryImpl;
58
import org.netbeans.api.project.Project;
55
import org.netbeans.api.project.Project;
59
import org.netbeans.api.project.ProjectManager;
56
import org.netbeans.api.project.ProjectManager;
60
import org.netbeans.spi.project.ProjectServiceProvider;
57
import org.netbeans.spi.project.ProjectServiceProvider;
 Lines 63-73    Link Here 
63
import org.openide.filesystems.FileObject;
60
import org.openide.filesystems.FileObject;
64
import org.openide.filesystems.FileUtil;
61
import org.openide.filesystems.FileUtil;
65
import org.openide.util.ChangeSupport;
62
import org.openide.util.ChangeSupport;
66
import org.openide.util.Utilities;
67
import org.openide.util.WeakListeners;
68
63
69
/**
64
/**
70
 * finds subprojects (projects this one depends on) that are locally available
65
 * finds subprojects that are locally available
71
 * and can be build as one unit. Uses maven multiproject infrastructure. (maven.multiproject.includes)
66
 * and can be build as one unit. Uses maven multiproject infrastructure. (maven.multiproject.includes)
72
 * @author  Milos Kleint
67
 * @author  Milos Kleint
73
 */
68
 */
 Lines 76-82    Link Here 
76
71
77
    private final Project project;
72
    private final Project project;
78
    private final ChangeSupport cs = new ChangeSupport(this);
73
    private final ChangeSupport cs = new ChangeSupport(this);
79
    private final ChangeListener listener2;
80
    private final PropertyChangeListener propertyChange;
74
    private final PropertyChangeListener propertyChange;
81
75
82
    public SubprojectProviderImpl(Project proj) {
76
    public SubprojectProviderImpl(Project proj) {
 Lines 88-102    Link Here 
88
                }
82
                }
89
            }
83
            }
90
        };
84
        };
91
        listener2 = new ChangeListener() {
92
            @Override public void stateChanged(ChangeEvent event) {
93
                cs.fireChange();
94
            }
85
            }
95
        };
96
        MavenFileOwnerQueryImpl.getInstance().addChangeListener(
97
                WeakListeners.change(listener2,
98
                MavenFileOwnerQueryImpl.getInstance()));
99
    }
100
86
101
87
102
    @Override public Set<? extends Project> getSubprojects() {
88
    @Override public Set<? extends Project> getSubprojects() {
 Lines 108-131    Link Here 
108
            // can be interrupted in the open project dialog..
94
            // can be interrupted in the open project dialog..
109
            return Collections.emptySet();
95
            return Collections.emptySet();
110
        }
96
        }
111
        addKnownOwners(projects);
112
        projects.remove(project);
97
        projects.remove(project);
113
        return projects;
98
        return projects;
114
    }
99
    }
115
100
116
    private void addKnownOwners(Set<Project> resultset) {
117
        List<Artifact> compileArtifacts = project.getLookup().lookup(NbMavenProject.class).getMavenProject().getCompileArtifacts();
118
        for (Artifact ar : compileArtifacts) {
119
            File f = ar.getFile();
120
            if (f != null) {
121
                Project p = MavenFileOwnerQueryImpl.getInstance().getOwner(Utilities.toURI(f));
122
                if (p != null) {
123
                    resultset.add(p);
124
                }
125
            }
126
        }
127
    }
128
129
    private boolean isProcessed(Set<Project> resultset, FileObject projectDir) {
101
    private boolean isProcessed(Set<Project> resultset, FileObject projectDir) {
130
102
131
        for (Project p : resultset) {
103
        for (Project p : resultset) {
 Lines 158-171    Link Here 
158
                    Project proj = processOneSubproject(projectDir);
130
                    Project proj = processOneSubproject(projectDir);
159
                    NbMavenProjectImpl mv = proj != null ? proj.getLookup().lookup(NbMavenProjectImpl.class) : null;
131
                    NbMavenProjectImpl mv = proj != null ? proj.getLookup().lookup(NbMavenProjectImpl.class) : null;
160
                    if (mv != null) {
132
                    if (mv != null) {
161
                        // ignore the pom type projects when resolving subprojects..
162
                        // maybe make an user settable option??
163
                        if (!NbMavenProject.TYPE_POM.equalsIgnoreCase(mv.getProjectWatcher().getPackagingType())) {
164
                            resultset.add(proj);
133
                            resultset.add(proj);
134
//make non recursive, only direct modules are required to be included.                        
135
//                        addProjectModules(FileUtil.toFile(mv.getProjectDirectory()),
136
//                                resultset, mv.getOriginalMavenProject().getModules());
165
                        }
137
                        }
166
                        addProjectModules(FileUtil.toFile(mv.getProjectDirectory()),
167
                                resultset, mv.getOriginalMavenProject().getModules());
168
                    }
169
                } else {
138
                } else {
170
                    // HUH?
139
                    // HUH?
171
                    ErrorManager.getDefault().log("fileobject not found=" + sub); //NOI18N
140
                    ErrorManager.getDefault().log("fileobject not found=" + sub); //NOI18N
(-)profiler.loadgen/src/org/netbeans/modules/profiler/loadgen/LoadGenPluginImpl.java (+3 lines)
 Lines 265-270    Link Here 
265
    if (traverse) {
265
    if (traverse) {
266
      // process possible subprojects
266
      // process possible subprojects
267
      //mkleint: see subprojectprovider for official contract, see #210465
267
      //mkleint: see subprojectprovider for official contract, see #210465
268
        //XXX mkleint subprojectProvider semantics is fairly vague,
269
        // there is also a new (ProjectDependenciesProvider and ProjectUtils.getDependencyProjects()) contract that is more specific.
270
        
268
      SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
271
      SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
269
      if (spp != null) {
272
      if (spp != null) {
270
        for (Iterator it = spp.getSubprojects().iterator(); it.hasNext();) {
273
        for (Iterator it = spp.getSubprojects().iterator(); it.hasNext();) {
(-)profiler.nbimpl/src/org/netbeans/modules/profiler/nbimpl/project/ProjectUtilities.java (+6 lines)
 Lines 605-610    Link Here 
605
605
606
    public static void fetchSubprojects(final Project project, final Set<Project> projects) {
606
    public static void fetchSubprojects(final Project project, final Set<Project> projects) {
607
        // process possible subprojects
607
        // process possible subprojects
608
        //XXX mkleint subprojectProvider semantics is fairly vague,
609
        // there is also a new (ProjectDependenciesProvider and ProjectUtils.getDependencyProjects())contract that is more specific.
610
        // see issue #210465
608
        SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
611
        SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
609
612
610
        if (spp != null) {
613
        if (spp != null) {
 Lines 863-868    Link Here 
863
        if (traverse) {
866
        if (traverse) {
864
            // process possible subprojects
867
            // process possible subprojects
865
            //mkleint: see subprojectprovider for official contract, see #210465
868
            //mkleint: see subprojectprovider for official contract, see #210465
869
        //XXX mkleint subprojectProvider semantics is fairly vague,
870
        // there is also a new (ProjectDependenciesProvider and ProjectUtils.getDependencyProjects()) contract that is more specific.
871
            
866
            SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
872
            SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
867
873
868
            if (spp != null) {
874
            if (spp != null) {
(-)profiler.projectsupport/src/org/netbeans/modules/profiler/projectsupport/utilities/ProjectUtilities.java (+6 lines)
 Lines 323-328    Link Here 
323
    public static void fetchSubprojects(final Project project, final Set<Project> projects) {
323
    public static void fetchSubprojects(final Project project, final Set<Project> projects) {
324
        // process possible subprojects
324
        // process possible subprojects
325
        //mkleint: see subprojectprovider for official contract, see #210465
325
        //mkleint: see subprojectprovider for official contract, see #210465
326
        //XXX subprojectProvider semantics is fairly vague,
327
        // there is also a new DependencyProjectProvider contract that is more specific.
326
        SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
328
        SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
327
329
328
        if (spp != null) {
330
        if (spp != null) {
 Lines 493-498    Link Here 
493
            if (traverse) {
495
            if (traverse) {
494
                // process possible subprojects
496
                // process possible subprojects
495
                //mkleint: see subprojectprovider for official contract, maybe classpath should be checked instead? see #210465                
497
                //mkleint: see subprojectprovider for official contract, maybe classpath should be checked instead? see #210465                
498
        //XXX subprojectProvider semantics is fairly vague,
499
        // there is also a new (ProjectDependenciesProvider and ProjectUtils.getDependencyProjects()) contract that is more specific.
496
                SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
500
                SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
497
501
498
                if (spp != null) {
502
                if (spp != null) {
 Lines 545-550    Link Here 
545
    public static boolean hasSubprojects(Project project) {
549
    public static boolean hasSubprojects(Project project) {
546
        if (project == null) return false;
550
        if (project == null) return false;
547
        
551
        
552
        //XXX mkleint subprojectProvider semantics is fairly vague,
553
        // there is also a new (ProjectDependenciesProvider and ProjectUtils.getDependencyProjects()) contract that is more specific.
548
        SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
554
        SubprojectProvider spp = project.getLookup().lookup(SubprojectProvider.class);
549
555
550
        if (spp == null) {
556
        if (spp == null) {
(-)projectapi/apichanges.xml (+28 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="incompatible" 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
                    <code>ProjectUtils.getDependencyProjects</code> is the API entry point for modules wanting to access the new functionality.
127
                </p>
128
                <p>
129
                    Implementation note: In Maven based projects, <code>SubprojectProvider</code> no longer returns project dependendencies and only returns submodules for 
130
                    projects with pom packaging. <code>DependencyProjectProvider</code> is now the one returning project dependencies as the list depends on currently opened project list.
131
                </p>
132
            </description>
133
            <class package="org.netbeans.spi.project" name="DependencyProjectProvider"/>
134
            <class package="org.netbeans.api.project" name="ProjectUtils"/>
135
            <issue number="210465"/>
136
        </change>
137
        
110
        <change id="LookupProviderSupport.multi">
138
        <change id="LookupProviderSupport.multi">
111
            <api name="general"/>
139
            <api name="general"/>
112
            <summary>New method createCompositeLookup(Lookup, Lookup) in LookupProviderSupport</summary>
140
            <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/api/project/ProjectUtils.java (+35 lines)
 Lines 51-57    Link Here 
51
import java.beans.PropertyChangeListener;
51
import java.beans.PropertyChangeListener;
52
import java.beans.PropertyChangeSupport;
52
import java.beans.PropertyChangeSupport;
53
import java.io.IOException;
53
import java.io.IOException;
54
import java.util.Collections;
54
import java.util.HashMap;
55
import java.util.HashMap;
56
import java.util.HashSet;
55
import java.util.Map;
57
import java.util.Map;
56
import java.util.Set;
58
import java.util.Set;
57
import java.util.logging.Level;
59
import java.util.logging.Level;
 Lines 66-71    Link Here 
66
import org.netbeans.spi.project.AuxiliaryConfiguration;
68
import org.netbeans.spi.project.AuxiliaryConfiguration;
67
import org.netbeans.spi.project.AuxiliaryProperties;
69
import org.netbeans.spi.project.AuxiliaryProperties;
68
import org.netbeans.spi.project.CacheDirectoryProvider;
70
import org.netbeans.spi.project.CacheDirectoryProvider;
71
import org.netbeans.spi.project.DependencyProjectProvider;
69
import org.netbeans.spi.project.SubprojectProvider;
72
import org.netbeans.spi.project.SubprojectProvider;
70
import org.netbeans.spi.project.support.GenericSources;
73
import org.netbeans.spi.project.support.GenericSources;
71
import org.openide.filesystems.FileObject;
74
import org.openide.filesystems.FileObject;
 Lines 169-174    Link Here 
169
    }
172
    }
170
    
173
    
171
    /**
174
    /**
175
     * 
176
     * Utility method for access to <code>DependencyProjectProvider</code>, a less vague variant of the <code>SubprojectProvider</code> for code
177
     * that wants to access project's dependencies that are also projects.
178
     * Unlike some java level API this doesn't distinguish between compile, runtime, test level dependencies. 
179
     * 
180
     * @param root project where to start calculating dependencies
181
     * @param recursive true if entire dependency tree should be calculated, 
182
     *                some project implementation can return just direct dependency projects that themselves have dependency projects.
183
     *                Please note that false value does NOT guarantee that only direct dependency projects will be returned.
184
     * @return 
185
     * @since 1.53
186
     */
187
    public static Set<Project> getDependencyProjects(@NonNull Project root, boolean recursive) {
188
        DependencyProjectProvider prov = root.getLookup().lookup(DependencyProjectProvider.class);
189
        if (prov != null) {
190
            Set<Project> toRet = new HashSet<Project>();
191
            DependencyProjectProvider.Result res = prov.getDependencyProjects();
192
            toRet.addAll(toRet);
193
            if (recursive && !res.isRecursive()) {
194
                for (Project p : res.getProjects()) {
195
                    Set<Project> subs = getDependencyProjects(p, recursive);
196
                    if (subs != null) {
197
                        toRet.addAll(subs);
198
                    }
199
                }
200
            }
201
            return toRet;
202
        }
203
        return null;
204
    }
205
    
206
    /**
172
     * Return {@link Preferences} for the given project and given module.
207
     * Return {@link Preferences} for the given project and given module.
173
     * 
208
     * 
174
     * <p class="nonnormative">
209
     * <p class="nonnormative">
(-)projectapi/src/org/netbeans/spi/project/DependencyProjectProvider.java (+93 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.annotations.common.NonNull;
48
import org.netbeans.api.project.Project;
49
50
/**
51
 * This is a less vague variant of the <code>SubprojectProvider</code> for code
52
 * that wants to access project's dependencies that are also projects.
53
 * Unlike some java level API this doesn't distinguish between compile, runtime, test level dependencies.
54
 * The implementation by project types is nonmandatory and if it's missing in the project's lookup, users should fallback to <code>SubprojectProvider</code>
55
 * @see Project#getLookup
56
 * @author mkleint
57
 * @since 1.53
58
 */
59
public interface DependencyProjectProvider {
60
61
    @NonNull Result getDependencyProjects();
62
    
63
 /**
64
     * Add a listener to changes in the set of dependency projects.
65
     * @param listener a listener to add
66
     */
67
    void addChangeListener(@NonNull ChangeListener listener);
68
    
69
    /**
70
     * Remove a listener to changes in the set of dependency projects.
71
     * @param listener a listener to remove
72
     */
73
    void removeChangeListener(@NonNull ChangeListener listener);
74
    
75
    
76
    public final class Result {
77
        private final boolean recursive;
78
        private final Set<? extends Project> projects;
79
        
80
        public Result(@NonNull Set<? extends Project> projects, boolean recursive) {
81
            this.projects = projects;
82
            this.recursive = recursive;
83
        }
84
        
85
        public boolean isRecursive() {
86
            return recursive;
87
        }
88
89
        public @NonNull Set<? extends Project> getProjects() {
90
            return projects;
91
        }        
92
    }
93
}
(-)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
(-)spi.debugger.ui/src/org/netbeans/modules/debugger/ui/models/BreakpointGroup.java (-4 / +9 lines)
 Lines 425-438    Link Here 
425
    private static boolean isSubProjectOf(Project p, Project op,
425
    private static boolean isSubProjectOf(Project p, Project op,
426
                                          Map<Project, Set<? extends Project>> subProjects, // cache of sub-projects
426
                                          Map<Project, Set<? extends Project>> subProjects, // cache of sub-projects
427
                                          Set<Project> allSubProjects) {                    // all inspected sub-projects
427
                                          Set<Project> allSubProjects) {                    // all inspected sub-projects
428
        Set<? extends Project> sps = subProjects.get(op);
428
        Set<Project> sps = (Set<Project>) subProjects.get(op);
429
        if (sps == null) {
429
        if (sps == null) {
430
            sps = new HashSet<Project>();
430
            //mkleint: see subprojectprovider for official contract, see #210465
431
            //mkleint: see subprojectprovider for official contract, see #210465
431
            SubprojectProvider spp = op.getLookup().lookup(SubprojectProvider.class);
432
            SubprojectProvider spp = op.getLookup().lookup(SubprojectProvider.class);
432
            if (spp == null) {
433
            if (spp != null) {
433
                return false;
434
                sps.addAll(spp.getSubprojects());
434
            }
435
            }
435
            sps = spp.getSubprojects();
436
            // maven non-pom projects now only provide this list of dependency projects, not subprojects above
437
            Set<Project> res = ProjectUtils.getDependencyProjects(op, true);
438
            if (res != null) {
439
                sps.addAll(res);
440
            }
436
            subProjects.put(op, sps);
441
            subProjects.put(op, sps);
437
        }
442
        }
438
        for (Project sp : sps) {
443
        for (Project sp : sps) {
(-)subversion/src/org/netbeans/modules/subversion/ui/update/UpdateWithDependenciesAction.java (-2 / +3 lines)
 Lines 123-130    Link Here 
123
            Project project =  (Project) node.getLookup().lookup(Project.class);
123
            Project project =  (Project) node.getLookup().lookup(Project.class);
124
            projectsToUpdate.add(project);
124
            projectsToUpdate.add(project);
125
            //mkleint: see subprojectprovider for official contract, see #210465
125
            //mkleint: see subprojectprovider for official contract, see #210465
126
            // do we care if all or just the direct subprojects are included?
126
            //XXX do we care if all or just the direct subprojects are included?
127
            SubprojectProvider deps = (SubprojectProvider) project.getLookup().lookup(SubprojectProvider.class);
127
            //XXX maybe also ProjectDependenciesProvider and ProjectUtils.getDependencyProjects() should be checked?
128
            SubprojectProvider deps = project.getLookup().lookup(SubprojectProvider.class);
128
            if(deps != null) {
129
            if(deps != null) {
129
                Set<? extends Project> children = deps.getSubprojects();
130
                Set<? extends Project> children = deps.getSubprojects();
130
                for (Project child : children) {
131
                for (Project child : children) {
(-)versioning.util/src/org/netbeans/modules/versioning/util/ProjectUtilities.java (-1 / +5 lines)
 Lines 242-248    Link Here 
242
     * @return collection of direct subprojects
242
     * @return collection of direct subprojects
243
     */
243
     */
244
    public static Set<? extends Project> getSubProjects (Project p) {
244
    public static Set<? extends Project> getSubProjects (Project p) {
245
        Set<? extends Project> subprojects = null;
245
        Set<? extends Project> subprojects;
246
        //XXX mkleint subprojectProvider semantics is fairly vague,
247
        // there is also a new DependencyProjectProvider contract that is more specific.
246
        SubprojectProvider spp = p.getLookup().lookup(SubprojectProvider.class);
248
        SubprojectProvider spp = p.getLookup().lookup(SubprojectProvider.class);
247
        if (spp != null) {
249
        if (spp != null) {
248
            subprojects = spp.getSubprojects();
250
            subprojects = spp.getSubprojects();
 Lines 263-268    Link Here 
263
        Set<? extends Project> subprojects = cache.get(p);
265
        Set<? extends Project> subprojects = cache.get(p);
264
        if (subprojects == null) {
266
        if (subprojects == null) {
265
            // p's subprojects have not yet been searched
267
            // p's subprojects have not yet been searched
268
            //XXX mkleint subprojectProvider semantics is fairly vague,
269
            // there is also a new DependencyProjectProvider contract that is more specific.
266
            SubprojectProvider spp = p.getLookup().lookup(SubprojectProvider.class);
270
            SubprojectProvider spp = p.getLookup().lookup(SubprojectProvider.class);
267
            if (spp != null) {
271
            if (spp != null) {
268
                subprojects = spp.getSubprojects();
272
                subprojects = spp.getSubprojects();
(-)xml/src/org/netbeans/modules/xml/wizard/impl/SchemaImportGUI.form (-1 / +1 lines)
 Lines 1-4    Link Here 
1
<?xml version="1.1" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
2
3
<Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <Properties>
4
  <Properties>
(-)xml/src/org/netbeans/modules/xml/wizard/impl/SchemaImportGUI.java (+1 lines)
 Lines 241-246    Link Here 
241
                DataFolder folder = templateWizard.getTargetFolder();
241
                DataFolder folder = templateWizard.getTargetFolder();
242
                Project project = FileOwnerQuery.getOwner(folder.getPrimaryFile());
242
                Project project = FileOwnerQuery.getOwner(folder.getPrimaryFile());
243
                //mkleint: see subprojectprovider for official contract, see #210465
243
                //mkleint: see subprojectprovider for official contract, see #210465
244
                //XXX maybe also ProjectDependenciesProvider and ProjectUtils.getDependencyProjects() should be checked?
244
                SubprojectProvider provider = (SubprojectProvider)project.getLookup().lookup(SubprojectProvider.class);
245
                SubprojectProvider provider = (SubprojectProvider)project.getLookup().lookup(SubprojectProvider.class);
245
246
246
                Set refProjects = null;
247
                Set refProjects = null;

Return to bug 210465
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo