mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notnull
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,6 +58,7 @@ public final class PackageElement implements Queryable, RootsProvider {
|
||||
return myElement;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VirtualFile> getRoots() {
|
||||
Set<VirtualFile> roots= new HashSet<VirtualFile>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -108,7 +108,7 @@ public abstract class ProjectViewNode <Value> extends AbstractTreeNode<Value> im
|
||||
Object value,
|
||||
ViewSettings settings) throws
|
||||
InstantiationException {
|
||||
Object[] parameters = new Object[]{project, value, settings};
|
||||
Object[] parameters = {project, value, settings};
|
||||
for (Constructor<? extends AbstractTreeNode> constructor : (Constructor<? extends AbstractTreeNode>[])nodeClass.getConstructors()) {
|
||||
if (constructor.getParameterTypes().length != 3) continue;
|
||||
try {
|
||||
@@ -164,6 +164,7 @@ public abstract class ProjectViewNode <Value> extends AbstractTreeNode<Value> im
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VirtualFile> getRoots() {
|
||||
Value value = getValue();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,6 +17,7 @@ package com.intellij.ide.projectView;
|
||||
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.containers.HashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
@@ -25,6 +26,7 @@ public interface RootsProvider {
|
||||
|
||||
Set<VirtualFile> EMPTY_ROOTS = new HashSet<VirtualFile>();
|
||||
|
||||
@NotNull
|
||||
Collection<VirtualFile> getRoots();
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -62,6 +62,7 @@ public abstract class AbstractModuleNode extends ProjectViewNode<Module> impleme
|
||||
return "Module";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VirtualFile> getRoots() {
|
||||
return Arrays.asList(ModuleRootManager.getInstance(getValue()).getContentRoots());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -70,6 +70,7 @@ public abstract class ModuleGroupNode extends ProjectViewNode<ModuleGroup> imple
|
||||
return result;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VirtualFile> getRoots() {
|
||||
Collection<AbstractTreeNode> children = getChildren();
|
||||
|
||||
Reference in New Issue
Block a user