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

> 
> None of my debug element classes implement IWorkbenchAdapter or
> IDeferredWorkbenchAdapter, so there aren't any implementations of the
> getChildren() method implemented improperly. There aren't any
> implementations of it at all. 
> 
> Is it simply a matter of implementing an adapter interface on the
> classes that I want to have children in the Debug View?
> 

Your elements do not need to implement IWorkbenchAdapter directly. They 
can provide the adapter via #getAdapter(IWorkbenchAdapter.class). However, 
you should not need to as the debug UI plug-in registers 
IWorkbenchAdapter's and IDeferredWorkbenchAdapter's for the standard debug 
elements when the Debug UI plug-in starts up:

                DebugElementAdapterFactory propertiesFactory = new 
DebugElementAdapterFactory();
                manager.registerAdapters(propertiesFactory, 
ILaunchManager.class);
                manager.registerAdapters(propertiesFactory, 
ILaunch.class);
                manager.registerAdapters(propertiesFactory, 
IDebugTarget.class);
                manager.registerAdapters(propertiesFactory, 
IProcess.class);
                manager.registerAdapters(propertiesFactory, 
IThread.class);
                manager.registerAdapters(propertiesFactory, 
IStackFrame.class);
                manager.registerAdapters(propertiesFactory, 
IRegisterGroup.class);
                manager.registerAdapters(propertiesFactory, 
IVariable.class);
                manager.registerAdapters(propertiesFactory, 
IRegister.class);
                manager.registerAdapters(propertiesFactory, 
IExpression.class);

and the factory provides the adapters at runtime... 

The Java debugger uses the standard adapters provided by the platform for 
all of its elements, except for threads. It provides its own adapter for 
IJavaThread, such that it can display lock/monitor information directly in 
the debug view.

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?

Thanks,

Darin



Back to the top