package org.eclipse.jface.text.source;When I execute a debug session it seems that my Aspect isn't loaded - I can't see its entry among the other Aspects in the logging output. Do I need to register the Aspect somewhere (or its package)?
import java.util.Map;
public aspect AnnotationModelAspect {
pointcut testtest(Annotation[] annotationsToRemove, Map annotationsToAdd, boolean fireModelChanged):
execution(protected* AnnotationModel.replaceAnnotations(Annotation[], Map, boolean)) &&
args(annotationsToRemove, annotationsToAdd, fireModelChanged);
before(Annotation[] annotationsToRemove, Map annotationsToAdd, boolean fireModelChanged):
testtest(annotationsToRemove, annotationsToAdd, fireModelChanged) {
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>TEST");
}
}
--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Simon,
You need to add your aspect to META-INF/aop.xml and possibly add the bundle you intend to weave in your MANIFEST.MF file, under Eclipse-SupplementBundle:
Be aware that weaving into the JDT is pretty fragile, since you're probably depending on non-APIs, and they might change in minor releases. Moreover, the Groovy plugin forked the JDT, so when you install the Groovy plugin you have a slightly different JDT. My advice is to do as much as possible without weaving, even if it means re-implementing some code that exists in the JDT. Weaving should be used only as a last resort.
I managed to successfully load the aspect (I believe) but it seems that the aspect is not executed (don't get any output on the console).
On 05/20/2013 10:54 AM, iulian dragos wrote:
Hi Simon,
You need to add your aspect to META-INF/aop.xml and possibly add the bundle you intend to weave in your MANIFEST.MF file, under Eclipse-SupplementBundle:
I also get an error message for every loaded aspect:
2013-05-20 15:46:02,921 ERROR [main] - System.err - [org.eclipse.jdt.debug.ui] info register aspect scala.tools.eclipse.contribution.weaving.jdt.configuration.IsWovenTester
2013-05-20 15:46:02,925 ERROR [main] - System.err - [org.eclipse.jdt.debug.ui] info register aspect scala.tools.eclipse.contribution.weaving.jdt.builderoptions.ScalaJavaBuilderAspect
...
But I don't know if these errors are related or what they mean.
Maybe I have some error in the aspect, could you please take a look? This commit contains all changes I did: https://github.com/sschaef/scala-ide/commit/0154f656025a9d45352a96bfcf90521b43255c03
The intention was to get access to internal information of JDT not to use it in production. If I find a way to extend JDT or to build something around it I will do it.
Be aware that weaving into the JDT is pretty fragile, since you're probably depending on non-APIs, and they might change in minor releases. Moreover, the Groovy plugin forked the JDT, so when you install the Groovy plugin you have a slightly different JDT. My advice is to do as much as possible without weaving, even if it means re-implementing some code that exists in the JDT. Weaving should be used only as a last resort.
On Mon, May 20, 2013 at 4:00 PM, Simon Schäfer <ma...@antoras.de> wrote:
I managed to successfully load the aspect (I believe) but it seems that the aspect is not executed (don't get any output on the console).
On 05/20/2013 10:54 AM, iulian dragos wrote:
Hi Simon,
You need to add your aspect to META-INF/aop.xml and possibly add the bundle you intend to weave in your MANIFEST.MF file, under Eclipse-SupplementBundle:
I also get an error message for every loaded aspect:
2013-05-20 15:46:02,921 ERROR [main] - System.err - [org.eclipse.jdt.debug.ui] info register aspect scala.tools.eclipse.contribution.weaving.jdt.configuration.IsWovenTester
2013-05-20 15:46:02,925 ERROR [main] - System.err - [org.eclipse.jdt.debug.ui] info register aspect scala.tools.eclipse.contribution.weaving.jdt.builderoptions.ScalaJavaBuilderAspect
...
Is your aspect in that list? I think those are expected messages.
But I don't know if these errors are related or what they mean.
Maybe I have some error in the aspect, could you please take a look? This commit contains all changes I did: https://github.com/sschaef/scala-ide/commit/0154f656025a9d45352a96bfcf90521b43255c03
Things look good to me, but I'm not so familiar with AspectJ.
The intention was to get access to internal information of JDT not to use it in production. If I find a way to extend JDT or to build something around it I will do it.
Be aware that weaving into the JDT is pretty fragile, since you're probably depending on non-APIs, and they might change in minor releases. Moreover, the Groovy plugin forked the JDT, so when you install the Groovy plugin you have a slightly different JDT. My advice is to do as much as possible without weaving, even if it means re-implementing some code that exists in the JDT. Weaving should be used only as a last resort.
I find it much easier to set breakpoints at the places I am interested in. If you have Eclipse classic (or the source bundles for PDE/JDT) it should work quite well.