• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ArrayListSet类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.util.containers.ArrayListSet的典型用法代码示例。如果您正苦于以下问题:Java ArrayListSet类的具体用法?Java ArrayListSet怎么用?Java ArrayListSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ArrayListSet类属于com.intellij.util.containers包,在下文中一共展示了ArrayListSet类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getSelectedFiles

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@NotNull public VirtualFile[] getSelectedFiles() {
  final Set<VirtualFile> files = new ArrayListSet<VirtualFile>();
  for (final EditorWindow window : myWindows) {
    final VirtualFile file = window.getSelectedFile();
    if (file != null) {
      files.add(file);
    }
  }
  final VirtualFile[] virtualFiles = VfsUtilCore.toVirtualFileArray(files);
  final VirtualFile currentFile = getCurrentFile();
  if (currentFile != null) {
    for (int i = 0; i != virtualFiles.length; ++i) {
      if (Comparing.equal(virtualFiles[i], currentFile)) {
        virtualFiles[i] = virtualFiles[0];
        virtualFiles[0] = currentFile;
        break;
      }
    }
  }
  return virtualFiles;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:EditorsSplitters.java


示例2: getExistingNames

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
private Set<String> getExistingNames() {
  final AntDomElement hostingElement = getHostingAntDomElement();
  if (hostingElement == null) {
    return Collections.emptySet();
  }
  final AntDomTarget contextTarget = hostingElement.getParentOfType(AntDomTarget.class, false);
  if (contextTarget == null) {
    return Collections.emptySet();
  }
  final Set<String> existing = new ArrayListSet<String>();
  final String selfName = contextTarget.getName().getStringValue();
  if (selfName != null) {
    existing.add(selfName);
  }
  final String dependsString = contextTarget.getDependsList().getRawText();
  if (dependsString != null) {
    final StringTokenizer tokenizer = new StringTokenizer(dependsString, ",", false);
    while (tokenizer.hasMoreTokens()) {
      existing.add(tokenizer.nextToken().trim());
    }
  }
  return existing;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:AntDomTargetReference.java


示例3: getSelectedFiles

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@NotNull public VirtualFile[] getSelectedFiles() {
  final ArrayListSet<VirtualFile> files = new ArrayListSet<VirtualFile>();
  for (final EditorWindow window : myWindows) {
    final VirtualFile file = window.getSelectedFile();
    if (file != null) {
      files.add(file);
    }
  }
  final VirtualFile[] virtualFiles = VfsUtil.toVirtualFileArray(files);
  final VirtualFile currentFile = getCurrentFile();
  if (currentFile != null) {
    for (int i = 0; i != virtualFiles.length; ++i) {
      if (Comparing.equal(virtualFiles[i], currentFile)) {
        virtualFiles[i] = virtualFiles[0];
        virtualFiles[0] = currentFile;
        break;
      }
    }
  }
  return virtualFiles;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:EditorsSplitters.java


示例4: getOpenFiles

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@Override
@Nonnull
public VirtualFile[] getOpenFiles() {
  final Set<VirtualFile> files = new ArrayListSet<>();
  for (final DesktopEditorWindow myWindow : myWindows) {
    final EditorWithProviderComposite[] editors = myWindow.getEditors();
    for (final EditorWithProviderComposite editor : editors) {
      VirtualFile file = editor.getFile();
      // background thread may call this method when invalid file is being removed
      // do not return it here as it will quietly drop out soon
      if (file.isValid()) {
        files.add(file);
      }
    }
  }
  return VfsUtilCore.toVirtualFileArray(files);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:DesktopEditorsSplitters.java


示例5: getSelectedFiles

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@Override
@Nonnull
public VirtualFile[] getSelectedFiles() {
  final Set<VirtualFile> files = new ArrayListSet<>();
  for (final DesktopEditorWindow window : myWindows) {
    final VirtualFile file = window.getSelectedFile();
    if (file != null) {
      files.add(file);
    }
  }
  final VirtualFile[] virtualFiles = VfsUtilCore.toVirtualFileArray(files);
  final VirtualFile currentFile = getCurrentFile();
  if (currentFile != null) {
    for (int i = 0; i != virtualFiles.length; ++i) {
      if (Comparing.equal(virtualFiles[i], currentFile)) {
        virtualFiles[i] = virtualFiles[0];
        virtualFiles[0] = currentFile;
        break;
      }
    }
  }
  return virtualFiles;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:24,代码来源:DesktopEditorsSplitters.java


示例6: getPluginsForInstall

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@Nonnull
public static Set<IdeaPluginDescriptor> getPluginsForInstall(List<IdeaPluginDescriptor> pluginsToInstall, List<IdeaPluginDescriptor> allPlugins) {
  final List<PluginId> pluginIds = new ArrayList<>();
  for (IdeaPluginDescriptor pluginNode : pluginsToInstall) {
    pluginIds.add(pluginNode.getPluginId());
  }

  final Set<IdeaPluginDescriptor> toInstallAll = new ArrayListSet<>();

  for (IdeaPluginDescriptor toInstall : pluginsToInstall) {
    Set<PluginNode> depends = new ArrayListSet<>();
    collectDepends(toInstall, pluginIds, depends, allPlugins);

    toInstallAll.addAll(depends);
    toInstallAll.add(toInstall);
  }

  if(toInstallAll.isEmpty()) {
    throw new IllegalArgumentException("No plugins for install");
  }
  return toInstallAll;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:23,代码来源:PluginInstallUtil.java


示例7: projectOpened

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@Override
public void projectOpened() {
    work = new ArrayListSet<InferenceCapable>();
    inferenceQueueProcessor =
            new QueueProcessor<InferenceCapable>(new InferenceQueue(myProject), myProject.getDisposed(), false);



    StartupManager.getInstance(myProject).runWhenProjectIsInitialized(new Runnable() {
        @Override
        public void run() {
            DumbService.getInstance(myProject).runWhenSmart(new InitRunnable());
        }
    });
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:16,代码来源:LuaPsiManager.java


示例8: getOpenFiles

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@NotNull public VirtualFile[] getOpenFiles() {
  final Set<VirtualFile> files = new ArrayListSet<VirtualFile>();
  for (final EditorWindow myWindow : myWindows) {
    final EditorWithProviderComposite[] editors = myWindow.getEditors();
    for (final EditorWithProviderComposite editor : editors) {
      VirtualFile file = editor.getFile();
      // background thread may call this method when invalid file is being removed
      // do not return it here as it will quietly drop out soon
      if (file.isValid()) {
        files.add(file);
      }
    }
  }
  return VfsUtilCore.toVirtualFileArray(files);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:EditorsSplitters.java


示例9: getOpenFiles

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@NotNull public VirtualFile[] getOpenFiles() {
  final ArrayListSet<VirtualFile> files = new ArrayListSet<VirtualFile>();
  for (final EditorWindow myWindow : myWindows) {
    final EditorWithProviderComposite[] editors = myWindow.getEditors();
    for (final EditorWithProviderComposite editor : editors) {
      VirtualFile file = editor.getFile();
      // background thread may call this method when invalid file is being removed
      // do not return it here as it will quietly drop out soon
      if (file.isValid()) {
        files.add(file);
      }
    }
  }
  return VfsUtil.toVirtualFileArray(files);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:EditorsSplitters.java


示例10: getDomainKeys

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@NotNull
private Set<String> getDomainKeys(@NotNull String domain) {
    Set<String> uniqueKeySet = new ArrayListSet<String>();

    for(Set<String> splits: FileBasedIndex.getInstance().getValues(TranslationStubIndex.KEY, domain, GlobalSearchScope.allScope(getProject()))) {
        ContainerUtil.addAll(uniqueKeySet, splits);
    }

    return uniqueKeySet;
}
 
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:11,代码来源:TranslationStubIndexTest.java


示例11: VariableAssignedVisitor

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
public VariableAssignedVisitor(@NotNull JSVariable      variable,
                               @NotNull JSElement       context,
                               @NotNull Set<JSVariable> notUpdatedSymbols) {
    this.variable          = variable;
    this.context           = context;
    this.notUpdatedSymbols = notUpdatedSymbols;
    this.candidateSymbols  = new ArrayListSet<JSVariable>();

    this.candidateSymbols.add(variable);
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:11,代码来源:VariableAccessUtil.java


示例12: getDataType

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@NotNull
@Override
public DataType getDataType() {
    Set<DataType.Feature> features = new ArrayListSet<>();
    return new DataType("type", "type", 1,1, LengthUnit.BYTE, true, "a",  "a", false, null, features, 0);
}
 
开发者ID:nvlad,项目名称:yii2support,代码行数:7,代码来源:TestColumn.java


示例13: getPropInfoWithSupers

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
static Set<PropertyDetector.PropInfo> getPropInfoWithSupers(UClass uClass){
    Set<PropertyDetector.PropInfo> mSet = new ArrayListSet<>();
    getPropInfoWithSupers(uClass.getPsi(), mSet);
    return mSet;
}
 
开发者ID:LightSun,项目名称:data-mediator,代码行数:6,代码来源:PropertyUtils.java


示例14: PackageIndex

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
PackageIndex(Project project) {
  this.project = project;
  // build toQualified by traversing directories
  //final GlobalSearchScope scope = new ProjectAndLibrariesScope(project);
  final ProjectRootManager prm = ProjectRootManager.getInstance(project);
  final ProjectFileIndexImpl idx = (ProjectFileIndexImpl)prm.getFileIndex();

  ContentIterator iter = new ContentIterator() {
    @Override
    public boolean processFile(VirtualFile fileOrDir) {
      if (fileOrDir.isDirectory()) {
        if (idx.isIgnored(fileOrDir))
          return true;

        // ignore resource files (some resource directories are just sitting in regular packages. Not
        // much we can do. Those will just never have classes in them.
        if (idx.isUnderSourceRootOfType(fileOrDir, JavaModuleSourceRootTypes.RESOURCES))
          return true;

        // source file
        VirtualFile root = idx.getSourceRootForFile(fileOrDir);
        // class file
        if (root == null)
          root = idx.getClassRootForFile(fileOrDir);

        // if not source, not class, or root, ignore
        if (root == null || root.getUrl().equals(fileOrDir.getUrl()))
          return true;

        String qpkg = fileOrDir.getPath().substring(root.getPath().length()).replace('/','.');

        // hacky, but we know no better way
        if (qpkg.isEmpty() || qpkg.equals(".") || qpkg.startsWith("META-INF"))
          return true;

        // non-jar classes end up with a '.' in front
        if (qpkg.charAt(0) == '.')
          qpkg = qpkg.substring(1);

        String pkg = qpkg.substring(qpkg.lastIndexOf('.')+1);

        Set<String> quals = toQualified.get(pkg);
        if (quals == null) {
          quals = new ArrayListSet<String>();
          toQualified.put(pkg,quals);
        }
        quals.add(qpkg);
      }
      return true;
    }
  };

  FileBasedIndex.getInstance().iterateIndexableFiles(iter, project, null);
}
 
开发者ID:eddysystems,项目名称:eddy,代码行数:55,代码来源:PackageIndex.java


示例15: getStatements

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@RequiredReadAction
private DotNetStatement[] getStatements(PsiFile file, int startOffset, int endOffset)
{
	Set<DotNetStatement> set = new ArrayListSet<DotNetStatement>();

	PsiElement element1 = file.findElementAt(startOffset);
	PsiElement element2 = file.findElementAt(endOffset - 1);
	if(element1 instanceof PsiWhiteSpace)
	{
		startOffset = element1.getTextRange().getEndOffset();
		element1 = file.findElementAt(startOffset);
	}
	if(element2 instanceof PsiWhiteSpace)
	{
		endOffset = element2.getTextRange().getStartOffset();
		element2 = file.findElementAt(endOffset - 1);
	}

	PsiElement statement1 = getTopmostParentOfType(element1, DotNetStatement.class);
	if(statement1 == null)
	{
		return EMPTY_ARRAY;
	}

	PsiElement statement2 = getTopmostParentOfType(element2, DotNetStatement.class);
	if(statement2 == null)
	{
		return EMPTY_ARRAY;
	}

	PsiElement temp = statement1;
	while(temp != null)
	{
		if(temp instanceof DotNetStatement)
		{
			set.add((DotNetStatement) temp);
		}

		if(temp == statement2)
		{
			return ContainerUtil.toArray(set, EMPTY_ARRAY);
		}

		temp = temp.getNextSibling();
	}
	return EMPTY_ARRAY;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:48,代码来源:CSharpExtractMethodHandler.java


示例16: doCreateArtifactTemplate

import com.intellij.util.containers.ArrayListSet; //导入依赖的package包/类
@NotNull
@RequiredReadAction
public static NewArtifactConfiguration doCreateArtifactTemplate(Module module, PackagingElementResolvingContext packagingElementResolvingContext)
{
	ModulesProvider modulesProvider = packagingElementResolvingContext.getModulesProvider();

	Project project = module.getProject();
	CompositePackagingElement<?> root = ExplodedWarArtifactType.getInstance().createRootElement(module.getName());

	DirectoryPackagingElement webInfDir = DirectoryElementType.getInstance().createEmpty(project);
	webInfDir.setDirectoryName(JavaWebConstants.WEB_INF);
	root.addFirstChild(webInfDir);

	DirectoryPackagingElement libDir = DirectoryElementType.getInstance().createEmpty(project);
	libDir.setDirectoryName("lib");
	webInfDir.addFirstChild(libDir);

	Set<Library> libraries = new ArrayListSet<>();
	Set<Module> modules = new ArrayListSet<>();

	collectInfo(modules, libraries, modulesProvider, module);

	for(Module toAddModule : modules)
	{
		NamedPointer<Module> pointer = ModuleUtilCore.createPointer(toAddModule);
		ModuleRootModel rootModel = modulesProvider.getRootModel(toAddModule);

		ZipArchivePackagingElement zipArchivePackagingElement = ZipArchiveElementType.getInstance().createEmpty(project);
		zipArchivePackagingElement.setArchiveFileName(toAddModule.getName() + ".jar");

		if(rootModel.getContentFolders(ContentFolderScopes.of(ProductionContentFolderTypeProvider.getInstance())).length > 0)
		{
			zipArchivePackagingElement.addFirstChild(ProductionModuleOutputElementType.getInstance().createElement(project, pointer));
		}

		if(rootModel.getContentFolders(ContentFolderScopes.of(ProductionResourceContentFolderTypeProvider.getInstance())).length > 0)
		{
			zipArchivePackagingElement.addFirstChild(ProductionResourceModuleOutputElementType.getInstance().createElement(project, pointer));
		}

		libDir.addFirstChild(zipArchivePackagingElement);

		if(rootModel.getContentFolders(ContentFolderScopes.of(WebResourcesFolderTypeProvider.getInstance())).length > 0)
		{
			root.addFirstChild(WebResourceModuleOutputElementType.getInstance().createElement(project, pointer));
		}
	}

	for(Library library : libraries)
	{
		LibraryPackagingElement libraryPackagingElement = LibraryElementType.getInstance().createEmpty(project);
		libraryPackagingElement.setLibraryName(library.getName());

		LibraryTable table = library.getTable();

		String tableLevel = table == null ? null : table.getTableLevel();
		libraryPackagingElement.setLevel(tableLevel);

		if(LibraryTableImplUtil.MODULE_LEVEL.equals(tableLevel))
		{
			libraryPackagingElement.setModuleName(((ModuleLibraryTable) table).getModule().getName());
		}

		libDir.addFirstChild(libraryPackagingElement);
	}

	return new NewArtifactConfiguration(root, ExplodedWarArtifactType.getInstance().getPresentableName() + ": " + module.getName(), ExplodedWarArtifactType.getInstance());
}
 
开发者ID:consulo,项目名称:consulo-javaee,代码行数:69,代码来源:ExplodedWarArtifactTemplate.java



注:本文中的com.intellij.util.containers.ArrayListSet类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StreamUtil类代码示例发布时间:2022-05-21
下一篇:
Java RuntimeConfigurationException类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap