Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 431868 - [Trim] Allow to hide ToolControl via right click menu
Summary: [Trim] Allow to hide ToolControl via right click menu
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
: 382227 (view as bug list)
Depends on:
Blocks: 426418 433778 453573
  Show dependency tree
 
Reported: 2014-04-03 03:53 EDT by Lars Vogel CLA
Modified: 2014-11-29 01:50 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2014-04-03 03:53:57 EDT
Similar to Bug 426535, we should allow to hide Toolitems via right mouse click.
Comment 1 Nobody - feel free to take it CLA 2014-04-06 17:32:53 EDT
https://git.eclipse.org/r/24511
Comment 2 Lars Vogel CLA 2014-04-07 02:29:17 EDT
(In reply to Sopot Cela from comment #1)
> https://git.eclipse.org/r/24511

Which ToolItem did you use of testing? I tried to close the SearchField with this patch but was unable to display the menu.
Comment 3 Nobody - feel free to take it CLA 2014-04-07 03:21:45 EDT
I tested it on the perspective switcher. Also with the quick search text field you need to right click in the lower right bar because if you right click directly on the text box you get the right click from the text box.

Not sure if we should merge this context menu with the actual tool control's own context menu.
Comment 4 Lars Vogel CLA 2014-04-23 06:20:39 EDT
Fixed with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=032f14076a4bc91d903adcd8008f8056eb1155a8

Thanks a bunch Sopot, I updated the Gerrit review with the usage of the new IPresentationEngine constant and aligned the reset of this tag.
Comment 5 Lars Vogel CLA 2014-04-23 15:51:36 EDT
Paul suggest to avoid using the term "Trimbar Entries" and use "Toolbar Entries". Done via https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=bda3bad1a25085e05301e9c9dc2386872012c088
Comment 6 Dani Megert CLA 2014-04-24 08:09:07 EDT
I would expect that I see the menu items when I right click in the entry field. Currently it's first very hard for a user to know where one needs to click and second, it's hard to really hit that small space.

Also, restore does not work:
1. start new workspace with latest build:
http://download.eclipse.org/eclipse/downloads/drops4/N20140423-2200/
2. close Welcome
3. open context menu on the small border below the quick access field and 'Hide'
4. on the same spot invoke context menu > Restore Toolbar Items
==> nothing happens
Comment 7 Dani Megert CLA 2014-04-24 09:06:32 EDT
(In reply to Dani Megert from comment #6)
> ...
> ==> nothing happens

Resizing the window brings it back, but from now on, one gets 4 exceptions logged each time when typing into the field:

!ENTRY org.eclipse.ui 4 4 2014-04-24 14:29:27.037
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.copy: {org.eclipse.ui.internal.quickaccess.SearchField$11@7cfb0c4c} vs {org.eclipse.ui.internal.quickaccess.SearchField$11@6b37df8e}

!ENTRY org.eclipse.ui 4 4 2014-04-24 14:29:27.077
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.paste: {org.eclipse.ui.internal.quickaccess.SearchField$12@4665428b} vs {org.eclipse.ui.internal.quickaccess.SearchField$12@4a70d302}

!ENTRY org.eclipse.ui 4 4 2014-04-24 14:29:27.443
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.selectAll: {org.eclipse.ui.internal.quickaccess.SearchField$9@3086f480} vs {org.eclipse.ui.internal.quickaccess.SearchField$9@126f8f24}

!ENTRY org.eclipse.ui 4 4 2014-04-24 14:29:27.452
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.cut: {org.eclipse.ui.internal.quickaccess.SearchField$10@34c53688} vs {org.eclipse.ui.internal.quickaccess.SearchField$10@6ffd4c0d}
Comment 8 Dani Megert CLA 2014-04-24 09:08:12 EDT
I've reverted the two changes until the mentioned issues are resolved. Sorry.

Changed the menu label to
&Restore Hidden Toolbar Entries
as suggested by Paul.
Comment 9 Lars Vogel CLA 2014-04-24 12:56:04 EDT
(In reply to Dani Megert from comment #7)

> one gets 4 exceptions
> logged each time when typing into the field:

Are you sure this is only related to my change? I still see these warnings in an runtime Eclipse IDE if I use the Quick Access box the first time I use it.
Comment 10 Lars Vogel CLA 2014-04-24 12:59:35 EDT
This Gerrit review should fix the issues reported by Dani, except the warnings reported in comment 9 which are also there without this change.

https://git.eclipse.org/r/25508
Comment 11 Lars Vogel CLA 2014-04-24 18:58:13 EDT
Tested Danis Szenarios and its work for me under Linux with the new change. Marking as fixed with  

https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=979d5bf2ce1c3233a871bb0b1391615980286358
Comment 12 Dani Megert CLA 2014-04-25 05:18:34 EDT
(In reply to Lars Vogel from comment #11)
> Tested Danis Szenarios and its work for me under Linux with the new change.
> Marking as fixed with  
> 
> https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=979d5bf2ce1c3233a871bb0b1391615980286358

Restore now works and exceptions are gone, but this from comment 6 is still not fixed:

"I would expect that I see the menu items when I right click in the entry field. Currently it's first very hard for a user to know where one needs to click and second, it's hard to really hit that small space."
Comment 13 Lars Vogel CLA 2014-04-25 09:01:54 EDT
(In reply to Dani Megert from comment #12)

> "I would expect that I see the menu items when I right click in the entry
> field. Currently it's first very hard for a user to know where one needs to
> click and second, it's hard to really hit that small space."

I agree that this would be better, but the tool control manager has no insights which SWT widgets is displayed. I suggest to open a new bug if you really want this but currently this is to my knowledge not possible with our renderer infrastructure.

I mark this as fixed, please open a new bug if you want to have the other funtionality.
Comment 14 Lars Vogel CLA 2014-04-28 17:03:27 EDT
*** Bug 382227 has been marked as a duplicate of this bug. ***
Comment 15 Lars Vogel CLA 2014-04-29 09:31:00 EDT
*** Bug 362420 has been marked as a duplicate of this bug. ***