You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Geoff Longman <gl...@intelligentworks.com> on 2003/01/30 02:02:15 UTC
OUCHIER
Handling the spec/template location is a huge job for sure
But I have a more pressing problem where Eclipse land conflicts with servlet land.
IResourceLocation deals with URLs and that makes perfect sense in an app deployed into a servlet container.
However, this makes no sense in Eclipse land as the resources in the project are represented as abstractions.
So when I need to call into the Specification Parser I already have the Eclipse object (IResource or IStorage if its in Jar file) and I can just ask for an InputStream.
The old calls into SpecParser took an InputStream but now with IResourceLocation I'm sunk. I agree with the thinking that gave rise to IResourceLocation, just trying to come up with a way to keep Spindle working...
Some suggestions:
1. Add a getInputSource method to IResourceLocation that returns the InputSource the parser is looking for.
2. Add a getInputStream method to IResourceLocation, then the parser can still build the source.
3. Wonder if it could be possible to separate the work of parsing the source into a DOM and then converting the DOM into Tapestry specifications. i.e. a 'Parser' and a 'Converter'. Thus I could extend AbstractDocumentParser (or even replace it) to do what I need.
#3 could even help with the "line numbers for errors" thing I was talking about earlier. Say for instance I provided my own parser that created a DOM (subclasses of the w3c stuff) that stores the locations of each element in the DOM, if the 'converter' threw an exception and included the node in question in that exception, Spindle would have all the info it could need to mark up the editor with the errors.
Pretty large impact to the codebase though... thoughts?
Geoff
Geoffrey Longman
Intelligent Works Inc.