diff --git a/platform/vcs-impl/src/com/intellij/lifecycle/AtomicSectionsAware.java b/platform/vcs-impl/src/com/intellij/lifecycle/AtomicSectionsAware.java deleted file mode 100644 index 3624f1626f9b..000000000000 --- a/platform/vcs-impl/src/com/intellij/lifecycle/AtomicSectionsAware.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2000-2009 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.lifecycle; - -import com.intellij.openapi.progress.ProcessCanceledException; - -public interface AtomicSectionsAware { - void enter(); - void exit(); - boolean shouldExitAsap(); - void checkShouldExit() throws ProcessCanceledException; -} diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeOutdatedException.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeOutdatedException.java deleted file mode 100644 index 28abea5beff6..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeOutdatedException.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2000-2012 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.openapi.vcs.changes; - -/** - * Created with IntelliJ IDEA. - * User: Irina.Chernushina - * Date: 7/28/12 - * Time: 4:00 PM - */ -public class ChangeOutdatedException extends RuntimeException { -} diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LineNumberConvertor.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LineNumberConvertor.java deleted file mode 100644 index 76ff9766249d..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LineNumberConvertor.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.openapi.vcs.changes; - -import gnu.trove.TIntFunction; -import gnu.trove.TIntHashSet; - -import java.util.Map; -import java.util.TreeMap; - -/** -* Created by IntelliJ IDEA. -* User: Irina.Chernushina -* Date: 9/8/11 -* Time: 1:11 PM -*/ -public class LineNumberConvertor implements TIntFunction { - private final TreeMap myFragmentStarts; - private final TIntHashSet myEmptyLines; - - public LineNumberConvertor() { - myFragmentStarts = new TreeMap<>(); - myEmptyLines = new TIntHashSet(); - } - - public void put(final int start, final int offset) { - myFragmentStarts.put(start, offset); - } - - public void emptyLine(final int line) { - myEmptyLines.add(line); // real number - } - - @Override - public int execute(int o) { - if (myEmptyLines.contains(o)) return -1; - final Map.Entry floor = myFragmentStarts.floorEntry(o); - return floor == null ? o : floor.getValue() + o - floor.getKey(); - } -} diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsDirtyMarker.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsDirtyMarker.java deleted file mode 100644 index 1c482cfb12fd..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsDirtyMarker.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2000-2009 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.openapi.vcs.changes; - -public interface VcsDirtyMarker { - void addDirtyDirRecursively(final T newcomer); - void addDirtyFile(final T newcomer); -} diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/PatchMergeRequestFactory.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/PatchMergeRequestFactory.java deleted file mode 100644 index 3bdaefea09c9..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/PatchMergeRequestFactory.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2000-2009 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.openapi.vcs.changes.patch; - -import com.intellij.openapi.diff.MergeRequest; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * @author yole - */ -public interface PatchMergeRequestFactory { - MergeRequest createMergeRequest(String leftText, - String rightText, - String originalContent, - @NotNull VirtualFile file, - Project project, - boolean reverse, @Nullable String leftPanelTitle, @Nullable String rightPanelTitle); -} diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/FilesForRefresh.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/FilesForRefresh.java deleted file mode 100644 index e5f4b4830144..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/FilesForRefresh.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2000-2009 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.openapi.vcs.update; - -import com.intellij.openapi.util.Comparing; -import com.intellij.openapi.vfs.VfsUtil; - -import java.io.File; -import java.util.*; - -public class FilesForRefresh { - private final List myRecursively; - private final List myPoints; - - public FilesForRefresh() { - myRecursively = new ArrayList<>(); - myPoints = new ArrayList<>(); - } - - public void addPoint(final File vf) { - if (vf == null) return; - myPoints.add(vf); - } - - public void addRecursively(final File vf) { - if (vf == null) return; - myRecursively.add(vf); - } - - public void filter() { - filterEqual(myRecursively); - filterEqual(myPoints); - - final ParentsFirstVFComparator comparator = new ParentsFirstVFComparator(); - Collections.sort(myRecursively, comparator); - - /*final Set superfluous = new HashSet(); - for (int i = (myRecursively.size() - 1); i > 0; -- i) { - final File file = myRecursively.get(i); - for (int j = i - 1; j >= 0; -- j) { - final File parent = myRecursively.get(j); - if (VfsUtil.isAncestor(parent, file, true)) { - superfluous.add(file.getAbsolutePath()); - break; - } - } - } - - for (Iterator iterator = myRecursively.iterator(); iterator.hasNext();) { - final File f = iterator.next(); - if (superfluous.contains(f.getAbsolutePath())) { - iterator.remove(); - } - }*/ - - for (Iterator iterator = myPoints.iterator(); iterator.hasNext();) { - final File f = iterator.next(); - for (File recursive : myRecursively) { - if (VfsUtil.isAncestor(recursive, f, false)) { - iterator.remove(); - } - } - } - - // todo remove - /* - System.out.println("recursive"); - for (File file : myRecursively) { - System.out.println(file.getAbsolutePath()); - } - System.out.println("points"); - for (File file : myPoints) { - System.out.println(file.getAbsolutePath()); - } - */ - } - - private void filterEqual(final List files) { - final Set set = new HashSet<>(); - for (File file : files) { - set.add(file.getAbsolutePath()); - } - files.clear(); - for (String s : set) { - files.add(new File(s)); - } - } - - public List getRecursively() { - return myRecursively; - } - - public List getPoints() { - return myPoints; - } - - private static class ParentsFirstVFComparator implements Comparator { - public int compare(File o1, File o2) { - if (Comparing.equal(o1.getAbsolutePath(), o2.getAbsolutePath())) return 0; - if (VfsUtil.isAncestor(o1, o2, true)) { - return -1; - } - if (VfsUtil.isAncestor(o2, o1, true)) { - return 1; - } - return 0; - } - } -}