|
Not a big deal but sometime, you have classes that do not have id so may
be we could have two constructor templates ?
Also, in writeXMLAttributes, you don't need to do
// attributes.remove("validationXMLAllchecks");
for each attribute, only for the attribute that are already present in
the extended core classes.
So only for id and name in fact. We could do an AbstractExtNamedSBase
that would implement only the
writeXMLAttributes for id and name so that we don't need to do that on
every NamedSBase in the extensions.
It is still on my todo list to update the user guide about these
read/write XML attributes methods btw, I haven't forgotten :-)
Nico
On 24/04/12 10:54, Finja Büchel wrote:
> Hi Mike,
>
> thanks for your feedback. I like the idea of combining all templates in
> one folder. The folder dev and subfoler eclipse would be fine for me. If
> nobody is against creating such a folder, I will create and commit it at
> the end of the week. Additionally, I will include a README.txt, because
> we have four different templates. Unfortunately, we can't combine them
> in one file:
>
> 1) the core/files/java.java contains the header which should be included
> in all java class files. We can also delete this file, because if
> everybody includes the core/files/codetemplates.xml (see next point 2)
> the header is also included. But I'm not sure if everybody includes this
> template...
>
> 2) the core/files/codetemplates.xml can be included in eclipse under the
> project properties in "Java" -> "Code Style" -> "Code templates". The
> file defines the header and some standard comments.
>
> 3) the core/files/SBML_Project_Java_style_for_Eclipse_3.6.xml should be
> included in "Java" -> "Code Style" -> "Formatter".
>
> 4) the core/doc/templates should be included in "Java" -> "Editor" ->
> "Templates", and can be used for easy code creation.
>
> While creating the templates Florian and I observed that the code isn't
> indented properly. Did you see other coding style mistakes?
>
> We tried to fix the indentation problem, but found no other solution
> than pressing "ctr + Shift + F" after automatic code generation.
> Especially, if we started templates with a variable declaration the
> indentation was even worse. That's the reason for defining the variables
> at the end of the "JSBML_Constructors"-template. If somebody has a
> solution for this problem I would be happy to change the templates.
>
> Best wishes,
> Finja
>
>
>
>
> Am 23.04.2012 19:06, schrieb Michael Hucka:
>> Hi,
>>
>> Thanks for doing this! This is a great start, and I'd like to ask for a few changes that I think would make this even better:
>>
>> 1) There were already some templates in core/files/codetemplates.xml. Could the new templates be merged or somehow integrated with the old ones?
>>
>> 2) The new templates don't actually seem to follow the coding style established by core/files/SBML_Project_Java_style_for_Eclipse_3.6.xml. Could they be updated, to be consistent? (To be clear, I'm not so much requiring that we stick to this proposed coding style as I am requesting adherence to *some* style. )
>>
>> 3) Neither location (core/files/ and doc/templates/) seems best for Eclipse configuration files like this. I'd like to propose that we introduce a directory "dev" within "core" at the same level as "doc" and "files", and then have "eclipse" within that:
>>
>> dev/
>> eclipse/
>> doc/
>> files/
>> lib/
>> …
>>
>> (Unless people can think of an even better location.) The reason is that these files are not really documentation files (so don't belong in "doc") and since there are now two of them (the templates and the code style for Eclipse), it seems like they should go in their own subdirectory. The name "dev" makes it more clear what this is for, and in the future, there might be other things that go into "dev". While we are at it, I think I would remove doc/templates altogether, because the only other file in there is subsumed by the Eclipse code templates.
>>
>> Thanks,
>> MH
>> --
>> Mike Hucka, Ph.D. -- mhucka@caltech.edu -- http://www.cds.caltech.edu/~mhucka
>> Computing and Mathematical Sciences, California Institute of Technology,
>> Pasadena, California, USA -- Twitter: @mhucka -- Skype: michaelhucka
>>
>>
>> On Mon, 16 Apr 2012 15:48:04 +0200, Finja Büchel wrote:
>>> Hi everybody,
>>>
>>> Florian and I implemented some JSBML templates for eclipse to facilitate
>>> programming of new JSBML classes. We created templates for the standard
>>> constructors, get-, set-, unset- methods for class variables, methods
>>> for ListOf element handling and XML attribute writing.
>>>
>>> The template xml can be found in core/doc/templates/JSBML_templates.xml.
>>>
>>> Just import the templates in your eclipse project templates.
>>>
>>> We are looking forward to some feedback.
>>>
>>> Best wishes
>>> Florian and Finja
>>>
>>>
>>> --
>>> Dipl.-Inform. (Bioinform.) Finja Büchel
>>> Eberhard-Karls-Universität Tübingen
>>> Lehrstuhl Kognitive Systeme
>>> Sand 1
>>> 72076 Tübingen
>>> Germany
>>>
>>> Tel: (+49/0) 7071 / 29 70436
>>> Fax: (+49/0) 7071 / 29 5091
>>> finja.buechel@uni-tuebingen.de
>>> ____________________________________________________________
>>> To manage your jsbml-development list subscription, visit
>>> https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
>>>
>>> For a web interface to the jsbml-development mailing list, visit
>>> http://sbml.org/Forums/
>>>
>>> For questions or feedback about the jsbml-development list,
>>> contact sbml-team@caltech.edu
>> ____________________________________________________________
>> To manage your jsbml-development list subscription, visit
>> https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
>>
>> For a web interface to the jsbml-development mailing list, visit
>> http://sbml.org/Forums/
>>
>> For questions or feedback about the jsbml-development list,
>> contact sbml-team@caltech.edu
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|