Im using the docking frames common with perspectives. Now I want to hide toolbars (closing also). I have tried to find my toolbars in the CControlRegister like for CDockables, but it doesn
t work.
The last thing I tried is:
public void removeToolbar(String title) {
CControlRegister dock = this.control.getRegister();
Pattern filter = Pattern.compile("toolbar"+title.toLowerCase()+".*");
for (ListIterator<CDockable> it = dock.getDockables().listIterator(); it.hasNext(); ) {
CDockable cdock = it.next();
String title2 = cdock.intern().getTitleText();
Matcher match = filter.matcher(title2);
if (match.matches()) {
this.control.removeDockable((SingleCDockable) cdock);
}
}
}
I have saved the following objects are under my class attributes:
private CControl control;
private CPerspective perspective;
private CToolbarContentArea area;
private CToolbarContentPerspective toolbars;
My unique id for CDockables follow this pattern:
"toolbar"+store.getTitle().toLowerCase()+i
i is an integer >= 0
Can someone help me, please?