Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333047 - ROV Path mapping fails for Windows-to-Windows
Summary: ROV Path mapping fails for Windows-to-Windows
Status: ASSIGNED
Alias: None
Product: RTSC
Classification: Technology
Component: Rta (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Branavan Karunamoorthy CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-21 19:02 EST by Chris McCormick CLA
Modified: 2015-06-02 21:01 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris McCormick CLA 2010-12-21 19:02:49 EST
The code which supports path mapping for ROV and RTA using the 'Common Source Lookup Path' dialog doesn't work when used to map one Windows path to another, though it does work for mapping a Linux path to a Windows one. 

To reproduce this, I mapped a network folder to V:\ and built an example on Windows in a workspace on V:\. Then, I switched the mapping of that folder to P:\, and added a path map in CCS from V:\ to P:\. I then loaded the example in CCS and tried to open ROV, but the path mapping logic failed to map V:\ to P:\.

In this use case, the path mapping dialog returns an object of type org.eclipse.core.internal.resources.File, whereas in the Linux mapping it returns an object of type org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage. Only LocalFileStorage is currently supported by the path mapping logic; I need to add support for 'File', and hopefully make this logic more robust against this type of error.
Comment 1 Dave Russo CLA 2012-05-14 16:06:47 EDT
In (rov-f06) com.ti.rta.support/src/com/ti/rta/support/file/FileLookup.java:

    /* Only look at the results which are of type 'LocalFileStorage' */
    if (result[i] instanceof LocalFileStorage) {
        /* Get the file path from the object. */
        try {
            validPath = 
                ((LocalFileStorage) result[i]).getFile().getCanonicalPath();
        } catch (IOException e) {
            e.printStackTrace();
            return (null);
        }
    }
    else {
        System.out.println("FileLookup - Received result of type " 
            + result[i].getClass());
    }