Skip to main content

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

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

 


Back to the top