Cannot run a profile launching configuration on Eclipse 3.1

Questions about YourKit Java Profiler
Post Reply
othomann
Posts: 3
Joined: Fri Oct 01, 2004 2:57 pm

Cannot run a profile launching configuration on Eclipse 3.1

Post by othomann »

Trying to use YourKit3.0 on top of Eclipse 3.1, I got the following error:

java.lang.NoSuchMethodError: org.eclipse.pde.internal.ui.launcher.LauncherUtils.getPrimaryFeatureId()Ljava/lang/String;
at com.yourkit.eclipsePlugin.YkWorkbenchLaunchConfigurationDelegate.if(a:86)
at com.yourkit.eclipsePlugin.YkWorkbenchLaunchConfigurationDelegate.for(a:354)
at com.yourkit.eclipsePlugin.YkWorkbenchLaunchConfigurationDelegate.launch(a:32)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:720)
at org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:892)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

This means the yourKit Eclipse plugin is using an internal method from the pde.ui plugin. This is strictly forbidden in the recommended usage of Eclipse API. Only API methods can be called.

Hope this will help you to fix this issue.

Best regards,
rkosta
Posts: 4
Joined: Sat Oct 02, 2004 10:29 pm

Post by rkosta »

Well, I can understand why they use internal API, there are just no other good way to launch runtime workbench.
But I also would like to have version that works under 3.1 M2...
Vladimir Kondratyev
Posts: 1625
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

We are using internal Eclipse API just because public API is not enough to implement workbench launching. But we are going to track the changes in internal Eclipse API and issue bugfix builds in time. Most probable plug-in for Eclipse 3.1-M1 will be available in version 3.0.1 of YourKit Java Profiler.
rkosta
Posts: 4
Joined: Sat Oct 02, 2004 10:29 pm

Post by rkosta »

Why only for M1? M2 is already published.
Vladimir Kondratyev
Posts: 1625
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Strange, there is only 3.0.1 at http://www.eclipse.org/downloads. Where can I download 3.1-M2?
rkosta
Posts: 4
Joined: Sat Oct 02, 2004 10:29 pm

Post by rkosta »

3.0.1 is bug fix for 3.0

3.1 M2 is build for 3.1 version with new features.

http://download2.eclipse.org/downloads/ ... /index.php
othomann
Posts: 3
Joined: Fri Oct 01, 2004 2:57 pm

Post by othomann »

Internal code should never be used. This is clearly against the portability and maintability of Eclipse plugins. If you miss something like an API to start a runtime workbench, you should request it on the Eclipse bugzilla site. This is the way to go. The internal code can be completely refactored without a notice.
It is possible to workaround this issue with 3.1 using a Java program launching configuration. It works fine.
Hope you can solve this by using only APIs, otherwise this prevents a nice integration inside Eclipse.
Post Reply