use of org.talend.components.api.wizard.ComponentWizard in project tdi-studio-se by Talend.
the class GenericDragAndDropHandler method getComponentMainName.
private String getComponentMainName(GenericConnection connection) {
IGenericWizardInternalService internalService = new GenericWizardInternalService();
ComponentWizard componentWizard = null;
String compPropertiesStr = connection.getCompProperties();
if (compPropertiesStr != null) {
ComponentProperties properties = ComponentsUtils.getComponentPropertiesFromSerialized(compPropertiesStr, connection);
if (properties != null) {
componentWizard = internalService.getTopLevelComponentWizard(properties, null);
}
}
if (componentWizard != null) {
return StringUtils.capitalize(componentWizard.getDefinition().getName());
}
return null;
}
Aggregations