Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/previewfeature/errors/AccessStaticMethodInPreviewFeatureClass.java
Tagir Valeev 178b721cf7 [java-highlighting] Preview warning migrated
Also improve reporting, different messages for errors and warnings; reflective preview use reported by inspection
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: d7c85058aed3202d0599fc879a61c0fa56388fea
2025-02-10 14:02:54 +00:00

12 lines
1.1 KiB
Java

import <error descr="com.mycom.FirstPreviewFeature is a preview API and is disabled by default">com.mycom.FirstPreviewFeature</error>;
import com.mycom.FirstPreviewFeatureReflective;
class Main {
{
<error descr="com.mycom.FirstPreviewFeature is a preview API and is disabled by default">FirstPreviewFeature</error>.g();
Runnable r1 = <error descr="com.mycom.FirstPreviewFeature is a preview API and is disabled by default">FirstPreviewFeature</error>::g;
<warning descr="com.mycom.FirstPreviewFeatureReflective is a reflective preview API and may be removed in a future release">FirstPreviewFeatureReflective</warning>.<warning descr="com.mycom.FirstPreviewFeatureReflective#g is a reflective preview API and may be removed in a future release">g</warning>();
Runnable r2 = <warning descr="com.mycom.FirstPreviewFeatureReflective is a reflective preview API and may be removed in a future release">FirstPreviewFeatureReflective</warning>::<warning descr="com.mycom.FirstPreviewFeatureReflective#g is a reflective preview API and may be removed in a future release">g</warning>;
}
}