[MonoDevelop] Code Templates

Michael Hutchinson m.j.hutchinson at gmail.com
Sun Feb 4 21:31:34 EST 2007


On 2/5/07, John Anderson <sontek at gmail.com> wrote:
> I noticed you added a namespace to the code behind, This wont work because
> the partial class that gets generated along with it doesn't have a namespace
> on it.

That complicates things. The CodeTranslationFile uses CodeDom, which
insists on having everything inside namespaces. If a class is outside
a namespace, it put it inside a default one, which can very between
languages (I think) and is presumably is the same one that the actual
master page ends up with. Removing it cleaning from the generated code
is going to be difficult.

Also, the CodeBehind binding gets confused, because it uses class
parsing to associate the files, but that can't be used in this case. I
hadn't realised that the "Inherits" attributes means something
different in the partial class "CodeBeside" model.

I'll need to rethink CodeBehind binding, so that it can work with
CodeBeside as well as CodeBehind. This may take some time. For now
I'll commit a quick fix to disable it.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list