问题标签 [ajdt]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1116 浏览

java - 使用 AspectJ eclipse 3.4 插件 ajdt2.0.1 将项目转换为 AspectJ 项目时发生编译错误

嘿,我想将 AOP 添加到我的 Web 项目中。我为 Eclipse 3.4.1 下载了 ajdt2.0.1。但是当我将这个项目转换为 AspectJ 项目时,我得到了很多不应该发生的编译错误。比如“无法解析XXXDAO”等。当我删除AspectJ Capability 时,一切顺利。有没有人遇到这个问题?提前致谢。

0 投票
1 回答
3744 浏览

spring-roo - 在项目上运行构建器“AspectJ Builder”时出错

我正在使用 Spring Roo 开发 SpringSource 工具套件。直到几天前我安装了 GWT 插件后,一切都运行良好(我认为这可能是一个问题,我不确定)。

每次我编写代码并按保存 (ctrl+s) 时,它都会显示一个对话框,显示

谁能帮我解决这个问题?

谢谢,

0 投票
6 回答
13581 浏览

eclipse - Eclipse 中的 Maven/AJDT 项目

我需要在 Maven 项目中使用 aspectj。我安装了 Eclipse (m2e) 的 maven 插件、maven aspectj 插件,以及 Eclipse 的 AJDT。所以现在,当我打开一个新项目时,我有“Maven Project”和“AspectJ Project”。我怎样才能创建一个新项目,即 Maven AspectJ 项目?我没有找到任何参考,所以你是我唯一的希望。谢谢

0 投票
1 回答
449 浏览

eclipse - How to reflect modified abstract syntax tree in JDT back to original java source file.?

Kindly refer "write it down" section of article http://www.eclipse.org/articles/article.php?file=Article-javaCodeManipulation_AST/index.html

I am parsing a java source code file which has method with contracts written using cofoja. Now when I create abstract syntax tree (ast) of the input file, and modify it. It can show me that Document document, object being modified. But when I try to reflect this document back to the original source file, the following declaration throws an exception:

The following exception gets thrown for ITextFileBufferManager bufferManager declaration in MyVisitor.java

Because of this, I am not able to change the original java file. One of the link I found on net : http://www.programcreek.com/2011/05/java-lang-illegalstateexception-workspace- is-closed/#comment-1939

It says: In brief, this is caused by simply adding dependent jar files to regular java project. To use JDT, you need to have the program running as a plug-in (or at least, an OSGi- enabled application) rather than using it as a jar.

Since I am creating a simple java project, is that a problem for using FileBuffers class? Do I need to create plug in instead?

0 投票
3 回答
916 浏览

eclipse - Spring 数据图和 Eclipse

花了 2 天时间试图了解如何使 Eclipse 与 Spring Data Graph 一起工作,但还不知道。代码是这样的:

这段代码绝对没问题,当我用 Maven 构建它时。persist()当我在 Eclipse 中打开项目时,它说class 中没有方法Person

我正在使用Eclipse 3.7(在 Ubuntu 11.04 上)、Spring 3.0.6.BUILD-SNAPSHOT、AspectJ 1.6.12.BUILD-SNAPSHOT、Spring Data Graph 1.2.0.BUILD-SNAPSHOT。我还安装了AJDT 2.2.0.e37x-20110815-2000

我的 Eclipse 项目启用了 AspectJ(我在项目图标上有 AJ)。

我想知道是否有人可以告诉我为了摆脱 Eclipse 中的错误,我需要安装所有这些工具的确切版本。

如果这些细节还不够,请发表评论。

更新

还将这个问题发布到官方 Spring Data Graph 论坛:

http://forum.springsource.org/showthread.php?113629-Using-Spring-Data-Graph-in-real

到目前为止没有反馈。

0 投票
2 回答
203 浏览

aspectj - 在 AJDT 无头 PDE 构建期间未设置 ajdt.pdebuild.scripts

