[MonoDevelop] Re: Reformat source file
Jacob Ilsø Christensen
jacobilsoe at gmail.com
Sat Jun 11 00:32:52 EDT 2005
On 6/10/05, John Luke <john.luke at gmail.com> wrote:
> Jacob Ilsø Christensen wrote:
>
> >Hi.
> >
> >I am starting out with just coding reformat file. Then I will do the
> >other stuff.
> >I have run into an issue though.
> >
> >Suppose you have the following:
> >
> >1: namespace NS
> >2: {
> >3:
> >4: }
> >
> >This should be (depending on how you have configured MD) formatted to:
> >
> >1: namespace NS
> >2: {
> >3:
> >4: }
> >
> >The problem is that the AST only contains information about where a
> >namespace declaration begins and ends (lines 1 and 4) not where the
> >contents of it begins and ends (line 2 and 4).
> >
> >
> Can you be more specific on why you need that info seperately? Why is
> it important to know where
> the content begins as you will be formatting it? (So you know where it
> will be)
Well, what I am doing is more an indenter than a formatter. So I just
want to indent line 2 correctly. And I have no information on line 2
in the AST. That's all.
/Jacob
>
> >I would like to extend the NamespaceDeclaration class with this
> >information. But this class resides in the ICSharpCode.SharpRefactory
> >namespace. Is it ok to change stuff there or is there still some
> >collaboration going on with ShardDevelop?
> >
> >
> It is ok to change stuff their when we need to. It is 95% the same as
> the SharpDevelop code but there is not really
> any collaboration going on here. They are probably rewriting it for C#
> 2.0 and we have not really decided what we will be doing yet.
>
More information about the Monodevelop-list
mailing list