This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 41807 - Zoom editor window as in FF/Opera/Word
Summary: Zoom editor window as in FF/Opera/Word
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker with 16 votes (vote)
Assignee: Miloslav Metelka
URL:
Keywords: PLAN
: 73747 94514 112787 163658 171384 (view as bug list)
Depends on:
Blocks: 212484
  Show dependency tree
 
Reported: 2004-04-07 19:04 UTC by magrawal
Modified: 2015-10-08 02:51 UTC (History)
7 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description magrawal 2004-04-07 19:04:05 UTC
I believe it would be useful to be able to zoom in 
and out of the editor window. This would help 
bring more code into focus (zoom out) when 
necessary relatively easily.
I do not program for a living, so I am not sure if 
professional programmers care for this feature, 
but virtually every editor application (word 
processors, spreadsheets etc) has a zoom function, 
so why not code editors?
Comment 1 eskild 2007-10-11 14:22:58 UTC
I second this request. In my case it would be useful when I'm trying to get an overview of an existing code file that's
several thousand lines long. Something like Ctrl-scrollwheel; Firefox also does it.
Comment 2 tomzi 2007-10-12 07:21:56 UTC
*** Issue 73747 has been marked as a duplicate of this issue. ***
Comment 3 tprochazka 2008-01-17 07:29:30 UTC
I think that this is very easy, only change font size in editor press Ctrl-MouseScrollWheel. I vote for it!!!
Comment 4 tprochazka 2008-01-17 07:33:42 UTC
It's very important for presentations. If listeners can't see small text you can fast change font size.
Comment 5 phazei 2009-01-26 23:36:16 UTC
*** Issue 94514 has been marked as a duplicate of this issue. ***
Comment 6 phazei 2009-01-26 23:40:15 UTC
I would also love this feature.  It's the only missing feature preventing me from using NetBeans as my primary IDE.

This would be great for anyone with vision impairment.  I can't always read everything perfectly.  Sometimes if it's a
complicated piece of code, it helps to zoom it in a lot to see it clearly.  But I can't keep it zoomed all the time
because I can't see enough of everything else.  Changing the font size back and forth is too time consuming.

Ctrl+Scroll,  Ctrl++, Ctrl+-
Those are all standard zoom shortcuts in many programs.  FF, Word, SciTE, Notepad++

