Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-debug-dev] Launch Shortcuts and Configurations

Perhaps there is a bug here. Here's my shortcuts:

   <extension point = "org.eclipse.debug.ui.launchShortcuts">
        <shortcut
                id="com.amzi.prolog.ui.launch.runShortcut"
                class="com.amzi.prolog.ui.launch.RunShortcut"
                label="Compiled Project (xpl)"
                icon="icons/monitor.gif"
                modes="run">
                <perspective id="com.amzi.prolog.ui.prologPerspective"/>
                <perspective id="org.eclipse.debug.ui.DebugPerspective"/>
        </shortcut>
   </extension>

   <extension point = "org.eclipse.debug.ui.launchShortcuts">
        <shortcut
                id="com.amzi.prolog.ui.launch.listenerShortcut"
                class="com.amzi.prolog.ui.launch.ListenerShortcut"
                label="Interpreted Project (pro)"
                icon="icons/question_dash.gif"
                modes="run, debug">
                <perspective id="com.amzi.prolog.ui.prologPerspective"/>
                <perspective id="org.eclipse.debug.ui.DebugPerspective"/>
        </shortcut>
   </extension>

Here's my perspective:

   <extension
        point="org.eclipse.ui.perspectives">
        <perspective
            id="com.amzi.prolog.ui.prologPerspective"
            name="Prolog"
            class="com.amzi.prolog.ui.PrologPerspective"
            icon="icons/amzi_paw.gif">
        </perspective>
    </extension>

The only difference I see is I do not have a helpContextId. Can't imagine that's the problem, is it?

I'm running RC3. When I have either my perspective open (with an open Prolog editor or a selected project in the navigator view), they often appear dimmed or not at all usually after a debug session. Usually restarting causes them to reappear. Resetting the Prolog perspective does not bring them back, nor does opening/closing files, selecting files or projects in the navigator view.

As I said before when the shortcuts appear on the menu they look right and work perfectly. The only problem is getting them to appear and stay there.

Any ideas on what to explore to debug this problem? Perhaps there is some side effect of executing a debug session. One non-standard thing we do during debug (and run) is open a Prolog debug listener view and (Prolog listener view) stacked with the Console. These views are where the Prolog program runs (does its input and output).

Thanks,
Mary

At 03:46 PM 3/22/2003 -0600, you wrote:

Yes, you need to call updateButtons for #2.

Your launch shortcuts should appear in the perspectives that you identify in your launch shortcut. There is no filtering besides the perspectives (i.e. the menus are static per perspective). The actions only look for a non empty selection from the active page, or an active editor - nothing special.

Here's example shortcuts (from the Java debugger).

<extension point = "org.eclipse.debug.ui.launchShortcuts">
        <shortcut
                id="org.eclipse.jdt.debug.ui.localJavaShortcut"
                class="org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut"
                helpContextId="org.eclipse.jdt.debug.ui.shortcut_local_java_application"
                label="%JavaApplicationShortcut.label"
                icon="icons/full/ctool16/java_app.gif"
                modes="run, debug">
                <perspective id="org.eclipse.jdt.ui.JavaPerspective"/>
                <perspective id="org.eclipse.jdt.ui.JavaHierarchyPerspective"/>
                <perspective id="org.eclipse.jdt.ui.JavaBrowsingPerspective"/>
                <perspective id="org.eclipse.debug.ui.DebugPerspective"/>
        </shortcut>
    <shortcut
        id="org.eclipse.jdt.debug.ui.javaAppletShortcut"
        class="org.eclipse.jdt.internal.debug.ui.launcher.JavaAppletLaunchShortcut"
                helpContextId="org.eclipse.jdt.debug.ui.shortcut_java_applet"
        label="%AppletShortcut.label"
        icon="icons/full/ctool16/java_applet.gif"
        modes="run, debug">
        <perspective id="org.eclipse.jdt.ui.JavaPerspective"/>
        <perspective id="org.eclipse.jdt.ui.JavaHierarchyPerspective"/>
        <perspective id="org.eclipse.jdt.ui.JavaBrowsingPerspective"/>
        <perspective id="org.eclipse.debug.ui.DebugPerspective"/>
    </shortcut>
</extension>


Darin




