Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366501

Summary: [Compatibility] Toolbar buttons in editor expand on selection of project
Product: [Eclipse Project] Platform Reporter: Michael Wenz <michael.wenz>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, pwebster, remy.suen, tim.kaiser
Version: 4.2   
Target Milestone: 4.2 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 371670    
Attachments:
Description Flags
Screenshot of expanded toolbar buttons
none
Screenshot of normal toolbar buttons in 3.8
none
Screenshot depicting the problem in question. none

Description Michael Wenz CLA 2011-12-13 03:59:50 EST
Have an open Diagram Editor (tutorial). The toolbar buttons for undo, redo, copy, paste and alignment are displayed as small icons.
Select the Graphiti sample project in the Project Explorer: the icons expand. Very ugly effect.
Comment 1 Michael Wenz CLA 2011-12-13 04:00:09 EST
Happens at least on Windows 7
Comment 2 Michael Wenz CLA 2011-12-13 04:02:46 EST
Base installation is Eclipse 4.2 M4
Comment 3 Tim Kaiser CLA 2011-12-13 05:12:51 EST
The bug seems to be related to the following bug i opened on the
GEF component wihle testing for M3:
Bug 359195
Comment 4 Tim Kaiser CLA 2011-12-13 05:14:08 EST
The behavior can be observed whenever the focus is tranferred to another view/editor. Even when direct editing is opened the behavior can be observed,
again a focus translation....
Comment 5 Michael Wenz CLA 2011-12-29 08:56:41 EST
This seems to be an issue in E4. The toolbar buttons in the Graphiti diagram editor expand as soon as an object in the project explorer is selected. This does only happen in a 4.2 installation, not in 3.8.

Steps to reproduce:
1) Install Eclipse Classic 4.2 M4
2) Add Graphiti SDK plus from the Juno update site at http://download.eclipse.org/releases/juno (Category modeling)
3) Create a Graphiti example project using File -> New -> Project -> Examples -> Graphiti Sample Project, give it any name and switch to the Graphiti
Comment 6 Michael Wenz CLA 2011-12-29 09:02:46 EST
This seems to be an issue in E4. The toolbar buttons in the Graphiti diagram
editor expand as soon as an object in the project explorer is selected. This
does only happen in a 4.2 installation, not in 3.8.

Steps to reproduce:
1) Install Eclipse Classic 4.2 M4
2) Add Graphiti SDK plus from the Juno update site at
http://download.eclipse.org/releases/juno (Category modeling)
3) Create a Graphiti example project using File -> New -> Project -> Examples
-> Graphiti Sample Project, give it any name and switch to the Graphiti perspective when asked
4) Create a new Graphiti diagram using the context menu of the project node in the project explorer: New -> Graphiti Diagram, type tutorial (happens for others as well), give it any name
5) Select any node in the Project Explorer -> the toolbar buttons for the diagram editor expand and are always active.

When the same steps are done in 3.8 M4 everthing works as expected.
Comment 7 Michael Wenz CLA 2011-12-29 09:03:45 EST
Created attachment 208846 [details]
Screenshot of expanded toolbar buttons
Comment 8 Remy Suen CLA 2012-01-26 14:14:07 EST
This certainly looks very weird. Usually when this happens it's because the tool items have text on them but it seems to me as though all the items have images on them.

Michael, could you attach a screenshot of what the tool bar looks like on Eclipse 3.x? Thank you very much.
Comment 9 Michael Wenz CLA 2012-01-27 05:12:09 EST
Created attachment 210170 [details]
Screenshot of normal toolbar buttons in 3.8

Here's the requested screenshot of how it is shown in 3.8.
AFAIK the buttons have only an icon but no text, but there is a tooltip. They are not our buttons, we inherit them from GEF.

Michael
Comment 10 Remy Suen CLA 2012-02-15 14:14:11 EST
Created attachment 211066 [details]
Screenshot depicting the problem in question.

When fully expanded, you can see a 'Hide Context Buttons' tool item. This is the cause behind the stretching.
Comment 11 Remy Suen CLA 2012-02-15 14:29:22 EST
For the record, this is not the same problem as the one in bug 369571.
Comment 12 Remy Suen CLA 2012-02-16 08:30:55 EST
(In reply to comment #9)
> AFAIK the buttons have only an icon but no text, but there is a tooltip.

Seems there isn't actually a tooltip defined. A tooltip was only set on it because of the code in ActionContributionItem.

String toolTip = action.getToolTipText();
if ((toolTip == null) || (toolTip.length() == 0)) {
  toolTip = text;
}
Comment 13 Remy Suen CLA 2012-02-16 10:11:21 EST
What's odd is that the 'Hide Context Buttons' tool item is actually correct in the beginning. It has an icon and the tooltip is correct.
Comment 14 Remy Suen CLA 2012-02-16 14:13:33 EST
(In reply to comment #12)
> Seems there isn't actually a tooltip defined. A tooltip was only set on it
> because of the code in ActionContributionItem.

If we leave these contribution items as ActionContributionItem instead of converting them in CoolBarToTrimManager's fill(*) then the tool bar will render okay.
Comment 15 Paul Webster CLA 2012-04-25 14:57:30 EDT
fixed by bug 319704
Comment 16 Michael Wenz CLA 2012-04-27 07:32:35 EDT
(In reply to comment #15)
> fixed by bug 319704

I did a quick check with the current integration build. Look fine now, thanks!
Comment 17 Paul Webster CLA 2012-05-01 14:21:44 EDT
In I20120430-1800

PW