Le 30 juin 2010 à 20:12, Nicolas Roard a écrit :

> On Wed, Jun 30, 2010 at 9:16 AM, David Chisnall <csda...@swan.ac.uk>  
> wrote:
>> Trampoline!
>>
>> I was thinking a little bit about frameworks and IDE integration.   
>> I think XCode actually already does something like this secretly,  
>> but I've not looked at how it works...
>>
>> With autogsdoc, document generation is a two-stage process.  Step 1  
>> generates some XML.  Step 2 transforms this into some HTML.  I  
>> originally suggested to Quentin that we should store the HTML in  
>> the .framework bundle, but I wonder if it would be more sensible to  
>> store the XML.
>>
>> We could then display method documentation trivially in the class  
>> browser in CodeMonkey.  For Smalltalk bundles, we could edit the  
>> XML directly in CodeMonkey, rather than having it interleaved in  
>> the source code.

Having arbitary views constructed on-demand to edit the code makes  
sense. We can build this kind of UI views if the IDE has access to the  
AST and hides/shows some parts of the AST. But if the IDE is that  
flexible, then whether the API documentation is embedded in the code  
or stored separately doesn't really matter I think.

It's probably a bit harder to store the API doc in XML, since there is  
a need to update the XML when methods/classes/vars are moved/inserted/ 
removed. The synchronization need could be minimized with a XML format  
where every methods/classes/vars are identified by UUID, but then this  
XML would be harder to edit directly.
The other downside I see is that you cannot edit the Smalltalk code  
directly (without CodeMonkey), otherwise the doc becomes outdated e.g.  
If a method is renamed, you have no easy way to detect what to updates  
in the XML the next time you run CodeMonkey. It's probably easy to  
detect the renaming of a single method but when multiple renaming  
occurs it is going to be impossible (unless we leverage the CoreObject  
history but that sounds really complex when there is no need to).

> the XML is more useful for tools, the HTML more useful for humans (and
> we can generate the HTML ...). If we have to choose one, use the XML,
> otherwise put both ?

I agree it's probably worth to package both.

Cheers,
Quentin.
_______________________________________________
Etoile-dev mailing list
Etoile-dev@gna.org
https://mail.gna.org/listinfo/etoile-dev

Reply via email to