use of org.eclipse.gef.DefaultEditDomain in project tdi-studio-se by Talend.
the class TalendPaletteContextMenuProvider method isComponentsTypePalette.
// public TalendPaletteContextMenuProvider() {
//
// }
protected boolean isComponentsTypePalette(ComponentCategory componentCategory) {
if (componentCategory == null) {
return false;
}
EditDomain editDomain = getPaletteViewer().getEditDomain();
if (editDomain == null || !(editDomain instanceof DefaultEditDomain)) {
return false;
}
IEditorPart editorPart = ((DefaultEditDomain) editDomain).getEditorPart();
if (editorPart == null || !(editorPart instanceof AbstractTalendEditor)) {
return false;
}
IProcess2 process = ((AbstractTalendEditor) editorPart).getProcess();
if (process == null) {
return false;
}
return componentCategory.getName().equals(process.getComponentsType());
}
Aggregations