On Fri, 30 Dec 2011 02:41:31 +1100, Benjamin Smedberg
<
benj...@smedbergs.us> wrote:
> On 12/29/2011 10:06 AM, Edmond Begumisa wrote:
>>
>> nsIChromeRegistry::convertChromeURL and
>> nsIResProtocolHandler::resolveURI provide a convenient way of getting a
>> local file path from chrome:* and registry:* URIs. Anyone know of an
>> equally easy way of doing the opposite?
>>
>> That is, finding the first chrome: or resource: URI resolving to a
>> particular local file: URI?
> The chrome registry does not expose a list of chrome packages, so no,
> there is currently no builtin way to do this.
Too bad.
> I'd accept a patch which hands back a list of the current set ofchrome
> package mappings.
>
What I have is all JavaScript in form of a Venkman plugin + Komodo
Extension :(
I'll see if I can find the time to port the registry part when it's all
done.
> The resource registry is even more "interesting" because there are cases
> where resource mappings are looked up dynamically (from the directory
> service) and so we don't even know the list of resource mappings until
> somebody tries to load from them.
Ahh, I see, and there's also nsIResProtocolHandler::setSubstitution to
deal with.
Luckily this is not a problem for my case because the reverse resolving is
only needed on the editor side not the debugger/XULRunner side. I figure
if the editor has the manifests in it's registry, resolves currently open
local files, then sends the resource URI to Venkman, Venkman should be
able to set breakpoints etc in 95% of the cases.
Thanks.
- Edmond -
>
> --BDS