Home » Language IDEs » Java Development Tools (JDT) » Re: New Code formatter? Why? (Need a Code Presenter)
Re: New Code formatter? Why? (Need a Code Presenter) [message #105619] |
Wed, 15 October 2003 17:42 |
Eclipse User |
|
|
|
Originally posted by: mbrozowski.nc.rr.com
A coworker and I recently started using eclipse and were discussing code
formatting and what
options we could agree on since with both have different styles. We quicky
realized that the optimum
solution would be a code presenter that would show you the code with the
formatting you preferred without change the format of the underlying code.
This would enable individual developers to develop with their own style
without interfering with those of others. Any change the New Formatter
could begin to do things this way?
Matt Brozowski (with input from Mark Miller)
Tavve Software Company
Morrisville, NC
"Alvin Thompson" <nobody@nowhere.com> wrote in message
news:3F8C7EE4.8010901@nowhere.com...
> please remember to use the appropriate newsgroup when posting questions.
> this one probably belongs in 'eclipse.tools.jdt'. it is unlikely you
> will get answers to your questions if you use the wrong newsgroup.
>
> > I am currious why they are bothering re-implementing this when there are
> > already a couple of formatters available and, in fact, potentially the
> > best formatter ever, Jalopy. Wouldnt it make more sense to try to
> > integrate Jalopy more tightly into Eclipse and build on their successes?
>
> jalopy is released under the BSD liscence, while eclipse is released
> under the...ummm...IBM liscence, i think.
>
> also, i want to torture my coworkers' eyes with my bizarre code
> formatting style. see:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=25559
>
>
> -alvin
>
|
|
|
Re: New Code formatter? Why? (Need a Code Presenter) [message #105961 is a reply to message #105619] |
Thu, 16 October 2003 09:50 |
Jerome Lanneluc Messages: 572 Registered: July 2009 |
Senior Member |
|
|
That's sound like a nice idea to browse code, but when you make a change to
a .java file and save it, which format would you choose?
Jerome
"Mathew Brozowski" <mbrozowski@nc.rr.com> wrote in message
news:bmk0u3$nt8$1@eclipse.org...
> A coworker and I recently started using eclipse and were discussing code
> formatting and what
> options we could agree on since with both have different styles. We
quicky
> realized that the optimum
> solution would be a code presenter that would show you the code with the
> formatting you preferred without change the format of the underlying code.
> This would enable individual developers to develop with their own style
> without interfering with those of others. Any change the New Formatter
> could begin to do things this way?
>
> Matt Brozowski (with input from Mark Miller)
> Tavve Software Company
> Morrisville, NC
>
>
>
> "Alvin Thompson" <nobody@nowhere.com> wrote in message
> news:3F8C7EE4.8010901@nowhere.com...
> > please remember to use the appropriate newsgroup when posting questions.
> > this one probably belongs in 'eclipse.tools.jdt'. it is unlikely you
> > will get answers to your questions if you use the wrong newsgroup.
> >
> > > I am currious why they are bothering re-implementing this when there
are
> > > already a couple of formatters available and, in fact, potentially the
> > > best formatter ever, Jalopy. Wouldnt it make more sense to try to
> > > integrate Jalopy more tightly into Eclipse and build on their
successes?
> >
> > jalopy is released under the BSD liscence, while eclipse is released
> > under the...ummm...IBM liscence, i think.
> >
> > also, i want to torture my coworkers' eyes with my bizarre code
> > formatting style. see:
> >
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=25559
> >
> >
> > -alvin
> >
>
>
|
|
|
Re: New Code formatter? Why? (Need a Code Presenter) [message #106040 is a reply to message #105961] |
Thu, 16 October 2003 10:49 |
Jonathan Gossage Messages: 42 Registered: July 2009 |
Member |
|
|
If you are going to use code presenters you need to establish a normalized
form for storage of your files otherwise you will get many false hits when
merging changes when using an SCM.
Regards
Jonathan Gossage
"Jerome Lanneluc" <jerome_lanneluc@fr.ibm.com> wrote in message
news:bmlpk0$6ir$1@eclipse.org...
> That's sound like a nice idea to browse code, but when you make a change
to
> a .java file and save it, which format would you choose?
>
> Jerome
>
> "Mathew Brozowski" <mbrozowski@nc.rr.com> wrote in message
> news:bmk0u3$nt8$1@eclipse.org...
> > A coworker and I recently started using eclipse and were discussing code
> > formatting and what
> > options we could agree on since with both have different styles. We
> quicky
> > realized that the optimum
> > solution would be a code presenter that would show you the code with the
> > formatting you preferred without change the format of the underlying
code.
> > This would enable individual developers to develop with their own style
> > without interfering with those of others. Any change the New Formatter
> > could begin to do things this way?
> >
> > Matt Brozowski (with input from Mark Miller)
> > Tavve Software Company
> > Morrisville, NC
> >
> >
> >
> > "Alvin Thompson" <nobody@nowhere.com> wrote in message
> > news:3F8C7EE4.8010901@nowhere.com...
> > > please remember to use the appropriate newsgroup when posting
questions.
> > > this one probably belongs in 'eclipse.tools.jdt'. it is unlikely you
> > > will get answers to your questions if you use the wrong newsgroup.
> > >
> > > > I am currious why they are bothering re-implementing this when there
> are
> > > > already a couple of formatters available and, in fact, potentially
the
> > > > best formatter ever, Jalopy. Wouldnt it make more sense to try to
> > > > integrate Jalopy more tightly into Eclipse and build on their
> successes?
> > >
> > > jalopy is released under the BSD liscence, while eclipse is released
> > > under the...ummm...IBM liscence, i think.
> > >
> > > also, i want to torture my coworkers' eyes with my bizarre code
> > > formatting style. see:
> > >
> > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=25559
> > >
> > >
> > > -alvin
> > >
> >
> >
>
>
|
|
| | | | |
Re: New Code formatter? Why? (Need a Code Presenter) [message #107171 is a reply to message #106341] |
Fri, 17 October 2003 19:14 |
Eclipse User |
|
|
|
Originally posted by: ed.burnette.REMOVE.THIS.sas.com
Doesn't help; diffs from my local style to the repository could be
substantial.
What I'd really like to see is a feature where the editor adapts to the
formatting (and tab vs. spaces style!) of the code being edited right now.
For new files, sure, pick your own format. But for a file written 10 years
ago and touched by half a dozen different programmers, I'd like to just
stick with whatever style is being used. People get so uptight about
changing the formatting in 'their' code anyway, so let's preserve it! I want
to be able to check out a file that anyone else formatted and checked in
some time in the past, and run reformat myself, and have nothing happen. Am
I asking too much?
"Alvin Thompson" <nobody@nowhere.com> wrote in message
news:3F8EB2C3.1000701@nowhere.com...
> excellent point; i suggest that if the file is under the jurisdiction of
> a version control system that it be saved in some universal style by
> default. that would save a lot of headaches.
>
> -alvin
>
|
|
| |
Re: New Code formatter? Why? (Need a Code Presenter) [message #107317 is a reply to message #107226] |
Sat, 18 October 2003 09:21 |
rich boakes Messages: 76 Registered: July 2009 |
Member |
|
|
Alvin Thompson wrote:
> how about if before the local version of the code is diff'd with the vcs
> version the local version (or a copy) is also formatted to the universal
> style? that should work...
I think Ed's point is highly relevant to some customers that I've worked
with on a contract basis.
When I've created new source, the customer typically specifies coding
conventions I must adhere to. ('Normalised Form' or 'Team style')
In such cases I'd like to be able to code in my own style and have a
translation process between me and the source repository. (SD called
this "presentation" style, but I think "personal" or "local" might
reflect it's purpose better).
However, I've also worked on much existing source for customers, and
it's rarely been within my remit to reformat it. So I'd want the option
of behaviour that is unchanged from today, where unless I explicitly
format the code, it remains unchanged.
I'm thinking something similar to the Build Path mechanism would be
perfect for this, enabling me to specify through regex, which parts of
the source tree I can and cannot use the translation process on.
To do this really effectively however, I think it would also be
necessary to store the customer's coding style preferences somewhere.
Rich
|
|
|
Re: New Code formatter? Why? (Need a Code Presenter) [message #107940 is a reply to message #105961] |
Mon, 20 October 2003 17:01 |
Eclipse User |
|
|
|
Originally posted by: mbrozowski.nc.rr.com
We parse the heck out of the file as it is? We even parse the comments now
with Javadoc.
How difficult would it be to make to determine how many spaces of indent the
existing file has and whether they like braces on the same line of the next.
It seems to me the optimimum would be to preserve the formatting of the
existing file so the 'owner/creator' would have it in the format he
originally intended while you could view it in the format you prefer. If
you preserve it as much as possible this makes merging much easier.
Our team started using eclipse here and we all had our own style conventions
which were so different that is mattered to us to standardize. But now the
formatters are rearranging the code making it difficult to merge. We're
having to standardize. Though you could argue that standardizing is good,
that's really only because we don't have a tool that makes it a non issue.
Matt Brozowski
"Jerome Lanneluc" <jerome_lanneluc@fr.ibm.com> wrote in message
news:bmlpk0$6ir$1@eclipse.org...
> That's sound like a nice idea to browse code, but when you make a change
to
> a .java file and save it, which format would you choose?
>
> Jerome
>
> "Mathew Brozowski" <mbrozowski@nc.rr.com> wrote in message
> news:bmk0u3$nt8$1@eclipse.org...
> > A coworker and I recently started using eclipse and were discussing code
> > formatting and what
> > options we could agree on since with both have different styles. We
> quicky
> > realized that the optimum
> > solution would be a code presenter that would show you the code with the
> > formatting you preferred without change the format of the underlying
code.
> > This would enable individual developers to develop with their own style
> > without interfering with those of others. Any change the New Formatter
> > could begin to do things this way?
> >
> > Matt Brozowski (with input from Mark Miller)
> > Tavve Software Company
> > Morrisville, NC
> >
> >
> >
> > "Alvin Thompson" <nobody@nowhere.com> wrote in message
> > news:3F8C7EE4.8010901@nowhere.com...
> > > please remember to use the appropriate newsgroup when posting
questions.
> > > this one probably belongs in 'eclipse.tools.jdt'. it is unlikely you
> > > will get answers to your questions if you use the wrong newsgroup.
> > >
> > > > I am currious why they are bothering re-implementing this when there
> are
> > > > already a couple of formatters available and, in fact, potentially
the
> > > > best formatter ever, Jalopy. Wouldnt it make more sense to try to
> > > > integrate Jalopy more tightly into Eclipse and build on their
> successes?
> > >
> > > jalopy is released under the BSD liscence, while eclipse is released
> > > under the...ummm...IBM liscence, i think.
> > >
> > > also, i want to torture my coworkers' eyes with my bizarre code
> > > formatting style. see:
> > >
> > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=25559
> > >
> > >
> > > -alvin
> > >
> >
> >
>
>
|
|
|
Re: New Code formatter? Why? (Need a Code Presenter) [message #108131 is a reply to message #107940] |
Tue, 21 October 2003 09:57 |
Jerome Lanneluc Messages: 572 Registered: July 2009 |
Senior Member |
|
|
Another interresting idea. I don't know if this is feasable, how costly it
would be, how much work it would be, etc... But you could still enter a
feature request describing it.
Jerome
"Mathew Brozowski" <mbrozowski@nc.rr.com> wrote in message
news:bn14bq$k5l$1@eclipse.org...
> We parse the heck out of the file as it is? We even parse the comments
now
> with Javadoc.
>
> How difficult would it be to make to determine how many spaces of indent
the
> existing file has and whether they like braces on the same line of the
next.
> It seems to me the optimimum would be to preserve the formatting of the
> existing file so the 'owner/creator' would have it in the format he
> originally intended while you could view it in the format you prefer. If
> you preserve it as much as possible this makes merging much easier.
>
> Our team started using eclipse here and we all had our own style
conventions
> which were so different that is mattered to us to standardize. But now
the
> formatters are rearranging the code making it difficult to merge. We're
> having to standardize. Though you could argue that standardizing is
good,
> that's really only because we don't have a tool that makes it a non issue.
>
> Matt Brozowski
>
> "Jerome Lanneluc" <jerome_lanneluc@fr.ibm.com> wrote in message
> news:bmlpk0$6ir$1@eclipse.org...
> > That's sound like a nice idea to browse code, but when you make a change
> to
> > a .java file and save it, which format would you choose?
> >
> > Jerome
> >
> > "Mathew Brozowski" <mbrozowski@nc.rr.com> wrote in message
> > news:bmk0u3$nt8$1@eclipse.org...
> > > A coworker and I recently started using eclipse and were discussing
code
> > > formatting and what
> > > options we could agree on since with both have different styles. We
> > quicky
> > > realized that the optimum
> > > solution would be a code presenter that would show you the code with
the
> > > formatting you preferred without change the format of the underlying
> code.
> > > This would enable individual developers to develop with their own
style
> > > without interfering with those of others. Any change the New
Formatter
> > > could begin to do things this way?
> > >
> > > Matt Brozowski (with input from Mark Miller)
> > > Tavve Software Company
> > > Morrisville, NC
> > >
> > >
> > >
> > > "Alvin Thompson" <nobody@nowhere.com> wrote in message
> > > news:3F8C7EE4.8010901@nowhere.com...
> > > > please remember to use the appropriate newsgroup when posting
> questions.
> > > > this one probably belongs in 'eclipse.tools.jdt'. it is unlikely you
> > > > will get answers to your questions if you use the wrong newsgroup.
> > > >
> > > > > I am currious why they are bothering re-implementing this when
there
> > are
> > > > > already a couple of formatters available and, in fact, potentially
> the
> > > > > best formatter ever, Jalopy. Wouldnt it make more sense to try to
> > > > > integrate Jalopy more tightly into Eclipse and build on their
> > successes?
> > > >
> > > > jalopy is released under the BSD liscence, while eclipse is released
> > > > under the...ummm...IBM liscence, i think.
> > > >
> > > > also, i want to torture my coworkers' eyes with my bizarre code
> > > > formatting style. see:
> > > >
> > > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=25559
> > > >
> > > >
> > > > -alvin
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
Re: New Code formatter? Why? (Need a Code Presenter) [message #108384 is a reply to message #108131] |
Tue, 21 October 2003 20:33 |
Eclipse User |
|
|
|
Originally posted by: derisor.arcor.de
If the backend format was consistent then the front end could be different. The
problem is that when comparing diffs you would NEED to look at the back end
format. If that isnt a compellign block then I dont see why it couldnt be done.
The buffer in the memory can show the code in whatever format it chooses to.
It would be interesting to play with it but I think very low priority.
-- Robert
"Jerome Lanneluc" <jerome_lanneluc@fr.ibm.com> wrote in message
news:bn2vtm$6hu$1@eclipse.org...
> Another interresting idea. I don't know if this is feasable, how costly it
> would be, how much work it would be, etc... But you could still enter a
> feature request describing it.
>
> Jerome
>
> "Mathew Brozowski" <mbrozowski@nc.rr.com> wrote in message
> news:bn14bq$k5l$1@eclipse.org...
> > We parse the heck out of the file as it is? We even parse the comments
> now
> > with Javadoc.
> >
> > How difficult would it be to make to determine how many spaces of indent
> the
> > existing file has and whether they like braces on the same line of the
> next.
> > It seems to me the optimimum would be to preserve the formatting of the
> > existing file so the 'owner/creator' would have it in the format he
> > originally intended while you could view it in the format you prefer. If
> > you preserve it as much as possible this makes merging much easier.
> >
> > Our team started using eclipse here and we all had our own style
> conventions
> > which were so different that is mattered to us to standardize. But now
> the
> > formatters are rearranging the code making it difficult to merge. We're
> > having to standardize. Though you could argue that standardizing is
> good,
> > that's really only because we don't have a tool that makes it a non issue.
> >
> > Matt Brozowski
> >
> > "Jerome Lanneluc" <jerome_lanneluc@fr.ibm.com> wrote in message
> > news:bmlpk0$6ir$1@eclipse.org...
> > > That's sound like a nice idea to browse code, but when you make a change
> > to
> > > a .java file and save it, which format would you choose?
> > >
> > > Jerome
> > >
> > > "Mathew Brozowski" <mbrozowski@nc.rr.com> wrote in message
> > > news:bmk0u3$nt8$1@eclipse.org...
> > > > A coworker and I recently started using eclipse and were discussing
> code
> > > > formatting and what
> > > > options we could agree on since with both have different styles. We
> > > quicky
> > > > realized that the optimum
> > > > solution would be a code presenter that would show you the code with
> the
> > > > formatting you preferred without change the format of the underlying
> > code.
> > > > This would enable individual developers to develop with their own
> style
> > > > without interfering with those of others. Any change the New
> Formatter
> > > > could begin to do things this way?
> > > >
> > > > Matt Brozowski (with input from Mark Miller)
> > > > Tavve Software Company
> > > > Morrisville, NC
> > > >
> > > >
> > > >
> > > > "Alvin Thompson" <nobody@nowhere.com> wrote in message
> > > > news:3F8C7EE4.8010901@nowhere.com...
> > > > > please remember to use the appropriate newsgroup when posting
> > questions.
> > > > > this one probably belongs in 'eclipse.tools.jdt'. it is unlikely you
> > > > > will get answers to your questions if you use the wrong newsgroup.
> > > > >
> > > > > > I am currious why they are bothering re-implementing this when
> there
> > > are
> > > > > > already a couple of formatters available and, in fact, potentially
> > the
> > > > > > best formatter ever, Jalopy. Wouldnt it make more sense to try to
> > > > > > integrate Jalopy more tightly into Eclipse and build on their
> > > successes?
> > > > >
> > > > > jalopy is released under the BSD liscence, while eclipse is released
> > > > > under the...ummm...IBM liscence, i think.
> > > > >
> > > > > also, i want to torture my coworkers' eyes with my bizarre code
> > > > > formatting style. see:
> > > > >
> > > > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=25559
> > > > >
> > > > >
> > > > > -alvin
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
| |
Goto Forum:
Current Time: Tue Jan 14 14:51:21 GMT 2025
Powered by FUDForum. Page generated in 0.04484 seconds
|