Hi Pawel,
The selection will be a little more tricky,
but I don’t think it’ll be a huge problem. Since the view
knows which layout it’s in, it can build up the correct selection (based
on the selected row and the number of columns displayed) before passing it to
the selection dependent actions. The behavior of some actions might need
to be changed when in grid layout mode. For example, adding registers to Expressions
view (via ‘watch’ context menu action) either has to be disabled or
it should add all the registers on a selected row. However, these should
be doable and I don’t think it’s necessary to modify the
tree-column control.
I implemented this feature with a tree viewer
in the previous version of our product and it worked fine. The only
difference was that I implemented it in our own custom registers view so I didn’t
have to modify anything at the platform/CDT/DSF levels. I also enabled register
editing by allowing each cell to be modified. I do agree with the fact
that it doesn’t exactly fit the tree viewer model, but it is still possible
to use a tree viewer for this layout.
As a starter, I’ve filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=291117
to keep track of this feature. We can continue our discussion in the
bugzilla entry. For those interested, please add your e-mail address to
the CC list and help out in any way you can :-)
From: cdt-dev-bounces@xxxxxxxxxxx
[mailto:cdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Pawel Piech
Sent: Thursday, October 01, 2009
5:14 PM
To: CDT
General developers list.
Subject: Re: [cdt-dev] Grid layout
in Registers view: making better use of empty space
I don't want to be a downer, but after thinking about
this for a second I think the selection and thus the detail pane, context menus
will be a major hurdle. You may have to go as deep as modifying the
tree-column control to get this right :-( An alternative may be to look
at creating a whole new view that is not tree control based or using a custom
memory rendering to accomplish this feature. Another option is showing
only the groups in the main view, and showing the grid in the detail pane.
Cheers,
Pawel
Mehregani, Navid wrote:
One of the features requested from our users is to
display registers in a grid layout. This would allow users to look at
more registers as they’re debugging their code. This feature makes
a much better use of the empty space typically displayed in Registers
view. As indicated in the attached snapshot, the captured registers view
displays about 13 registers when it’s in “tree layout”.
However, switching to “grid layout” allows the user to view more
than 30 registers at the same time.
I’ve already implemented this feature without
modifying Platform/CDT code. When grid layout is selected, I replace the
content/label providers used by the tree viewer in Registers view. The
current TreeModelViewer and label provider used by Registers view automatically
assume that each register will be displayed on a new row. By replacing
the providers, I “trick” the viewer into displaying multiple
registers on the same row. My solution is not very clean or efficient.
To come up with a better solution, I’d have to implement it at a lower
level (i.e. either at platform or CDT/DSF layer).
The purpose of this e-mail is to see who else in the
community would be interested in such a feature. If there is enough
interest, I can submit an enhancement (along with my code) and with the help of
the community we can come up with the ideal solution.

Regards,
- Navid

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