Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
File URL To Chrome/Resource URL
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Edmond Begumisa  
View profile  
 More options Dec 29 2011, 10:06 am
Newsgroups: mozilla.dev.apps.js-debugger
From: "Edmond Begumisa" <0434336...@iprimus.com.au>
Date: Fri, 30 Dec 2011 02:06:16 +1100
Local: Thurs, Dec 29 2011 10:06 am
Subject: File URL To Chrome/Resource URL
Hello all,

I'm working on an extension to link Venkman to Komodo with the aim of  
providing local and remote debugging of XULRunner applications. Small  
question...

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?

I'm currently painfully walking through the ChromeML directory service,  
reading manifests from disk, parsing them, then doing regex trickery to  
construct a dictionary of file URIs to compare to but I'm sure someone  
must have already found an easier way deep in the Mozilla code.

Thanks in advance.

- Edmond -

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Smedberg  
View profile  
 More options Dec 29 2011, 10:41 am
Newsgroups: mozilla.dev.apps.js-debugger
From: Benjamin Smedberg <benja...@smedbergs.us>
Date: Thu, 29 Dec 2011 10:41:31 -0500
Local: Thurs, Dec 29 2011 10:41 am
Subject: Re: File URL To Chrome/Resource URL
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. I'd accept a patch which
hands back a list of the current set of chrome package mappings.

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.

--BDS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Edmond Begumisa  
View profile  
 More options Dec 29 2011, 11:16 am
Newsgroups: mozilla.dev.apps.js-debugger
From: "Edmond Begumisa" <0434336...@iprimus.com.au>
Date: Fri, 30 Dec 2011 03:16:13 +1100
Local: Thurs, Dec 29 2011 11:16 am
Subject: Re: File URL To Chrome/Resource URL
On Fri, 30 Dec 2011 02:41:31 +1100, Benjamin Smedberg  

<benja...@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

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »