use of org.talend.designer.core.ui.editor.palette.TalendDrawerEditPart in project tdi-studio-se by Talend.
the class AbstractTalendEditor method collapsePalette.
/**
* DOC hcw Comment method "collapsePalette".
*
* @param children
*/
private void collapsePalette(List children) {
for (Object object : children) {
if (object instanceof TalendDrawerEditPart) {
TalendDrawerEditPart part = (TalendDrawerEditPart) object;
part.setExpanded(false);
collapsePalette(part.getChildren());
} else if (object instanceof EditPart) {
collapsePalette(((EditPart) object).getChildren());
}
}
}
use of org.talend.designer.core.ui.editor.palette.TalendDrawerEditPart in project tdi-studio-se by Talend.
the class AbstractTalendEditor method expandPaletteDrawer.
/**
* DOC hcw Comment method "expandPaletteDrawer".
*
* @param paletteViewer
* @param paletteEntry
*/
private void expandPaletteDrawer(PaletteViewer paletteViewer, ToolEntry paletteEntry) {
List<TalendDrawerEditPart> parts = new ArrayList<TalendDrawerEditPart>();
PaletteContainer parent = paletteEntry.getParent();
while (parent != null) {
if (parent instanceof TalendPaletteDrawer) {
Object editpart = paletteViewer.getEditPartRegistry().get(parent);
if (editpart instanceof TalendDrawerEditPart) {
parts.add((TalendDrawerEditPart) editpart);
}
}
parent = parent.getParent();
}
for (int i = parts.size() - 1; i >= 0; i--) {
parts.get(i).setExpanded(true);
}
}
Aggregations