use of org.talend.commons.ui.swt.advanced.dataeditor.commands.IExtendedTableCommand in project tdi-studio-se by Talend.
the class DynamicTabbedPropertySection method registerListenerForRefreshingSection.
/**
* amaumont Comment method "registerListenerForRefreshingSection".
*/
public void registerListenerForRefreshingSection() {
if (commandStackEventListener == null) {
DynamicTabbedPropertySection.commandStackEventListener = new CommandStackEventListener() {
@Override
public void stackChanged(CommandStackEvent event) {
int detail = event.getDetail();
if (lastPropertyUsed != null) {
if ((lastPropertyUsed.getElement() instanceof org.talend.designer.core.ui.editor.connections.Connection) && (event.getCommand() instanceof ChangeMetadataCommand) && (//
0 != (detail & CommandStack.POST_EXECUTE) || 0 != (detail & CommandStack.POST_REDO) || 0 != (detail & CommandStack.POST_REDO))) {
lastPropertyUsed.addComponents(true);
lastPropertyUsed.refresh();
}
if (0 != (detail & CommandStack.POST_UNDO) || 0 != (detail & CommandStack.POST_REDO)) {
if (event.getCommand() instanceof IExtendedTableCommand) {
lastPropertyUsed.refresh();
}
}
}
}
};
getCommandStack().addCommandStackEventListener(DynamicTabbedPropertySection.commandStackEventListener);
}
}
Aggregations