use of org.talend.designer.mapper.model.table.TMAP_LOOKUP_MODE in project tdi-studio-se by Talend.
the class InputDataMapTableView method addToolItems.
/*
* (non-Javadoc)
*
* @see org.talend.designer.mapper.ui.visualmap.table.DataMapTableView#addEntriesActionsComponents()
*/
@Override
protected boolean addToolItems() {
// TODO: unlock this tentatively.
if (!getInputTable().isMainConnection()) {
final InputTable table = getInputTable();
// condensed Item
condensedItem = new ToolItem(toolBarActions, SWT.CHECK);
// condensedItem.setEnabled(!mapperManager.componentIsReadOnly());
condensedItem.setSelection(table.isActivateCondensedTool());
condensedItem.setToolTipText("tMap settings");
initCondensedItemImage();
condensedItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
table.setActivateCondensedTool(condensedItem.getSelection());
showTableMapSetting(condensedItem.getSelection());
}
});
if (mapperManager.isPersistentMap()) {
TMAP_LOOKUP_MODE lookupMode = (TMAP_LOOKUP_MODE) table.getLookupMode();
switch(lookupMode) {
case LOAD_ONCE:
case LOAD_ONCE_AND_UPDATE:
case RELOAD:
persistentCheckEditable = true;
previousValidPersistentMode = table.isPersistent();
break;
case CACHE_OR_RELOAD:
persistentCheckEditable = false;
getInputTable().setPersistent(false);
break;
default:
break;
}
}
}
createActivateFilterCheck();
createColumnNameFilterCheck();
return true;
}
Aggregations