[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-debug-dev] Detecting variable closing
|
On Friday 24 November 2006 22:03, Darin Wright wrote:
> Hi,
>
> You should be able to get the tree with something like:
>
> IWorkbenchPage page = ...;
> IViewPart view = page.findView(IDebugUIConstants.
> ID_VARIABLE_VIEW);
> if (view instanceof IDebugView) {
> IDebugView debugView = (IDebugView) view;
> Viewer viewer = debugView.getViewer();
> Control control = viewer.getControl();
> if (control instanceof Tree) {
> Tree Tree = (Tree) control;
> ...
> }
> }
I should have being more clear about overriding VariablesView. I know how I
can get to the tree, and how I can install TreeListener on it. However, I
also need to map from tree item to the model item. There's
AsynchronousViewer.findNode that does exactly that. Except that this method
is protected. To call it, I must create a class derived from VariablesViewer,
say CVariablesViewer. To make CDT use that new class, I must derive from
VariablesView -- say creating CVariablesView, and make CVariablesView create
CVariablesViewer, as opposed of VariablesViewer. But, then, I need some way
to make CDT use CVariablesViewer, instead of VariablesView, and prevent
VariablesView from ever being created in C++ perspectives.
Is it possible?
Thanks,
Volodya