use of com.intellij.openapi.vfs.pointers.VirtualFilePointer in project intellij-community by JetBrains.
the class CompilerProjectExtensionImpl method setCompilerOutputUrl.
@Override
public void setCompilerOutputUrl(String compilerOutputUrl) {
VirtualFilePointer pointer = VirtualFilePointerManager.getInstance().create(compilerOutputUrl, myProject, null);
setCompilerOutputPointer(pointer);
String path = VfsUtilCore.urlToPath(compilerOutputUrl);
myCompilerOutputWatchRequest = LocalFileSystem.getInstance().replaceWatchedRoot(myCompilerOutputWatchRequest, path, true);
}
use of com.intellij.openapi.vfs.pointers.VirtualFilePointer in project intellij-community by JetBrains.
the class ExcludeCompilerOutputPolicy method getExcludeRootsForModule.
@NotNull
@Override
public VirtualFilePointer[] getExcludeRootsForModule(@NotNull final ModuleRootModel rootModel) {
ArrayList<VirtualFilePointer> result = new ArrayList<>();
final CompilerModuleExtension extension = rootModel.getModuleExtension(CompilerModuleExtension.class);
if (extension == null) {
return VirtualFilePointer.EMPTY_ARRAY;
}
if (extension.isCompilerOutputPathInherited()) {
ContainerUtil.addIfNotNull(result, CompilerProjectExtension.getInstance(myProject).getCompilerOutputPointer());
} else {
if (!extension.isExcludeOutput())
return VirtualFilePointer.EMPTY_ARRAY;
ContainerUtil.addIfNotNull(result, extension.getCompilerOutputPointer());
ContainerUtil.addIfNotNull(result, extension.getCompilerOutputForTestsPointer());
}
return result.isEmpty() ? VirtualFilePointer.EMPTY_ARRAY : result.toArray(new VirtualFilePointer[result.size()]);
}
use of com.intellij.openapi.vfs.pointers.VirtualFilePointer in project intellij-community by JetBrains.
the class VirtualFilePointerContainerImpl method writeExternal.
@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);
}
}
use of com.intellij.openapi.vfs.pointers.VirtualFilePointer in project intellij-community by JetBrains.
the class VirtualFilePointerContainerImpl method add.
@Override
public void add(@NotNull String url) {
assert !myDisposed;
dropCaches();
final VirtualFilePointer pointer = create(url);
myList.add(pointer);
}
use of com.intellij.openapi.vfs.pointers.VirtualFilePointer in project intellij-community by JetBrains.
the class VirtualFilePointerContainerImpl method add.
@Override
public void add(@NotNull VirtualFile file) {
assert !myDisposed;
dropCaches();
final VirtualFilePointer pointer = create(file);
myList.add(pointer);
}
Aggregations