use of org.talend.cwm.compare.ui.actions.PopComparisonUIAction in project tdq-studio-se by Talend.
the class PopComparisonUIProvider method fillContextMenu.
@Override
public void fillContextMenu(IMenuManager menu) {
// MOD mzhao user readonly role on svn repository mode.
if (!isShowMenu()) {
return;
}
// TDQ-9394 hide all "Reload" menu.
if (isShowMenu()) {
return;
}
Object obj = ((TreeSelection) this.getContext().getSelection()).getFirstElement();
if (obj instanceof RepositoryNode) {
RepositoryNode node = (RepositoryNode) obj;
if (shouldShowReloadMenu(node)) {
String menuText = COMPAREDATABASE_MENUTEXT;
if (node instanceof DBTableFolderRepNode) {
menuText = COMPARETABLES_MENUTEXT;
} else if (node instanceof DBViewFolderRepNode) {
menuText = COMPAREVIEWS_MENUTEXT;
} else if (node instanceof DBColumnFolderRepNode) {
menuText = COMPARECOLUMNS_MENUTEXT;
}
menu.add(new PopComparisonUIAction(node, menuText));
}
}
}
Aggregations