mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notnullified
This commit is contained in:
+8
@@ -40,11 +40,13 @@ public class ModuleAwareContentRoot implements ContentEntry {
|
||||
return myModule;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<SourceFolder> getSourceFolders(@NotNull JpsModuleSourceRootType<?> rootType) {
|
||||
return myDelegate.getSourceFolders(rootType);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<SourceFolder> getSourceFolders(@NotNull Set<? extends JpsModuleSourceRootType<?>> rootTypes) {
|
||||
return myDelegate.getSourceFolders(rootTypes);
|
||||
@@ -68,26 +70,31 @@ public class ModuleAwareContentRoot implements ContentEntry {
|
||||
return myDelegate.getSourceFolders();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public VirtualFile[] getSourceFolderFiles() {
|
||||
return myDelegate.getSourceFolderFiles();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ExcludeFolder[] getExcludeFolders() {
|
||||
return myDelegate.getExcludeFolders();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public VirtualFile[] getExcludeFolderFiles() {
|
||||
return myDelegate.getExcludeFolderFiles();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource) {
|
||||
return myDelegate.addSourceFolder(file, isTestSource);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource, @NotNull String packagePrefix) {
|
||||
return myDelegate.addSourceFolder(file, isTestSource, packagePrefix);
|
||||
@@ -101,6 +108,7 @@ public class ModuleAwareContentRoot implements ContentEntry {
|
||||
return myDelegate.addSourceFolder(file, type, properties);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceFolder addSourceFolder(@NotNull String url, boolean isTestSource) {
|
||||
return myDelegate.addSourceFolder(url, isTestSource);
|
||||
|
||||
@@ -64,6 +64,7 @@ public interface ContentEntry extends Synthetic {
|
||||
* @param rootType type of accepted source roots
|
||||
* @return list of source roots of the specified type containing in this content root
|
||||
*/
|
||||
@NotNull
|
||||
List<SourceFolder> getSourceFolders(@NotNull JpsModuleSourceRootType<?> rootType);
|
||||
|
||||
/**
|
||||
@@ -71,6 +72,7 @@ public interface ContentEntry extends Synthetic {
|
||||
* @param rootTypes types of accepted source roots
|
||||
* @return list of source roots of the specified types containing in this content root
|
||||
*/
|
||||
@NotNull
|
||||
List<SourceFolder> getSourceFolders(@NotNull Set<? extends JpsModuleSourceRootType<?>> rootTypes);
|
||||
|
||||
/**
|
||||
@@ -78,6 +80,7 @@ public interface ContentEntry extends Synthetic {
|
||||
*
|
||||
* @return list of all valid source roots.
|
||||
*/
|
||||
@NotNull
|
||||
VirtualFile[] getSourceFolderFiles();
|
||||
|
||||
/**
|
||||
@@ -85,6 +88,7 @@ public interface ContentEntry extends Synthetic {
|
||||
*
|
||||
* @return list of this <code>ContentEntry</code> {@link com.intellij.openapi.roots.ExcludeFolder}s
|
||||
*/
|
||||
@NotNull
|
||||
ExcludeFolder[] getExcludeFolders();
|
||||
|
||||
/**
|
||||
@@ -92,6 +96,7 @@ public interface ContentEntry extends Synthetic {
|
||||
*
|
||||
* @return list of all valid exclude roots.
|
||||
*/
|
||||
@NotNull
|
||||
VirtualFile[] getExcludeFolderFiles();
|
||||
|
||||
/**
|
||||
@@ -101,6 +106,7 @@ public interface ContentEntry extends Synthetic {
|
||||
* @param isTestSource true if the directory is added as a test source root.
|
||||
* @return the object representing the added root.
|
||||
*/
|
||||
@NotNull
|
||||
SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource);
|
||||
|
||||
/**
|
||||
@@ -112,6 +118,7 @@ public interface ContentEntry extends Synthetic {
|
||||
* package prefix is required.
|
||||
* @return the object representing the added root.
|
||||
*/
|
||||
@NotNull
|
||||
SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource, @NotNull String packagePrefix);
|
||||
|
||||
@NotNull
|
||||
@@ -125,6 +132,7 @@ public interface ContentEntry extends Synthetic {
|
||||
* @param isTestSource true if the directory is added as a test source root.
|
||||
* @return the object representing the added root.
|
||||
*/
|
||||
@NotNull
|
||||
SourceFolder addSourceFolder(@NotNull String url, boolean isTestSource);
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,6 +47,7 @@ public interface ModuleRootModel {
|
||||
* @return list of content entries for this module
|
||||
* @see ContentEntry
|
||||
*/
|
||||
@NotNull
|
||||
ContentEntry[] getContentEntries();
|
||||
|
||||
/**
|
||||
|
||||
+8
-1
@@ -113,11 +113,13 @@ public class ContentEntryImpl extends RootModelComponentBase implements ContentE
|
||||
return mySourceFolders.toArray(new SourceFolder[mySourceFolders.size()]);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<SourceFolder> getSourceFolders(@NotNull JpsModuleSourceRootType<?> rootType) {
|
||||
return getSourceFolders(Collections.singleton(rootType));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<SourceFolder> getSourceFolders(@NotNull Set<? extends JpsModuleSourceRootType<?>> rootTypes) {
|
||||
SmartList<SourceFolder> folders = new SmartList<SourceFolder>();
|
||||
@@ -144,6 +146,7 @@ public class ContentEntryImpl extends RootModelComponentBase implements ContentE
|
||||
return VfsUtilCore.toVirtualFileArray(result);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ExcludeFolder[] getExcludeFolders() {
|
||||
//assert !isDisposed();
|
||||
@@ -181,11 +184,13 @@ public class ContentEntryImpl extends RootModelComponentBase implements ContentE
|
||||
return VfsUtilCore.toVirtualFileArray(result);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource) {
|
||||
return addSourceFolder(file, isTestSource, SourceFolderImpl.DEFAULT_PACKAGE_PREFIX);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource, @NotNull String packagePrefix) {
|
||||
JavaSourceRootType type = isTestSource ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE;
|
||||
@@ -201,6 +206,7 @@ public class ContentEntryImpl extends RootModelComponentBase implements ContentE
|
||||
return addSourceFolder(new SourceFolderImpl(file, JpsElementFactory.getInstance().createModuleSourceRoot(file.getUrl(), type, properties), this));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceFolder addSourceFolder(@NotNull String url, boolean isTestSource) {
|
||||
assertFolderUnderMe(url);
|
||||
@@ -209,7 +215,8 @@ public class ContentEntryImpl extends RootModelComponentBase implements ContentE
|
||||
return addSourceFolder(new SourceFolderImpl(JpsElementFactory.getInstance().createModuleSourceRoot(url, type, properties), this));
|
||||
}
|
||||
|
||||
private SourceFolder addSourceFolder(SourceFolderImpl f) {
|
||||
@NotNull
|
||||
private SourceFolder addSourceFolder(@NotNull SourceFolderImpl f) {
|
||||
mySourceFolders.add(f);
|
||||
Disposer.register(this, f); //rewire source folder dispose parent from rootmodel to this content root
|
||||
return f;
|
||||
|
||||
+1
@@ -150,6 +150,7 @@ public class ModuleRootManagerImpl extends ModuleRootManager implements ModuleCo
|
||||
return myRootModel;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ContentEntry[] getContentEntries() {
|
||||
return myRootModel.getContentEntries();
|
||||
|
||||
@@ -153,6 +153,7 @@ public abstract class RootModelBase implements ModuleRootModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ContentEntry[] getContentEntries() {
|
||||
final Collection<ContentEntry> content = getContent();
|
||||
|
||||
+8
@@ -92,11 +92,13 @@ public class JpsContentEntry implements ContentEntry, Disposable {
|
||||
return mySourceFolders.toArray(new SourceFolder[mySourceFolders.size()]);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<SourceFolder> getSourceFolders(@NotNull JpsModuleSourceRootType<?> rootType) {
|
||||
return getSourceFolders(Collections.singleton(rootType));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<SourceFolder> getSourceFolders(@NotNull Set<? extends JpsModuleSourceRootType<?>> rootTypes) {
|
||||
List<SourceFolder> folders = new SmartList<SourceFolder>();
|
||||
@@ -108,6 +110,7 @@ public class JpsContentEntry implements ContentEntry, Disposable {
|
||||
return folders;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public VirtualFile[] getSourceFolderFiles() {
|
||||
return getFiles(getSourceFolders());
|
||||
@@ -124,6 +127,7 @@ public class JpsContentEntry implements ContentEntry, Disposable {
|
||||
return VfsUtilCore.toVirtualFileArray(result);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ExcludeFolder[] getExcludeFolders() {
|
||||
final ArrayList<ExcludeFolder> result = new ArrayList<ExcludeFolder>(myExcludeFolders);
|
||||
@@ -149,16 +153,19 @@ public class JpsContentEntry implements ContentEntry, Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public VirtualFile[] getExcludeFolderFiles() {
|
||||
return getFiles(getExcludeFolders());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource) {
|
||||
return addSourceFolder(file, isTestSource, "");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource, @NotNull String packagePrefix) {
|
||||
return addSourceFolder(file.getUrl(), isTestSource, packagePrefix);
|
||||
@@ -184,6 +191,7 @@ public class JpsContentEntry implements ContentEntry, Disposable {
|
||||
return sourceFolder;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceFolder addSourceFolder(@NotNull String url, boolean isTestSource) {
|
||||
return addSourceFolder(url, isTestSource, "");
|
||||
|
||||
Reference in New Issue
Block a user