Menu

#61 Provide an extension point to have custom local file -> script mapping

Accepted
nobody
None
Medium
Defect
2012-03-15
2012-02-10
Anonymous
No

Originally created by: Wat...@gmail.com

SDK/Debugger version: 3.2
Eclipse version:3.7.1.
Google Chrome/V8 Embedder + version:
OS + version: Linux

Currently only the inverse is possible with a custom SourceContainer. It would be useful to be able to specify a mapping from local file to chrome loaded js file

Discussion

  • Anonymous

    Anonymous - 2012-02-10

    Originally posted by: peter.ry...@gmail.com

    Could you please provide more details? Also it's not clear what "inverse" is.

     
  • Anonymous

    Anonymous - 2012-02-12

    Originally posted by: Wat...@gmail.com

    Apologies for being unclear.

    In our project we have the following structure of js files:

    - x/y/z/a.js
    - x/y/b.js

    etc...

    where every folder constitutes to a package name. In the web ui however, these files are returned as x.y.z.a.js and x.y.b.js. This is not what the dev tools eclipse plugin expects.

    So now we have two issues:
    1) How do I map from x.y.b.js to x/y/b.js
    2) How do I map from x/y/b.js to x.y.b.js

    Issue nr.1 is currently solvable by providing a custom SourceContainer which takes in the x.y.b.js string and maps it to the correct subfolder and file.

    Issue nr.2 is not solvable by usage of extension points and can only be solved by modifying the original code. I currently use the "Auto-detect" option, but that runs into issues when I have similarly named javascript files which reside in different packages.

    Does that make the issue somewhat clearer?

     
  • Anonymous

    Anonymous - 2012-02-13

    Originally posted by: peter.ry...@gmail.com

    So I understand you're asking about programming API and you are OK to implement container and mapping yourself? Is it correct?

     
  • Anonymous

    Anonymous - 2012-02-13

    Originally posted by: Wat...@gmail.com

    Hi,

    as said, the container I have already implemented as this was an extension point provided by eclipse. This then can be added over the Source tab in the settings.

    I would still require the API (an extension point preferably) so that I can map local files to javascript files in the vm uniquely.

    Hopefully that makes sense

     
  • Anonymous

    Anonymous - 2012-02-14

    Originally posted by: peter.ry...@gmail.com

    (No comment was entered for this change.)

    Status: Accepted

     
  • Anonymous

    Anonymous - 2012-03-15

    Originally posted by: peter.ry...@gmail.com

    Wattos,

    could you please take a look at this change:
    https://chromiumcodereview.appspot.com/9704071/

    Hopefully it provides an interface that you need. You only have to implement ReverseLookupContainer in your container class.

    Peter

     
  • Anonymous

    Anonymous - 2012-03-15

    Originally posted by: Wat...@gmail.com

    Will try it out and let you know as soon as possible. Thanks for taking the time to implement this!

     

Log in to post a comment.