Bug 304199 [Path Variables] Second review pass for Dynamic Path Variables API
Not too much time left for API freeze, thus I have a second look at this new API. Changes under review are: - IProject#getPathVariableManager - changes in IPathVariableManager - IPathVariable - PathVariableResolver (SPI) If I missed something, please let me know. 1. IPathVariable#isPreferred. I am not sure how this is computed? Is it set once per whole Eclipse session? Is it possible that we end up having two 'the same' IPathVariables, where one is preferred and another one is not? 2. We had a discussion once, that dynamic path variables API may be more flexible. Right now we can get the manager only for the workspace or a project. I think that more flexible API would be: IWorkspace#getPathVariableManager(IResource) which would return the manager for the given resource and only IWorkspace and IProject scopes would be supported now. Maybe we could add support for IFolder in M7? 3. I don't understand this IPathVariableManager#convertToRelative. Why do we pass IResource there? The same for IPathvariableManager#getVariableRelativePathLocation. I assume that URI is enough...
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEResourceInfoUtils.java
private static String BYTES_LABEL = IDEWorkbenchMessages.ResourceInfo_bytes;
	/**
	 * An empty string to reuse.
	 */
	public static final String EMPTY_STRING = ""; 
	private static String FILE_LABEL = IDEWorkbenchMessages.ResourceInfo_file;
	private static String FILE_NOT_EXIST_TEXT = IDEWorkbenchMessages.ResourceInfo_fileNotExist;
	private static String FILE_TYPE_FORMAT = IDEWorkbenchMessages.ResourceInfo_fileTypeFormat;
	private static String FOLDER_LABEL = IDEWorkbenchMessages.ResourceInfo_folder;
	private static String LINKED_FILE_LABEL = IDEWorkbenchMessages.ResourceInfo_linkedFile;
	private static String LINKED_FOLDER_LABEL = IDEWorkbenchMessages.ResourceInfo_linkedFolder;
	private static String VIRTUAL_FOLDER_LABEL = IDEWorkbenchMessages.ResourceInfo_virtualFolder;
	private static String VIRTUAL_FOLDER_TEXT = IDEWorkbenchMessages.ResourceInfo_isVirtualFolder;
	private static String MISSING_PATH_VARIABLE_TEXT = IDEWorkbenchMessages.ResourceInfo_undefinedPathVariable;
	private static String NOT_EXIST_TEXT = IDEWorkbenchMessages.ResourceInfo_notExist;
	private static String NOT_LOCAL_TEXT = IDEWorkbenchMessages.ResourceInfo_notLocal;
	private static String PROJECT_LABEL = IDEWorkbenchMessages.ResourceInfo_project;
	private static String UNKNOWN_LABEL = IDEWorkbenchMessages.ResourceInfo_unknown;
	/**
	 * Return whether or not the file called pathName exists.
	 * 
	 * @param pathName
	 * @return boolean <code>true</code> if the file exists.
	 * @see IFileInfo#exists()
	 */
	public static boolean exists(String pathName) {
		IFileInfo info = getFileInfo(pathName);
		if (info == null) {
			return false;