zgauthier8286 / chromedevtools

Automatically exported from code.google.com/p/chromedevtools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

Original issue reported on code.google.com by Wat...@gmail.com on 10 Feb 2012 at 10:39

GoogleCodeExporter commented 8 years ago
Could you please provide more details? Also it's not clear what "inverse" is.

Original comment by peter.ry...@gmail.com on 10 Feb 2012 at 5:44

GoogleCodeExporter commented 8 years ago
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?

Original comment by Wat...@gmail.com on 12 Feb 2012 at 9:38

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

Original comment by peter.ry...@gmail.com on 14 Feb 2012 at 1:46

GoogleCodeExporter commented 8 years ago
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

Original comment by Wat...@gmail.com on 14 Feb 2012 at 7:48

GoogleCodeExporter commented 8 years ago

Original comment by peter.ry...@gmail.com on 14 Feb 2012 at 8:40

GoogleCodeExporter commented 8 years ago
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

Original comment by peter.ry...@gmail.com on 16 Mar 2012 at 12:17

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

Original comment by Wat...@gmail.com on 16 Mar 2012 at 6:40