我在 eclipse 3.5 中开发了一个 eclipse rcp 应用程序。我能够通过以下目标条目在 ant 中成功执行 pde 无头构建(从 eclipse 外部的命令外壳):

但是一旦 AspectJ (AJDT) 参与进来,我就修改了上面的目标,如下所示:

不幸的是,我现在收到以下错误:

c:\eclipse-3.5\plugins\org.eclipse.ajdt.pde.build_2.0.2.e35x-release-20101021-0900\scripts\productBuild\productBuild.xml:8:找不到 ${ajdt.pdebuild.scripts} /从 c:\eclipse-3.5\plugins\org.eclipse.ajdt.pde.build_2.0.2.e35x-release-20101021-0900\scripts\productBuild\productBuild.xml 导入的 productBuild/allElements.xml

有人知道如何设置 ajdt.pdebuild.scripts 值吗?谢谢你!!!

0 投票
1 回答
1471 浏览

aspectj - 在 RAD 7.5.5 中使用 AspectJ/AJDT

我正在使用 RAD 7.5.5。我从下载站点安装了 AJDT 插件:http: //archive.eclipse.org/tools/ajdt/34/update/

我将一个现有的 Java 项目转换为 AspectJ 项目,添加了一个方面以在 methodA() 的方法开始和结束时打印日志语句,重建项目并进行部署。

调用 methodA() 时出现以下异常:

抛出异常:java.lang.NoSuchMethodError: org/aspectj/runtime/reflect/Factory.makeMethodSig(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String ;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;

我搜索了一下,发现这可能是由于 aspectjrt.jar 的旧版本引起的。但是 RAD 扩展了 Eclipse 3.4,因此我添加了与 Eclipse 3.4 (/RAD 7.5.5) 兼容的 AJDT 插件版本。任何指向可能是什么问题的指针?

0 投票
1 回答
1728 浏览

eclipse - 插件卸载后删除 AspectJ Content Assist 建议

我想从 CTRL+Space 菜单中删除 AJDT 完成。我安装了 AspectJ Tools,但我删除了插件,但建议仍然存在。

0 投票
0 回答
1134 浏览

java - 带有“第二个”aop.xml 文件的 AspectJ LTW

我最近开始使用AspectJ LTW。我将 Eclipse 与AJDT一起使用。我基本上使用“outjar”选项来使用已编译的 .aj 文件创建我的“AspectJ 库(.jar 文件)”。

下一步是在“普通”Eclipse Java 项目中使用这个 jar 文件,如果我在 javaagent 路径上有 aspectjweaver.jar 库,它就可以完美运行:

我的下一个目标是在这个“普通”java 项目中使用第二个 aop.xml 文件。META-INF/aop.xml如果文件位于类加载器搜索路径上,即使这样也能很好地工作。现在我发现了这一点:

http://www.eclipse.org/aspectj/doc/released/README-1612.html

(向下滚动到“aop.xml 中更灵活的切入点/代码连接”)

以下 XML 规范可以正常工作:

但我真正感兴趣的是将我自己的参数/变量/消息“传递”给方法someMethod。就像是:

那么有没有办法将字符串(例如)传递给方法someMethod?或者还有其他可用的选项吗?

0 投票
1 回答
149 浏览

eclipse - 无法在 Eclipse 3.6 中使用 AJDT 执行无头 PDE 构建

我在 Eclipse 3.6 中开发了几个简单的插件项目,作为 rcp 应用程序的一部分。我也有一个非常简单的方面。我已阅读 Andrew Eisenberg 的文章 (http://contraptionsforprogramming.blogspot.com/2010/03/ajdt-pde-builds-redux.html) 关于从 eclipse 3.6 开始逐步淘汰 ajdt-pde 构建方法,这让我能够我的应用程序直接在 Eclipse 中工作。但是,我们的官方构建是使用 Ant 进行无头构建的,以下代码块是它的编译方式:

因为 build.properties 不涉及基于 Ant 的 PDE 无头构建,所以我不清楚以下条目应该放在哪里:

请帮我。感谢您的时间!!!