Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Neon ignores "Print margin column" setting in Java editor(It does show it, but always at 120 no matter what value I enter)
icon9.gif  Neon ignores "Print margin column" setting in Java editor [message #1737570] Sun, 10 July 2016 10:23 Go to next message
Davide Vecchi is currently offline Davide VecchiFriend
Messages: 35
Registered: July 2009
Member
I go to "Windows / Preferences / General / Editors / Text editors / Show print margin / Print margin column" and the value shown is 100, but in the Java editor the vertical line showing the margin is always at column 120 instead of 100.

No matter what number I enter instead of 100, the vertical line in the editor doesn't move, it stays at column 120. I tried 50, 80 and 100.

But if I uncheck its parent option ("Show print margin"), the vertical line in the editor does disappear, just like it's supposed to. So I'm in the right preference page.
When I check "Show print margin" again, the vertical line in the editor does reappear; just it won't move away from column 120.

This was working perfectly with the previous version (Mars); changing that number would make the vertical line move and reflect the new value exactly.

When I installed Neon I have let it convert my workspace as usual and everything went very smooth as usual , basically zero time used for the transition to Neon. Just this little thing that I don't know how to solve (for me it's more important than it might sound).

BTW it has nothing to do with actual printing, I just use the print margin in the editor to keep my source code within a common width (100).

Any info or comment would help.

Environment:

"Eclipse IDE for Java Developers", Version: Neon Release (4.6.0), Build id: 20160613-1800.
Always up to date.

Only extra plugin I installed: FindBugs and visualswing4eclipse.

Windows 7 Professional, Service Pack 1.

java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
Re: Neon ignores "Print margin column" setting in Java editor [message #1737728 is a reply to message #1737570] Tue, 12 July 2016 10:01 Go to previous messageGo to next message
Davide Vecchi is currently offline Davide VecchiFriend
Messages: 35
Registered: July 2009
Member
On a different computer, with the same Eclipse version and build id but with many more plugins / extensions installed, the print margin doesn't show at all in the Java editor, no matter how I set the above mentioned preferences. But interestingly, in the two editors of the two plugins / extensions I checked, namely "Tapestry5 WebTools Editors Extensions (experimental) 2.13.4" to edit Tapestry .tml templates and "Minimalist Gradle Editor 1.0.2.201509250223 org.nodeclipse.enide.editors.gradle.feature.feature.group Nodeclipse/Enide", the print margin does show up normally and it responds normally to changing the "Print margin column" and "Show print margin" preferences.

So the problem seems to be specific to the Java editor. Probably even on the first computer it's so (I will check that as soon as I am on it).
Re: Neon ignores "Print margin column" setting in Java editor [message #1744892 is a reply to message #1737570] Sat, 01 October 2016 18:05 Go to previous messageGo to next message
Roman Pavlov is currently offline Roman PavlovFriend
Messages: 1
Registered: October 2016
Junior Member
Yep, it's real problem. I can't move print margin in Java editor, but can move it in CPP editor.
Re: Neon ignores "Print margin column" setting in Java editor [message #1749153 is a reply to message #1737570] Fri, 02 December 2016 11:18 Go to previous messageGo to next message
John McCabe is currently offline John McCabeFriend
Messages: 228
Registered: July 2009
Senior Member
I can't move it in the CPP editor.
Re: Neon ignores "Print margin column" setting in Java editor [message #1749591 is a reply to message #1744892] Thu, 08 December 2016 13:09 Go to previous messageGo to next message
Antonio Capape is currently offline Antonio CapapeFriend
Messages: 1
Registered: December 2016
Junior Member
Have you tried to set that width on formatter settings?

Windows > Preferences > Java > Code Style > Formatter > Edit > Line Wrapping
Re: Neon ignores "Print margin column" setting in Java editor [message #1749610 is a reply to message #1749591] Thu, 08 December 2016 16:10 Go to previous messageGo to next message
John McCabe is currently offline John McCabeFriend
Messages: 228
Registered: July 2009
Senior Member
Yes, I have, and it puts it in the right place in the editor. However, as I commented on https://bugs.eclipse.org/bugs/show_bug.cgi?id=468307, I don't believe there's any justification for that behaviour. The "PRINT margin column" should have no connection with the "Line Wrapping" in the formatter and, certainly, the language editor should not be overriding that option without any warning!
icon3.gif  Re: Neon ignores "Print margin column" setting in Java editor [message #1749612 is a reply to message #1749591] Thu, 08 December 2016 16:14 Go to previous messageGo to next message
Davide Vecchi is currently offline Davide VecchiFriend
Messages: 35
Registered: July 2009
Member
I didn't know that parameter. But I think it only applies to the preview window shown in that option page.

However I just realized that I no longer see the vertical line anywhere at all in the Java editor, although the setting I mentioned at the top of my question is still in place ("Show print margin" is selected and the value of "Print margin column" is ignored), so at least I should see the print margin like I did when I asked the question. Instead I don't see it anywhere. It might have happened with some update, maybe the one to Neon.1, I don't know.
Re: Neon ignores "Print margin column" setting in Java editor [message #1749613 is a reply to message #1749612] Thu, 08 December 2016 16:20 Go to previous messageGo to next message
John McCabe is currently offline John McCabeFriend
Messages: 228
Registered: July 2009
Senior Member
There is a separate option for what column to use in the preview window; it's down under the preview window and says "Set line width for preview window:".
Re: Neon ignores "Print margin column" setting in Java editor [message #1753170 is a reply to message #1737570] Thu, 02 February 2017 12:17 Go to previous messageGo to next message
John McCabe is currently offline John McCabeFriend
Messages: 228
Registered: July 2009
Senior Member
Hope this is of interest to you:

https://marketplace.eclipse.org/content/arbitrarylines

This is a plugin that is confgured under the "Text Editors" -> "ArbitraryLines" group and lets you draw line where you specify, not where the JDT/CDT team think you might want them. It was created by Robert Zenz, with a little help from me, to overcome the rather screwy change to this behaviour and the failure of the JDT developers to accept this was a screwy change (particularly in light of the fact that they made the change without either letting the users choose whether they wanted to do it the new way, or warn them, in any place in the UI, that the JDT/CDT were using a 'local' setting instead of the obvious one).

Hope this is of use to you.
icon14.gif  Re: Neon ignores "Print margin column" setting in Java editor [message #1753180 is a reply to message #1753170] Thu, 02 February 2017 13:41 Go to previous messageGo to next message
Davide Vecchi is currently offline Davide VecchiFriend
Messages: 35
Registered: July 2009
Member
It is great. The process of installing and configuring it was 100% without any issue or doubt, and the line I set just stays where I set it to stay. This is refreshing. Thanks for making this plugin and for posting a link here.
Re: Neon ignores "Print margin column" setting in Java editor [message #1753182 is a reply to message #1753180] Thu, 02 February 2017 13:58 Go to previous message
John McCabe is currently offline John McCabeFriend
Messages: 228
Registered: July 2009
Senior Member
Davide,

Thanks for that. If you have/find any problems with it please let us know. If you post them on here I'll be notified, or you could check it out on GitHub or GitLab probably.

John
Previous Topic:Installing Software has encountered a problem
Next Topic:Making calls to REST service using Jersey
Goto Forum:
  


Current Time: Thu Apr 25 12:25:20 GMT 2024

Powered by FUDForum. Page generated in 0.60510 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top