use of com.intellij.openapi.vfs.pointers.VirtualFilePointer in project intellij-community by JetBrains.
the class FileAssociationsManagerImpl method readExternal.
@SuppressWarnings({ "unchecked" })
public void readExternal(Element element) throws InvalidDataException {
final List<Element> children = element.getChildren("file");
for (Element child : children) {
final String url = child.getAttributeValue("url");
if (url != null) {
final VirtualFilePointer pointer = myFilePointerManager.create(url, myProject, null);
final VirtualFilePointerContainer container = myFilePointerManager.createContainer(myProject);
container.readExternal(child, "association");
myAssociations.put(pointer, container);
}
}
}
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);
}
use of com.intellij.openapi.vfs.pointers.VirtualFilePointer in project intellij-community by JetBrains.
the class CompilerModuleExtensionImpl method getOutputPathValue.
@Nullable
protected VirtualFilePointer getOutputPathValue(Element element, String tag, final boolean createPointer) {
final Element outputPathChild = element.getChild(tag);
VirtualFilePointer vptr = null;
if (outputPathChild != null && createPointer) {
String outputPath = outputPathChild.getAttributeValue(ATTRIBUTE_URL);
vptr = createPointer(outputPath);
}
return vptr;
}
Aggregations