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

Bug 369571

Summary: [Compatibility] GEF logic examples editor has incorrect tool items
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bbdalai, bsd, pwebster
Version: 4.2   
Target Milestone: 4.2 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 369570    
Attachments:
Description Flags
Screenshot depicting the state in question. none

Description Remy Suen CLA 2012-01-24 13:54:04 EST
Created attachment 209993 [details]
Screenshot depicting the state in question.

The editor toolbar in 4.x is still missing some features it seems. The noticeable difference here is the presence of text and the absence of a few items.
Comment 1 Remy Suen CLA 2012-02-15 14:30:48 EST
If we change this in MenuHelper to set the tooltip then the problem goes away for the 'Undo'/'Redo' case.

} else if (property.equals(IAction.TOOL_TIP_TEXT)) {
  toolItem.setLabel(action.getToolTipText());
}

Though Paul has mentioned that perhaps these items should be opaque instead so perhaps that entire block of code shouldn't even be there.
Comment 2 Remy Suen CLA 2012-02-16 14:11:42 EST
(In reply to comment #1)
> Though Paul has mentioned that perhaps these items should be opaque instead so
> perhaps that entire block of code shouldn't even be there.

If we change the code in CoolBarToTrimManager's fill(*) method to only spawn MOpaqueToolItems for ActionContributionItems then everything looks okay. This would also work for bug 366501.
Comment 3 Biswa Bhusan Dalai CLA 2012-04-03 07:39:54 EDT
MenuHelper.getIconURI() is not working for FileImageDescriptor. Due to that toolbar menu is shown without icon.

URL url = FileLocator.find(bundle, new Path(parentPath).append(path), null); is returning null for valid icon path.

The bundle.getResource(path) is returning correct URL.
Comment 4 Paul Webster CLA 2012-04-03 09:28:56 EDT
When Brian gets back I'd like to know why the MenuHelper method isn't returning the correct icon URI, although as mentioned in comment #2 this problem will probably go away with M7

PW
Comment 5 Paul Webster CLA 2012-04-25 14:55:30 EDT
Brain, is there a problem with our handling of FileImageDescriptor in getIconURI(*)?  If so can we move that to another bug.

The problem depicted in the screenshot has been fixed by bug 319704

PW
Comment 6 Brian de Alwis CLA 2012-04-25 15:24:06 EDT
(In reply to comment #5)
> is there a problem with our handling of FileImageDescriptor in
> getIconURI(*)?  If so can we move that to another bug.

We seem to be unable to compute a durable icon for some icons — I'm just starting to look into it now.  Let's use bug 375771 to track that issue.
Comment 7 Paul Webster CLA 2012-05-01 14:27:23 EDT
In I20120430-1800

There's now bug 377961