本文整理汇总了Java中com.intellij.openapi.vfs.VfsUtil.virtualToIoFile方法的典型用法代码示例。如果您正苦于以下问题:Java VfsUtil.virtualToIoFile方法的具体用法?Java VfsUtil.virtualToIoFile怎么用?Java VfsUtil.virtualToIoFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.vfs.VfsUtil
的用法示例。
在下文中一共展示了VfsUtil.virtualToIoFile方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDetectedFacetDescriptions
import com.intellij.openapi.vfs.VfsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public <F extends Facet, C extends FacetConfiguration> List<? extends DetectedFrameworkDescription> createDetectedFacetDescriptions(@NotNull FacetBasedFrameworkDetector<F, C> detector,
@NotNull Collection<VirtualFile> files) {
final List<ModuleDescriptor> descriptors = getModuleDescriptors();
MultiMap<ModuleDescriptor, VirtualFile> filesByModule = new MultiMap<ModuleDescriptor, VirtualFile>();
for (VirtualFile file : files) {
final File ioFile = VfsUtil.virtualToIoFile(file);
ModuleDescriptor descriptor = findDescriptorByFile(descriptors, ioFile);
if (descriptor != null) {
filesByModule.putValue(descriptor, file);
}
}
final List<DetectedFrameworkDescription> result = new ArrayList<DetectedFrameworkDescription>();
final FacetType<F,C> facetType = detector.getFacetType();
for (ModuleDescriptor module : filesByModule.keySet()) {
if (!facetType.isSuitableModuleType(module.getModuleType())) {
continue;
}
final List<Pair<C, Collection<VirtualFile>>> pairs =
detector.createConfigurations(filesByModule.get(module), Collections.<C>emptyList());
for (Pair<C, Collection<VirtualFile>> pair : pairs) {
result.add(new FacetBasedDetectedFrameworkDescriptionInWizard<F, C>(module, detector, pair.getFirst(),
new HashSet<VirtualFile>(pair.getSecond())));
}
}
return result;
}
示例2: requestLocation
import com.intellij.openapi.vfs.VfsUtil; //导入方法依赖的package包/类
private boolean requestLocation() {
VirtualFile virtualFile = chooseCheckoutLocation(myConfiguration.PATH_TO_WORKING_FOLDER);
if (virtualFile == null) return false;
myCheckoutLocation = VfsUtil.virtualToIoFile(virtualFile);
myConfiguration.PATH_TO_WORKING_FOLDER = myCheckoutLocation.getAbsolutePath();
return true;
}
示例3: readSymbolicLink
import com.intellij.openapi.vfs.VfsUtil; //导入方法依赖的package包/类
@Override
public File readSymbolicLink(File link) throws IOException {
if (!isSymbolicLink(link)) {
throw new NotLinkException(link.getPath());
}
VirtualFile vf = fileSystem.findFile(link.getPath());
return VfsUtil.virtualToIoFile(symlinks.get(vf));
}
示例4: GitHandler
import com.intellij.openapi.vfs.VfsUtil; //导入方法依赖的package包/类
/**
* A constructor
*
* @param project a project
* @param vcsRoot a process directory
* @param command a command to execute
*/
protected GitHandler(final Project project, final VirtualFile vcsRoot, final GitCommand command) {
this(project, VfsUtil.virtualToIoFile(vcsRoot), command);
}