mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
better documentation for Migration-stubs-from-stub-element-types.md
GitOrigin-RevId: 572d7399179100be27a29b5659ae76628ef3825f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
43ce6deba1
commit
f2f516c73d
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi.stubs;
|
||||
|
||||
import com.intellij.psi.PsiElement;
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
|
||||
public interface StubElement<T extends PsiElement> extends Stub {
|
||||
/**
|
||||
* @deprecated Use {@link #getElementType()} instead
|
||||
* @deprecated Use {@link #getElementType()} or {@link #getStubSerializer()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@Override
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package com.intellij.extapi.psi;
|
||||
|
||||
@@ -331,7 +331,7 @@ public class StubBasedPsiElementBase<T extends StubElement> extends ASTDelegateP
|
||||
public @NotNull IStubElementType getElementType() {
|
||||
if (!(myElementType instanceof IStubElementType)) {
|
||||
throw new ClassCastException("Don't use #getElementType method. It is deprecated.\n" +
|
||||
"Implement and use #getIElementType with the help of #getElementTypeImpl" +
|
||||
"Implement and use #getIElementType with the help of #getElementTypeImpl.\n" +
|
||||
"Not a stub type: " + myElementType + " in " + getClass());
|
||||
}
|
||||
return (IStubElementType<?, ?>)myElementType;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package com.intellij.psi.tree;
|
||||
|
||||
@@ -16,7 +16,8 @@ import java.io.IOException;
|
||||
|
||||
/**
|
||||
* OBSOLESCENCE NOTE:
|
||||
* Use {@link com.intellij.psi.stubs.LanguageStubDefinition}, {@link com.intellij.psi.stubs.StubElementFactory}, {@link com.intellij.psi.stubs.LightStubElementFactory} instead
|
||||
* <p>
|
||||
* Use {@link IFileElementType} and extract the corresponding parts to {@link LanguageStubDefinition}, {@link StubElementFactory}, {@link LightStubElementFactory}.
|
||||
*/
|
||||
@ApiStatus.Obsolete
|
||||
public class IStubFileElementType<T extends PsiFileStub> extends StubFileElementType<T> {
|
||||
|
||||
Reference in New Issue
Block a user