Community
Participate
Working Groups
... when plugin provides launch delegates with "profile" mode. If this cannot understood automatically based on current plugin xml, please provide any way to explicitly specify this. YourKit Java Profiler uses Profile action set, and currently asks user to manually enable it in perspective, which is not user friendly at all. Please find related discussion here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=43097#c5
Anton, would you be able to attach the current YourKit plugin.xml file?
Here are some excerpts of an email conversation Darin and I had about this: NE: It would be nice if we could turn on the Profile action set automatically, but I don't see how we can do that with the current support, unless Debug explicitly tracks the installation of profile launchers and turns on the action set. DW: As long as there is an API enable an action set, the debugger could detect that a profiler has been contributed and turn on the action set. NE: We have IWorkbenchPage.showActionSet, but it only works on the active perspective, so it wouldn't work properly e.g. if you had Resource, Java and Debug perspectives open. It would be better to push on the contexts mechanism, similarly to what you (currently have to jump through hoops to) do for dynamic debug views. That is, have a "profiling" context that gets promoted whenever profiling stuff is installed, and allow action set filtering based on context enablement. Debug's job would then be just to enable/disable the context appropriately.
The plugin.xml is: <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin id="com.yourkit.profiler" name="MACRO_APP_FULL_NAME" version="MACRO_APP_VERSION_NUMBER.MACRO_BUILD_NUMBER" provider-name="YourKit, LLC" class="com.yourkit.eclipse31Plugin.Plugin"> <runtime> <library name="yourkit-for-eclipse.jar"> <export name="*"/> </library> </runtime> <requires> <import plugin="org.eclipse.core.resources"/> <import plugin="org.eclipse.core.runtime.compatibility"/> <import plugin="org.eclipse.debug.core"/> <import plugin="org.eclipse.debug.ui"/> <import plugin="org.eclipse.jdt.core"/> <import plugin="org.eclipse.jdt.debug.ui"/> <import plugin="org.eclipse.jdt.launching"/> <import plugin="org.eclipse.jdt.ui"/> <import plugin="org.eclipse.jdt.junit"/> <import plugin="org.eclipse.jface.text"/> <import plugin="org.eclipse.ui"/> <import plugin="org.eclipse.ui.workbench.texteditor"/> <import plugin="org.eclipse.pde.core"/> <import plugin="org.eclipse.pde.ui"/> </requires> <extension point="org.eclipse.debug.core.launchDelegates"> <launchDelegate id="com.yourkit.profiler.localJavaApplicationDelegate" delegate="com.yourkit.eclipse31Plugin.YkJavaLocalApplicationLaunchConfigurationDelegate" type="org.eclipse.jdt.launching.localJavaApplication" modes="profile"> </launchDelegate> </extension> <extension point="org.eclipse.debug.core.launchDelegates"> <launchDelegate id="com.yourkit.profiler.javaAppletDelegate" delegate="com.yourkit.eclipse31Plugin.YkJavaAppletLaunchConfigurationDelegate" type="org.eclipse.jdt.launching.javaApplet" modes="profile"> </launchDelegate> </extension> <extension point="org.eclipse.debug.core.launchDelegates"> <launchDelegate id="com.yourkit.profiler.workbenchDelegate" delegate="com.yourkit.eclipse31Plugin.YkWorkbenchLaunchConfigurationDelegate" type="org.eclipse.pde.ui.RuntimeWorkbench" modes="profile"> </launchDelegate> </extension> <extension point="org.eclipse.debug.core.launchDelegates"> <launchDelegate id="com.yourkit.profiler.junitDelegate" delegate="com.yourkit.eclipse31Plugin.YkJUnitLaunchConfigurationDelegate" type="org.eclipse.jdt.junit.launchconfig" modes="profile"> </launchDelegate> </extension> <extension point="org.eclipse.debug.ui.launchConfigurationTabGroups"> <launchConfigurationTabGroup type="org.eclipse.jdt.launching.localJavaApplication" helpContextId="org.eclipse.jdt.debug.ui.launchConfigHelpContext.local_java_application" class="com.yourkit.eclipse31Plugin.YkJavaLocalApplicationTabGroup" id="org.eclipse.jdt.debug.ui.launchConfigurationTabGroup.localJavaApplication"> <launchMode mode="profile" description="Create a configuration that will launch a Java virtual machine with MACRO_APP_SHORT_NAME agent."> </launchMode> </launchConfigurationTabGroup> <launchConfigurationTabGroup type="org.eclipse.jdt.launching.javaApplet" helpContextId="org.eclipse.jdt.debug.ui.launchConfigHelpContext.java_applet" class="com.yourkit.eclipse31Plugin.YkJavaAppletTabGroup" id="org.eclipse.jdt.debug.ui.launchConfigurationTabGroup.javaApplet"> <launchMode mode="profile" description="Create a configuration that will launch a Java applet with MACRO_APP_SHORT_NAME agent."> </launchMode> </launchConfigurationTabGroup> <launchConfigurationTabGroup type="org.eclipse.pde.ui.RuntimeWorkbench" class="com.yourkit.eclipse31Plugin.YkWorkbenchTabGroup" id="org.eclipse.pde.ui.launcher.WorkbenchLauncherTabGroup"> <launchMode mode="profile" description="Create a configuration that will launch an Eclipse workbench with MACRO_APP_SHORT_NAME agent."> </launchMode> </launchConfigurationTabGroup> <launchConfigurationTabGroup type="org.eclipse.jdt.junit.launchconfig" helpContextId="org.eclipse.jdt.junit.junit_tab_group" class="com.yourkit.eclipse31Plugin.YkJUnitTabGroup" id="org.eclipse.jdt.junit.launchConfigurationTabGroup.junit"> <launchMode mode="profile" description="Create a configuration that will launch a JUnit test with MACRO_APP_SHORT_NAME agent."> </launchMode> </launchConfigurationTabGroup> </extension> </plugin>
Deferred for post 3.1
> Deferred for post 3.1 Why? I'm not familiar with Eclipse internals, but IMHO from a point of common sence this seems to be a simple internal fix that requires no API changes. Isn't it?
Nick, is the context support currently available for enabling action sets? I was under the impression that this was yet to come.
Correct: contexts do not yet drive action set visibility. Unfortunately the change is non-trivial.
We should consider this when migrating to the new menu/command support.
Not planned for 3.4. We're not migrating debug to the new menus/commands extension in 3.4, and visiblity is not supported on action sets.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.