Java Code Examples for com.intellij.util.containers.ContainerUtil#newTroveSet()

The following examples show how to use com.intellij.util.containers.ContainerUtil#newTroveSet() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UnityScriptGotoClassContributor.java    From consulo-unity3d with Apache License 2.0 5 votes vote down vote up
@Nonnull
@Override
public String[] getNames(Project project, boolean includeNonProjectItems)
{
	CommonProcessors.CollectProcessor<String> processor = new CommonProcessors.CollectProcessor<String>(ContainerUtil.<String>newTroveSet());
	processNames(processor, GlobalSearchScope.allScope(project), IdFilter.getProjectIdFilter(project, includeNonProjectItems));
	return processor.toArray(ArrayUtil.STRING_ARRAY_FACTORY);
}
 
Example 2
Source File: UnityScriptGotoClassContributor.java    From consulo-unity3d with Apache License 2.0 5 votes vote down vote up
@Nonnull
@Override
public NavigationItem[] getItemsByName(String name, String pattern, Project project, boolean includeNonProjectItems)
{
	CommonProcessors.CollectProcessor<NavigationItem> processor = new CommonProcessors.CollectProcessor<NavigationItem>(ContainerUtil.<NavigationItem>newTroveSet());
	processElementsWithName(name, processor, new FindSymbolParameters(pattern, name, GlobalSearchScope.allScope(project), IdFilter.getProjectIdFilter(project, includeNonProjectItems)));
	return processor.toArray(NavigationItem.ARRAY_FACTORY);
}
 
Example 3
Source File: CSharpTypeNameContributor.java    From consulo-csharp with Apache License 2.0 5 votes vote down vote up
@Nonnull
@Override
public String[] getNames(Project project, boolean includeNonProjectItems)
{
	CommonProcessors.CollectProcessor<String> processor = new CommonProcessors.CollectProcessor<String>(ContainerUtil.<String>newTroveSet());
	processNames(processor, GlobalSearchScope.allScope(project), IdFilter.getProjectIdFilter(project, includeNonProjectItems));
	return processor.toArray(ArrayUtil.STRING_ARRAY_FACTORY);
}
 
Example 4
Source File: CSharpTypeNameContributor.java    From consulo-csharp with Apache License 2.0 5 votes vote down vote up
@Nonnull
@Override
@RequiredReadAction
public NavigationItem[] getItemsByName(String name, final String pattern, Project project, boolean includeNonProjectItems)
{
	CommonProcessors.CollectProcessor<NavigationItem> processor = new CommonProcessors.CollectProcessor<NavigationItem>(ContainerUtil.<NavigationItem>newTroveSet());
	processElementsWithName(name, processor, new FindSymbolParameters(pattern, name, GlobalSearchScope.allScope(project), IdFilter.getProjectIdFilter(project, includeNonProjectItems)));
	return processor.toArray(NavigationItem.ARRAY_FACTORY);
}
 
Example 5
Source File: ProjectRootManagerComponent.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void markRootsForRefresh() {
  Set<String> paths = ContainerUtil.newTroveSet(FileUtil.PATH_HASHING_STRATEGY);
  addRootsFromModules(false, paths, paths);

  LocalFileSystem fs = LocalFileSystem.getInstance();
  for (String path : paths) {
    VirtualFile root = fs.findFileByPath(path);
    if (root instanceof NewVirtualFile) {
      ((NewVirtualFile)root).markDirtyRecursively();
    }
  }
}
 
Example 6
Source File: ConsoleFoldingSettings.java    From consulo with Apache License 2.0 5 votes vote down vote up
private void writeDiff(List<String> added, List<String> removed, boolean negated) {
  Set<String> baseline = ContainerUtil.newTroveSet();
  for (CustomizableConsoleFoldingBean regexp : CustomizableConsoleFoldingBean.EP_NAME.getExtensions()) {
    if (regexp.negate == negated) {
      baseline.add(regexp.substring);
    }
  }

  final List<String> current = patternList(negated);
  added.addAll(current);
  added.removeAll(baseline);

  baseline.removeAll(current);
  removed.addAll(baseline);
}