Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 122825 - Ant "Open With" support for imports etc no longer works
Summary: Ant "Open With" support for imports etc no longer works
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-05 17:35 EST by Darin Swanson CLA
Modified: 2006-01-09 14:09 EST (History)
2 users (show)

See Also:


Attachments
simpleCommon.xml (288 bytes, text/plain)
2006-01-09 12:53 EST, Darin Swanson CLA
no flags Details
smipleCommon2.xml (304 bytes, text/plain)
2006-01-09 12:55 EST, Darin Swanson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2006-01-05 17:35:34 EST
The Open With menu is not presented for imported elements as the corresponding IFile is not resolved. 

The IFile is not found due to differences in case for the device.

I have to double check but I am pretty sure the same test case worked fine on 3.1.
Comment 1 Darin Swanson CLA 2006-01-05 19:34:03 EST
Requesting help here.
Same test case works fine in 3.1.

The "problem" is occuring as the case is different for the device in FileSystemResourceManager.allPathsForLocation between the testLocation and the location. So testLocation.relativize(location) "fails" and the path is not found.

I know next to nothing about URI. I have attempted normalization of a URI but this  had no impact on the case of the drive letter.
Comment 2 John Arthorne CLA 2006-01-09 10:51:30 EST
I'll investigate... can you give a little snippet that illustrates the problem?  I.e., what core API call are you using?
Comment 3 Darin Swanson CLA 2006-01-09 11:41:44 EST
The code that is failing is in AntUtil.getFileForLocation which uses:
 IFile[] files=   ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(filePath); on line 529.
Comment 4 John Arthorne CLA 2006-01-09 12:04:15 EST
I believe I have a fix... how can I verify this in the Ant tooling?
Comment 5 Darin Swanson CLA 2006-01-09 12:50:20 EST
I would be happy to try out a patch and I will attach a test case to this bug report.
Comment 6 Darin Swanson CLA 2006-01-09 12:53:14 EST
Created attachment 32687 [details]
simpleCommon.xml
Comment 7 Darin Swanson CLA 2006-01-09 12:55:18 EST
Created attachment 32688 [details]
smipleCommon2.xml

Bring these two files into Eclipse and place in the same folder.
From simpleCommon.xml Outline, right clicking on externaltarget2 should present Open With
Comment 8 John Arthorne CLA 2006-01-09 14:09:52 EST
Thanks, that test works for me.  Fix released to HEAD.