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
;
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() {
43 public Project
getProject() {
47 public AbstractVcs
getVcs() {
51 public Set
<FilePath
> getDirtyFiles() {
55 public Set
<FilePath
> getDirtyFilesNoExpand() {
59 public Set
<FilePath
> getRecursivelyDirtyDirectories() {
64 public boolean isRecursivelyDirty(final VirtualFile vf
) {
65 for (FilePath dir
: myDirs
) {
66 final VirtualFile dirVf
= dir
.getVirtualFile();
68 if (VfsUtil
.isAncestor(dirVf
, vf
, false)) {
76 public void iterate(final Processor
<FilePath
> iterator
) {
79 public boolean belongsTo(final FilePath path
) {
83 public void addFile(final FilePath path
) {
87 public void addDir(final FilePath dir
) {