Community
Participate
Working Groups
Eclipse 3.3 on WinXP / Sun 1.6.0_01 Steps To Reproduce: 1.In physical file system, create C:\foo\bar\baz 2.Define a Path Variable: Window > Preferences > General > Workspace > Linked Resources Add: "WIND_HOME" -> C:\foo 3.Create a new simple project in empty workspace: File > New > Project, (General:Project), name=fooproj 4. Create a linked resource folder in the new project File > New > Folder, Advanced:Link, Variables:select WIND_HOME, Extend -> drill down till you get the Link WIND_HOME/bar Project Explorer expands contents below the linked resource properly. Right-click on the linked resource folder bar > Properties --> Error log shows two entries: "Must specify a URI scheme:WIND_HOME/bar" (org.eclipse.core.filesystem) "Must specify a URI scheme:WIND_HOME/bar" (org.eclipse.ui.ide) More information: In spite of the errors logged, everything else seems to work as expected, so I'm marking this issue as minor. We have seen the very same issue before and logged it as bug 180363 comment 1 which was originally about creating linked resources with variables. After fixing that issue, links can now be created with variables but the error still occurs when looking at properties of the resource. The same errors are logged in Eclipse 3.2.1, but we do not see them in Eclipse 3.1.2 so we think it's a regression introduced by EFS. Bug 182722 also seems similar, but this one is easier to reproduce and has fewer dependencies (no JDT involved). Bug 151965 is similar for deleted resources while here the resource exists. The contents of the .project file looks like this: <linkedResources> <link> <name>bar</name> <type>2</type> <locationURI>WIND_HOME/bar</locationURI> </link> </linkedResources>
I'm encountering this issue and it is serious enough from my perspective because it generates a lot of noisy errors in the error log. Attaching a patch for this issue for consideration. From what I can see the problem will not be easily fixed in the EFS itself. The patch I'm suggesting is in org.eclipse.ui.internal.ide.dialogs.IDEResourceInfoUtils in the getLocationText() method. Firstly, the call to getFileStore(<URI>) will always fail if a PATH variable is being used, so the resolved location should be passed to it instead. Secondly, if the resource is linked and is specified with a PATH variable, then the raw location should be used for the location text. The patch is created against the org.eclipse.ui.ide_3.3.1.M20070910-0800b tagged revision of this class.
Created attachment 104142 [details] Proposed change to fix 198091
consider for 3.4.1
John, +1 for 3.4.1, or do you see any risk in this change?
+1, this is low risk enough. However the attached patch is not efficient. It could be fixed without any additional method calls because all the information is already computed above.
Created attachment 111008 [details] patch with local variables to avoid unnecessary calls This is the patch I am going to commit.
Released to R3_4_maintenance. Thanks for the patch, David!