Skip to content

Conversation

@SougandhS
Copy link
Contributor

The Console view icon now reflects the currently selected console. This helps users quickly identify different consoles when multiple consoles are present, without having to inspect each one.

Before :

image

After :

image

@iloveeclipse
Copy link
Member

Interesting idea. I remember there was a time the default JDT Java Console page had no icon at all. What would happen in such a case?

@SougandhS
Copy link
Contributor Author

Interesting idea. I remember there was a time the default JDT Java Console page had no icon at all. What would happen in such a case?

If no icon, then default IConsoleConstants.IMG_VIEW_CONSOLE is used

@SougandhS
Copy link
Contributor Author

@iloveeclipse Build looks good now, could you please merge this change ?

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

Test Results

 1 977 files  ±0   1 977 suites  ±0   1h 36m 9s ⏱️ + 3m 44s
 4 743 tests ±0   4 719 ✅ ±0   24 💤 ±0  0 ❌ ±0 
14 229 runs  ±0  14 047 ✅ ±0  182 💤 ±0  0 ❌ ±0 

Results for commit 659e494. ± Comparison against base commit 9d41ea7.

♻️ This comment has been updated with latest results.

Copy link
Member

@iloveeclipse iloveeclipse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there are 2 or 3 issues with image handling.

I've got as well as errors about leaked images and about already disposed images.

  1. This one happens if you open Console, opens few pages, close Console & trigger GC:
java.lang.Error: SWT Resource was not properly disposed
	at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:191)
	at org.eclipse.swt.graphics.Resource.<init>(Resource.java:124)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:635)
	at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:300)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:331)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:309)
	at org.eclipse.ui.internal.console.ConsoleView.updateIcon(ConsoleView.java:285)
	at org.eclipse.ui.internal.console.ConsoleView.showPageRec(ConsoleView.java:190)
	at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:698)
	at org.eclipse.ui.internal.console.ConsoleView.display(ConsoleView.java:538)
	at org.eclipse.ui.internal.console.ConsoleDropDownAction.run(ConsoleDropDownAction.java:132)
	at org.eclipse.ui.internal.console.ConsoleDropDownAction.runWithEvent(ConsoleDropDownAction.java:153)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:581)
	at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:454)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5895)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1656)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5110)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4545)
  1. I can't reproduce yet this one but I saw few of them in my log
java.lang.NullPointerException
	at java.base/java.util.Objects.requireNonNull(Objects.java:220)
	at org.eclipse.jface.resource.CompositeImageDescriptor$CachedDescriptorImageDataProvider.<init>(CompositeImageDescriptor.java:126)
	at org.eclipse.jface.resource.CompositeImageDescriptor.createCachedImageDataProvider(CompositeImageDescriptor.java:551)
	at org.eclipse.jface.viewers.DecorationOverlayIcon.<init>(DecorationOverlayIcon.java:121)
	at org.eclipse.debug.internal.ui.quickaccess.LaunchQuickAccessElement.getImageDescriptor(LaunchQuickAccessElement.java:81)
	at org.eclipse.ui.internal.quickaccess.QuickAccessEntry.getImage(QuickAccessEntry.java:120)
	at org.eclipse.ui.internal.quickaccess.QuickAccessEntry.paint(QuickAccessEntry.java:224)
	at org.eclipse.ui.internal.quickaccess.QuickAccessContents.lambda$11(QuickAccessContents.java:857)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5895)
  1. Beside this, closing all pages leaves last selected page icon on the console.

@iloveeclipse
Copy link
Member

I would probably manage images created for console pages with a map and probably update it in doCreatePage / doDestroyPage, but I havent looked deep enough into the ode to be sure.

Copy link
Contributor

@laeubi laeubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should likely use a LocalResourceManager for images.

@SougandhS
Copy link
Contributor Author

I have applied LocalResourceManager and tested few cases, didn't see any exceptions on logs

Copy link
Member

@iloveeclipse iloveeclipse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better now, resources problem seem to be fixed, beside small code change left is only this one:

closing all pages leaves last selected page icon on the console.

SougandhS and others added 2 commits January 14, 2026 11:12
The Console view icon now reflects the currently selected console.
This helps users quickly identify different consoles when multiple
consoles are present, without having to inspect each one.
@iloveeclipse
Copy link
Member

beside small code change left is only this one:

closing all pages leaves last selected page icon on the console.

Fixed remaining issues with 659e494 & rebased on master.

@iloveeclipse iloveeclipse merged commit 39c64e8 into eclipse-platform:master Jan 14, 2026
18 checks passed
@iloveeclipse
Copy link
Member

@SougandhS : thanks for the idea, I really like it.
Could you please provide N&N entry ?

@iloveeclipse
Copy link
Member

A nice (unexpected) side effect is that now Console also changes icon if the JUnit tests are running or Ant tasks etc, so I see something like

image image

Cool. I really like this small change.

SougandhS added a commit to SougandhS/www.eclipse.org-eclipse that referenced this pull request Jan 16, 2026
@SougandhS
Copy link
Contributor Author

Thank you @iloveeclipse @laeubi for the review

Could you please provide N&N entry ?

Sure 👍

SougandhS added a commit to SougandhS/www.eclipse.org-eclipse that referenced this pull request Jan 16, 2026
SougandhS added a commit to SougandhS/www.eclipse.org-eclipse that referenced this pull request Jan 16, 2026
merks pushed a commit to eclipse-platform/www.eclipse.org-eclipse that referenced this pull request Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants