update copyright
[fedora-idea.git] / plugins / svn4idea / src / org / jetbrains / idea / svn / integrate / AlienDirtyScope.java
blobe840352042a10c9a3050a0b6e456257c4f2c6246
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.jetbrains.idea.svn.integrate;
18 import com.intellij.openapi.project.Project;
19 import com.intellij.openapi.vcs.AbstractVcs;
20 import com.intellij.openapi.vcs.FilePath;
21 import com.intellij.openapi.vcs.changes.VcsDirtyScope;
22 import com.intellij.openapi.vfs.VirtualFile;
23 import com.intellij.openapi.vfs.VfsUtil;
24 import com.intellij.util.Processor;
26 import java.util.Collection;
27 import java.util.HashSet;
28 import java.util.Set;
30 public class AlienDirtyScope extends VcsDirtyScope {
31 private final Set<FilePath> myFiles;
32 private final Set<FilePath> myDirs;
34 public AlienDirtyScope() {
35 myFiles = new HashSet<FilePath>();
36 myDirs = new HashSet<FilePath>();
39 public Collection<VirtualFile> getAffectedContentRoots() {
40 return null;
43 public Project getProject() {
44 return null;
47 public AbstractVcs getVcs() {
48 return null;
51 public Set<FilePath> getDirtyFiles() {
52 return myFiles;
55 public Set<FilePath> getDirtyFilesNoExpand() {
56 return myFiles;
59 public Set<FilePath> getRecursivelyDirtyDirectories() {
60 return myDirs;
63 @Override
64 public boolean isRecursivelyDirty(final VirtualFile vf) {
65 for (FilePath dir : myDirs) {
66 final VirtualFile dirVf = dir.getVirtualFile();
67 if (dirVf != null) {
68 if (VfsUtil.isAncestor(dirVf, vf, false)) {
69 return true;
73 return false;
76 public void iterate(final Processor<FilePath> iterator) {
79 public boolean belongsTo(final FilePath path) {
80 return false;
83 public void addFile(final FilePath path) {
84 myFiles.add(path);
87 public void addDir(final FilePath dir) {
88 myDirs.add(dir);