Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » What arguments should be passed to ProceedingJoinPoint
What arguments should be passed to ProceedingJoinPoint [message #599430] Tue, 18 November 2008 21:07
Hao Missing name is currently offline Hao Missing nameFriend
Messages: 115
Registered: July 2009
Senior Member
Hi I tried to use ProceedingJoinPoint for the following point cut

@Pointcut(
"call(*
org.eclipse.swt.widgets.Control.setEnabled(boolean))&&am p;target(ctrl)&&args(enabled) "
)
void enableControl(org.eclipse.swt.widgets.Control ctrl, boolean enabled){}

@Around("enableControl(ctrl, enabled)")
public void enableControl_Around(ProceedingJoinPoint joinPoint,
org.eclipse.swt.widgets.Control ctrl, boolean enabled){
try{
joinPoint.proceed(new Object[]{ctrl, enabled});
}catch(Throwable ex){
ex.printStackTrace();
}
}

Based on ProceedingJoinPoint API, the first arg is target, and then are
args. I tried it but get the following error: (highly appreciate if
someone can point out what arguments should be passed to proceed() method.)

java.lang.VerifyError: arguments are not type compatible (class:
com/discover/test/dfsclient/cminfo/CardMemberAcctSummaryTabP age method:
setEnabled_aroundBody7$advice(Lcom/discover/test/dfsclient/c minfo/CardMemberAcctSummaryTabPage;Lorg/eclipse/swt/widgets/ Text;ZLorg/aspectj/lang/JoinPoint;Lcom/discover/test/dfsclie nt/aspect/WidgetAccessCtrl;Lorg/aspectj/lang/ProceedingJoinP oint;Lorg/eclipse/swt/widgets/Control;Z)V)
at pc: 40
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:68)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:129)
at
com.discover.test.dfsclient.CardMemberView.createPartControl (CardMemberView.java:199)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:371)
at
org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:230)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:30 6)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:53 1)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:180)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:270)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:473)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 08)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:649)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:576)
at
org.eclipse.ui.internal.PartSashContainer.createControl(Part SashContainer.java:568)
at
org.eclipse.ui.internal.PerspectiveHelper.activate(Perspecti veHelper.java:271)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.j ava:964)
at
org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPa ge.java:2557)
at
org.eclipse.ui.internal.WorkbenchWindow$25.run(WorkbenchWind ow.java:2869)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchWindow.setActivePage(Workbe nchWindow.java:2850)
at
org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(Workben chWindow.java:759)
at
org.eclipse.ui.internal.Workbench$21.runWithException(Workbe nch.java:1027)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:132)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3778)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3403)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:803)
at
org.eclipse.ui.internal.Workbench$27.runWithException(Workbe nch.java:1361)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:132)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3778)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3403)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2298)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 03)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
com.discover.test.dfsclient.DFSClientApplication.start(DFSCl ientApplication.java:20)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:379)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Previous Topic:What arguments should be passed to ProceedingJoinPoint
Next Topic:cast thisJoinPoint to ProceedingJoinPoint
Goto Forum:
  


Current Time: Mon Nov 24 22:44:59 GMT 2014

Powered by FUDForum. Page generated in 0.03148 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software