Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 94927 - [viewmgmt] Ability to enable Profile action set without user interaction...
Summary: [viewmgmt] Ability to enable Profile action set without user interaction...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-12 06:23 EDT by Anton Katilin CLA
Modified: 2019-11-14 02:14 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Katilin CLA 2005-05-12 06:23:45 EDT
... 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
Comment 1 Nick Edgar CLA 2005-05-12 09:53:49 EDT
Anton, would you be able to attach the current YourKit plugin.xml file?
Comment 2 Nick Edgar CLA 2005-05-12 09:55:24 EDT
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.

Comment 3 Anton Katilin CLA 2005-05-12 12:56:18 EDT
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>
Comment 4 Darin Wright CLA 2005-05-13 14:53:35 EDT
Deferred for post 3.1
Comment 5 Anton Katilin CLA 2005-05-16 05:35:16 EDT
> 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?
Comment 6 Darin Wright CLA 2005-05-16 09:07:09 EDT
Nick, is the context support currently available for enabling action sets? I 
was under the impression that this was yet to come.
Comment 7 Nick Edgar CLA 2005-05-16 10:54:16 EDT
Correct: contexts do not yet drive action set visibility.  Unfortunately the
change is non-trivial.
Comment 8 Darin Wright CLA 2007-06-27 14:10:39 EDT
We should consider this when migrating to the new menu/command support.
Comment 9 Darin Wright CLA 2008-01-30 17:59:32 EST
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.
Comment 10 Lars Vogel CLA 2019-11-14 02:14:20 EST
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.