[SrcML] de.srcml.dom.supports package
Status: Beta
Brought to you by:
crashchaos
From: Frank R. <fra...@un...> - 2005-11-20 00:28:20
|
On Sat, Nov 19, 2005 at 02:37:11PM +0100, Frank Raiser wrote: > Good idea. Hm... we could flag those elements which can have names with > an ISupportsName interface with the implementation checking against > keyords and reserved words then before setting the name attribute. But > that's something totally different again :) I've added the keywords and reserved words yesterday and finished adding ISupportsNames now. There's now a new package de.srcml.dom.supports available which holds the various ISupports* Interfaces. These interfaces are used for all DOM classes which share certain concepts and make them easily accessible through the API. This is supposed to avoid the need for developers to work directly on the DOM tree (or once it's matured further to even avoid knowing the structure of that tree). Also consistency checks of any kind can be enforced better when these methods are used. [1] Currently there's only the following interfaces available: ISupportsModifiers ISupportsMethods ISupportsName There's also ISupports*Impl classes with default implementations available in the same package. I'm currently planning to add the following interfaces too: ISupportsBaseclasses ISupportsInterfaces ISupportsVariables probably ISupportsJavadoc and ISupportsComment too If there are any other important concepts which should have extended support through another such interface and you think it should be added too please let me know in a reply to this mail. Of course every tiny little idea of every programming language could be made into one of those interfaces, but I'm looking for those for which at least a few of our current classes in de.srcml.dom are applicable. [1] For example setting a name for an object implementing ISupportsName will check if the given name is a keyword in the target language and refuse to set it (returning false and logging the problem) PS: Leif informed me that after the last major change of the ViewJava plugin I forgot to run it through the whole srcml module again. This was done today and while unit tests worked fine on my machine here I cannot guarantee that the current CVS state is ok. I'd like to get some feedback here from someone else to see if the current CVS version compiles and the unit tests work if possible. -- Raiser, Frank Student @ University of Ulm (www.uni-ulm.de) When you are a Bear of Very Little Brain, and you Think of Things, you find sometimes that a Thing which seemed very Thingish inside you is quite different when it gets out into the open and has other people looking at it. (A A Milne) |