Bug 305161 Dynamic Path Variable ui.ide API review
Dynamic Path Variable ui.ide API review
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ImportTypeDialog.java
paths[i] = sources[i].getLocation();
		}
		return getPreferredVariable(paths, target);
	}
	/**
	 * Return the most appropriate path variable given the context
	 * @param names
	 * 		The list of files that were dragged
	 * @param target
	 * 		The target container onto which the files were dropped
	 * @return the most appropriate path variable given the context
	 */
	private static String getPreferredVariable(String[] names,
			IContainer target) {
		IPath[] paths = new IPath[names.length];
		for (int i = 0; i < names.length; i++) {
			paths[i] = Path.fromOSString(names[i]);
		}
		return getPreferredVariable(paths, target);
	}
	/**
	 * Select the most appropriate mode that should be used for the dialog given
	 * the items dropped on the container, the container type, and the drop operation.
	 *
	 * @param dropOperation
	 * @param resources
	 * 		The list of items that were dragged
	 * @param target
	 * 		The target container onto which the items were dropped
	 * @return the appropriate import mask given the files dropped on the target