Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] [CDT Platform] Add a button to the debug toolbar

Hi !

Great news !!! It's ok .... my button doesn't have any functionality yet but it became enabled with the debug :) !
In fact, I had two factory adapter and only the first was called ...

Many thanks to Jonah, you are very nice !

I've to work hard to understand DSF ... it's a very strange philosophy ;) !
Christelle

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Jonah Graham
Sent: Wednesday, December 02, 2015 1:18 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] [CDT Platform] Add a button to the debug toolbar

Hi Christelle,

I have backported the example plug-in to Kepler/CDT 8.3.

You can get the branch from
https://github.com/jonahkichwacoders/cdt/tree/new_command_in_dsf_example_backported_to_kepler_cdt_8_3

To use the branch, I recommend:
1) In a new workspace (I used Eclipse Committers Mars.1 as my dev environment)
2) Import only the dsf-gdb/org.eclipse.cdt.examples.dsf.gdb project
3) Set the target platform to cdt-8.3-kepler.target
4) Launch target Eclipse
5) Create and debug a project

By default, you won't get the extended GDB launch options (i.e. the new button enabled). To get that, edit the launch configuration and set the launcher to use (click "Select other..." and choose the "Example GDB Extended Launch Delegate Launcher"). See attached screenshot.

Thanks,
Jonah
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On 1 December 2015 at 12:51, Christelle BURGUERA <Christelle.BURGUERA@xxxxxx> wrote:
> Thank you Jonah !
> It'll be very nice to you if you backport the example to Kepler :)
>
> I'll check your comments now !
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Jonah Graham
> Sent: Tuesday, December 01, 2015 11:45 AM
> To: CDT General developers list.
> Subject: Re: [cdt-dev] [CDT Platform] Add a button to the debug
> toolbar
>
> Hi Christelle,
>
> For starters, would it be useful to you if I backported the example to Kepler? I don't think it would be too hard. That way you would have a working starting point.
>
> Here are some comments based on what you have provided:
>
>> Instead of extend a GdbAdapterFactory (because I'm under Kepler) I've implemented a IAdapterFactory, ILaunchesListener2  which manage a lot of commands.
>> But nothing happened ! I've my button added but it's always enabled
>> and I never reach my breakpoints on my factory class
>
> There is a GdbAdapterFactory in Kepler [1], the correct Kepler (aka old, pre Mars) procedure is to copy the entirety of GdbAdapterFactory to your plug-in, rename it and add it to the plugin.xml.
>
>>               commandId=" blabla.debug.command.reset"
> I assume this is just a typo in the email, not the actual plugin.xml,
> but there is a space before blabla
>
> *** This is where I would start ***
> Your handler for reset:
>> <handler
>>             class="blabla.debug.commands.ResetHandler"
>>            commandId=" blabla.debug.command.reset">
> has a test on activated bundles, but the bundle you are testing for is "org.eclipse.cdt.examples.dsf.gdb" instead of your bundle. If the bundle is never activated, then the handler will never become enabled.
> For now, just remove the enabledWhen to see if that gets you further.
>
> I hope this helps you!
> Jonah
>
>
> Apologies for the links to github instead of git.eclipse.org, but all of eclipse.org is running slow as I write this email:
>
> [1]
> https://github.com/eclipse/cdt/blob/cdt_8_2/dsf-gdb/org.eclipse.cdt.ds
> f.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.jav
> a
> ~~~
> Jonah Graham
> Kichwa Coders Ltd.
> www.kichwacoders.com
>
>
> On 1 December 2015 at 09:09, Christelle BURGUERA <Christelle.BURGUERA@xxxxxx> wrote:
>> Hi Jonash !
>>
>> It's not very easy to implement...
>> I don’t really understand, I'm sorry :(
>>
>> Instead of extend a GdbAdapterFactory (because I'm under Kepler) I've implemented a IAdapterFactory, ILaunchesListener2  which manage a lot of commands.
>> But nothing happened ! I've my button added but it's always enabled
>> and I never reach my breakpoints on my factory class
>>
>> I explain :
>> I've a command :
>> <command
>>             description="Reset the chip to restart the process"
>>             id="blabla.debug.command.reset"
>>             name="Reset">
>> </command>
>>
>> I've added 3 menuContribution :
>>      <menuContribution
>>            allPopups="false"
>>            locationURI="toolbar:org.eclipse.debug.ui.DebugView?before=stepGroup">
>>         <command
>>               commandId=" blabla.debug.command.reset"
>>               icon="icons/selected_restart.gif"
>>               label="Reset"
>>               style="push"
>>               tooltip="Reset the chip to restart the process">
>>            <visibleWhen
>>                  checkEnabled="false">
>>               <systemTest
>>                     property="org.eclipse.debug.ui.debugViewToolbarVisible"
>>                     value="true">
>>               </systemTest>
>>            </visibleWhen>
>>         </command>
>>      </menuContribution>
>>      <menuContribution
>>            locationURI="popup:org.eclipse.debug.ui.DebugView?before=stepGroup">
>>         <command
>>               commandId=" blabla.debug.command.reset"
>>               icon="icons/selected_restart.gif"
>>               label="Reset"
>>               style="push"
>>               tooltip="Reset the chip to restart the process">
>>         </command>
>>      </menuContribution>
>>      <menuContribution
>>            allPopups="false"
>>            locationURI="toolbar:org.eclipse.debug.ui.main.toolbar?before=stepGroup">
>>         <command
>>               commandId="blabla.debug.command.reset"
>>               icon="icons/selected_restart.gif"
>>               label="Reset"
>>               style="push"
>>               tooltip="Reset the chip to restart the process">
>>            <visibleWhen
>>                  checkEnabled="false">
>>               <reference
>>                     definitionId="org.eclipse.cdt.debug.ui.testIsDebugActionSetActive">
>>               </reference>
>>            </visibleWhen>
>>         </command>
>>      </menuContribution>
>>
>> I've a handler:
>> <extension
>>          point="org.eclipse.ui.handlers">
>>       <handler
>>             class="blabla.debug.commands.ResetHandler"
>>             commandId=" blabla.debug.command.reset">
>>          <enabledWhen>
>>             <with
>>                   variable="org.eclipse.core.runtime.Platform">
>>                <test
>>                      args="org.eclipse.cdt.examples.dsf.gdb"
>>                      property="org.eclipse.core.runtime.bundleState"
>>                      value="ACTIVE">
>>                </test>
>>             </with>
>>          </enabledWhen>
>>       </handler>
>>    </extension>
>>
>> Only the handler references a class which extend DebugCommandHandler and return a IDebugCommandHandler.
>>
>> I've added a factory:
>> <extension point="org.eclipse.core.runtime.adapters">
>>       <factory
>>             adaptableType=" blabla.debug.dsf.gdb.GdbExtendedLaunch"
>>             class="blabla.debug.dsf.MCUAdapterFactory2">
>>          <adapter
>>                type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider">
>>          </adapter>
>>          <adapter
>>                type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory">
>>          </adapter>
>>          <adapter
>>                type="org.eclipse.debug.ui.contexts.ISuspendTrigger">
>>          </adapter>
>>          <adapter
>>                type="org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory">
>>          </adapter>
>>       </factory>
>>    </extension>
>>
>> I've added in the class blabla.debug.dsf.MCUAdapterFactory2, the
>> management of my command, but I never reached my breakpoints on it :( I miss something .... Do you have any idea ?
>>
>> Many thanks !
>> I'm not familiar with DSF ... I've to learn !
>>
>> Christelle
>>
>>
>> -----Original Message-----
>> From: cdt-dev-bounces@xxxxxxxxxxx
>> [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>> On Behalf Of Jonah Graham
>> Sent: Monday, November 30, 2015 12:05 PM
>> To: CDT General developers list.
>> Subject: Re: [cdt-dev] [CDT Platform] Add a button to the debug
>> toolbar
>>
>> Hi Christelle,
>>
>> You are using a code base that is before Marc's refactoring to make
>> it easier to extend the adapter factory. If you look at Bug
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=462623 you should see the change that came in since Kepler.
>>
>> Fortunately the dsf gdb example came into existence before Bug 462623, so if you examine the CDT tree before that commit [1] you should see the adapter factory [2] in its previous form before session adapters was added. The plugin.xml [3] does not change due to the refactoring in Bug 462623, so that should still be straightforward.
>>
>> I hope that is clear enough, if not, please ask me some follow ups.
>>
>> [1]
>> http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf-gdb/org.ecl
>> i
>> pse.cdt.examples.dsf.gdb?id=0fec0f9cd303f022387510323f11ca7c8c6a311a
>> [2]
>> http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf-gdb/org.ecl
>> i
>> pse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/GdbExte
>> n dedAdapterFactory.java?id=0fec0f9cd303f022387510323f11ca7c8c6a311a
>> [3]
>> http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf-gdb/org.ecl
>> i
>> pse.cdt.examples.dsf.gdb/plugin.xml?id=0fec0f9cd303f022387510323f11ca
>> 7
>> c8c6a311a#n66
>>
>> Thanks
>> Jonah
>> ~~~
>> Jonah Graham
>> Kichwa Coders Ltd.
>> www.kichwacoders.com
>>
>>
>> On 30 November 2015 at 09:55, Christelle BURGUERA <Christelle.BURGUERA@xxxxxx> wrote:
>>> Hi Jonah !
>>>
>>> I was quietly trying to work with your example ... when suddenly it
>>> was the drama :( I'm working on Kepler and I haven' the choice :(
>>>
>>> So I haven't the GdbSessionAdapters ... I 'll try to adapt it ...
>>>
>>> Thank you for your example :) it's very nice !
>>>
>>> -----Original Message-----
>>> From: cdt-dev-bounces@xxxxxxxxxxx
>>> [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>>> On Behalf Of Jonah Graham
>>> Sent: Sunday, November 29, 2015 10:28 PM
>>> To: CDT General developers list.
>>> Subject: Re: [cdt-dev] [CDT Platform] Add a button to the debug
>>> toolbar
>>>
>>> Hi Christelle,
>>>
>>> In the end I decided that the best way to demonstrate adding a new
>>> command was to extend the dsf gdb example in the CDT repo. You can
>>> pick up the change to the example from my github fork of CDT here
>>> https://github.com/jonahkichwacoders/cdt/tree/new_command_in_dsf_exa
>>> m
>>> p
>>> le
>>>
>>> The commit is here:
>>> https://github.com/jonahkichwacoders/cdt/commit/e137b129c39d61ac34e0
>>> 9
>>> 4
>>> a411885dbf89444f35 where you can see all the different parts that
>>> work together. If there is any part of this commit I can explain, please let me know and I will add explanations to the code for all to benefit.
>>>
>>> The bugzilla covering this enhancement to the example is
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=483234 with the associated gerrit.
>>>
>>> I hope this helps.
>>> Jonah
>>> ~~~
>>> Jonah Graham
>>> Kichwa Coders Ltd.
>>> www.kichwacoders.com
>>>
>>>
>>> On 27 November 2015 at 14:19, Christelle BURGUERA <Christelle.BURGUERA@xxxxxx> wrote:
>>>> Many many thanks !!!
>>>> :)
>>>>
>>>> I'll let you more than one hour ... I'm in week-end in one hour :)
>>>>
>>>> Have a nice week-end !
>>>>
>>>> -----Original Message-----
>>>> From: cdt-dev-bounces@xxxxxxxxxxx
>>>> [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>>>> On Behalf Of Jonah Graham
>>>> Sent: Friday, November 27, 2015 3:09 PM
>>>> To: CDT General developers list.
>>>> Subject: Re: [cdt-dev] [CDT Platform] Add a button to the debug
>>>> toolbar
>>>>
>>>> Hi Christelle,
>>>>
>>>> I'll try and put together a standalone example for you and we can see if that works in your environment. Give me an hour or two and I'll get back to you on this list again.
>>>>
>>>> Jonah
>>>> ~~~
>>>> Jonah Graham
>>>> Kichwa Coders Ltd.
>>>> www.kichwacoders.com
>>>>
>>>>
>>>> On 27 November 2015 at 12:25, Christelle BURGUERA <Christelle.BURGUERA@xxxxxx> wrote:
>>>>> Hi,
>>>>>
>>>>> I really not understand how can I do to enable and disable my button....
>>>>> I want it enabled if debug is launching and disabled if not.
>>>>>
>>>>> I mimic the connect button, so I created a contributionMenu, a command and an handler (to test it I copied the "enabledWhen"). But the state of my button doesn’t change.
>>>>> I don’t' understand the handler you use. There is no enable function ..
>>>>>
>>>>> Thank you
>>>>> Christelle
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: cdt-dev-bounces@xxxxxxxxxxx
>>>>> [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>>>>> On Behalf Of Jonah Graham
>>>>> Sent: Thursday, November 26, 2015 5:10 PM
>>>>> To: CDT General developers list.
>>>>> Subject: Re: [cdt-dev] [CDT Platform] Add a button to the debug
>>>>> toolbar
>>>>>
>>>>> Hi Christelle,
>>>>>
>>>>> You want something like this, note the locationURI.
>>>>>
>>>>>       <menuContribution
>>>>>             locationURI="toolbar:org.eclipse.debug.ui.DebugView?before=stepGroup">
>>>>>          <command
>>>>>                commandId="org.eclipse.cdt.debug.ui.command.connect"
>>>>>                icon="icons/obj16/connect.gif"
>>>>>                label="%Connect.label"
>>>>>                style="push"
>>>>>                tooltip="%Connect.tooltip">
>>>>>          </command>
>>>>>       </menuContribution>
>>>>>
>>>>> The above snippet comes from here:
>>>>> http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/debug/org.ec
>>>>> l
>>>>> i
>>>>> p
>>>>> s
>>>>> e.cdt.debug.ui/plugin.xml#n2726
>>>>>
>>>>> If you search the file for the id
>>>>> "org.eclipse.cdt.debug.ui.command.connect" you should see all the parts you need to connect together.
>>>>>
>>>>> Jonah
>>>>>
>>>>> ~~~
>>>>> Jonah Graham
>>>>> Kichwa Coders Ltd.
>>>>> www.kichwacoders.com
>>>>>
>>>>>
>>>>> On 26 November 2015 at 15:18, Christelle BURGUERA <Christelle.BURGUERA@xxxxxx> wrote:
>>>>>> Hi Marc,
>>>>>>
>>>>>>
>>>>>>
>>>>>> I’ll have a look.
>>>>>>
>>>>>> Do you know the plugin’s name where I can find this button ?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thank you !
>>>>>>
>>>>>> Christelle
>>>>>>
>>>>>>
>>>>>>
>>>>>> From: cdt-dev-bounces@xxxxxxxxxxx
>>>>>> [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>>>>>> On Behalf Of Marc Khouzam
>>>>>> Sent: Thursday, November 26, 2015 4:11 PM
>>>>>> To: CDT General developers list.
>>>>>> Subject: Re: [cdt-dev] [CDT Platform] Add a button to the debug
>>>>>> toolbar
>>>>>>
>>>>>>
>>>>>>
>>>>>> I haven't looked deeply at the code you posted but I didn't
>>>>>> notice the use of the menu.ui extension point.  When I use the
>>>>>> command framework I use the extension points:
>>>>>> Command
>>>>>> Handler
>>>>>> Menu
>>>>>>
>>>>>> I recommend you mimic the connect button which is added by CDT to
>>>>>> the Debug toolbar. That should be the closest example you can
>>>>>> find to what you seem to want.
>>>>>>
>>>>>> BR,
>>>>>>
>>>>>> Marc
>>>>>>
>>>>>>
>>>>>>
>>>>>> From: Christelle BURGUERA <Christelle.BURGUERA@xxxxxx>
>>>>>> Sent: Nov 26, 2015 03:11
>>>>>> To: cdt-dev@xxxxxxxxxxx
>>>>>> Subject: [cdt-dev] [CDT Platform] Add a button to the debug
>>>>>> toolbar
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>
>>>>>>
>>>>>> I develop plugins installed on a CDT Eclipse to do C/C++ application.
>>>>>>
>>>>>> I would like to add a button to the debug toolbar next to “Resume”
>>>>>> button for example or not so far ….
>>>>>>
>>>>>> To do that I was inspired by the button “Resume”. I did the same
>>>>>> things, I just changed the id and name but for the moment my
>>>>>> button should have the same behavior that Resume button !
>>>>>>
>>>>>> But no L !
>>>>>>
>>>>>>
>>>>>>
>>>>>> By default it’s enabled when no debug is launched and more
>>>>>> annoying it’s visible in the others perspectives !
>>>>>>
>>>>>>
>>>>>>
>>>>>> I put breakpoints on “init” function of
>>>>>> ResumeCommandActionDelegate and ResetCommandActionDelegate (my
>>>>>> commandActionDelegate). When I open the debug perspective, the
>>>>>> breakpoint on “init” function of ResumeCommandActionDelegate is
>>>>>> detected but not in my commandActionDelegate, the breakpoint is detected only when I click on the button … but too late !
>>>>>>
>>>>>> I think my action isn’t register !
>>>>>>
>>>>>> But I don’t know why ….
>>>>>>
>>>>>>
>>>>>>
>>>>>> See the sources code :
>>>>>>
>>>>>> plugin.xml:
>>>>>>
>>>>>> [CODE]
>>>>>>
>>>>>> // actionSets
>>>>>>
>>>>>> <extension
>>>>>>
>>>>>>          point="org.eclipse.ui.actionSets">
>>>>>>
>>>>>>       <actionSet
>>>>>>
>>>>>>             id="blabla.debug.reset.actionset"
>>>>>>
>>>>>>             label="Reset"
>>>>>>
>>>>>>             visible="true">
>>>>>>
>>>>>>          <action
>>>>>>
>>>>>>                class="blabla.debug.actions.ResetCommandActionDelegate"
>>>>>>
>>>>>>                definitionId="blabla.debug.commands.Reset"
>>>>>>
>>>>>>                disabledIcon="icons/unselected_restart.gif"
>>>>>>
>>>>>>                hoverIcon="icons/selected_restart.gif"
>>>>>>
>>>>>>                icon="icons/selected_restart.gif"
>>>>>>
>>>>>>                id="blabla.debug.action.reset"
>>>>>>
>>>>>>                label="Reset"
>>>>>>
>>>>>>                menubarPath="org.eclipse.ui.run/stepGroup"
>>>>>>
>>>>>>                toolbarPath="org.eclipse.debug.ui.main.toolbar/additions"
>>>>>>
>>>>>>                tooltip="Reset the chip to restart the process">
>>>>>>
>>>>>>          </action>
>>>>>>
>>>>>>       </actionSet>
>>>>>>
>>>>>>    </extension>
>>>>>>
>>>>>> // Command
>>>>>>
>>>>>> <command
>>>>>>
>>>>>>             categoryId="org.eclipse.debug.ui.category.run"
>>>>>>
>>>>>>             defaultHandler="blabla.debug.commands.ResetHandler"
>>>>>>
>>>>>>             description="Reset the chip to restart the process"
>>>>>>
>>>>>>             id="blabla.debug.commands.Reset"
>>>>>>
>>>>>>             name="Reset">
>>>>>>
>>>>>>       </command>
>>>>>>
>>>>>> [/CODE]
>>>>>>
>>>>>>
>>>>>>
>>>>>> Associated sources:
>>>>>>
>>>>>> [CODE]
>>>>>>
>>>>>> package blabla.debug.commands;
>>>>>>
>>>>>>
>>>>>>
>>>>>> import org.eclipse.debug.core.commands.IRestartHandler;
>>>>>>
>>>>>> import org.eclipse.debug.core.commands.IResumeHandler;
>>>>>>
>>>>>> import org.eclipse.debug.ui.actions.DebugCommandHandler;
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> public class ResetHandler extends DebugCommandHandler {
>>>>>>
>>>>>>
>>>>>>
>>>>>>             @Override
>>>>>>
>>>>>>                         protected Class<IResumeHandler>
>>>>>> getCommandType() {
>>>>>>
>>>>>>                     return IResumeHandler.class;
>>>>>>
>>>>>>                 }
>>>>>>
>>>>>>
>>>>>>
>>>>>> }
>>>>>>
>>>>>> [/CODE]
>>>>>>
>>>>>>
>>>>>>
>>>>>> [CODE]
>>>>>>
>>>>>> package blabla.debug.actions;
>>>>>>
>>>>>>
>>>>>>
>>>>>> import org.eclipse.debug.ui.actions.DebugCommandAction;
>>>>>>
>>>>>> import org.eclipse.jface.action.IAction;
>>>>>>
>>>>>> import org.eclipse.jface.viewers.ISelection;
>>>>>>
>>>>>> import org.eclipse.swt.widgets.Event;
>>>>>>
>>>>>> import org.eclipse.ui.IActionDelegate2;
>>>>>>
>>>>>> import org.eclipse.ui.IWorkbenchWindow;
>>>>>>
>>>>>> import org.eclipse.ui.IWorkbenchWindowActionDelegate;
>>>>>>
>>>>>>
>>>>>>
>>>>>> public class ResetCommandActionDelegate implements
>>>>>> IWorkbenchWindowActionDelegate, IActionDelegate2 {
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>             private DebugCommandActionfDebugAction = new
>>>>>> ResetCommandAction();
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public void dispose() {
>>>>>>
>>>>>>         fDebugAction.dispose();
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public void init(IWorkbenchWindow window) {
>>>>>>
>>>>>>         fDebugAction.init(window);
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public void run(IAction action) {
>>>>>>
>>>>>>         fDebugAction.run();
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public void selectionChanged(IAction action,
>>>>>> ISelection
>>>>>> selection) {
>>>>>>
>>>>>>         // do nothing
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public void init(IAction action) {
>>>>>>
>>>>>>         fDebugAction.setActionProxy(action);
>>>>>>
>>>>>>
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public void runWithEvent(IAction action, Event event)
>>>>>> {
>>>>>>
>>>>>>         run(action);
>>>>>>
>>>>>>     }
>>>>>>
>>>>>> }
>>>>>>
>>>>>> [/CODE]
>>>>>>
>>>>>>
>>>>>>
>>>>>> [CODE]
>>>>>>
>>>>>> package blabla.debug.actions;
>>>>>>
>>>>>>
>>>>>>
>>>>>> import org.eclipse.debug.core.commands.IRestartHandler;
>>>>>>
>>>>>> import org.eclipse.debug.core.commands.IResumeHandler;
>>>>>>
>>>>>> import org.eclipse.debug.internal.ui.DebugPluginImages;
>>>>>>
>>>>>> import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
>>>>>>
>>>>>> import org.eclipse.debug.internal.ui.actions.ActionMessages;
>>>>>>
>>>>>> import org.eclipse.debug.ui.actions.DebugCommandAction;
>>>>>>
>>>>>> import org.eclipse.jface.resource.ImageDescriptor;
>>>>>>
>>>>>> import org.eclipse.ui.plugin.AbstractUIPlugin;
>>>>>>
>>>>>>
>>>>>>
>>>>>> import blabla.debug.MCUDebugPlugin;
>>>>>>
>>>>>>
>>>>>>
>>>>>> public class ResetCommandAction extends DebugCommandAction {
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>             public ResetCommandAction() {
>>>>>>
>>>>>>
>>>>>> setActionDefinitionId("org.eclipse.debug.ui.commands.Resume");
>>>>>> //$NON-NLS-1$
>>>>>>
>>>>>>             }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public String getText() {
>>>>>>
>>>>>>         return ActionMessages.ResumeAction_0;
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public String getHelpContextId() {
>>>>>>
>>>>>>         return "org.eclipse.debug.ui.resume_action_context";
>>>>>> //$NON-NLS-1$
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public String getId() {
>>>>>>
>>>>>>         return "org.eclipse.debug.ui.debugview.toolbar.resume";
>>>>>> //$NON-NLS-1$
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public String getToolTipText() {
>>>>>>
>>>>>>         return ActionMessages.ResumeAction_3;
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public ImageDescriptor getDisabledImageDescriptor() {
>>>>>>
>>>>>>         return
>>>>>> DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IM
>>>>>> G
>>>>>> _
>>>>>> D
>>>>>> L
>>>>>> C
>>>>>> L_RESUME);
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public ImageDescriptor getHoverImageDescriptor() {
>>>>>>
>>>>>>         return
>>>>>> DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IM
>>>>>> G
>>>>>> _
>>>>>> E
>>>>>> L
>>>>>> C
>>>>>> L_RESUME);
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>     @Override
>>>>>>
>>>>>>             public ImageDescriptor getImageDescriptor() {
>>>>>>
>>>>>>         return
>>>>>> DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IM
>>>>>> G
>>>>>> _
>>>>>> E
>>>>>> L
>>>>>> C
>>>>>> L_RESUME);
>>>>>>
>>>>>>     }
>>>>>>
>>>>>>
>>>>>>
>>>>>>             @Override
>>>>>>
>>>>>>             protected Class<IResumeHandler> getCommandType() {
>>>>>>
>>>>>>                         return IResumeHandler.class;
>>>>>>
>>>>>>             }
>>>>>>
>>>>>>
>>>>>>
>>>>>> }
>>>>>>
>>>>>> [/CODE]
>>>>>>
>>>>>>
>>>>>>
>>>>>> If you have any idea ….
>>>>>>
>>>>>> Many thanks !!!
>>>>>>
>>>>>>
>>>>>>
>>>>>> Chris
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> cdt-dev mailing list
>>>>>> cdt-dev@xxxxxxxxxxx
>>>>>> To change your delivery options, retrieve your password, or
>>>>>> unsubscribe from this list, visit
>>>>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>>> _______________________________________________
>>>>> cdt-dev mailing list
>>>>> cdt-dev@xxxxxxxxxxx
>>>>> To change your delivery options, retrieve your password, or
>>>>> unsubscribe from this list, visit
>>>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>>> _______________________________________________
>>>>> cdt-dev mailing list
>>>>> cdt-dev@xxxxxxxxxxx
>>>>> To change your delivery options, retrieve your password, or
>>>>> unsubscribe from this list, visit
>>>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>> _______________________________________________
>>>> cdt-dev mailing list
>>>> cdt-dev@xxxxxxxxxxx
>>>> To change your delivery options, retrieve your password, or
>>>> unsubscribe from this list, visit
>>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>> _______________________________________________
>>>> cdt-dev mailing list
>>>> cdt-dev@xxxxxxxxxxx
>>>> To change your delivery options, retrieve your password, or
>>>> unsubscribe from this list, visit
>>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>> _______________________________________________
>>> cdt-dev mailing list
>>> cdt-dev@xxxxxxxxxxx
>>> To change your delivery options, retrieve your password, or
>>> unsubscribe from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>> _______________________________________________
>>> cdt-dev mailing list
>>> cdt-dev@xxxxxxxxxxx
>>> To change your delivery options, retrieve your password, or
>>> unsubscribe from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or
>> unsubscribe from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or
>> unsubscribe from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/cdt-dev

Back to the top