Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] DSF viewmodel/datamodel etc.

Hi Branko,
The only supported way to add support to the new view is to extends GdbViewModelAdapter for your debugger and to return the IVMProvider for your new view from there. I.e. there is no way to add support for a new view from a third party.

A workaround you could use is that instead of setting the active debug context as the input to your viewer directly. You could wrap it in a new element. For this new element you could implement your own element content provider, and other presentation API.

Hope this helps,
Pawel

On 01/18/2012 01:04 AM, Branko Drevenšek wrote:
Hi.

I hope someone can share some insight on my problem.

I'm trying to add new view to eclipse, that would show some additional information. The background is that when program is running on simulator, simulator can provide additional execution information directly (execution profile etc.). This happens in a similar way to gdb MI communication. On lower level this is done and information is successfully read by a DSF service that represents simulator.

I'm trying to use DSF view model here, but I'm having difficulties grasping all of it. I'm studying examples (nice), but still. Currently I'm having problem getting IVMProvider for my IPresentationContext. The query to create a provider ends up in GdbViewModelAdapter class, which knows nothing about my context and returns null. I tried (at one point) to extend org.eclipse.core.runtime.adapters, but all I managed to to was get that query into my model adapter, which successfully disabled the GdbViewModelAdapter making whole debug unusable.

Is there a (nice) way to add additional adapter, that would be used in case that one returns null? Is it at all good idea to have my view extend AbstractDebugView instead of ViewPart directly?

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



Back to the top