Bug 160960 - [Decorators] org.eclipse.ui.ide.internal.LinkedResourceDecorator always decorates links referencing non-local IFileStore URI with warning decoration
Summary: [Decorators] org.eclipse.ui.ide.internal.LinkedResourceDecorator always decor...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.2.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2006-10-14 09:04 EDT by John O'Shea CLA
Modified: 2019-09-06 16:10 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John O'Shea CLA 2006-10-14 09:04:28 EDT
LinkedResourceDecorator.decorate() always decorates links to non-local filestore URIs with a warning decoration (in the bottom right corner).  

The implementation of this method uses IResource.getLocation() which returns null for non-local filestore URIs, causing the subsequent if() to add the warning decoration:

IPath location = resource.getLocation();

if (location != null && location.toFile().exists()) {
	decoration.addOverlay(LINK);
} else {
	decoration.addOverlay(LINK_WARNING);
}

Perhaps it should use IResource.getLocationURI() and an EFS API (EFS.getStore(URI).fetchInfo().exists()) rather than location.toFile().exists() to determine if the resource actually exists?

To reproduce:

To reproduce this:

1) Install a non-local filesystem EFS extension.  The example below uses the
HTTP IFileStore implementation listed at
http://wiki.eclipse.org/index.php/EFS#HTTP

2) Create a project with the following descriptor (.project file):

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
        <name>linktest</name>
        <comment></comment>
        <projects>
        </projects>
        <buildSpec>
        </buildSpec>
        <natures>
        </natures>
        <linkedResources>
                <link>
                        <name>index.html</name>
                        <type>1</type>
                       
<locationURI>http://www.eclipse.com/index.html</locationURI>
                </link>
        </linkedResources>
</projectDescription>

Note the warning icon in the bottom right corner of the link resource.
Comment 1 Susan McCourt CLA 2009-07-15 11:50:27 EDT
"As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009"
Comment 2 Boris Bokowski CLA 2009-11-17 10:54:08 EST
Oleg is now responsible for watching the [Decorators] category.
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:10:39 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.