Source:
<code>private IRepositoryTypeProcessor createTypeProcessor() { for (IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) { IRepositoryTypeProcessor processor = handler.getRepositoryTypeProcessor(repositoryType); if (processor != null) { return processor; } } String componentName = null; String[] listItemsDisplayName = null; if (this.elem != null && (this.elem instanceof INode)) { componentName = ((INode) elem).getComponent().getName(); IElementParameter elementParameter = ((INode) elem).getElementParameter("DBTYPE"); <START> listItemsDisplayName = elementParameter.getListItemsDisplayName(); <END> } boolean isGeneric = false; if(this.elem != null && (this.elem instanceof INode) && ((INode)elem).getComponent().getComponentType() == EComponentType.GENERIC){ isGeneric = true; } if (repositoryType != null && repositoryType.contains("|")) { String[] repTypes = repositoryType.split("\\|"); IRepositoryTypeProcessor hadoopTypeProcessor = getHadoopSubMultiRepTypeProcessor(repTypes); if (hadoopTypeProcessor != null) { return hadoopTypeProcessor; } } if (type == null && repositoryTypes != null) { return new MetadataMultiTypeProcessor(repositoryTypes); } if (type == ERepositoryObjectType.PROCESS) { return new JobTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA) { return new RepositoryTypeProcessor(repositoryType, isGeneric, componentName, listItemsDisplayName); } if (type == ERepositoryObjectType.METADATA_CON_TABLE) { return new SchemaTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA_CON_QUERY) { return new QueryTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA_SAP_FUNCTION) { return new SAPFunctionProcessor(repositoryType); } if (type == ERepositoryObjectType.CONTEXT) { return new ContextTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA_HEADER_FOOTER) { return new HeaderFooterTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA_VALIDATION_RULES) { return new ValidationRuleTypeProcessor(repositoryType, elem); } throw new IllegalArgumentException(Messages.getString("RepositoryReviewDialog.0", type)); }</code><technical_language><LINK_0> reuse code in PropertyTypeController instead of</technical_language>

Target:
private IRepositoryTypeProcessor createTypeProcessor() { for (IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) { IRepositoryTypeProcessor processor = handler.getRepositoryTypeProcessor(repositoryType); if (processor != null) { return processor; } } boolean isGeneric = false; if(this.elem != null && (this.elem instanceof INode) && ((INode)elem).getComponent().getComponentType() == EComponentType.GENERIC){ isGeneric = true; } if (repositoryType != null && repositoryType.contains("|")) { String[] repTypes = repositoryType.split("\\|"); IRepositoryTypeProcessor hadoopTypeProcessor = getHadoopSubMultiRepTypeProcessor(repTypes); if (hadoopTypeProcessor != null) { return hadoopTypeProcessor; } } if (type == null && repositoryTypes != null) { return new MetadataMultiTypeProcessor(repositoryTypes); } if (type == ERepositoryObjectType.PROCESS) { return new JobTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA) { return new RepositoryTypeProcessor(repositoryType, isGeneric); } if (type == ERepositoryObjectType.METADATA_CON_TABLE) { return new SchemaTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA_CON_QUERY) { return new QueryTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA_SAP_FUNCTION) { return new SAPFunctionProcessor(repositoryType); } if (type == ERepositoryObjectType.CONTEXT) { return new ContextTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA_HEADER_FOOTER) { return new HeaderFooterTypeProcessor(repositoryType); } if (type == ERepositoryObjectType.METADATA_VALIDATION_RULES) { return new ValidationRuleTypeProcessor(repositoryType, elem); } throw new IllegalArgumentException(Messages.getString("RepositoryReviewDialog.0", type)); }