Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Customising the Debug view

I know of two ways to customize the icons - either fork the CDT you use in your product and replace icon files or create your own view model.

To plug your view model (assuming you have your own launch delegate - I guess you've already declared it if you have custom services):
1. Introduce a new subclass of the org.eclipse.debug.core.Launch (our debugger subclasses org.eclipse.cdt.dsf.gdb.launching.GdbLaunch)
2. Declare the adapter factory similar to this (this is from ...cdt.dsf.gdb.ui):
   <extension point="org.eclipse.core.runtime.adapters">
      <factory
            class="org.eclipse.cdt.dsf.gdb.internal.ui.GdbAdapterFactory"
            adaptableType="org.eclipse.cdt.dsf.gdb.launching.GdbLaunch">
         <adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider"/>
         <adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory"/>
         <adapter type="org.eclipse.debug.ui.contexts.ISuspendTrigger"/>
         <adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory"/>
      </factory>        
   </extension>   
3. In your adapter factory create a new custom adapter for IElementContentProvider.class, IModelProxyFactory.class, IColumnPresentationFactory.class that subclasses org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.GdbViewModelAdapter or any supertype.
4. From the createViewModelProvider method return you own model provider for context IDebugUIConstants.ID_DEBUG_VIEW.
5. Create custom VM nodes subclasses that have custom handler for update(ILabelUpdate[]). Usually this method delegates to custom label provider - and your label provider will have to return custom icons.

You will need to introduce custom VM nodes for each element type that you want to customize the icon.

Best regards,
Eugene

On Mon, Feb 13, 2012 at 7:29 AM, Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> wrote:
Hi,
 
I'm sure there is way to change icons and labels easily, but I've never had to do it.
But others should be able to give you pointers.  Anyone?
 
Marc


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Nipin P.
Sent: Saturday, February 11, 2012 12:52 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Customising the Debug view

Hi all,

 

I am working on   customising the debug view. To be more precise I want to change the labels and images of process, thread and stack nodes.

I am working with Eclipse 3.7/CDT 8.0 for debugging some remote application.

I managed to change the labels by using the services provided in GDBServiceFactory. But there is no provision in the services classes MIStack, MIProcesses etc for overriding the

Image icons. Can eclipse include function for this also in the service classes?

Or else is there any other solution. Is there any way to override the node classes (ThreadVMNode , StackFramesVMNode etc)

 

Thanks and Regards

Nipin

 
***** Confidentiality Statement/Disclaimer *****

This message and any attachments is intended for the sole use of the intended recipient. It may contain confidential information. Any unauthorized use, dissemination or modification is strictly prohibited. If you are not the intended recipient, please notify the sender immediately then delete it from all your systems, and do not copy, use or print. Internet communications are not secure and it is the responsibility of the recipient to make sure that it is virus/malicious code exempt.
The company/sender cannot be responsible for any unauthorized alterations or modifications made to the contents. If you require any form of confirmation of the contents, please contact the company/sender. The company/sender is not liable for any errors or omissions in the content of this message.

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top