Bug 87856 [Commands] Last closed editor leaked due to reference by command manager
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterizedCommand.java
public static final Collection generateCombinations(final Command command)
			throws NotDefinedException {
		final IParameter[] parameters = command.getParameters();
		if (parameters == null) {
			return Collections
					.singleton(new ParameterizedCommand(command, null));
		}
		final Collection expansion = expandParameters(0, parameters);
		final Collection combinations = new ArrayList(expansion.size());
		final Iterator expansionItr = expansion.iterator();
		while (expansionItr.hasNext()) {
			final List combination = (List) expansionItr.next();
			while (combination.remove(null)) {
				
			}
			if (combination.isEmpty()) {
				combinations.add(new ParameterizedCommand(command, null));
			} else {
				final Parameterization[] parameterizations = (Parameterization[]) combination
						.toArray(new Parameterization[combination.size()]);
				combinations.add(new ParameterizedCommand(command,
						parameterizations));
			}
		}
		return combinations;
	}
	/**
	 * The base command which is being parameterized. This value is never
	 * <code>null</code>.
	 */