Project: Eclipse_Platform_UI
Bug 304199 [Path Variables] Second review pass for Dynamic Path Variables API
Reported: 2010-03-01 08:01:29 | Status: verified fixed

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...

Files changed in fix:
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ImportTypeDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/PathVariableSelectionDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CreateLinkedResourceGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEResourceInfoUtils.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourceEditor.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariableDialog.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariablesGroup.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ImportOperation.java