use of org.talend.core.ui.context.ContextManagerHelper in project tdi-studio-se by Talend.
the class UpdateContextParameterCommand method checkNewRepositoryParameters.
/**
* DOC hcw Comment method "checkAddedParameters".
*
* @param process
* @param names
*/
private void checkNewRepositoryParameters(IProcess2 process, Set<String> names) {
// add context in repository
ContextManagerHelper helper = new ContextManagerHelper(process.getContextManager());
Set<ContextItem> contextItemList = helper.getContextItems();
ContextItem item = (ContextItem) result.getParameter();
// this job contains the repository context group
if (contextItemList.contains(item)) {
ContextType contextType = getDefaultContextType(item);
for (String paramName : names) {
ContextParameterType contextParameterType = ContextUtils.getContextParameterTypeByName(contextType, paramName);
// check if there is a parameter with same name
// IContextParameter paramExisted = helper.getExistedContextParameter(contextParameterType.getName());
// if (paramExisted == null) {
helper.addContextParameterType(contextParameterType);
// }
}
}
ConnectionContextHelper.showContextGroupDialog(process, item, process.getContextManager(), names);
}
Aggregations