diff options
Diffstat (limited to 'platform/vcs-api')
18 files changed, 71 insertions, 26 deletions
diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java b/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java index c6b0daa0852d..938021c03e55 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java @@ -229,7 +229,8 @@ public abstract class ProjectLevelVcsManager { public abstract boolean isBackgroundVcsOperationRunning(); public abstract List<VirtualFile> getRootsUnderVcsWithoutFiltering(final AbstractVcs vcs); - public abstract VirtualFile[] getRootsUnderVcs(AbstractVcs vcs); + + public abstract VirtualFile[] getRootsUnderVcs(@NotNull AbstractVcs vcs); /** * Also includes into list all modules under roots diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/update/FileGroup.java b/platform/vcs-api/src/com/intellij/openapi/vcs/update/FileGroup.java index a5fa2c121ed2..d9684018484a 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/update/FileGroup.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/update/FileGroup.java @@ -254,6 +254,9 @@ public class FileGroup implements JDOMExternalizable { return null; } + /** + * @deprecated: remove after IDEA 14 + */ public void setRevisions(final String path, final AbstractVcs vcs, final VcsRevisionNumber revision) { for (UpdatedFile file : myFiles) { if (file.getPath().startsWith(path)) { diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdatedFiles.java b/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdatedFiles.java index d8d6d53371d8..fdd3237af1cd 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdatedFiles.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdatedFiles.java @@ -106,6 +106,10 @@ public class UpdatedFiles implements JDOMExternalizable { return result; } + /** + * @deprecated: remove after IDEA 14 + */ + @SuppressWarnings("UnusedDeclaration") public void setRevisions(final String path, final AbstractVcs vcs, final VcsRevisionNumber revision) { for(FileGroup group: myGroups) { group.setRevisions(path, vcs, revision); diff --git a/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java b/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java index bdd9304e9d88..7266e344c72f 100644 --- a/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java +++ b/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java @@ -577,18 +577,6 @@ public class VcsUtil { return files; } - public static boolean caseDiffers(final String s1, final String s2) { - String s1Trimmed = s1.trim(); - String s2Trimmed = s2.trim(); - - if (File.separatorChar != '/') { - s1Trimmed = s1Trimmed.replace(File.separatorChar, '/'); - s2Trimmed = s2Trimmed.replace(File.separatorChar, '/'); - } - - return (! s1Trimmed.equals(s2Trimmed)) && s1Trimmed.equalsIgnoreCase(s2Trimmed); - } - private static final String ANNO_ASPECT = "show.vcs.annotation.aspect."; //public static boolean isAspectAvailableByDefault(LineAnnotationAspect aspect) { // if (aspect.getId() == null) return aspect.isShowByDefault(); diff --git a/platform/vcs-api/src/com/intellij/lifecycle/PeriodicalTasksCloser.java b/platform/vcs-api/vcs-api-core/src/com/intellij/lifecycle/PeriodicalTasksCloser.java index bbb4847fbc64..3b6a7ff2a5c6 100644 --- a/platform/vcs-api/src/com/intellij/lifecycle/PeriodicalTasksCloser.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/lifecycle/PeriodicalTasksCloser.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/FilePath.java b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/FilePath.java index 90fd92f2e78e..1ca489c0d128 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/FilePath.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/FilePath.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsException.java b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/VcsException.java index 5a72bfe1fba6..dacf4e654f5f 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsException.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/VcsException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsKey.java b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/VcsKey.java index f3a507cf8e56..4e2871b3f539 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsKey.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/VcsKey.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/Change.java b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/changes/Change.java index 8e300bd2a291..b1d8978eea68 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/Change.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/changes/Change.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. @@ -25,7 +25,7 @@ import com.intellij.openapi.vcs.FileStatus; import com.intellij.openapi.vcs.VcsBundle; import com.intellij.openapi.vcs.impl.VcsPathPresenter; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.vcsUtil.VcsUtil; +import com.intellij.vcsUtil.VcsFilePathUtil; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.Nullable; @@ -120,7 +120,8 @@ public class Change { } if ((! Comparing.equal(myBeforeRevision.getFile(), myAfterRevision.getFile())) || - ((! SystemInfo.isFileSystemCaseSensitive) && VcsUtil.caseDiffers(myBeforeRevision.getFile().getPath(), myAfterRevision.getFile().getPath()))) { + ((! SystemInfo.isFileSystemCaseSensitive) && VcsFilePathUtil + .caseDiffers(myBeforeRevision.getFile().getPath(), myAfterRevision.getFile().getPath()))) { myType = Type.MOVED; return myType; } diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ContentRevision.java b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/changes/ContentRevision.java index af21b167041f..de5944ac9b3c 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ContentRevision.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/changes/ContentRevision.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/MergeTexts.java b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/changes/MergeTexts.java index 18423d8ad490..16ed06a00b41 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/MergeTexts.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/changes/MergeTexts.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/history/LongRevisionNumber.java b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/history/LongRevisionNumber.java index ffcedbb456c2..52bae307b01e 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/history/LongRevisionNumber.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/history/LongRevisionNumber.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/history/VcsRevisionNumber.java b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/history/VcsRevisionNumber.java index 4647ecac78af..9d5851da6889 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/history/VcsRevisionNumber.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/history/VcsRevisionNumber.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/impl/VcsPathPresenter.java b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/impl/VcsPathPresenter.java index b8c239f84a71..9985cf77518f 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/impl/VcsPathPresenter.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/openapi/vcs/impl/VcsPathPresenter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/src/com/intellij/vcsUtil/Rethrow.java b/platform/vcs-api/vcs-api-core/src/com/intellij/vcsUtil/Rethrow.java index dc2e3b9409bd..6c42caaa3126 100644 --- a/platform/vcs-api/src/com/intellij/vcsUtil/Rethrow.java +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/vcsUtil/Rethrow.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * 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. diff --git a/platform/vcs-api/vcs-api-core/src/com/intellij/vcsUtil/VcsFilePathUtil.java b/platform/vcs-api/vcs-api-core/src/com/intellij/vcsUtil/VcsFilePathUtil.java new file mode 100644 index 000000000000..b6992f53ab0c --- /dev/null +++ b/platform/vcs-api/vcs-api-core/src/com/intellij/vcsUtil/VcsFilePathUtil.java @@ -0,0 +1,32 @@ +/* + * 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.vcsUtil; + +import java.io.File; + +public class VcsFilePathUtil { + public static boolean caseDiffers(final String s1, final String s2) { + String s1Trimmed = s1.trim(); + String s2Trimmed = s2.trim(); + + if (File.separatorChar != '/') { + s1Trimmed = s1Trimmed.replace(File.separatorChar, '/'); + s2Trimmed = s2Trimmed.replace(File.separatorChar, '/'); + } + + return (! s1Trimmed.equals(s2Trimmed)) && s1Trimmed.equalsIgnoreCase(s2Trimmed); + } +} diff --git a/platform/vcs-api/vcs-api-core/vcs-api-core.iml b/platform/vcs-api/vcs-api-core/vcs-api-core.iml new file mode 100644 index 000000000000..434160533f3b --- /dev/null +++ b/platform/vcs-api/vcs-api-core/vcs-api-core.iml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="annotations" /> + <orderEntry type="module" module-name="core-api" /> + <orderEntry type="module" module-name="editor-ui-api" /> + </component> +</module> + diff --git a/platform/vcs-api/vcs-api.iml b/platform/vcs-api/vcs-api.iml index 685d664dd28f..d6c7d2eb1b67 100644 --- a/platform/vcs-api/vcs-api.iml +++ b/platform/vcs-api/vcs-api.iml @@ -9,6 +9,7 @@ <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="platform-api" exported="" /> <orderEntry type="library" name="microba" level="project" /> + <orderEntry type="module" module-name="vcs-api-core" exported="" /> </component> </module> |