diff --git a/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java b/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java index fce44042176e..3ed96d076be0 100644 --- a/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java +++ b/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2011 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. @@ -526,7 +526,7 @@ public class JavaDocInfoGenerator { final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(packageHtmlFile.getProject()).getElementFactory(); final PsiDocComment docComment; try { - docComment = elementFactory.createDocCommentFromText(fileText, null); + docComment = elementFactory.createDocCommentFromText(fileText); } catch (IncorrectOperationException e) { LOG.error(e); @@ -800,7 +800,7 @@ public class JavaDocInfoGenerator { s = StringUtil.replace(s, "", method.getContainingClass().getName()); final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myProject).getElementFactory(); try { - return elementFactory.createDocCommentFromText(s, null); + return elementFactory.createDocCommentFromText(s); } catch (IncorrectOperationException e) { return null; diff --git a/java/java-impl/src/com/intellij/psi/impl/PsiElementFactoryImpl.java b/java/java-impl/src/com/intellij/psi/impl/PsiElementFactoryImpl.java index 5b441892b852..e7d84d136092 100644 --- a/java/java-impl/src/com/intellij/psi/impl/PsiElementFactoryImpl.java +++ b/java/java-impl/src/com/intellij/psi/impl/PsiElementFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2011 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,7 +40,6 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Collections; import java.util.Map; import static com.intellij.openapi.util.text.StringUtil.join; @@ -288,12 +287,6 @@ public class PsiElementFactoryImpl extends PsiJavaParserFacadeImpl implements Ps return createType(aClass, PsiSubstitutor.EMPTY.putAll(aClass, parameters)); } - @NotNull - @Override - public PsiType detachType(@NotNull final PsiType type) { - return type; - } - @NotNull @Override public PsiSubstitutor createRawSubstitutor(@NotNull final PsiTypeParameterListOwner owner) { @@ -638,30 +631,6 @@ public class PsiElementFactoryImpl extends PsiJavaParserFacadeImpl implements Ps return result; } - @NotNull - @Override - public PsiTypeCodeFragment createTypeCodeFragment(@NotNull final String text, - final PsiElement context, - final boolean isVoidValid, - final boolean isPhysical) { - int flags = 0; - if (isVoidValid) flags |= ALLOW_VOID; - return createTypeCodeFragment(text, context, isPhysical, flags); - } - - @NotNull - @Override - public PsiTypeCodeFragment createTypeCodeFragment(@NotNull final String text, - final PsiElement context, - final boolean isVoidValid, - final boolean isPhysical, - final boolean allowEllipsis) { - int flags = 0; - if (isVoidValid) flags |= ALLOW_VOID; - if (allowEllipsis) flags |= ALLOW_ELLIPSIS; - return createTypeCodeFragment(text, context, isPhysical, flags); - } - @NotNull @Override public PsiAnnotation createAnnotationFromText(@NotNull final String annotationText, @Nullable final PsiElement context) throws IncorrectOperationException { @@ -777,12 +746,4 @@ public class PsiElementFactoryImpl extends PsiJavaParserFacadeImpl implements Ps assert original != null : message; original.replace(replacement); } - - /** - * @deprecated use {@link PsiJavaParserFacadeImpl#getPrimitiveType(String)} (remove in IDEA 11). - */ - @SuppressWarnings({"MethodOverridesStaticMethodOfSuperclass", "UnusedDeclaration"}) - public static PsiPrimitiveType getPrimitiveType(final String text) { - return PsiJavaParserFacadeImpl.getPrimitiveType(text); - } } diff --git a/java/java-impl/src/com/intellij/psi/impl/PsiJavaParserFacadeImpl.java b/java/java-impl/src/com/intellij/psi/impl/PsiJavaParserFacadeImpl.java index 1ff3da344cc6..6f55d3aa8710 100644 --- a/java/java-impl/src/com/intellij/psi/impl/PsiJavaParserFacadeImpl.java +++ b/java/java-impl/src/com/intellij/psi/impl/PsiJavaParserFacadeImpl.java @@ -187,12 +187,6 @@ public class PsiJavaParserFacadeImpl extends PsiParserFacadeImpl implements PsiJ return createDocCommentFromText(StringUtil.join("/**\n", text, "\n */")).getTags()[0]; } - @NotNull - @Override - public PsiDocTag createDocTagFromText(@NotNull final String text, @Nullable final PsiElement context) throws IncorrectOperationException { - return createDocTagFromText(text); - } - @NotNull @Override public PsiDocComment createDocCommentFromText(@NotNull final String text) throws IncorrectOperationException { @@ -202,12 +196,6 @@ public class PsiJavaParserFacadeImpl extends PsiParserFacadeImpl implements PsiJ return comment; } - @NotNull - @Override - public PsiDocComment createDocCommentFromText(@NotNull final String text, @Nullable final PsiElement context) throws IncorrectOperationException { - return createDocCommentFromText(text); - } - @NotNull @Override public PsiClass createClassFromText(@NotNull final String body, @Nullable final PsiElement context) throws IncorrectOperationException { diff --git a/java/openapi/src/com/intellij/psi/PsiElementFactory.java b/java/openapi/src/com/intellij/psi/PsiElementFactory.java index 6bc1c7bff83f..416ee4fe768f 100644 --- a/java/openapi/src/com/intellij/psi/PsiElementFactory.java +++ b/java/openapi/src/com/intellij/psi/PsiElementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2011 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. @@ -162,15 +162,6 @@ public interface PsiElementFactory extends PsiJavaParserFacade, JVMElementFactor @NotNull PsiClassType createType(@NotNull PsiClass aClass, PsiType... parameters); - /** - * Detaches type from reference(s) or type elements it was created from. - * - * @param type the type to detach. - * @return the detached type. - * @deprecated does nothing (remove in IDEA 11) - */ - @NotNull PsiType detachType(@NotNull PsiType type); - /** * Creates a substitutor for the specified class which replaces all type parameters * with their corresponding raw types. @@ -421,20 +412,6 @@ public interface PsiElementFactory extends PsiJavaParserFacade, JVMElementFactor */ @NotNull PsiTypeCodeFragment createTypeCodeFragment(@NotNull String text, PsiElement context, boolean isPhysical, int flags); - /** - * @deprecated use {@link #createTypeCodeFragment(String, PsiElement, boolean, int)} (todo[r.sh] to remove in IDEA 11). - */ - @NotNull PsiTypeCodeFragment createTypeCodeFragment(@NotNull String text, PsiElement context, boolean isVoidValid, boolean isPhysical); - - /** - * @deprecated use {@link #createTypeCodeFragment(String, PsiElement, boolean, int)} (todo[r.sh] to remove in IDEA 11). - */ - @NotNull PsiTypeCodeFragment createTypeCodeFragment(@NotNull String text, - PsiElement context, - boolean isVoidValid, - boolean isPhysical, - boolean allowEllipsis); - /** * Returns a synthetic Java class containing methods which are defined on Java arrays. * diff --git a/java/openapi/src/com/intellij/psi/PsiJavaParserFacade.java b/java/openapi/src/com/intellij/psi/PsiJavaParserFacade.java index 3ec70be7466a..917ad62f05f4 100644 --- a/java/openapi/src/com/intellij/psi/PsiJavaParserFacade.java +++ b/java/openapi/src/com/intellij/psi/PsiJavaParserFacade.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2011 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. @@ -37,12 +37,6 @@ public interface PsiJavaParserFacade extends PsiParserFacade { @NotNull PsiDocTag createDocTagFromText(@NotNull String docTagText) throws IncorrectOperationException; - /** - * @deprecated use {@link #createDocTagFromText(String)} (to remove in IDEA 11) - */ - @NotNull - PsiDocTag createDocTagFromText(@NotNull String docTagText, @Nullable PsiElement context) throws IncorrectOperationException; - /** * Creates a JavaDoc comment from the specified text. * @@ -53,12 +47,6 @@ public interface PsiJavaParserFacade extends PsiParserFacade { @NotNull PsiDocComment createDocCommentFromText(@NotNull String docCommentText) throws IncorrectOperationException; - /** - * @deprecated use {@link #createDocCommentFromText(String)} (to remove in IDEA 11) - */ - @NotNull - PsiDocComment createDocCommentFromText(@NotNull String docCommentText, @Nullable PsiElement context) throws IncorrectOperationException; - /** * Creates a Java class from the specified text. * diff --git a/platform/lang-impl/src/com/intellij/lang/ASTFactory.java b/platform/lang-impl/src/com/intellij/lang/ASTFactory.java index 2132f3feb7bc..e9ce34b542a0 100644 --- a/platform/lang-impl/src/com/intellij/lang/ASTFactory.java +++ b/platform/lang-impl/src/com/intellij/lang/ASTFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2011 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,8 +15,6 @@ */ package com.intellij.lang; -import com.intellij.lexer.Lexer; -import com.intellij.lexer.LexerUtil; import com.intellij.psi.TokenType; import com.intellij.psi.impl.source.CharTableImpl; import com.intellij.psi.impl.source.CodeFragmentElement; @@ -28,7 +26,7 @@ import com.intellij.util.CharTable; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -/* +/** * @author max */ public abstract class ASTFactory { @@ -106,30 +104,6 @@ public abstract class ASTFactory { return w; } - /** - * @deprecated use {@link #leaf(com.intellij.psi.tree.IElementType, CharSequence)} (to remove in IDEA 11). - */ - @NotNull - public static LeafElement leaf(IElementType type, CharSequence fileText, int start, int end, CharTable table) { - return leaf(type, table.intern(fileText, start, end)); - } - - /** - * @deprecated use {@link #leaf(com.intellij.psi.tree.IElementType, CharSequence)} (to remove in IDEA 11). - */ - @NotNull - public static LeafElement leaf(IElementType type, CharSequence text, CharTable table) { - return leaf(type, table.intern(text)); - } - - /** - * @deprecated use {@link #leaf(com.intellij.psi.tree.IElementType, CharSequence)} (to remove in IDEA 11). - */ - @NotNull - public static LeafElement leaf(final Lexer lexer, final CharTable charTable) { - return leaf(lexer.getTokenType(), LexerUtil.internToken(lexer, charTable)); - } - // default implementation private static class DefaultFactory extends ASTFactory { diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/parsing/ChameleonTransforming.java b/platform/lang-impl/src/com/intellij/psi/impl/source/parsing/ChameleonTransforming.java deleted file mode 100644 index 55b9a66d5f38..000000000000 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/parsing/ChameleonTransforming.java +++ /dev/null @@ -1,31 +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.psi.impl.source.parsing; - -import com.intellij.lang.ASTNode; - -/** - * @deprecated obsolete (ro remove in IDEA 11). - */ -@SuppressWarnings({"ALL"}) -public class ChameleonTransforming { - public static void transformChildren(ASTNode element) { - } - - public static void transformChildren(ASTNode element, boolean recursive) { - } -} diff --git a/xml/impl/src/com/intellij/psi/impl/source/xml/XmlTagImpl.java b/xml/impl/src/com/intellij/psi/impl/source/xml/XmlTagImpl.java index dda67fb49cb4..08eed6845524 100644 --- a/xml/impl/src/com/intellij/psi/impl/source/xml/XmlTagImpl.java +++ b/xml/impl/src/com/intellij/psi/impl/source/xml/XmlTagImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2011 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. @@ -992,7 +992,6 @@ public class XmlTagImpl extends XmlElementImpl implements XmlTag { } public TreeElement addInternal(TreeElement first, ASTNode last, ASTNode anchor, Boolean beforeB) { - //ChameleonTransforming.transformChildren(this); TreeElement firstAppended = null; boolean before = beforeB == null || beforeB.booleanValue(); try {