Community
Participate
Working Groups
I20060725-0800 Import 'org.eclipse.core.commands' as binary plugin. The binary type 'org.eclipse.core.commands.AbstractHandler' shows a method 'execute(ExecutionEvent) : Object' in the Outline, but this method is not declared in the source of this class. The IMethod has no valid source range and is not marked as synthetic. I tried to reproduce the problem outside of said plugin, but I couldn't. Something must be very special in the core.commands plugin...
Actually, the compiled AbstractHandler.class file already contains a method declaration 'public abstract Object execute(ExecutionEvent);'.
I can only get execute method in AbstractHandler.class file while importing plugin either as binary source or with source folders. If I check-out the plugin from devl.eclipse.org CVS repository, then AbstractHandler.class file does not have this abstract method... Sounds more like a code gen issue than a model one. I'll talk about this whith Philippe or Olivier when they come back from vacations...
FYI, AbstractHandler.execute() disappeared from the class file between 3.4M5 and RC1 (which broke the source of subclasses accidentally having @Override on the method).
The method comes from the superinterface org.eclipse.core.commands.IHandler. /org.eclipse.core.commands/META-INF/MANIFEST.MF contains: --- Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0, J2SE-1.3 --- The project's "Generated .class files compatibility" is set to 1.1. Could it be that the PDE builder changed the -target used for compiling the plug-in? Is the abstract method in the class file of AbstractHandler required in some targets but not in all?
Default abstract methods are only generated if VM target is <= 1.1. Darin - has there been any change in PDE near required exec context post 3.4M5 ?
(In reply to comment #2) > If I check-out the plugin from devl.eclipse.org CVS repository, then > AbstractHandler.class file does not have this abstract method... Not true any more in I20080527-2000: AbstractHandler.class now contains... // Method descriptor #75 (Lorg/eclipse/core/commands/ExecutionEvent;)Ljava/lang/Object; public abstract synthetic java.lang.Object execute(... ... in both cases. But since the method is synthetic, the Outline does not show it by default (since synthetic members are filtered), but it really is there. In 3.4M5, the method was not marked as synthetic (same in .jar and when compiled locally). I guess this bug can be closed as WORKSFORME, since the method is synthetic now.
yes, default abstract methods are now tagged as synthetic.
(In reply to comment #5) > Default abstract methods are only generated if VM target is <= 1.1. > Darin - has there been any change in PDE near required exec context post 3.4M5 > ? Not that I know of. Chris?
Ah right. Olivier did fix our default abstract methods to be marked as synthetic recently. This wasn't the case in the past, and the old behavior was no longer consistent with modern expectations (latest updates of JDKs do also mark these as synthetics).
closing
Verified for 3.4RC3 using I20080530-0100