| Summary: | [Compatibility] Huge toolbar buttons with EcoreDiagramEditor | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Nicolas Bros <nicolas.bros> | ||||||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||||||
| Status: | VERIFIED FIXED | QA Contact: | Remy Suen <remy.suen> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | pwebster, remy.suen | ||||||||
| Version: | 4.2 | ||||||||||
| Target Milestone: | 4.2 M3 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 331377 | ||||||||||
| Attachments: |
|
||||||||||
Version : Eclipse SDK Version: 4.1.0 Build id: I20110805-1200 Created attachment 203658 [details]
screenshot 3.7.1
For comparison, here is how it looks with Eclipse 3.7.1:
Eclipse SDK
Version: 3.7.1
Build id: M20110909-1335
I appear to get this problem even if I just open a the example 'logic' file editor from the GEF examples. One rough guess might be that there contributions contain non-null text...perhaps we should 'trim' the text and set 'null' if it's empty... As we're unable to extract the image from the ActionContributionItem, we end up using its text which causes all the other tool items of that tool bar to have the same width as the one with text on it. Turning such items into opaque model items would resolve this problem. What do you think, Paul? (In reply to comment #5) > As we're unable to extract the image from the ActionContributionItem This is because they're a FileImageDescriptor instead of a URLImageDescriptor. Created attachment 203703 [details]
ToolBar rendering patch v1
Here is an illustrative patch to point out where the problematic code is.
(In reply to comment #5) > > Turning such items into opaque model items would resolve this problem. What do > you think, Paul? Is it not possible to turn a FileImageDescriptor into a URLImageDescriptor? file://... ? If we leave them Opaque, they'll work but we won't honour any command related code like an actionDefinitionId or keybinding. PW (In reply to comment #8) > Is it not possible to turn a FileImageDescriptor into a URLImageDescriptor? > file://... ? That wouldn't work because the FID is actually for loading resources within the bundle (using getResourceAsStream(String)). We would have to translate the class into its source bundle and then perform some string manipulation. I gave up the last time I tried to do this but I don't remember if that was out of frustration of if it was because of a technical reason. Pushed more reflection code to R4_development. Marking as RESOLVED/FIXED. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=8475ac8232733c18afbbc987a161dea9d58b0f8e Verified with I20111025-2000 on Windows XP. Thanks for testing Eclipse 4, Nicolas! |
Created attachment 203657 [details] screenshot When I open the Ecore Tools diagram editor (org.eclipse.emf.ecoretools.diagram.part.EcoreDiagramEditor), I see huge buttons in the toolbar : see attached screenshot.