@Override
	public void addProposals(String start, List<ModuleDescriptor> parseResult, CompletionKind kind, int detailLevel,
			List<String> proposals) {
		// List is in reverse order
		ModuleDescriptor lastModule = parseResult.get(0);
		ModuleType lastModuleType = lastModule.getType();

		// For full streams, add processors and sinks
		if (kind == stream && lastModuleType != ModuleType.sink) {
			addAllModulesOfType(start.endsWith(" ") ? start + "| " : start + " | ", processor, proposals);
			addAllModulesOfType(start.endsWith(" ") ? start + "| " : start + " | ", sink, proposals);
		}

		// For composed modules, don't go up to sink if we started with a source
		ModuleDescriptor firstModule = parseResult.get(parseResult.size() - 1);
		ModuleType firstModuleType = firstModule.getType();
		if (kind == module && lastModuleType != ModuleType.sink) {
			addAllModulesOfType(start.endsWith(" ") ? start + "| " : start + " | ", processor, proposals);
			if (firstModuleType != source) {
				addAllModulesOfType(start.endsWith(" ") ? start + "| " : start + " | ", sink, proposals);
			}
		}

	}
Construct a new PipeIntoOtherModulesExpansionStrategy given a ModuleDefinition repository.

@param moduleRegistry the registry to check for the existence of the last entered module
       definition.
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/stream/completion/PipeIntoOtherModulesExpansionStrategy.java