当前位置: 首页>>代码示例>>Java>>正文


Java VirtualFilePointer.getUrl方法代码示例

本文整理汇总了Java中com.intellij.openapi.vfs.pointers.VirtualFilePointer.getUrl方法的典型用法代码示例。如果您正苦于以下问题:Java VirtualFilePointer.getUrl方法的具体用法?Java VirtualFilePointer.getUrl怎么用?Java VirtualFilePointer.getUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.vfs.pointers.VirtualFilePointer的用法示例。


在下文中一共展示了VirtualFilePointer.getUrl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: duplicate

import com.intellij.openapi.vfs.pointers.VirtualFilePointer; //导入方法依赖的package包/类
@NotNull
@Override
public VirtualFilePointer duplicate(@NotNull VirtualFilePointer pointer,
                                    @NotNull Disposable parent,
                                    @Nullable VirtualFilePointerListener listener) {
  return new IdentityVirtualFilePointer(pointer.getFile(), pointer.getUrl());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:CoreVirtualFilePointerManager.java

示例2: writeExternal

import com.intellij.openapi.vfs.pointers.VirtualFilePointer; //导入方法依赖的package包/类
@Override
public void writeExternal(@NotNull final Element element, @NotNull final String childElementName) {
  for (VirtualFilePointer pointer : myList) {
    String url = pointer.getUrl();
    final Element rootPathElement = new Element(childElementName);
    rootPathElement.setAttribute(URL_ATTR, url);
    element.addContent(rootPathElement);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:VirtualFilePointerContainerImpl.java

示例3: cacheThings

import com.intellij.openapi.vfs.pointers.VirtualFilePointer; //导入方法依赖的package包/类
@NotNull
private Trinity<String[], VirtualFile[], VirtualFile[]> cacheThings() {
  Trinity<String[], VirtualFile[], VirtualFile[]> result;
  if (myList.isEmpty()) {
    result = EMPTY;
  }
  else {
    List<VirtualFile> cachedFiles = new ArrayList<VirtualFile>(myList.size());
    List<String> cachedUrls = new ArrayList<String>(myList.size());
    List<VirtualFile> cachedDirectories = new ArrayList<VirtualFile>(myList.size() / 3);
    boolean allFilesAreDirs = true;
    for (VirtualFilePointer v : myList) {
      VirtualFile file = v.getFile();
      String url = v.getUrl();
      cachedUrls.add(url);
      if (file != null) {
        cachedFiles.add(file);
        if (file.isDirectory()) {
          cachedDirectories.add(file);
        }
        else {
          allFilesAreDirs = false;
        }
      }
    }
    VirtualFile[] directories = VfsUtilCore.toVirtualFileArray(cachedDirectories);
    VirtualFile[] files = allFilesAreDirs ? directories : VfsUtilCore.toVirtualFileArray(cachedFiles);
    String[] urlsArray = ArrayUtil.toStringArray(cachedUrls);
    result = Trinity.create(urlsArray, files, directories);
  }
  myCachedThings = result;
  myTimeStampOfCachedThings = myVirtualFilePointerManager.getModificationCount();
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:35,代码来源:VirtualFilePointerContainerImpl.java

示例4: getMapping

import com.intellij.openapi.vfs.pointers.VirtualFilePointer; //导入方法依赖的package包/类
@Override
@Nullable
public String getMapping(@NotNull PsiFile file) {
  final VirtualFilePointer pointer = getMappedPointer(file);
  return pointer != null ? pointer.getUrl() : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:NoNamespaceConfigImpl.java


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