Mary Kroening <mary@xxxxxxxx>
Sent by: platform-debug-dev-admin@xxxxxxxxxxx

03/22/2003 01:45 PM
Please respond to platform-debug-dev
       
        To:        platform-debug-dev@xxxxxxxxxxx
        cc:       
        Subject:        Re: [platform-debug-dev] Launch Shortcuts and Configurations



Thanks for the help on the launch configuration, but did you mean #2 for updateButtons? As I don't see how the ILaunchConfigurationDialog is connected to launch shortcuts.

As to #1, my shortcuts do not appear when my perspective is active, and I have either selected a Prolog (our language/perspective) project in the navigator view or have an open Prolog editor window, or both. What kind of selection or editor are the run as/debug as menus looking for? The launch shortcut only specifies a perspective in which the shortcut should appear. How do I make an association between a selection or editor and a shortcut? And why sometimes are they dimmed, but usually they simply do not appear at all?

Thanks,
Mary

At 12:51 PM 3/22/2003 -0600, you wrote:

And, for (1), you also need to call  ILaunchConfigurationDialog.updateButtons(), and updateMessage() to get the buttons and message are to update.

Darin


----- Forwarded by Darin Wright/Ottawa/IBM on 03/22/2003 12:49 PM -----

Darin Wright/Ottawa/IBM@IBMCA

Sent by: platform-debug-dev-admin@xxxxxxxxxxx


03/22/2003 12:28 PM

Please respond to platform-debug-dev

      
       To:        platform-debug-dev@xxxxxxxxxxx

       cc:       
       Subject:        Re: [platform-debug-dev] Launch Shortcuts and Configurations





1) The launch shortcut actions are disabled in the in the run/debug as menu when there is no active editor, or no selection in a view (since the actions are selection dependent).

2) You must change attributes on the launch configuration (working copy) as the user changes values in the tab for the apply/revert buttons to become enabled. The buttons only enable if something in the launch configuration has changed.


Darin



Mary Kroening <mary@xxxxxxxx>

Sent by: platform-debug-dev-admin@xxxxxxxxxxx


03/22/2003 12:00 PM

Please respond to platform-debug-dev
       
      To:        platform-debug-dev@xxxxxxxxxxx

      cc:       
      Subject:        [platform-debug-dev] Launch Shortcuts and Configurations




Hi,

I'm having 2 problems with launching (using RC3). I have studied the
article on launching and cannot find any information on these two points.

1) My launch shortcuts (both run and debug) either disappear or are dimmed
for reasons that are not clear. I have noticed this same problem with the
built-in Java shortcuts in RC3. (Also when the JDT is installed with my
plug-ins, I will get JDT shortcuts appearing dimmed on the Run As and Debug
As menus (but mine do not appear at all).)

My shortcuts are declared to appear in my perspective (the primary one) and
the debug perspective. They usually appear on startup, but then after some
debug or run sessions, they dim or disappear and there appears to be no way
to make them come back.

I have even taken to forcibly creating the corresponding launch
configurations when my UI plug-in is instantiated. This seems to help, but
does not completely solve the problem. When the shortcuts are shown,
everything works flawlessly.

How can I resolve this? Or is this a bug in RC3 that I should report?

2) On my launch configuration tab the Apply and Revert buttons are always
dimmed. So in order to save configuration changes, one has to switch to the
Common tab, make a change (so the buttons are enabled, then press Apply).
What controls the buttons appearing? I've tried setDirty() and have
implemented canSave() and isValid() to no avail.

Many thanks,
Mary Kroening
Amzi! inc.

_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx

http://dev.eclipse.org/mailman/listinfo/platform-debug-dev



----------------------------------------------------
 Amzi! inc.
   5861 Greentree Road
   Lebanon, OH 45036 U.S.A.
 web     
http://www.amzi.com
 tel      +1 513 425 8050
 e-mail   info@xxxxxxxx
 fax      +1 513 425 8025
----------------------------------------------------


----------------------------------------------------
  Amzi! inc.
    5861 Greentree Road
    Lebanon, OH 45036 U.S.A.
  web      http://www.amzi.com
  tel      +1 513 425 8050
  e-mail   info@xxxxxxxx
  fax      +1 513 425 8025
----------------------------------------------------


Back to the top