Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-debug-dev] Threads and stack frames disappear in move from 3.0 to 3.1

Darin asked:
>Since adapters are provided for you, I think there must be some other 
>problem here. Can you debug this by placing a breakpoint in 
>DebugViewContentProvider.getChildren(..), and tracing through 
>what happens 
>in your debug model?

Sure.

Break in DebugViewContentProvider.getChildren(..) when the parentElement
is an instance of my IDebugTarget derivative (let's call it
MyDebugTarget). It checks whether the parentElement is an instance of
IStackFrame. It's not, so it calls fManager.getChildren(parentElement),
which takes us to RemoteTreeContentManager.getChildren().

Here it calls RemoteTreeContentManager.getAdapter(parent), which checks
whether parent is an instance of IDeferredWorkbenchAdapter. It's not. It
_is_ an IAdaptable, so it calls
MyDebugTarget.getAdapter(IDeferredWorkbenchAdapter.class), which returns
null because it doesn't adapt to IDeferredWorkbenchAdapter (should it?).

RemoteTreeContentManager.getAdapter(..) returns null.
RemoteTreeContentManager.getChildren(..) returns null.

Return to DebugViewContentProvider.getChildren(..).

Because children is null, the content provider calls its
super.getChildren(..), taking us to
BaseWorkbenchContentProvider.getChildren(..), then to
BaseWorkbenchContentProvider.getAdapter(), where it checks whether the
element is IAdaptable (it is), then calls
MyDebugTarget.getAdapter(IWorkbenchAdapter.class), which returns null
because I don't adapt to that interface either (should I?)

BaseWorkbenchContentProvider.getAdapter(..) returns null.
BaseWorkbenchContentProvider.getChildren(..) returns new Object[0]

DebugViewContentProvider.getChildren() returns the same empty list.

There doesn't seem to be any call to the manager for the default
adapters. Should there be one in MyDebugTarget.getAdapter(..)?

Cheers,
Ken
  


Back to the top