Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[atf-dev] accessing non-workspace resources

hi there,

there's an interesting bug in ATF queue:
285596: Adding a breakpoint impossible for files outside of Eclipse workspace
https://bugs.eclipse.org/bugs/show_bug.cgi?id=285596

Most of time when debugging, we'd like to do some advanced things with resources not in our workspace, but are identified by some URL. For example we'd like to put there breakpoints (markers) or examine URL content-type to open it in correct editor. From Eclipse APIs perspective this falls under Resources API, so we'd have to make that URLs look like workspace resources.
So here we come to questions:

1. Where should we take the resource information
a) perform HTTP requests
-> This can be risky because second HTTP request can be confusing to server and end up failing, ot we might get different data if file is generated on the fly. b) query Mozilla cache/internals/API to get the file that is rendered without any extra HTTP requests
c) any alternative?

2. When do we update resources? Because they're not in workspace, we don't get any change notifications a) listen to Mozilla to catch any refresh actions invoked by user and update resources accordingly
b) everytime when accessing resource
c) any alternative?

3. How do we make non-workspace being look like workspace resources?
a)  implement Eclipse File System (EFS)
b) create hidden project and cache resources there
c) any alternative?

So far, I've been experimenting with EFS and it's not very difficult to implement some simple filesystem there, however it has rather tiny documentation and here and there I'm finding new extra requirements. For example, to make EFS actually work you still have to create a project in workspace with location set to the same scheme as your virtual FS.

For now, I'm going to work on EFS approach (3a.) and try to get as much information as possible from Mozilla (1b. and 2a.), however if anyone has any opinions or sees better approach (e.g. other way to implement breakpoint, than via IMarker and IResource) - pls speak up.

thanks!


Jacek




Back to the top