Thanks.
Comment 7 coderage 2009-02-15 10:11:46 UTC
I agree.  I think this would be a good addition to the IDE.
Comment 8 Vitezslav Stejskal 2009-08-27 13:42:26 UTC
*** Issue 163658 has been marked as a duplicate of this issue. ***
Comment 9 Ondrej Langr 2009-09-03 13:00:43 UTC
Based on number of votes and duplicates, changing priority to P3 .. 
Comment 10 romantoo 2010-03-05 18:58:34 UTC
For as well, this is the main feature preventing me from using NetBeans as my primary IDE. Please, somebody, implement it!
Comment 11 phazei 2010-03-07 20:55:06 UTC
I'm still using Notepad++ because no decent PHP IDE provides a way of changing the font that isn't 3-5 levels deep.  Even a +/- button on the menu would be something.  I can go digging through menus every single time I want to sit forward or lean back.
Comment 12 bsbawa10 2010-03-08 03:58:37 UTC
This is a must feature.  I do not know why nobody at netbeans is listening to us
Comment 13 Vitezslav Stejskal 2010-03-08 06:19:56 UTC
*** Bug 181602 has been marked as a duplicate of this bug. ***
Comment 14 romantoo 2010-03-09 17:16:10 UTC
(In reply to comment #11)
> I'm still using Notepad++ because no decent PHP IDE provides a way of changing
> the font that isn't 3-5 levels deep.

Komodo does (as easily as in Firefox and Notepad), and it's much better for developing in PHP than Notepad++.
Comment 15 romantoo 2010-03-09 17:22:17 UTC
In bug 181602, Vitezslav Stejskal asked: "Why do you need this?"

Vitezslav, would you be satisfied with this answer: to be comfortable reading text on the screen and be able to adjust font size quickly and conveniently.

Why do you, guys, develop Netbeans IDE? All development can be done with plain Notepad. I guess you do it because using a custom made IDE makes developing software easier, more comfortable, faster, etc.

Maybe others will have more to add to this.
Comment 16 Vitezslav Stejskal 2010-03-12 08:24:11 UTC
(In reply to comment #15)
> In bug 181602, Vitezslav Stejskal asked: "Why do you need this?"
> 
> Vitezslav, would you be satisfied with this answer: to be comfortable reading
> text on the screen and be able to adjust font size quickly and conveniently.

:-) Sure. I asked, because I for example have never ever needed to change the font size. Or if I did, I changed it once and that was it. But that's just me and other may have different needs, hence the question.
Comment 17 phazei 2010-03-13 14:49:11 UTC
Vitezslav, you might hardly ever change the font size, but have you ever used an editor where that was even an option to do with ease if you wanted to?

If not, I think if you had you might realize it's more useful than you realize.  Haven't you ever been coding late at night and just wanted to finish up the end of a project or function, before calling it a day, but you're eyes were getting a bit droopy.  If it's through a number of menu's, you might not think about changing the font size, but suppose it was a mouse scroll away.  You could simply zoom in a bit and it eases things up.

Or suppose you are nice and alert, and you're trying to get a better picture of what you have going on around the line you're working on.  Well, you could scroll up and down, or you could ctrl+scroll zoom out.  Then you could see much more code around the piece you're looking at.

I use it for both those reasons out of convenience, but my main use it because my vision isn't perfect.  I have glasses, but even with those I'd need to keep the font at too large a size all the time, but then I wouldn't be able to see enough lines of code around where I'm working.  So I adjust it to however my eyes are feeling, and if I need to see more, I can move closer to the screen and zoom out the size.  Also, if I'm hunched over, and then decide to lean back in my chair, I move around a lot while just sitting there.  Whenever I need to move further or closer from the screen, I can adjust the font quickly to my liking.

I'm sure there are a lot of other uses.

One feature that would be awesome to go along with zooming in/out, that I haven't seen before, is zooming back in on the area the mouse is over.  When implementing the zoom, you have to decide which area will be the focal point, the place to zoom in/out on.  I'd assume the most logical would be the center of the screen if using ctrl+plus or ctrl+minus.  But if using the mouse, it would be great if it would focus on the line the mouse cursor was sitting on.  That way it could be used for quick navigation.  Zoom out till the font size is like 1, you'll still see the color coding and shapes of the functions and comments, then move the mouse over where you want to go, and zoom right back in.  Yeah there's the code browser with the class/functions list, but this could be another method.
Comment 18 ratickle 2010-06-06 20:48:05 UTC
I teach Intro to Java and AP Computer Science at a high school.  I use Netbeans, but it is very frustrating NOT to be able to zoom-in to enlarge the text so that students at the back of the room can read whats on the screen.

The Output Window works fine with "Control-Scroll".  Please give the Editor Window the same capability.
Comment 19 phazei 2010-09-13 23:29:45 UTC
Any movement on this accessibility issue?
Comment 20 eduardoavdr 2010-12-23 10:07:51 UTC
Hi,

I´m missing this feature too in NetBeans!!! This is clearly a MUST! We have an ERP application written entirely in Java using Netbeans, and we at our company miss this feature as it would make things easier when as we have thousands of lines of code.

We are developing a .Net application (for the first time) and guess what?
Microsoft Visual Studio DOES have this feature! What are the people at Netbeans waiting for to introduce this feature?
Im a Java fanboy, but I must admit this is a clear advantadge of Microsoft´s IDE.

Eduardo
Comment 21 phazei 2011-03-08 18:27:53 UTC
Anyone remember this is sitting here... dead?

Miloslay, have you taken a look at it at all?  Seems to be assigned to you but you haven't even commented.

According to his linked in he's not even working on netbeans anymore :(

Can someone please help move this along?
Comment 22 Miloslav Metelka 2011-03-09 12:39:49 UTC
I'm sorry I've been busy with view-hierarchy related issues.
 Having in mind how things work regarding editor settings etc. this is a bit tricky to implement. With the current new view hierarchy (issue 121357) this could be somewhat easier since it respects editorPane.setFont() and assuming tokens use just default-font's bold/italic derivations that would just suffice to change the component's font and the rest would trigger automagically.
 However still if there would be an extra font used for any of the colorings (e.g. default font would be Monospaced and e.g. a keyword token would be using Liberation font) then the keywords would stay unchanged during zooming :( Not frequent case but it should possibly be covered.
 So I tend to have an extra property like
  editorPane.putClientProperty("zoom-font-size", Integer.valueOf(...));
that the view hierarchy would respect.
 I'll work it out once the NB7.0 work is finished so that it's available early in dev builds for testing.
Comment 23 romantoo 2011-06-17 01:15:13 UTC
(In reply to comment #22)
>  I'll work it out once the NB7.0 work is finished so that it's available early
> in dev builds for testing.

Is this feature ready for testing?
Comment 24 Milutin Kristofic 2011-07-11 08:40:58 UTC
*** Bug 112787 has been marked as a duplicate of this bug. ***
Comment 25 phazei 2011-08-08 21:06:29 UTC
Is this coming along?  Any updates?
Comment 26 Miloslav Metelka 2011-08-09 08:50:19 UTC
Yes, I'm working on both this and issue #89607.
Comment 27 ratickle 2011-08-09 11:13:13 UTC
Thank you!  Thank you!  Thank you!

Being able to quickly change the font size of code in the editor will make Netbeans an even better tool for teaching Java to a room full of students.
Comment 28 Miloslav Metelka 2011-08-10 12:15:15 UTC
http://hg.netbeans.org/jet-main/rev/f4541706e751

Currently zooming works for Ctrl+Wheel up/down. Suggested shortcuts Ctrl with +/- are reserved for expanding/collapsing folds. I'm wondering if any shortcut for zooming is necessary at all since the feature will likely be mostly used in presentations where mouse is being used heavily.
Since the feature changes default font size for the given text component the views need to be rebuilt and repainted. Although cursor position gets retained the zooming is not as visually smooth like typical pixel zooming but it should work fine.
Comment 29 Quality Engineering 2011-08-11 21:02:55 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/f4541706e751
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #41807 - Zoom editor window as in FF/Opera/Word.
Comment 30 phazei 2011-08-11 23:36:03 UTC
It's essential that there's a short cut available for the zooming.  Presentations are tiny edge case.  It's a standard feature in many editors and is very functional for every day use.  It's both utility and accessibility.  Is there a shortcut manager somewhere in NetBeans where every program shortcut feature can be managed?  Can we manually set the short cut and remove the code folding one?
Ctrl+/- has become pretty universally standard for zooming.  Something+left/right would make more sense for code folding.

If not, would Ctrl+Shift and +/- be available?
Comment 31 Miloslav Metelka 2011-08-16 12:22:15 UTC
I've added Zoom Text In/Out actions:
http://hg.netbeans.org/jet-main/rev/89248b1fa016

Shortcuts can be assigned (or override) in Tools->Options->Keymap search for "zoom".
Ctrl+Shift +/- are currently reserved for Expand/Collapse All Folds but feel free to override the shortcut in the Options.
Comment 32 Quality Engineering 2011-08-17 13:54:18 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/89248b1fa016
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #41807 - Zoom editor window as in FF/Opera/Word - Zoom Text actions added.
Comment 33 Miloslav Metelka 2011-10-04 15:54:38 UTC
*** Bug 171384 has been marked as a duplicate of this bug. ***
Comment 34 280Z28 2011-10-06 14:41:03 UTC
This is related to Issue 203243 (requesting alteration, removal of, or the ability to configure this "enhancement").
Comment 35 tomwheeler 2011-11-02 15:38:18 UTC
I verified that this is implemented and works in nightly build 201110250600, exactly as I had described a couple of years ago in #112787.

Also, it's a very nice touch that the line numbers in the editor's gutter also increase/decrease in size along with the text of the editor itself.  This will make it very handy to reference specific lines of code when doing reviews or giving presentations, both of which are now going to be a lot easier with NetBeans.
Comment 36 jbfaden 2012-01-02 14:02:10 UTC
I'd like this too.  Often I do this because I'm so used to it with firefox.  Also it would be nice if I could have different zoom levels for each document, so I could have the code I'm focused on and the same code zoomed out for reference.
Comment 37 romantoo 2012-11-18 02:40:27 UTC
(In reply to comment #28)
> Currently zooming works for Ctrl+Wheel up/down.

This doesn't work. Alt+Wheel up/down does.
Comment 38 romantoo 2015-10-08 02:51:00 UTC
Notepad touchpad users are out of luck with the current implementation.