Bug 483877

Summary: Change font size with Ctrl+ +/- in Java stack trace console view
Product: [Eclipse Project] Platform Reporter: Noopur Gupta <noopur_gupta>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, mistria
Version: 4.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 483921, 476037    
Bug Blocks:    

Description Noopur Gupta CLA 2015-12-08 03:55:41 EST
I20151207-2000.

1. Open a text editor with some text in it.
2. Copy the text and go to Navigate > Open from clipboard to open the Java stack trace console view with the copied text.
3. Increasing/decreasing the font size with Ctrl +/- in the text editor changes the font size in the view also. 

But pressing these keys in the view does not work. If I close the editor now, to reset the font size in the view, I have to go to the preferences.

Can't say this is a bug but not being able to change the font size from the view which is affected by font size changes in the editor looks incomplete.
Comment 1 Dani Megert CLA 2015-12-08 04:11:07 EST
See also bug 483472.

Leaving in Platform Text for now.
Comment 2 Mickael Istria CLA 2015-12-08 05:01:39 EST
The font for console (more precisely for org.eclipse.ui.console.TextConsolePage) is the IConsoleConstants.P_FONT constant. I didn't find a way to access that font in a generic way, using the APIs that are allowed in the handler.
Without way to access the font definition name, we cannot get the zoom to work.

I believe this highlights the need for a new interface such as IFontPropertyConsumer that we could hook on multiple text-related parts and pages (Console, compare or whatever consumes a font property). Then the handler would simply check whether the current part or page is and IFontPropertyConsumer and call its "getFontName()" method.
Comment 3 Dani Megert CLA 2015-12-08 10:47:14 EST
(In reply to Mickael Istria from comment #2)
> The font for console (more precisely for
> org.eclipse.ui.console.TextConsolePage) is the IConsoleConstants.P_FONT
> constant. I didn't find a way to access that font in a generic way, using
> the APIs that are allowed in the handler.
> Without way to access the font definition name, we cannot get the zoom to
> work.
> 
> I believe this highlights the need for a new interface such as
> IFontPropertyConsumer that we could hook on multiple text-related parts and
> pages (Console, compare or whatever consumes a font property). Then the
> handler would simply check whether the current part or page is and
> IFontPropertyConsumer and call its "getFontName()" method.

I agree, but don't like the name ;-). Please file a bug report for M5 and cc me.