本文整理汇总了Java中com.intellij.util.containers.ContainerUtil.addAllNotNull方法的典型用法代码示例。如果您正苦于以下问题:Java ContainerUtil.addAllNotNull方法的具体用法?Java ContainerUtil.addAllNotNull怎么用?Java ContainerUtil.addAllNotNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.containers.ContainerUtil
的用法示例。
在下文中一共展示了ContainerUtil.addAllNotNull方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addRange
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private void addRange(int[] starts, int[] ends) {
List<FoldedBlock> result = new ArrayList<FoldedBlock>(3);
int[] rangeStarts = new int[myCount];
int[] rangeEnds = new int[myCount];
for (int number = 0; ; number++) {
int shift = getRangeShift(mySettings.range, number);
if (shift == -1) break;
for (int i = 0; i < myCount; i++) {
rangeStarts[i] = bound(starts[i] + shift, i);
rangeEnds[i] = bound(ends[i] - shift, i);
}
ContainerUtil.addAllNotNull(result, createRange(rangeStarts, rangeEnds, myExpandSuggester.isExpanded(rangeStarts, rangeEnds)));
}
if (result.size() > 0) {
FoldedBlock[] block = ContainerUtil.toArray(result, new FoldedBlock[result.size()]);
for (FoldedBlock folding : block) {
folding.installHighlighter(block);
}
myFoldings.add(block);
}
}
示例2: getReferencesByElement
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@NotNull
@Override
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
Collection<PsiReference> result = ContainerUtil.newArrayList();
for (PsiReferenceProvider child : children) {
ContainerUtil.addAllNotNull(result, child.getReferencesByElement(element, context));
}
return result.toArray(new PsiReference[result.size()]);
}
示例3: getParameterSubstrings
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@NotNull
@Override
public List<Substring> getParameterSubstrings() {
final List<Substring> result = new ArrayList<Substring>();
for (SectionField field : getParameterFields()) {
ContainerUtil.addAllNotNull(result, field.getNamesAsSubstrings());
}
return result;
}
示例4: getKeywordArgumentSubstrings
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@NotNull
@Override
public List<Substring> getKeywordArgumentSubstrings() {
final List<Substring> result = new ArrayList<Substring>();
for (SectionField field : getKeywordArgumentFields()) {
ContainerUtil.addAllNotNull(field.getNamesAsSubstrings());
}
return result;
}
示例5: getModules
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
public static Module[] getModules(@Nullable PsiFile context) {
if (context == null) return Module.EMPTY_ARRAY;
final Set<Module> modules = new HashSet<Module>();
for (ModuleContextProvider moduleContextProvider : Extensions.getExtensions(EP_NAME)) {
ContainerUtil.addAllNotNull(modules, moduleContextProvider.getContextModules(context));
}
Module module = ModuleUtilCore.findModuleForPsiElement(context);
if (module != null) modules.add(module);
return modules.toArray(new Module[modules.size()]);
}
示例6: configure
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@Override
public void configure(CommandLineParser parser) {
systemPropertiesCommandLineConverter.configure(parser);
parser.allowMixedSubcommandsAndOptions();
//noinspection unchecked
final Collection<Option> supportedOptions = GradleCommandLineOptionsProvider.getSupportedOptions().getOptions();
for (Option supportedOption : supportedOptions) {
final List<String> objects = ContainerUtil.newSmartList();
ContainerUtil.addAllNotNull(objects, supportedOption.getOpt(), supportedOption.getLongOpt());
if (!objects.isEmpty()) {
try {
final CommandLineOption option = parser.option(ArrayUtil.toStringArray(objects));
if (supportedOption.hasArg()) {
option.hasArgument();
}
if (supportedOption.hasArgs()) {
option.hasArguments();
}
option.hasDescription(supportedOption.getDescription());
}
catch (IllegalArgumentException ignore) {
}
}
}
}
示例7: getToolingExtensionClasses
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@NotNull
private Set<Class> getToolingExtensionClasses() {
final Set<Class> classes = ContainerUtil.<Class>set(
ExternalProject.class,
// gradle-tooling-extension-api jar
ProjectImportAction.class,
// gradle-tooling-extension-impl jar
ModelBuildScriptClasspathBuilderImpl.class,
ShortTypeHandling.class
);
ContainerUtil.addAllNotNull(classes, doGetToolingExtensionClasses());
return classes;
}
示例8: visitReferenceExpression
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@Override
public void visitReferenceExpression(GrReferenceExpression referenceExpression) {
final int size = myInfos.size();
super.visitReferenceExpression(referenceExpression);
if (size == myInfos.size()) {
List<HighlightInfo> infos = myReferenceChecker.checkReferenceExpression(referenceExpression);
if (infos != null) {
ContainerUtil.addAllNotNull(myInfos, infos);
}
}
}
示例9: addEnterProcessors
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
protected void addEnterProcessors(FixEnterProcessor... processors) {
ContainerUtil.addAllNotNull(myEnterProcessors, processors);
}
示例10: addFixers
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
protected void addFixers(Fixer<? extends SmartEnterProcessorWithFixers>... fixers) {
ContainerUtil.addAllNotNull(myFixers, fixers);
}