Bug 258729 - [Metadata] Platform/UI plug-ins needs more project-specific settings
Summary: [Metadata] Platform/UI plug-ins needs more project-specific settings
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Prakash Rangaraj CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 261077 (view as bug list)
Depends on:
Blocks: 264440
  Show dependency tree
 
Reported: 2008-12-13 04:38 EST by Remy Suen CLA
Modified: 2019-09-06 15:36 EDT (History)
8 users (show)

See Also:


Attachments
workbench settings v01 (31.83 KB, patch)
2009-04-01 10:45 EDT, Paul Webster CLA
no flags Details | Diff
Patch for changing the line width to 100 (1.74 KB, patch)
2009-12-04 01:40 EST, Prakash Rangaraj CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2008-12-13 04:38:08 EST
The most important ones here would be settings for the Java formatter and "save actions". Import statements and whitespace always tends to augment the size of a patch. Different contributors from the community have different workspace settings so it is probably not unheard of for these lines to change back and forth after applying one person's patch and another.

Having unified settings will help reduce the number of changes to eyeball in the future.
Comment 1 Paul Webster CLA 2008-12-15 08:07:40 EST
I'm surprised.  We are supposed to have project specific settings for this (with it being set to the default eclipse formatter).

PW
Comment 2 Boris Bokowski CLA 2008-12-16 22:34:19 EST
Last time I ask (it's a while ago) I was told that the UI team could not agree on a common setting and thus we have none.

We should try again, and talk about this at the next UI team meeting. I'd vote for the default Eclipse formatter, and the save action being to format the changed lines only.
Comment 3 Boris Bokowski CLA 2009-01-14 15:07:58 EST
*** Bug 261077 has been marked as a duplicate of this bug. ***
Comment 4 Boris Bokowski CLA 2009-01-14 15:10:23 EST
copied from bug 261077 comment 0:
"Related thoughts:

(*) Do we really need that 80 char limit for line wrapping in the formatter?
(*) Can we enable the Save Actions and do the Organize imports and format the
edited lines?"

I'd be OK with 100 or 120 characters. Also, +1 for Save Actions to organize imports and format the edited lines.
Comment 5 Paul Webster CLA 2009-01-23 13:01:12 EST
(In reply to comment #4)
> copied from bug 261077 comment 0:
> "Related thoughts:
> 
> (*) Do we really need that 80 char limit for line wrapping in the formatter?

Yes, standard java coding conventions: http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

> (*) Can we enable the Save Actions and do the Organize imports and format the
> edited lines?"

I'd be interested in this if it would restrict itself to the changed lines ... I don't think we want to introduce differences into CVS that aren't necessary.

PW
Comment 6 Boris Bokowski CLA 2009-01-23 13:11:31 EST
I'm ok with using the standard but would like to change the 80 column setting to something like 100 or 120.

(In reply to comment #5)
> Yes, standard java coding conventions:
> http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

The document says "Avoid lines longer than 80 characters, since they're not handled well by many terminals and tools." and was written in 1999. Not sure which terminals and tools they refer to, but we're using the Eclipse SDK which handles longer lines just fine.

> I'd be interested in this if it would restrict itself to the changed lines ...
> I don't think we want to introduce differences into CVS that aren't necessary.

Yes, agree. Remy suggested using the the "Format edited lines" option.

Comment 7 Paul Webster CLA 2009-01-23 13:20:36 EST
(In reply to comment #6)
> The document says "Avoid lines longer than 80 characters, since they're not
> handled well by many terminals and tools." and was written in 1999. Not sure
> which terminals and tools they refer to, but we're using the Eclipse SDK which
> handles longer lines just fine.

handles, yes.  displays, not so much.  I stretch out my eclipse on my screen, but activating the 80-char print margin tells me I can see about 91 chars in an editor ...

If you'd like to move it up to 88 chars, then I couldn't complain :-)

PW
Comment 8 Francis Upton IV CLA 2009-01-23 13:33:54 EST
(10:30:11 AM) Francis Upton: i don't like horizontal scrolling, but i think 100 avoids that for me
(10:31:03 AM) Francis Upton: borisb6i: i think with a  reasonable size font and monitor (i use monospace 9) and have only a 17" monitor, 100 is fine
(10:31:12 AM) Francis Upton: i think 120 is too long
(10:31:25 AM) Francis Upton: and if i had to chose between 120 and 88 i would pick 88
Comment 9 Francis Upton IV CLA 2009-01-23 13:35:12 EST
> I'd be interested in this if it would restrict itself to the changed lines ...
> I don't think we want to introduce differences into CVS that aren't necessary.

> Yes, agree. Remy suggested using the the "Format edited lines" option.

+1 for this
Comment 10 Paul Webster CLA 2009-01-23 14:00:43 EST
Background Info:  We have coding conventions linked through http://www.eclipse.org/eclipse/platform-ui/ and we follow the eclipse coding conventions, http://wiki.eclipse.org/index.php/Development_Conventions_and_Guidelines

PW
Comment 11 Dani Megert CLA 2009-01-24 03:23:40 EST
At least when it comes to compiler and formatter settings they are often less aggressive (e.g. set to 'ignore') than they should be due to compatibility reasons. You might want to take a look at JDT project settings. Though quite strict we had very good experience so far. We also use the Save actions but did not yet store them per project because especially formatting changed lines had some issues, however most of which are now solved in latest 3.5 builds.
Comment 12 Paul Webster CLA 2009-03-26 11:15:32 EDT
(In reply to comment #11)
> strict we had very good experience so far. We also use the Save actions but did
> not yet store them per project because especially formatting changed lines had
> some issues, however most of which are now solved in latest 3.5 builds.

I would like to try the per-project formatting with formatting auto-applied to changes, if the feedback would be useful.

PW

Comment 13 Dani Megert CLA 2009-03-26 12:11:33 EDT
>I would like to try the per-project formatting with formatting auto-applied to
>changes, if the feedback would be useful.
If you mean regarding formatting, then yes: feedback is always welcome ;-)
Comment 14 Paul Webster CLA 2009-04-01 10:45:11 EDT
Created attachment 130570 [details]
workbench settings v01

Released to HEAD
PW
Comment 15 Prakash Rangaraj CLA 2009-12-03 03:16:43 EST
Line wrapping at 80 chars is really annoying. Any increase to that limit would make me happier. Is 100 fine with everyone?
Comment 16 Dani Megert CLA 2009-12-03 03:25:07 EST
>Line wrapping at 80 chars is really annoying. Any increase to that limit would
>make me happier. Is 100 fine with everyone?
We even have this set to 200, so I'm all in ;-)
Comment 17 Francis Upton IV CLA 2009-12-03 03:36:32 EST
(In reply to comment #15)
> Line wrapping at 80 chars is really annoying. Any increase to that limit would
> make me happier. Is 100 fine with everyone?

+1
Comment 18 Paul Webster CLA 2009-12-03 08:13:21 EST
(In reply to comment #15)
> Line wrapping at 80 chars is really annoying. Any increase to that limit would
> make me happier. Is 100 fine with everyone?

You need to update the coding conventions as well (some links in comment #10)  and hold a vote (remember, in eclipse one -1 is a veto :-)  So you can post this bug to platform-ui-dev

PW
Comment 19 Oleg Besedin CLA 2009-12-03 09:35:45 EST
(In reply to comment #15)
> Line wrapping at 80 chars is really annoying. Any increase to that limit would
> make me happier. Is 100 fine with everyone?

+1 from me.

We don't use punch cards anymore; it's a mystery why there is a forced line length limit at all.
Comment 20 Paul Webster CLA 2009-12-03 09:43:34 EST
(In reply to comment #19)
> We don't use punch cards anymore; it's a mystery why there is a forced line
> length limit at all.

Because it shows up in my terminals and annoys me ... but I'm willing to let it slide :-)

+1

PW
Comment 21 John Arthorne CLA 2009-12-03 09:46:33 EST
(In reply to comment #15)
> Line wrapping at 80 chars is really annoying. Any increase to that limit would
> make me happier. Is 100 fine with everyone?

+1 from me for longer lines. The longer the better, but 100 would be a great improvement.

I also like the Format+Organize Imports save actions. I am so used to this from the core+equinox projects that I never remember to do it manually anymore when I touch projects that don't have this enabled. If you want to avoid bigger patches you could always run the format+organize over all the projects one weekend to get them all aligned with the settings.

Paul: you need to try a variable-width font in your editor!
Comment 22 Matthew Hall CLA 2009-12-03 10:27:02 EST
(In reply to comment #15)
> Line wrapping at 80 chars is really annoying. Any increase to that limit would
> make me happier. Is 100 fine with everyone?

In principle +1, except I'm wondering about how this will affect maximized side-by-side editors or the compare editor.
Comment 23 Prakash Rangaraj CLA 2009-12-03 12:30:02 EST
(In reply to comment #22)
> In principle +1, except I'm wondering about how this will affect maximized
> side-by-side editors or the compare editor.

   Well, it won't be as pretty as now. But 98.345% of the time, we use the Java Editor and only the rest of time we use Compare Editor (see, you didn't believe when I said statistics are always cooked :-))

   So far there aren't any -1s, which means, I'll be doing the change by tomorrow.
Comment 24 Prakash Rangaraj CLA 2009-12-04 01:40:05 EST
Created attachment 153802 [details]
Patch for changing the line width to 100

I've created a new profile and the only change in it is the line width. If we need additional changes, we have to modify this profile.
Comment 25 Prakash Rangaraj CLA 2009-12-04 01:41:23 EST
Patch released to HEAD.
Comment 26 Paul Webster CLA 2009-12-04 08:09:11 EST
(In reply to comment #24)
> I've created a new profile and the only change in it is the line width. If we
> need additional changes, we have to modify this profile.

Why does it say "Unmanaged profile 'Platform UI'" ?

Wouldn't we want the profile saved in the project?

PW
Comment 27 Boris Bokowski CLA 2009-12-04 16:59:44 EST
Thanks for making the change, Prakash. We should make it for all our projects, though, not just for one. Can we use this opportunity to check that all our project-specific settings are consistent across our projects?
Comment 28 Prakash Rangaraj CLA 2009-12-06 23:58:13 EST
(In reply to comment #26)
> Why does it say "Unmanaged profile 'Platform UI'" ?
> 
> Wouldn't we want the profile saved in the project?

    The profile is actually saved in the project. I guess when JDT says Unmanaged profile - it means the profile is not shared. Not sure of it though. Dani can explain it.


    Before this, I tried to create a new profile, but that would result in exporting the profile to elsewhere and every one have to import to have the profile. I checked how JDT UI project has done (this unmanaged profile) and followed the same
Comment 29 Prakash Rangaraj CLA 2009-12-06 23:59:01 EST
(In reply to comment #27)
> Thanks for making the change, Prakash. We should make it for all our projects,
> though, not just for one. Can we use this opportunity to check that all our
> project-specific settings are consistent across our projects?

   Sure.
Comment 30 Dani Megert CLA 2009-12-09 07:13:22 EST
>Dani can explain it.
F1 can too ;-)
Comment 31 Eclipse Webmaster CLA 2019-09-06 15:36:45 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.