Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] overriding DsfSourceDisplayAdapter

Title: Re: [cdt-dev] overriding DsfSourceDisplayAdapter

Our debugger source lookup director is CPU aware. It keeps the containers per CPU.

Let’s say the user debugs a system with two CPUs ( ARM + DSP).

The two CPUs will be displayed in the same debug session, but their source lookup container will be completely different.

The user can setup Projec1 to be a source lookup container for the ARM and Project2 to be the source lookup container for the DSP.

When a source file cannot be found and the user clicks on “locate file” the newly created container is added to the director for specifically for the DSP or the ARM – the CPU the debug elements belongs to.

 

Dobrin

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of ken.ryall@xxxxxxxxx
Sent: Monday, July 26, 2010 5:44 PM
To: cdt-dev@xxxxxxxxxxx
Subject: Re: [cdt-dev] overriding DsfSourceDisplayAdapter

 

Now I’m wondering if we need to add some features to the CSourceNotFoundEditor. Can either of you share details about the custom implementations? Anything that we should add into CSourceNotFoundEditor?

Thanks - Ken


From: ext Pawel Piech <pawel.piech@xxxxxxxxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Mon, 26 Jul 2010 23:35:23 +0200
To: "cdt-dev@xxxxxxxxxxx" <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] overriding DsfSourceDisplayAdapter

Wind river overrides the source not found editor by using a custom source lookup director, so that may be an option for you.  The other place where the source not found editor is referenced is in CDebugModelPresentation, would you be able to override this class instead?

Cheers,
Pawel

On 07/26/2010 01:12 PM, Alexiev, Dobrin wrote:

   
 

Hello,
 
 
 
I’d like to override the behavior of the buttons in the “pseudo editor” CSourceNotFoundEditor in our DSF debugger.
 
I contributed a new editor type that derives from CSourceNotFoundEditor and overrode few methods in it.
 
So far so good.
 
 
 
The problem I hit is DsfSourceDisplayAdapter is referencing the contribution of CSourceNotFoundEditor via the constant ICDebugUIConstants.CSOURCENOTFOUND_EDITOR_ID.
 
My first thought was to override parts of DsfSourceDisplayAdapter that are referencing the constant but that proved impossible.
 
I ended up copying the whole class DsfSourceDisplayAdapter plus three more classes in the same package – total of 1500+ lines of code.
 
 
 
Does it make sense to introduce a protected method getSourceNotFoundEditorId() inside DsfSourceDisplayAdapter so other debuggers can easily override the source not found editor?
 
I noticed that other DSF adapters as much better suited for overriding.
 
 
 
May be there is a better way to deliver this functionality?
 
 
 
I noticed that the Executable View also is referencing the constant ICDebugUIConstants.CSOURCENOTFOUND_EDITOR_ID.
 
Since I am not altering the workflow if the not found file is a translation unit, referencing the constant there is not an issue (yet).
 
 
 
Regards
 
Dobrin
 
 
 
 


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

 


Back to the top