Lines 60-65
Link Here
|
60 |
import javax.swing.Icon; |
60 |
import javax.swing.Icon; |
61 |
import javax.swing.event.ChangeListener; |
61 |
import javax.swing.event.ChangeListener; |
62 |
import org.netbeans.api.annotations.common.NonNull; |
62 |
import org.netbeans.api.annotations.common.NonNull; |
|
|
63 |
import org.netbeans.api.annotations.common.NullAllowed; |
63 |
import org.netbeans.modules.projectapi.AuxiliaryConfigBasedPreferencesProvider; |
64 |
import org.netbeans.modules.projectapi.AuxiliaryConfigBasedPreferencesProvider; |
64 |
import org.netbeans.modules.projectapi.AuxiliaryConfigImpl; |
65 |
import org.netbeans.modules.projectapi.AuxiliaryConfigImpl; |
65 |
import org.netbeans.spi.project.AuxiliaryConfiguration; |
66 |
import org.netbeans.spi.project.AuxiliaryConfiguration; |
Lines 97-103
Link Here
|
97 |
* @return some information about it |
98 |
* @return some information about it |
98 |
* @see Project#getLookup |
99 |
* @see Project#getLookup |
99 |
*/ |
100 |
*/ |
100 |
public static ProjectInformation getInformation(Project p) { |
101 |
public static ProjectInformation getInformation(@NonNull Project p) { |
101 |
Lookup l = p.getLookup(); |
102 |
Lookup l = p.getLookup(); |
102 |
ProjectInformation pi = l.lookup(ProjectInformation.class); |
103 |
ProjectInformation pi = l.lookup(ProjectInformation.class); |
103 |
return new AnnotateIconProxyProjectInformation(pi != null ? pi : new BasicInformation(p)); |
104 |
return new AnnotateIconProxyProjectInformation(pi != null ? pi : new BasicInformation(p)); |
Lines 112-118
Link Here
|
112 |
* @return a list of sources for it |
113 |
* @return a list of sources for it |
113 |
* @see Project#getLookup |
114 |
* @see Project#getLookup |
114 |
*/ |
115 |
*/ |
115 |
public static Sources getSources(Project p) { |
116 |
public static Sources getSources(@NonNull Project p) { |
116 |
Lookup l = p.getLookup(); |
117 |
Lookup l = p.getLookup(); |
117 |
Sources s = l.lookup(Sources.class); |
118 |
Sources s = l.lookup(Sources.class); |
118 |
if (s != null) { |
119 |
if (s != null) { |
Lines 181-187
Link Here
|
181 |
* @return {@link Preferences} for the given project |
182 |
* @return {@link Preferences} for the given project |
182 |
* @since 1.16 |
183 |
* @since 1.16 |
183 |
*/ |
184 |
*/ |
184 |
public static Preferences getPreferences(Project project, Class clazz, boolean shared) { |
185 |
public static Preferences getPreferences(@NonNull Project project, @NonNull Class clazz, boolean shared) { |
185 |
Parameters.notNull("project", project); |
186 |
Parameters.notNull("project", project); |
186 |
Parameters.notNull("clazz", clazz); |
187 |
Parameters.notNull("clazz", clazz); |
187 |
|
188 |
|
Lines 195-201
Link Here
|
195 |
* @param master the original master project (for use with candidate param) |
196 |
* @param master the original master project (for use with candidate param) |
196 |
* @param candidate a candidate added subproject for master, or null |
197 |
* @param candidate a candidate added subproject for master, or null |
197 |
*/ |
198 |
*/ |
198 |
private static boolean visit(Map<Project,Boolean> encountered, Project curr, Project master, Project candidate) { |
199 |
private static boolean visit(@NonNull Map<Project,Boolean> encountered, @NonNull Project curr, Project master, @NullAllowed Project candidate) { |
199 |
if (encountered.containsKey(curr)) { |
200 |
if (encountered.containsKey(curr)) { |
200 |
if (encountered.get(curr)) { |
201 |
if (encountered.get(curr)) { |
201 |
return false; |
202 |
return false; |
Lines 376-382
Link Here
|
376 |
* @return an auxiliary configuration handle |
377 |
* @return an auxiliary configuration handle |
377 |
* @since org.netbeans.modules.projectapi/1 1.17 |
378 |
* @since org.netbeans.modules.projectapi/1 1.17 |
378 |
*/ |
379 |
*/ |
379 |
public static AuxiliaryConfiguration getAuxiliaryConfiguration(Project project) { |
380 |
public static AuxiliaryConfiguration getAuxiliaryConfiguration(@NonNull Project project) { |
380 |
Parameters.notNull("project", project); |
381 |
Parameters.notNull("project", project); |
381 |
return new AuxiliaryConfigImpl(project); |
382 |
return new AuxiliaryConfigImpl(project); |
382 |
} |
383 |
} |
Lines 395-401
Link Here
|
395 |
* @throws IOException if no such directory could be created |
396 |
* @throws IOException if no such directory could be created |
396 |
* @since org.netbeans.modules.projectapi/1 1.26 |
397 |
* @since org.netbeans.modules.projectapi/1 1.26 |
397 |
*/ |
398 |
*/ |
398 |
public static FileObject getCacheDirectory(Project project, Class<?> owner) throws IOException { |
399 |
public static FileObject getCacheDirectory(@NonNull Project project, @NonNull Class<?> owner) throws IOException { |
399 |
FileObject d; |
400 |
FileObject d; |
400 |
CacheDirectoryProvider cdp = project.getLookup().lookup(CacheDirectoryProvider.class); |
401 |
CacheDirectoryProvider cdp = project.getLookup().lookup(CacheDirectoryProvider.class); |
401 |
if (cdp != null) { |
402 |
if (cdp != null) { |