I wouldn't mind having IDEA (optionally) reformat the source code at the
time it is loaded into the editor. It would be nice if this was a
one-time expense. That is, IDEA would keep track of which files have
already been formatted so that it would not have to do it again. Of
course, it the file is re-fetched from version control, then it would
have to be re-formatted.
If you really wnted to do this correctly, you would have to keep two
formats: the team/project format and the programmer's format. When
fetching a file from version control, you would reformat according to the
programmer's desired format. When the programmer is ready to commit, you
would format the commited version into the team/project format before
committing. That way, all committed source is in the standard
team/project format and not any developer's individual format. If you
are in the middle of editing a file, have not yet committed it, and want
do an update to merge the latest version from the repository (which is in
the team/project format), the following would have to happen to avoid
potentially massive conficts due to formatting changes:
* the version of the file currently being edited would have to be
reformatted back into the team/project format
* the cvs update would then be performed which would merge the most
recently committed version (which is in team/project format) into
the currently edited version (which is now momentarity back in
team/project format)
* after the merge is complete, the file is reformatted into the
developer's personal format
Of course, this would all happen automagically so that the programmer is
hardly aware that it is happening :)
cc
Eugene Belyaev wrote:
> It's pretty expensive in terms of time, you know that. Would it be ok
> for you since the IDE itself might save files quite often?
>
> Best regards,
>
> Eugene Belyaev
> IntelliJ Software, http://www.intellij.com
> "Develop with pleasure"
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]] On Behalf Of Noah Nordrum
> > Sent: Friday, January 18, 2002 9:42 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [Eap-list] Feature Request - Auto Code Layout on Save
> >
> >
> > +1
> >
> > ----- Original Message -----
> > From: "Paul Hodgetts" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, January 17, 2002 3:58 PM
> > Subject: [Eap-list] Feature Request - Auto Code Layout on Save
> >
> >
> > > If it's not too difficult or expensive, I'd like to
> > > see an option to trigger a Layout Code on a file
> > > save. I find myself doing a code layout almost every
> > > time I'm done coding and before I do a final save.
> > > The option could just be a check box on the Code
> > > Style or General sections.
> > >
> > > Thanks,
> > > Paul
> > >
> > >
> > > _______________________________________________
> > > Eap-list mailing list
> > > [EMAIL PROTECTED]
> > > http://www.intellij.com/mailman/listinfo/eap-list
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > _______________________________________________
> > Eap-list mailing list
> > [EMAIL PROTECTED]
> > http://www.intellij.com/mailman/listinfo/eap-list
> >
>
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-list
_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list