Community
Participate
Working Groups
Build Identifier: I would like to modify ISTDataViewersField with a new method, in order to support columns hidden by default. Something like: boolean isShowingByDefault(); The default implementation (AbstractSTDataViewersField) will return true. In other words, the default behaviour will not change. However, it will now possible to have columns hidden by default. It can be interesting, especially for columns with "data for advanced users". Such columns will be displayed only if user explicitly wants to displays them. Reproducible: Always
Jerome/Lilia: I opened this RFE for you. Are you OK for this enhancement ? Xavier
(In reply to comment #1) > Jerome/Lilia: > > I opened this RFE for you. > Are you OK for this enhancement ? > > Xavier Absolutely OK for me. I needed such behavior in a recently implemented Debug view where I had to define for each column a constructor (AbstractSTDataViewersField) with boolean as a parameter for showing/not. Thanks Xavier!
Hi Lilia, Ok, many thanks. I'm not sure to understand your comment. Do you have already implemented this feature ? Or is it only an identified requirement from your side ? Xavier
Sorry if I was not clear. Actually, it is a requirement I identified and which I implemented in my plugin not in dataviewers side. your solution sounds better. Some code snippets in my current implementation: public abstract class MyAbstractField extends AbstractSTDataViewersField { public myAbstractField (boolean show) { super(); setShowing(show); } [...] } public class myFieldx extends MyAbstractField { public myFieldx (boolean b){ super(b); } [...] } public class myViewer extends AbstractSTTableViewer { public ISTDataViewersField[] getAllFields() { return new ISTDataViewersField[] { new myField1(true); new myField2(true); new myField3(false); new myField4(false); } } thus, by default, the two last columns hidden. I hope it is clearer now? Lilia
a patch has been submitted here: https://git.eclipse.org/r/#/c/11672/
fixed by rev 444a56364afb015c59f7b73d52707913404f07ca