Hi Elaine,
We too had similar requirement, for that we started by overriding the adapter factory … I shall detail below, the things I remember :
1. Created custom adaptor factory; see org.eclipse.cdt.dsf.gdb.internal.ui.GdbAdapterFactory.java
a. Please refer http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg23664.html
2. In that, create custom source display adaptor by overriding org.eclipse.cdt.dsf.debug.ui.sourcelookup.DsfSourceDisplayAdapter.java
3. Create custom source not found editor input; override org.eclipse.cdt.debug.internal.ui.sourcelookup.CSourceNotFoundEditorInput.java
4. Create custom source not found editor element; override org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceNotFoundElement
5. Create custom source not found editor; override org.eclipse.cdt.debug.internal.ui.sourcelookup.CSourceNotFoundEditor
6. In the custom source display adaptor, in performLookup() use our own source not found editor input and provide the custom source editor ID we created:
I don’t know whether this could be done in a better way.. Let experts say.. J
Still this worked for us…Hope this help you too…
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Elaine Herren
Sent: 20 July 2013 03:01
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] How do you get a custom source not found editor to beinvoked instead of CSourceNotFoundEditor?
Hi,
I'd like to use a custom source not found editor, which overrides org.eclipse.cdt.debug.internal.ui.sourcelookup.CSourceNotFoundEditor. I've been investigating and found some references that it can be done, but no documentation that makes it clear how to do it, especially for a newbie like me. One discussion I found in the cdt-dev archives mentions that WindRiver "overrides the source not found editor by using a custom source lookup director". We do have a custom source lookup director, but how do I get my custom source not found editor to be invoked, instead of the default CSourceNotFoundEditor? It seems like there's some magic going on that determines which editor class instance to create, and I'm not sure how to change it to create my custom editor instance instead. Can someone give me some clear steps on what I need to do? Thanks!!!
-Elaine