From 1efaeea95fe3b2fd347eb8d822d2accd3596071c Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Mon, 11 Nov 2013 18:28:39 +0100 Subject: [PATCH] platform: deprecated APIs dropped --- .../com/intellij/analysis/AnalysisScope.java | 3 - .../src/com/intellij/lang/PsiBuilderUtil.java | 34 +---------- .../com/intellij/openapi/project/Project.java | 7 +-- .../openapi/vfs/VirtualFileManager.java | 8 +-- .../com/intellij/psi/CommonClassNames.java | 6 -- .../src/com/intellij/psi/StubBuilder.java | 7 +-- .../psi/codeStyle/SuggestedNameInfo.java | 6 +- .../psi/stubs/DefaultStubBuilder.java | 8 +-- .../intellij/psi/stubs/LightStubBuilder.java | 20 +------ .../src/com/intellij/psi/tree/TokenSet.java | 26 +------- .../src/com/intellij/mock/MockProject.java | 9 +-- .../vfs/impl/VirtualFileManagerImpl.java | 12 +--- .../intellij/psi/impl/source/PsiFileImpl.java | 18 +++--- .../psi/impl/source/tree/TreeUtil.java | 15 +---- .../intellij/util/PatchedSoftReference.java | 32 ---------- .../com/intellij/dvcs/test/MockProject.java | 7 +-- .../openapi/actionSystem/ActionManager.java | 12 ---- .../intellij/openapi/project/ProjectUtil.java | 4 -- .../intellij/execution/ExecutionHelper.java | 20 +------ .../impl/SdkListCellRenderer.java | 21 +------ .../fileChooser/FileChooserDescriptor.java | 13 ---- .../fileChooser/FileChooserFactory.java | 24 +------- .../intellij/openapi/ui/DialogBuilder.java | 6 -- .../openapi/ui/DialogWrapperPeer.java | 8 +-- .../openapi/ui/MasterDetailsComponent.java | 15 +---- .../openapi/util/PasswordPromptDialog.java | 59 ------------------- .../intellij/openapi/util/PasswordUtil.java | 12 +--- .../openapi/vfs/newvfs/RefreshQueue.java | 6 +- .../openapi/vfs/watcher/ChangeKind.java | 28 --------- .../vfs/watcher/NotAvailableException.java | 21 ------- .../intellij/openapi/wm/WindowManager.java | 3 - .../src/com/intellij/ui/GuiUtils.java | 6 -- .../intellij/ui/ListCellRendererWrapper.java | 11 +--- .../execution/process/RunnerMediator.java | 12 +--- .../ide/actions/ShowFilePathAction.java | 5 -- .../com/intellij/ide/impl/ProjectUtil.java | 8 --- .../openapi/command/impl/DummyProject.java | 9 +-- .../impl/stores/DefaultProjectStoreImpl.java | 7 +-- .../components/impl/stores/IProjectStore.java | 11 +--- .../impl/stores/ProjectStoreImpl.java | 30 +++------- .../openapi/project/impl/ProjectImpl.java | 9 --- .../ui/impl/DialogWrapperPeerImpl.java | 6 -- .../ui/impl/GlassPaneDialogWrapperPeer.java | 10 +--- .../openapi/vfs/newvfs/RefreshQueueImpl.java | 5 -- .../src/com/intellij/ui/AppUIUtil.java | 13 ---- .../com/intellij/psi/tree/TokenSetTest.java | 25 +------- .../roots/impl/LibraryOrderEntryBaseImpl.java | 19 +----- .../libraries/PersistentLibraryKind.java | 14 +---- .../src/com/intellij/mock/MockProjectEx.java | 5 +- .../com/intellij/mock/MockProjectStore.java | 13 +--- .../vcs/impl/CheckinHandlersManager.java | 31 +--------- .../vcs/impl/CheckinHandlersManagerImpl.java | 29 +-------- .../src/git4idea/merge/GitPullDialog.java | 4 +- 53 files changed, 60 insertions(+), 692 deletions(-) delete mode 100644 platform/core-impl/src/com/intellij/util/PatchedSoftReference.java delete mode 100644 platform/platform-api/src/com/intellij/openapi/util/PasswordPromptDialog.java delete mode 100644 platform/platform-api/src/com/intellij/openapi/vfs/watcher/ChangeKind.java delete mode 100644 platform/platform-api/src/com/intellij/openapi/vfs/watcher/NotAvailableException.java diff --git a/platform/analysis-api/src/com/intellij/analysis/AnalysisScope.java b/platform/analysis-api/src/com/intellij/analysis/AnalysisScope.java index 512a6b4e7645..381ecf9751d0 100644 --- a/platform/analysis-api/src/com/intellij/analysis/AnalysisScope.java +++ b/platform/analysis-api/src/com/intellij/analysis/AnalysisScope.java @@ -66,9 +66,6 @@ public class AnalysisScope { public static final int VIRTUAL_FILES = 9; public static final int UNCOMMITTED_FILES = 10; - /** @deprecated use {@linkplain #UNCOMMITTED_FILES} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") public static final int UNCOMMITED_FILES = UNCOMMITTED_FILES; - @MagicConstant(intValues = {PROJECT, DIRECTORY, FILE, MODULE, INVALID, MODULES, CUSTOM, VIRTUAL_FILES, UNCOMMITTED_FILES}) public @interface Type { } diff --git a/platform/core-api/src/com/intellij/lang/PsiBuilderUtil.java b/platform/core-api/src/com/intellij/lang/PsiBuilderUtil.java index c9a0a17ea159..f512528e8ea6 100644 --- a/platform/core-api/src/com/intellij/lang/PsiBuilderUtil.java +++ b/platform/core-api/src/com/intellij/lang/PsiBuilderUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -17,42 +17,10 @@ package com.intellij.lang; import com.intellij.psi.tree.IElementType; import com.intellij.psi.tree.TokenSet; -import org.jetbrains.annotations.Nullable; public class PsiBuilderUtil { private PsiBuilderUtil() { } - /** - * @deprecated use {@linkplain PsiBuilder#lookAhead(int)} (to remove in IDEA 13) - */ - @SuppressWarnings("UnusedDeclaration") - @Nullable - public static IElementType nextTokenType(final PsiBuilder builder) { - return builder.lookAhead(1); - } - - /** - * @deprecated use {@linkplain PsiBuilder#lookAhead(int)} (to remove in IDEA 13) - */ - @SuppressWarnings("UnusedDeclaration") - public static boolean lookAhead(final PsiBuilder builder, final IElementType... tokenTypes) { - if (tokenTypes.length == 0) return true; - - if (!tokenTypes[0].equals(builder.getTokenType())) return false; - - if (tokenTypes.length == 1) return true; - - final PsiBuilder.Marker rb = builder.mark(); - builder.advanceLexer(); - int i = 1; - while (!builder.eof() && i < tokenTypes.length && tokenTypes[i].equals(builder.getTokenType())) { - builder.advanceLexer(); - i++; - } - rb.rollbackTo(); - return i == tokenTypes.length; - } - /** * Advances lexer by given number of tokens (but not beyond the end of token stream). * diff --git a/platform/core-api/src/com/intellij/openapi/project/Project.java b/platform/core-api/src/com/intellij/openapi/project/Project.java index 8c1e0fb100e3..0683c9b11fe4 100644 --- a/platform/core-api/src/com/intellij/openapi/project/Project.java +++ b/platform/core-api/src/com/intellij/openapi/project/Project.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -107,11 +107,6 @@ public interface Project extends ComponentManager, AreaInstance { @NonNls String getLocationHash(); - /** @deprecated please use {@linkplain #getPresentableUrl()} or {@linkplain #getBasePath()} (to remove in IDEA 13) */ - @Nullable - @NonNls - String getLocation(); - /** * Should be invoked under WriteAction. */ diff --git a/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileManager.java b/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileManager.java index cce9a6dc867e..32565676773a 100644 --- a/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileManager.java +++ b/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -70,12 +70,6 @@ public abstract class VirtualFileManager implements ModificationTracker { */ public abstract long asyncRefresh(@Nullable Runnable postAction); - /** @deprecated use {@linkplain #syncRefresh()} or {@linkplain #asyncRefresh(Runnable)} (to remove in IDEA 13) */ - public abstract void refresh(boolean asynchronous); - - /** @deprecated use {@linkplain #syncRefresh()} or {@linkplain #asyncRefresh(Runnable)} (to remove in IDEA 13) */ - public abstract void refresh(boolean asynchronous, @Nullable Runnable postAction); - public abstract void refreshWithoutFileWatcher(boolean asynchronous); /** diff --git a/platform/core-api/src/com/intellij/psi/CommonClassNames.java b/platform/core-api/src/com/intellij/psi/CommonClassNames.java index 6d8d16172cb4..a7b6649666b4 100644 --- a/platform/core-api/src/com/intellij/psi/CommonClassNames.java +++ b/platform/core-api/src/com/intellij/psi/CommonClassNames.java @@ -99,10 +99,4 @@ public interface CommonClassNames { @NonNls String JAVA_LANG_INVOKE_MH_POLYMORPHIC = "java.lang.invoke.MethodHandle.PolymorphicSignature"; @NonNls String CLASS_FILE_EXTENSION = ".class"; - - /** @deprecated not that common (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") @NonNls String JAVA_SQL_DATE = "java.sql.Date"; - - /** @deprecated use {@link #JAVA_LANG_ANNOTATION_TARGET} (to remove in IDEA 14) */ - @SuppressWarnings("UnusedDeclaration") @NonNls String TARGET_ANNOTATION_FQ_NAME = JAVA_LANG_ANNOTATION_TARGET; } diff --git a/platform/core-api/src/com/intellij/psi/StubBuilder.java b/platform/core-api/src/com/intellij/psi/StubBuilder.java index d94fb4706e30..9eed79a6fc28 100644 --- a/platform/core-api/src/com/intellij/psi/StubBuilder.java +++ b/platform/core-api/src/com/intellij/psi/StubBuilder.java @@ -17,9 +17,7 @@ package com.intellij.psi; import com.intellij.lang.ASTNode; import com.intellij.psi.stubs.StubElement; -import com.intellij.psi.tree.IElementType; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; /** * @author max @@ -27,8 +25,5 @@ import org.jetbrains.annotations.Nullable; public interface StubBuilder { StubElement buildStubTree(@NotNull PsiFile file); - /** - * @deprecated use/implement {@linkplain com.intellij.psi.stubs.DefaultStubBuilder#skipChildProcessingWhenBuildingStubs(ASTNode, ASTNode)} - * (to remove in IDEA 13) */ - boolean skipChildProcessingWhenBuildingStubs(@Nullable ASTNode parent, IElementType childType); + boolean skipChildProcessingWhenBuildingStubs(@NotNull ASTNode parent, @NotNull ASTNode node); } \ No newline at end of file diff --git a/platform/core-api/src/com/intellij/psi/codeStyle/SuggestedNameInfo.java b/platform/core-api/src/com/intellij/psi/codeStyle/SuggestedNameInfo.java index a68e7ccb59b0..412683ce3f6f 100644 --- a/platform/core-api/src/com/intellij/psi/codeStyle/SuggestedNameInfo.java +++ b/platform/core-api/src/com/intellij/psi/codeStyle/SuggestedNameInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -51,10 +51,6 @@ public abstract class SuggestedNameInfo { */ public void nameChosen(String name) { } - /** @deprecated override {@linkplain #nameChosen(String)} instead (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public void nameChoosen(String name) { nameChosen(name); } - public static class Delegate extends SuggestedNameInfo { SuggestedNameInfo myDelegate; diff --git a/platform/core-api/src/com/intellij/psi/stubs/DefaultStubBuilder.java b/platform/core-api/src/com/intellij/psi/stubs/DefaultStubBuilder.java index d20d3ae5117b..1a8c2003efea 100644 --- a/platform/core-api/src/com/intellij/psi/stubs/DefaultStubBuilder.java +++ b/platform/core-api/src/com/intellij/psi/stubs/DefaultStubBuilder.java @@ -24,7 +24,6 @@ import com.intellij.psi.StubBuilder; import com.intellij.psi.tree.IElementType; import com.intellij.util.containers.Stack; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; /** * @author max @@ -123,14 +122,9 @@ public class DefaultStubBuilder implements StubBuilder { /** * Note to implementers: always keep in sync with {@linkplain #skipChildProcessingWhenBuildingStubs(PsiElement, PsiElement)}. - * todo[r.sh] move to interface (IDEA 13) */ - public boolean skipChildProcessingWhenBuildingStubs(@NotNull ASTNode parent, @NotNull ASTNode node) { - return skipChildProcessingWhenBuildingStubs(parent, node.getElementType()); - } - @Override - public boolean skipChildProcessingWhenBuildingStubs(@Nullable ASTNode parent, IElementType childType) { + public boolean skipChildProcessingWhenBuildingStubs(@NotNull ASTNode parent, @NotNull ASTNode node) { return false; } } diff --git a/platform/core-api/src/com/intellij/psi/stubs/LightStubBuilder.java b/platform/core-api/src/com/intellij/psi/stubs/LightStubBuilder.java index c0dc51e2890b..054c323a68c5 100644 --- a/platform/core-api/src/com/intellij/psi/stubs/LightStubBuilder.java +++ b/platform/core-api/src/com/intellij/psi/stubs/LightStubBuilder.java @@ -159,35 +159,19 @@ public class LightStubBuilder implements StubBuilder { /** * Note to implementers: always keep in sync with {@linkplain #skipChildProcessingWhenBuildingStubs(LighterAST, LighterASTNode, LighterASTNode)}. - * todo[r.sh] move to interface (IDEA 13) */ - @SuppressWarnings("deprecation") + @Override public boolean skipChildProcessingWhenBuildingStubs(@NotNull ASTNode parent, @NotNull ASTNode node) { - return skipChildProcessingWhenBuildingStubs(parent, node.getElementType()); + return false; } /** * Note to implementers: always keep in sync with {@linkplain #skipChildProcessingWhenBuildingStubs(ASTNode, ASTNode)}. */ - @SuppressWarnings("deprecation") protected boolean skipChildProcessingWhenBuildingStubs(@NotNull LighterAST tree, @NotNull LighterASTNode parent, @NotNull LighterASTNode node) { - return skipChildProcessingWhenBuildingStubs(parent.getTokenType(), node.getTokenType()); - } - - /** @deprecated override {@linkplain #skipChildProcessingWhenBuildingStubs(ASTNode, ASTNode)} (to remove in IDEA 13) */ - @SuppressWarnings("deprecation") - @Override - public final boolean skipChildProcessingWhenBuildingStubs(@Nullable ASTNode parent, IElementType childType) { - return skipChildProcessingWhenBuildingStubs(parent != null ? parent.getElementType() : null, childType); - } - - /** @deprecated override {@linkplain #skipChildProcessingWhenBuildingStubs(LighterAST, LighterASTNode, LighterASTNode)} (to remove in IDEA 13) */ - @SuppressWarnings("unused") - public boolean skipChildProcessingWhenBuildingStubs(final IElementType parent, final IElementType childType) { return false; } - private static class FCTSBackedLighterAST extends LighterAST { private final FlyweightCapableTreeStructure myTreeStructure; diff --git a/platform/core-api/src/com/intellij/psi/tree/TokenSet.java b/platform/core-api/src/com/intellij/psi/tree/TokenSet.java index 30ce34b211c5..499f68b5dff9 100644 --- a/platform/core-api/src/com/intellij/psi/tree/TokenSet.java +++ b/platform/core-api/src/com/intellij/psi/tree/TokenSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -34,14 +34,12 @@ public class TokenSet { private final short myShift; private final short myMax; - private final short myTop; private final long[] myWords; private volatile IElementType[] myTypes; private TokenSet(short shift, short max) { myShift = shift; myMax = max; - myTop = IElementType.getAllocatedTypesCount(); final int size = (max >> 6) + 1 - shift; myWords = size > 0 ? new long[size] : ArrayUtil.EMPTY_LONG_ARRAY; } @@ -193,24 +191,4 @@ public class TokenSet { } return newSet; } - - /** @deprecated please use {@linkplain #andNot(TokenSet, TokenSet)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - @NotNull - public TokenSet minus(@NotNull TokenSet t) { - return andNot(this, t); - } - - /** @deprecated please use {@linkplain IElementType#enumerate(com.intellij.psi.tree.IElementType.Predicate)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - @NotNull - public static TokenSet not(@NotNull TokenSet set) { - final TokenSet newSet = new TokenSet((short)0, set.myTop); - for (int i = 0; i < newSet.myWords.length; i++) { - int wordIndex = i - set.myShift; - long word = wordIndex >= 0 && wordIndex < set.myWords.length ? set.myWords[wordIndex] : 0; - newSet.myWords[i] = ~word; - } - return newSet; - } -} \ No newline at end of file +} diff --git a/platform/core-impl/src/com/intellij/mock/MockProject.java b/platform/core-impl/src/com/intellij/mock/MockProject.java index c1418a0cb176..8e8016f1f659 100644 --- a/platform/core-impl/src/com/intellij/mock/MockProject.java +++ b/platform/core-impl/src/com/intellij/mock/MockProject.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -99,13 +99,6 @@ public class MockProject extends MockComponentManager implements Project { return "mock"; } - @Override - @Nullable - @NonNls - public String getLocation() { - throw new UnsupportedOperationException("Method getLocation not implemented in " + getClass()); - } - @Override @NotNull public String getProjectFilePath() { diff --git a/platform/core-impl/src/com/intellij/openapi/vfs/impl/VirtualFileManagerImpl.java b/platform/core-impl/src/com/intellij/openapi/vfs/impl/VirtualFileManagerImpl.java index 65ce004775bd..4b3d65a9d203 100644 --- a/platform/core-impl/src/com/intellij/openapi/vfs/impl/VirtualFileManagerImpl.java +++ b/platform/core-impl/src/com/intellij/openapi/vfs/impl/VirtualFileManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -93,16 +93,6 @@ public class VirtualFileManagerImpl extends VirtualFileManagerEx { return doRefresh(true, postAction); } - @Override - public void refresh(boolean asynchronous) { - doRefresh(asynchronous, null); - } - - @Override - public void refresh(boolean asynchronous, @Nullable final Runnable postAction) { - doRefresh(asynchronous, postAction); - } - protected long doRefresh(boolean asynchronous, @Nullable Runnable postAction) { if (!asynchronous) { ApplicationManager.getApplication().assertIsDispatchThread(); diff --git a/platform/core-impl/src/com/intellij/psi/impl/source/PsiFileImpl.java b/platform/core-impl/src/com/intellij/psi/impl/source/PsiFileImpl.java index 23e3c8da01d6..97e0c5ec3dc8 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/source/PsiFileImpl.java +++ b/platform/core-impl/src/com/intellij/psi/impl/source/PsiFileImpl.java @@ -274,28 +274,28 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF @Override protected void visitNode(TreeElement node) { CompositeElement parent = node.getTreeParent(); - if (parent != null && TreeUtil.skipNode(builder, parent, node)) { + if (parent != null && builder.skipChildProcessingWhenBuildingStubs(parent, node)) { return; } - - + + IElementType type = node.getElementType(); if (type instanceof IStubElementType && ((IStubElementType)type).shouldCreateStub(node)) { if (!stubs.hasNext()) { reportStubAstMismatch("Stub list is less than AST, last AST element: " + node.getElementType() + " " + node, stubTree, cachedDocument); } - + final StubElement stub = stubs.next(); if (stub.getStubType() != node.getElementType()) { reportStubAstMismatch("Stub and PSI element type mismatch in " + getName() + ": stub " + stub + ", AST " + node.getElementType() + "; " + node, stubTree, cachedDocument); } - + PsiElement psi = stub.getPsi(); assert psi != null : "Stub " + stub + " (" + stub.getClass() + ") has returned null PSI"; result.add(Pair.create((StubBasedPsiElementBase)psi, (CompositeElement)node)); } - + super.visitNode(node); } }); @@ -319,7 +319,7 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF msg += ", modStamp=" + getModificationStamp(); msg += "\n stub debugInfo=" + stubTree.getDebugInfo(); msg += "\n document before=" + cachedDocument; - + ObjectStubTree latestIndexedStub = StubTreeLoader.getInstance().readFromVFile(getProject(), getVirtualFile()); msg += "\nlatestIndexedStub=" + latestIndexedStub; if (latestIndexedStub != null) { @@ -330,7 +330,7 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF FileViewProvider viewProvider = getViewProvider(); msg += "\n viewProvider=" + viewProvider; msg += "\n viewProvider stamp: " + viewProvider.getModificationStamp(); - + VirtualFile file = viewProvider.getVirtualFile(); msg += "; file stamp: " + file.getModificationStamp(); msg += "; file modCount: " + file.getModificationCount(); @@ -698,7 +698,7 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF if (getTreeElement() != null) return null; if (!(getContentElementType() instanceof IStubFileElementType)) return null; - + final VirtualFile vFile = getVirtualFile(); if (!(vFile instanceof VirtualFileWithId)) return null; diff --git a/platform/core-impl/src/com/intellij/psi/impl/source/tree/TreeUtil.java b/platform/core-impl/src/com/intellij/psi/impl/source/tree/TreeUtil.java index 45318cabf795..b247f8743fd3 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/source/tree/TreeUtil.java +++ b/platform/core-impl/src/com/intellij/psi/impl/source/tree/TreeUtil.java @@ -400,7 +400,7 @@ public class TreeUtil { @Override protected void visitNode(TreeElement node) { CompositeElement parent = node.getTreeParent(); - if (parent != null && skipNode(builder, parent, node)) { + if (parent != null && builder.skipChildProcessingWhenBuildingStubs(parent, node)) { return; } @@ -419,17 +419,4 @@ public class TreeUtil { } }); } - - @SuppressWarnings("deprecation") - public static boolean skipNode(@NotNull StubBuilder builder, @NotNull ASTNode parent, @NotNull ASTNode node) { - if (builder instanceof DefaultStubBuilder) { - return ((DefaultStubBuilder)builder).skipChildProcessingWhenBuildingStubs(parent, node); - } - else if (builder instanceof LightStubBuilder) { - return ((LightStubBuilder)builder).skipChildProcessingWhenBuildingStubs(parent, node); - } - else { - return builder.skipChildProcessingWhenBuildingStubs(parent, node.getElementType()); - } - } } diff --git a/platform/core-impl/src/com/intellij/util/PatchedSoftReference.java b/platform/core-impl/src/com/intellij/util/PatchedSoftReference.java deleted file mode 100644 index 578f5c66f42b..000000000000 --- a/platform/core-impl/src/com/intellij/util/PatchedSoftReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2000-2013 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.util; - -import com.intellij.reference.SoftReference; - -import java.lang.ref.ReferenceQueue; - -/** @deprecated use {@link SoftReference} (to remove in IDEA 13) */ -@SuppressWarnings("UnusedDeclaration") -public class PatchedSoftReference extends SoftReference { - public PatchedSoftReference(final T referent) { - super(referent); - } - - public PatchedSoftReference(final T referent, final ReferenceQueue q) { - super(referent, q); - } -} diff --git a/platform/dvcs/testFramework/com/intellij/dvcs/test/MockProject.java b/platform/dvcs/testFramework/com/intellij/dvcs/test/MockProject.java index 7a54623a3af8..6ca5f302607c 100644 --- a/platform/dvcs/testFramework/com/intellij/dvcs/test/MockProject.java +++ b/platform/dvcs/testFramework/com/intellij/dvcs/test/MockProject.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -80,11 +80,6 @@ public class MockProject implements Project { throw new UnsupportedOperationException(); } - @Override - public String getLocation() { - throw new UnsupportedOperationException(); - } - @Override public void save() { throw new UnsupportedOperationException(); diff --git a/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionManager.java b/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionManager.java index 5077b0ae8fcf..db95e99aa468 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionManager.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionManager.java @@ -161,20 +161,8 @@ public abstract class ActionManager implements ApplicationComponent { public abstract void addTransparentTimerListener(int delay, TimerListener listener); - /** @deprecated use {@linkplain #addTransparentTimerListener(int, TimerListener)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public void addTransparrentTimerListener(int delay, TimerListener listener) { - addTransparentTimerListener(delay, listener); - } - public abstract void removeTransparentTimerListener(TimerListener listener); - /** @deprecated use {@linkplain #removeTransparentTimerListener(TimerListener)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public void removeTransparrentTimerListener(TimerListener listener) { - removeTransparentTimerListener(listener); - } - public abstract ActionCallback tryToExecute(@NotNull AnAction action, @NotNull InputEvent inputEvent, @Nullable Component contextComponent, @Nullable String place, boolean now); diff --git a/platform/lang-api/src/com/intellij/openapi/project/ProjectUtil.java b/platform/lang-api/src/com/intellij/openapi/project/ProjectUtil.java index 5fcd7d50515f..62a2b91d3777 100644 --- a/platform/lang-api/src/com/intellij/openapi/project/ProjectUtil.java +++ b/platform/lang-api/src/com/intellij/openapi/project/ProjectUtil.java @@ -25,7 +25,6 @@ import com.intellij.openapi.roots.ProjectRootManager; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFilePathWrapper; -import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -35,9 +34,6 @@ import javax.swing.*; * @author max */ public class ProjectUtil { - /** @deprecated use {@linkplain Project#DIRECTORY_STORE_FOLDER} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") @NonNls public static final String DIRECTORY_BASED_PROJECT_DIR = Project.DIRECTORY_STORE_FOLDER; - private ProjectUtil() { } @Nullable diff --git a/platform/lang-impl/src/com/intellij/execution/ExecutionHelper.java b/platform/lang-impl/src/com/intellij/execution/ExecutionHelper.java index 6dc22a3e6b77..c4b5eaf71daf 100644 --- a/platform/lang-impl/src/com/intellij/execution/ExecutionHelper.java +++ b/platform/lang-impl/src/com/intellij/execution/ExecutionHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -18,7 +18,6 @@ package com.intellij.execution; import com.intellij.execution.configurations.GeneralCommandLine; import com.intellij.execution.executors.DefaultRunExecutor; -import com.intellij.execution.process.OSProcessHandler; import com.intellij.execution.process.ProcessHandler; import com.intellij.execution.process.ProcessOutput; import com.intellij.execution.ui.RunContentDescriptor; @@ -257,23 +256,6 @@ public class ExecutionHelper { } } - /** @deprecated use lookup by user data (to remove in IDEA 13) */ - public static Collection findRunningConsoleByCmdLine(final Project project, - @NotNull final NotNullFunction cmdLineMatcher) { - return findRunningConsole(project, new NotNullFunction() { - @NotNull - @Override - public Boolean fun(RunContentDescriptor selectedContent) { - final ProcessHandler processHandler = selectedContent.getProcessHandler(); - if (processHandler instanceof OSProcessHandler && !processHandler.isProcessTerminated()) { - final String commandLine = ((OSProcessHandler)processHandler).getCommandLine(); - return cmdLineMatcher.fun(commandLine); - } - return false; - } - }); - } - public static Collection findRunningConsoleByTitle(final Project project, @NotNull final NotNullFunction titleMatcher) { return findRunningConsole(project, new NotNullFunction() { diff --git a/platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/SdkListCellRenderer.java b/platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/SdkListCellRenderer.java index 05af2835af3b..4ffd6f467485 100644 --- a/platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/SdkListCellRenderer.java +++ b/platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/SdkListCellRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package com.intellij.openapi.projectRoots.impl; import com.intellij.openapi.projectRoots.Sdk; @@ -42,24 +41,6 @@ public class SdkListCellRenderer extends ColoredListCellRendererWrapper { myShowHomePath = showHomePath; } - /** @deprecated use {@linkplain #SdkListCellRenderer(String)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public SdkListCellRenderer(final ListCellRenderer listCellRenderer) { - this(""); - } - - /** @deprecated use {@linkplain #SdkListCellRenderer(String)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public SdkListCellRenderer(final String nullText, final ListCellRenderer listCellRenderer) { - this(nullText); - } - - /** @deprecated use {@linkplain #SdkListCellRenderer(String, boolean)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public SdkListCellRenderer(final String nullText, final boolean showHomePath, final ListCellRenderer listCellRenderer) { - this(nullText, showHomePath); - } - @Override protected void doCustomize(final JList list, final Sdk sdk, final int index, final boolean selected, final boolean hasFocus) { if (sdk != null) { diff --git a/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooserDescriptor.java b/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooserDescriptor.java index d2ab0405b3f2..edcc97ec7cd5 100644 --- a/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooserDescriptor.java +++ b/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooserDescriptor.java @@ -233,19 +233,6 @@ public class FileChooserDescriptor implements Cloneable { myRoots.addAll(roots); } - /** @deprecated use {@linkplain #setRoots(com.intellij.openapi.vfs.VirtualFile...)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public final void setRoot(VirtualFile root) { - myRoots.clear(); - myRoots.add(root); - } - - /** @deprecated use {@linkplain #setRoots(com.intellij.openapi.vfs.VirtualFile...)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public final void addRoot(VirtualFile root) { - myRoots.add(root); - } - public boolean isTreeRootVisible() { return myIsTreeRootVisible; } diff --git a/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooserFactory.java b/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooserFactory.java index 0d47ad39462b..f22a5943a725 100644 --- a/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooserFactory.java +++ b/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooserFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -29,26 +29,6 @@ public abstract class FileChooserFactory { return ServiceManager.getService(FileChooserFactory.class); } - /** - * @deprecated use {@linkplain #createFileChooser(FileChooserDescriptor, com.intellij.openapi.project.Project, java.awt.Component)} - * (to remove in IDEA 13) - */ - @SuppressWarnings("UnusedDeclaration") - @NotNull - public FileChooserDialog createFileChooser(@NotNull FileChooserDescriptor descriptor, @Nullable Project project) { - return createFileChooser(descriptor, project, null); - } - - /** - * @deprecated use {@linkplain #createFileChooser(FileChooserDescriptor, com.intellij.openapi.project.Project, java.awt.Component)} - * (to remove in IDEA 13) - */ - @SuppressWarnings("UnusedDeclaration") - @NotNull - public FileChooserDialog createFileChooser(@NotNull FileChooserDescriptor descriptor, @NotNull Component parent) { - return createFileChooser(descriptor, null, parent); - } - @NotNull public abstract FileChooserDialog createFileChooser(@NotNull FileChooserDescriptor descriptor, @Nullable Project project, @@ -93,4 +73,4 @@ public abstract class FileChooserFactory { @NotNull FileChooserDescriptor descriptor, boolean showHidden, @Nullable Disposable parent); -} \ No newline at end of file +} diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DialogBuilder.java b/platform/platform-api/src/com/intellij/openapi/ui/DialogBuilder.java index 76c10a8acddc..480cea63de95 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DialogBuilder.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DialogBuilder.java @@ -93,12 +93,6 @@ public class DialogBuilder implements Disposable { myTitle = title; } - /** @deprecated use {@linkplain #setPreferredFocusComponent(JComponent)} (to remove in IDEA 13) */ - @SuppressWarnings({"UnusedDeclaration", "SpellCheckingInspection"}) - public void setPreferedFocusComponent(JComponent component) { - setPreferredFocusComponent(component); - } - public void setPreferredFocusComponent(JComponent component) { myPreferedFocusComponent = component; } diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapperPeer.java b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapperPeer.java index 0ef61f01430b..dddef7fa3705 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapperPeer.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapperPeer.java @@ -16,6 +16,7 @@ package com.intellij.openapi.ui; import com.intellij.openapi.util.ActionCallback; +import com.intellij.util.ArrayUtil; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -23,7 +24,6 @@ import java.awt.*; import java.awt.event.KeyListener; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; -import java.util.List; public abstract class DialogWrapperPeer { public static Object HAVE_INITIAL_SELECTION = new Object(); @@ -151,15 +151,11 @@ public abstract class DialogWrapperPeer { public abstract void repaint(); public abstract void pack(); - /** @deprecated use {@linkplain Window#setIconImages(List)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public abstract void setIconImages(List image); - public abstract void setAppIcons(); public abstract boolean isHeadless(); public Object[] getCurrentModalEntities() { - return new Object[0]; + return ArrayUtil.EMPTY_OBJECT_ARRAY; } } \ No newline at end of file diff --git a/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java b/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java index bce394b2c668..a286a800a244 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -266,12 +266,6 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom myListeners.add(l); } - /** @deprecated use {@linkplain #getPanelPreferredSize()} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - protected Dimension getPanelPrefferedSize() { - return getPanelPreferredSize(); - } - protected Dimension getPanelPreferredSize() { return new Dimension(800, 600); } @@ -584,13 +578,6 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom return null; } - /** @deprecated use {@linkplain #getSelectedConfigurable()} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - @Nullable - public NamedConfigurable getSelectedConfugurable() { - return getSelectedConfigurable(); - } - @Nullable public NamedConfigurable getSelectedConfigurable() { final TreePath selectionPath = myTree.getSelectionPath(); diff --git a/platform/platform-api/src/com/intellij/openapi/util/PasswordPromptDialog.java b/platform/platform-api/src/com/intellij/openapi/util/PasswordPromptDialog.java deleted file mode 100644 index 9904374c20fc..000000000000 --- a/platform/platform-api/src/com/intellij/openapi/util/PasswordPromptDialog.java +++ /dev/null @@ -1,59 +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.util; - -import com.intellij.openapi.ui.DialogWrapper; -import org.jetbrains.annotations.Nullable; - -import javax.swing.*; - -/** @deprecated use {@linkplain com.intellij.openapi.ui.Messages#showPasswordDialog(String, String)} (to remove in IDEA 13) */ -@SuppressWarnings("UnusedDeclaration") -public class PasswordPromptDialog extends DialogWrapper { - private JPasswordField myPasswordField; - private final String myPrompt; - private final String myDefaultValue; - - public PasswordPromptDialog(String prompt, final String title, @Nullable final String defaultValue) { - super(true); - myDefaultValue = defaultValue; - setTitle(title); - myPrompt = prompt; - init(); - } - - protected JComponent createNorthPanel() { - return new JLabel(myPrompt); - } - - protected JComponent createCenterPanel() { - myPasswordField = new JPasswordField(); - - if (myDefaultValue != null) { - myPasswordField.setText(myDefaultValue); - } - - return myPasswordField; - } - - public JComponent getPreferredFocusedComponent() { - return myPasswordField; - } - - public String getPassword() { - return new String(myPasswordField.getPassword()); - } -} diff --git a/platform/platform-api/src/com/intellij/openapi/util/PasswordUtil.java b/platform/platform-api/src/com/intellij/openapi/util/PasswordUtil.java index 4b3bc1718603..4ba3fa7c1516 100644 --- a/platform/platform-api/src/com/intellij/openapi/util/PasswordUtil.java +++ b/platform/platform-api/src/com/intellij/openapi/util/PasswordUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -15,9 +15,6 @@ */ package com.intellij.openapi.util; -import com.intellij.openapi.ui.Messages; -import org.jetbrains.annotations.Nullable; - public class PasswordUtil { private PasswordUtil() { } @@ -44,11 +41,4 @@ public class PasswordUtil { } return result; } - - /** @deprecated use {@linkplain Messages#showPasswordDialog(String, String)} (to remove in IDEA 13) */ - @Nullable - @SuppressWarnings("UnusedDeclaration") - public static String requestPassword(String prompt, String title, final String defaultValue) { - return Messages.showPasswordDialog(prompt, title); - } } \ No newline at end of file diff --git a/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java b/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java index 0f7fe1f1f941..3fa080f35111 100644 --- a/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java +++ b/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -66,10 +66,6 @@ public abstract class RefreshQueue { session.launch(); } - /** @deprecated use {@linkplain #refresh(boolean, boolean, Runnable, ModalityState, VirtualFile...)} with {@linkplain ManagingFS#getLocalRoots()} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public abstract void refreshLocalRoots(boolean async, @Nullable Runnable postAction, @NotNull ModalityState modalityState); - public abstract void processSingleEvent(@NotNull VFileEvent event); public abstract void cancelSession(long id); diff --git a/platform/platform-api/src/com/intellij/openapi/vfs/watcher/ChangeKind.java b/platform/platform-api/src/com/intellij/openapi/vfs/watcher/ChangeKind.java deleted file mode 100644 index 5c4472447977..000000000000 --- a/platform/platform-api/src/com/intellij/openapi/vfs/watcher/ChangeKind.java +++ /dev/null @@ -1,28 +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.vfs.watcher; - -/** @deprecated not an API (to remove in IDEA 13) */ -@SuppressWarnings("UnusedDeclaration") -public enum ChangeKind { - CREATE, - DELETE, - STATS, - CHANGE, - DIRTY, - RECDIRTY, - RESET -} \ No newline at end of file diff --git a/platform/platform-api/src/com/intellij/openapi/vfs/watcher/NotAvailableException.java b/platform/platform-api/src/com/intellij/openapi/vfs/watcher/NotAvailableException.java deleted file mode 100644 index dccecf9c7a11..000000000000 --- a/platform/platform-api/src/com/intellij/openapi/vfs/watcher/NotAvailableException.java +++ /dev/null @@ -1,21 +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.vfs.watcher; - -/** @deprecated not an API (to remove in IDEA 13) */ -@SuppressWarnings("UnusedDeclaration") -public class NotAvailableException extends RuntimeException { -} diff --git a/platform/platform-api/src/com/intellij/openapi/wm/WindowManager.java b/platform/platform-api/src/com/intellij/openapi/wm/WindowManager.java index e4252f104ed1..c2fb9cdd168b 100644 --- a/platform/platform-api/src/com/intellij/openapi/wm/WindowManager.java +++ b/platform/platform-api/src/com/intellij/openapi/wm/WindowManager.java @@ -114,9 +114,6 @@ public abstract class WindowManager { @NotNull public abstract IdeFrame[] getAllProjectFrames(); - /** @deprecated Use {@linkplain #getAllProjectFrames()} instead (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") public IdeFrame[] getAllFrames() { return getAllProjectFrames(); } - public abstract JFrame findVisibleFrame(); public abstract void addListener(WindowManagerListener listener); diff --git a/platform/platform-api/src/com/intellij/ui/GuiUtils.java b/platform/platform-api/src/com/intellij/ui/GuiUtils.java index 91e9fc26f0ae..ac7810cfb15e 100644 --- a/platform/platform-api/src/com/intellij/ui/GuiUtils.java +++ b/platform/platform-api/src/com/intellij/ui/GuiUtils.java @@ -388,10 +388,4 @@ public class GuiUtils { invokeAndWait(runnable); } } - - /** @deprecated call {@link Application#invokeAndWait(Runnable, ModalityState)} directly (to remove in IDEA 13). */ - @SuppressWarnings("UnusedDeclaration") - public static void invokeAndWaitIfNeeded(@NotNull Runnable runnable, @NotNull ModalityState modalityState) { - ApplicationManager.getApplication().invokeAndWait(runnable, modalityState); - } } diff --git a/platform/platform-api/src/com/intellij/ui/ListCellRendererWrapper.java b/platform/platform-api/src/com/intellij/ui/ListCellRendererWrapper.java index 3a7d4fcb8081..febb5b26dd80 100644 --- a/platform/platform-api/src/com/intellij/ui/ListCellRendererWrapper.java +++ b/platform/platform-api/src/com/intellij/ui/ListCellRendererWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -40,17 +40,12 @@ public abstract class ListCellRendererWrapper implements ListCellRenderer { private Color myBackground; private Font myFont; + @SuppressWarnings("UndesirableClassUsage") public ListCellRendererWrapper() { myDefaultRenderer = new JComboBox().getRenderer(); assert myDefaultRenderer != null : "LaF: " + UIManager.getLookAndFeel(); } - /** @deprecated please use {@linkplain #ListCellRendererWrapper()} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") public ListCellRendererWrapper(final JComboBox comboBox) { this(); } - - /** @deprecated please use {@linkplain #ListCellRendererWrapper()} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") public ListCellRendererWrapper(final ListCellRenderer listCellRenderer) { this(); } - public final Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { mySeparator = false; myIcon = null; @@ -75,7 +70,7 @@ public abstract class ListCellRendererWrapper implements ListCellRenderer { return separator; } - final Component component = myDefaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + @SuppressWarnings("unchecked") final Component component = myDefaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (component instanceof JLabel) { final JLabel label = (JLabel)component; label.setIcon(myIcon); diff --git a/platform/platform-impl/src/com/intellij/execution/process/RunnerMediator.java b/platform/platform-impl/src/com/intellij/execution/process/RunnerMediator.java index 8a6386647691..bc561c6d031c 100644 --- a/platform/platform-impl/src/com/intellij/execution/process/RunnerMediator.java +++ b/platform/platform-impl/src/com/intellij/execution/process/RunnerMediator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -109,16 +109,6 @@ public class RunnerMediator { } } - /** @deprecated use {@link SystemInfo#isUnix} (to remove in IDEA 13) */ - public static boolean isUnix() { - return SystemInfo.isUnix; - } - - /** @deprecated use {@link SystemInfo#isWindows} (to remove in IDEA 13) */ - public static boolean isWindows() { - return SystemInfo.isWindows; - } - /** * Destroys process tree: in case of windows via imitating ctrl+break, in case of unix via sending sig_kill to every process in tree. * @param process to kill with all sub-processes. diff --git a/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java b/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java index 3bc0a11bc4b8..534114b226df 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java @@ -253,11 +253,6 @@ public class ShowFilePathAction extends AnAction { return fileManagerName.getValue(); } - /** @deprecated use {@linkplain #openFile(java.io.File)} (to remove in IDEA 13) */ - public static void open(@NotNull final File ioFile, @Nullable final File toSelect) { - openFile(toSelect != null && toSelect.exists() ? toSelect : ioFile); - } - /** * Shows system file manager with given file's parent directory open and the file highlighted in it
* (note that not all platforms support highlighting). diff --git a/platform/platform-impl/src/com/intellij/ide/impl/ProjectUtil.java b/platform/platform-impl/src/com/intellij/ide/impl/ProjectUtil.java index 3c6861c8fcc2..d495641417c1 100644 --- a/platform/platform-impl/src/com/intellij/ide/impl/ProjectUtil.java +++ b/platform/platform-impl/src/com/intellij/ide/impl/ProjectUtil.java @@ -274,14 +274,6 @@ public class ProjectUtil { } } - /** - * @deprecated use {@linkplain com.intellij.openapi.project.ProjectUtil#isProjectOrWorkspaceFile(com.intellij.openapi.vfs.VirtualFile)} (to remove in IDEA 13) - */ - @SuppressWarnings("UnusedDeclaration") - public static boolean isProjectOrWorkspaceFile(final VirtualFile file) { - return com.intellij.openapi.project.ProjectUtil.isProjectOrWorkspaceFile(file); - } - public static String getBaseDir() { final String lastProjectLocation = GeneralSettings.getInstance().getLastProjectCreationLocation(); if (lastProjectLocation != null) { diff --git a/platform/platform-impl/src/com/intellij/openapi/command/impl/DummyProject.java b/platform/platform-impl/src/com/intellij/openapi/command/impl/DummyProject.java index 053e0e652f96..2b7e32717318 100644 --- a/platform/platform-impl/src/com/intellij/openapi/command/impl/DummyProject.java +++ b/platform/platform-impl/src/com/intellij/openapi/command/impl/DummyProject.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -71,13 +71,6 @@ public class DummyProject extends UserDataHolderBase implements Project { return "dummy"; } - @Override - @Nullable - @NonNls - public String getLocation() { - throw new UnsupportedOperationException("Method getLocation not implemented in " + getClass()); - } - @Override @NotNull public String getProjectFilePath() { diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/DefaultProjectStoreImpl.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/DefaultProjectStoreImpl.java index 8685b846b0a3..48247b2de866 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/DefaultProjectStoreImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/DefaultProjectStoreImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -197,11 +197,6 @@ public class DefaultProjectStoreImpl extends ProjectStoreImpl { }; } - @Override - public String getLocation() { - throw new UnsupportedOperationException("Method getLocation not implemented in " + getClass()); - } - @Override public void load() throws IOException, StateStorageException { if (myElement == null) return; diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java index d7d047603a8b..5d32996ed3f9 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -44,10 +44,6 @@ public interface IProjectStore extends IComponentStore { @Nullable String getProjectBasePath(); - /** @deprecated please use {@linkplain #getPresentableUrl()} or {@linkplain #getProjectBaseDir()} (to remove in IDEA 13) */ - @Nullable - String getLocation(); - @NotNull String getProjectName(); @@ -62,6 +58,7 @@ public interface IProjectStore extends IComponentStore { boolean reload(@NotNull Set> changedFiles) throws StateStorageException, IOException; //------ This methods should be got rid of + /** @deprecated to remove in IDEA 14 */ void loadProject() throws IOException, JDOMException, InvalidDataException, StateStorageException; @Nullable @@ -72,10 +69,6 @@ public interface IProjectStore extends IComponentStore { void loadProjectFromTemplate(@NotNull ProjectImpl project); - /** @deprecated please use {@linkplain #getProjectFile()} (to remove in IDEA 13) */ - @NotNull - String getProjectFileName(); - @NotNull String getProjectFilePath(); } diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java index 88948d4d669c..33f1751ff961 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java @@ -272,21 +272,6 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject return myScheme == StorageScheme.DEFAULT ? file.getParent() : file.getParentFile().getParent(); } - @Override - public String getLocation() { - if (myCachedLocation == null) { - if (myScheme == StorageScheme.DEFAULT) { - myCachedLocation = getProjectFilePath(); - } - else { - final VirtualFile baseDir = getProjectBaseDir(); - myCachedLocation = baseDir == null ? null : baseDir.getPath(); - } - } - - return myCachedLocation; - } - @NotNull @Override public String getProjectName() { @@ -330,6 +315,13 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject } } + @NotNull + private String getProjectFileName() { + final FileBasedStorage storage = (FileBasedStorage)getStateStorageManager().getFileStateStorage(StoragePathMacros.PROJECT_FILE); + assert storage != null; + return storage.getFileName(); + } + @NotNull @Override public StorageScheme getStorageScheme() { @@ -388,14 +380,6 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject } } - @NotNull - @Override - public String getProjectFileName() { - final FileBasedStorage storage = (FileBasedStorage)getStateStorageManager().getFileStateStorage(StoragePathMacros.PROJECT_FILE); - assert storage != null; - return storage.getFileName(); - } - @NotNull @Override public String getProjectFilePath() { diff --git a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java index 7e6a04cb86b9..5428df47485a 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java @@ -280,15 +280,6 @@ public class ProjectImpl extends ComponentManagerImpl implements ProjectEx { return prefix + Integer.toHexString(str.hashCode()); } - @SuppressWarnings("deprecation") - @Nullable - @NonNls - @Override - public String getLocation() { - if (myName == null) return null; // was called before initialized - return isDisposed() ? null : getStateStore().getLocation(); - } - @Override @Nullable public VirtualFile getWorkspaceFile() { diff --git a/platform/platform-impl/src/com/intellij/openapi/ui/impl/DialogWrapperPeerImpl.java b/platform/platform-impl/src/com/intellij/openapi/ui/impl/DialogWrapperPeerImpl.java index 14be7eacb2da..5a09049cc950 100644 --- a/platform/platform-impl/src/com/intellij/openapi/ui/impl/DialogWrapperPeerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/ui/impl/DialogWrapperPeerImpl.java @@ -356,12 +356,6 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer implements FocusTra myDialog.pack(); } - @Override - @SuppressWarnings("UnusedDeclaration") - public void setIconImages(final List images) { - myDialog.getWindow().setIconImages(images); - } - @Override public void setAppIcons() { AppUIUtil.updateWindowIcon(getWindow()); diff --git a/platform/platform-impl/src/com/intellij/openapi/ui/impl/GlassPaneDialogWrapperPeer.java b/platform/platform-impl/src/com/intellij/openapi/ui/impl/GlassPaneDialogWrapperPeer.java index b538143773c7..f305db12838b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/ui/impl/GlassPaneDialogWrapperPeer.java +++ b/platform/platform-impl/src/com/intellij/openapi/ui/impl/GlassPaneDialogWrapperPeer.java @@ -51,7 +51,6 @@ import java.awt.*; import java.awt.event.*; import java.awt.image.BufferedImage; import java.lang.ref.WeakReference; -import java.util.List; /** * @author spleaner @@ -104,7 +103,7 @@ public class GlassPaneDialogWrapperPeer extends DialogWrapperPeer implements Foc } public GlassPaneDialogWrapperPeer(DialogWrapper wrapper, boolean canBeParent) throws GlasspanePeerUnavailableException { - this(wrapper, (Project) null, canBeParent); + this(wrapper, (Project)null, canBeParent); } public GlassPaneDialogWrapperPeer(DialogWrapper wrapper, @NotNull Component parent, boolean canBeParent) @@ -145,8 +144,7 @@ public class GlassPaneDialogWrapperPeer extends DialogWrapperPeer implements Foc if (myDialog != null) { return myDialog.getFocusTrackback(); } - - return null; + return null; } public void setUndecorated(final boolean undecorated) { @@ -318,10 +316,6 @@ public class GlassPaneDialogWrapperPeer extends DialogWrapperPeer implements Foc public void pack() { } - public void setIconImages(final List image) { - throw new UnsupportedOperationException("Not implemented in " + getClass().getCanonicalName()); - } - public void setAppIcons() { throw new UnsupportedOperationException("Not implemented in " + getClass().getCanonicalName()); } diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java index 5d6e714b7a48..1a49ff2b1bda 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java @@ -135,11 +135,6 @@ public class RefreshQueueImpl extends RefreshQueue { return new RefreshSessionImpl(async, recursively, finishRunnable, state); } - @Override - public void refreshLocalRoots(boolean async, @Nullable Runnable postAction, @NotNull ModalityState modalityState) { - RefreshQueue.getInstance().refresh(async, true, postAction, modalityState, ManagingFS.getInstance().getLocalRoots()); - } - @Override public void processSingleEvent(@NotNull VFileEvent event) { new RefreshSessionImpl(Collections.singletonList(event)).launch(); diff --git a/platform/platform-impl/src/com/intellij/ui/AppUIUtil.java b/platform/platform-impl/src/com/intellij/ui/AppUIUtil.java index a9eefcb35c9f..7ae9fb6b6efa 100644 --- a/platform/platform-impl/src/com/intellij/ui/AppUIUtil.java +++ b/platform/platform-impl/src/com/intellij/ui/AppUIUtil.java @@ -33,7 +33,6 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import javax.swing.*; import java.awt.*; import java.io.IOException; import java.io.InputStream; @@ -51,18 +50,6 @@ public class AppUIUtil { window.setIconImages(getAppIconImages()); } - /** @deprecated use {@linkplain #updateWindowIcon(Window)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public static void updateFrameIcon(final Frame frame) { - updateWindowIcon(frame); - } - - /** @deprecated use {@linkplain #updateWindowIcon(Window)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedDeclaration") - public static void updateDialogIcon(final JDialog dialog) { - updateWindowIcon(dialog); - } - @SuppressWarnings({"UnnecessaryFullyQualifiedName", "deprecation"}) private static List getAppIconImages() { ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance(); diff --git a/platform/platform-tests/testSrc/com/intellij/psi/tree/TokenSetTest.java b/platform/platform-tests/testSrc/com/intellij/psi/tree/TokenSetTest.java index 9dfc0c34eba4..159d2c9b90fc 100644 --- a/platform/platform-tests/testSrc/com/intellij/psi/tree/TokenSetTest.java +++ b/platform/platform-tests/testSrc/com/intellij/psi/tree/TokenSetTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -93,24 +93,13 @@ public class TokenSetTest { check(TokenSet.andSet(S12, S34)); } - @SuppressWarnings("deprecation") @Test public void andNot() throws Exception { final TokenSet S123 = TokenSet.orSet(S12, S3); - check(S123.minus(S12), T3); - check(S123.minus(S5), T1, T2, T3); check(TokenSet.andNot(S123, S12), T3); check(TokenSet.andNot(S123, S5), T1, T2, T3); } - @SuppressWarnings("deprecation") - @Test - public void not() throws Exception { - checkNot(TokenSet.not(S12), T1, T2); - checkNot(TokenSet.not(S34), T3, T4); - checkNot(TokenSet.not(S5), T5); - } - private static void fakeElements(int from, int to) { for (int i = from; i <= to; i++) { new IElementType("Test element #" + i, Language.ANY); @@ -129,18 +118,6 @@ public class TokenSetTest { } } - private static void checkNot(@NotNull TokenSet set, @NotNull IElementType... elements) { - final Set expected = ContainerUtil.newHashSet(elements); - for (IElementType t : Arrays.asList(T1, T2, T3, T4, T5, T6)) { - if (!expected.contains(t)) { - assertTrue("missed: " + t, set.contains(t)); - } - else { - assertFalse("unexpected: " + t, set.contains(t)); - } - } - } - @Test public void performance() throws Exception { diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/LibraryOrderEntryBaseImpl.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/LibraryOrderEntryBaseImpl.java index 1d9b369ef0cf..c2f12985dfb9 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/LibraryOrderEntryBaseImpl.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/LibraryOrderEntryBaseImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -22,16 +22,11 @@ import com.intellij.openapi.roots.DependencyScope; import com.intellij.openapi.roots.LibraryOrSdkOrderEntry; import com.intellij.openapi.roots.OrderRootType; import com.intellij.openapi.roots.RootProvider; -import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.ArrayUtil; -import com.intellij.util.NullableFunction; -import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.List; - /** * @author dsl */ @@ -69,18 +64,6 @@ abstract class LibraryOrderEntryBaseImpl extends OrderEntryBaseImpl implements L return rootProvider != null ? rootProvider.getFiles(type) : VirtualFile.EMPTY_ARRAY; } - /** @deprecated has no sense (to remove in IDEA 13) */ - @SuppressWarnings({"MethodMayBeStatic", "UnusedDeclaration"}) - protected VirtualFile[] filterDirectories(@NotNull VirtualFile[] files) { - List filtered = ContainerUtil.mapNotNull(files, new NullableFunction() { - @Override - public VirtualFile fun(@NotNull VirtualFile file) { - return file.isDirectory() ? file : null; - } - }); - return VfsUtilCore.toVirtualFileArray(filtered); - } - @Nullable protected abstract RootProvider getRootProvider(); diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/libraries/PersistentLibraryKind.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/libraries/PersistentLibraryKind.java index 636061956091..b0f7dbf3102d 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/libraries/PersistentLibraryKind.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/libraries/PersistentLibraryKind.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -31,21 +31,9 @@ public abstract class PersistentLibraryKind

extends super(kindId); } - /** @deprecated 'fileBased' has no sense, use {@linkplain #PersistentLibraryKind(String)} (to remove in IDEA 13) */ - @SuppressWarnings("UnusedParameters") - public PersistentLibraryKind(@NotNull @NonNls String kindId, boolean fileBased) { - super(kindId); - } - @NotNull public abstract P createDefaultProperties(); - /** @deprecated has no sense (to remove in IDEA 13) */ - @SuppressWarnings({"UnusedDeclaration", "MethodMayBeStatic"}) - public boolean isFileBased() { - return false; - } - public OrderRootType[] getAdditionalRootTypes() { return new OrderRootType[0]; } diff --git a/platform/testFramework/src/com/intellij/mock/MockProjectEx.java b/platform/testFramework/src/com/intellij/mock/MockProjectEx.java index 9e41a6baf804..bc9da504ab19 100644 --- a/platform/testFramework/src/com/intellij/mock/MockProjectEx.java +++ b/platform/testFramework/src/com/intellij/mock/MockProjectEx.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -53,5 +53,4 @@ public class MockProjectEx extends MockProject implements ProjectEx { public void setOptimiseTestLoadSpeed(final boolean optimiseTestLoadSpeed) { throw new UnsupportedOperationException("Method setOptimiseTestLoadSpeed not implemented in " + getClass()); } - - } +} diff --git a/platform/testFramework/src/com/intellij/mock/MockProjectStore.java b/platform/testFramework/src/com/intellij/mock/MockProjectStore.java index d552a5966661..73b353be1e2c 100644 --- a/platform/testFramework/src/com/intellij/mock/MockProjectStore.java +++ b/platform/testFramework/src/com/intellij/mock/MockProjectStore.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -70,11 +70,6 @@ public class MockProjectStore implements IProjectStore { throw new UnsupportedOperationException("Method getProjectBasePath is not yet implemented in " + getClass().getName()); } - @Override - public String getLocation() { - throw new UnsupportedOperationException("Method getLocation not implemented in " + getClass()); - } - @Override @NotNull public String getProjectName() { @@ -109,12 +104,6 @@ public class MockProjectStore implements IProjectStore { throw new UnsupportedOperationException("Method loadProjectFromTemplate is not yet implemented in " + getClass().getName()); } - @Override - @NotNull - public String getProjectFileName() { - throw new UnsupportedOperationException("Method getProjectFileName is not yet implemented in " + getClass().getName()); - } - @Override @NotNull public String getProjectFilePath() { diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/impl/CheckinHandlersManager.java b/platform/vcs-api/src/com/intellij/openapi/vcs/impl/CheckinHandlersManager.java index 7e0374fe8b82..abf11f2230a5 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/impl/CheckinHandlersManager.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/impl/CheckinHandlersManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -18,8 +18,6 @@ package com.intellij.openapi.vcs.impl; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.vcs.AbstractVcs; import com.intellij.openapi.vcs.checkin.BaseCheckinHandlerFactory; -import com.intellij.openapi.vcs.checkin.VcsCheckinHandlerFactory; -import org.jetbrains.annotations.NotNull; import java.util.List; @@ -35,31 +33,4 @@ public abstract class CheckinHandlersManager { * @return the list of registered factories */ public abstract List getRegisteredCheckinHandlerFactories(AbstractVcs[] allActiveVcss); - - @SuppressWarnings("UnusedDeclaration") - @Deprecated - /** - * @deprecated to remove in IDEA 13 - */ - public abstract List getMatchingVcsFactories(@NotNull final List keys); - - @SuppressWarnings("UnusedDeclaration") - @Deprecated - /** - * @deprecated to remove in IDEA 13, use EP {@link com.intellij.openapi.vcs.checkin.CheckinHandlerFactory#EP_NAME} - * Registers a factory which provides callbacks to run before and after VCS checkin operations. - * - * @param factory the factory to register. - */ - public abstract void registerCheckinHandlerFactory(BaseCheckinHandlerFactory factory); - - @SuppressWarnings("UnusedDeclaration") - @Deprecated - /** - * @deprecated to remove in IDEA 13, use EP {@link com.intellij.openapi.vcs.checkin.CheckinHandlerFactory#EP_NAME} - * Unregister a factory which provides callbacks to run before and after VCS checkin operations. - * - * @param factory the factory to unregister. - */ - public abstract void unregisterCheckinHandlerFactory(BaseCheckinHandlerFactory factory); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/CheckinHandlersManagerImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/CheckinHandlersManagerImpl.java index a49fcea06511..b236ac8db571 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/CheckinHandlersManagerImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/CheckinHandlersManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -20,10 +20,8 @@ import com.intellij.openapi.vcs.VcsKey; import com.intellij.openapi.vcs.checkin.BaseCheckinHandlerFactory; import com.intellij.openapi.vcs.checkin.CheckinHandlerFactory; import com.intellij.openapi.vcs.checkin.VcsCheckinHandlerFactory; -import com.intellij.util.SmartList; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.containers.MultiMap; -import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.Collection; @@ -44,8 +42,7 @@ public class CheckinHandlersManagerImpl extends CheckinHandlersManager { @Override public List getRegisteredCheckinHandlerFactories(AbstractVcs[] allActiveVcss) { - final List list = - new ArrayList(myRegisteredBeforeCheckinHandlers.size() + allActiveVcss.length); + final List list = new ArrayList(myRegisteredBeforeCheckinHandlers.size() + allActiveVcss.length); list.addAll(myRegisteredBeforeCheckinHandlers); for (AbstractVcs vcs : allActiveVcss) { final Collection factories = myVcsMap.get(vcs.getKeyInstanceMethod()); @@ -55,26 +52,4 @@ public class CheckinHandlersManagerImpl extends CheckinHandlersManager { } return list; } - - @Override - public List getMatchingVcsFactories(@NotNull List vcsList) { - final List result = new SmartList(); - for (AbstractVcs vcs : vcsList) { - final Collection factories = myVcsMap.get(vcs.getKeyInstanceMethod()); - if (!factories.isEmpty()) { - result.addAll(factories); - } - } - return result; - } - - @Override - public void registerCheckinHandlerFactory(BaseCheckinHandlerFactory factory) { - myRegisteredBeforeCheckinHandlers.add(factory); - } - - @Override - public void unregisterCheckinHandlerFactory(BaseCheckinHandlerFactory handler) { - myRegisteredBeforeCheckinHandlers.remove(handler); - } } diff --git a/plugins/git4idea/src/git4idea/merge/GitPullDialog.java b/plugins/git4idea/src/git4idea/merge/GitPullDialog.java index 2daf8a972726..f9d8085cfab8 100644 --- a/plugins/git4idea/src/git4idea/merge/GitPullDialog.java +++ b/plugins/git4idea/src/git4idea/merge/GitPullDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -306,7 +306,7 @@ public class GitPullDialog extends DialogWrapper { * @return a list cell renderer for virtual files (it renders presentable URL */ public ListCellRendererWrapper getGitRemoteListCellRenderer(final String defaultRemote) { - return new ListCellRendererWrapper(myRemote) { + return new ListCellRendererWrapper() { @Override public void customize(final JList list, final GitRemote remote, final int index, final boolean selected, final boolean hasFocus) { final String text;