Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333047

Summary: ROV Path mapping fails for Windows-to-Windows
Product: [Technology] RTSC Reporter: Chris McCormick <c-mccormick>
Component: RtaAssignee: Branavan Karunamoorthy <b-karunamoorthy>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: d-russo, dfriedland
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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());
    }