无法在 Eclipse 中创建方面文件

Cannot create Aspect file in Eclipse

我正在尝试将一个方面 class 添加到我的方面项目。我收到此错误:

An error has occurred. See error log for more details.
class org.eclipse.ajdt.core.javaelements.AJCompilationUnit tried to access private field org.eclipse.jdt.internal.core.JavaElement.parent (org.eclipse.ajdt.core.javaelements.AJCompilationUnit is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @9ae2810; org.eclipse.jdt.internal.core.JavaElement is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @60eb5d5b)

我无法打开 *.aj 文件。

我试过:

我的系统:

AJDT 适用于 Java 17 和 18,您只需要安装正确的版本。 AJDT版本也需要和Eclipse版本匹配。

有关详细信息,请参阅有关 setting up a development environment, section "Eclipse" 的 AspectJ 快速指南。