Community
Participate
Working Groups
I downloaded Eclipse 4.3M7 SDK. I ran it and switched to the Resource perspective. I shrank the project explorer and outline pane until both view titles were truncated. I hovered over each title - a tooltip is not shown for Outline. I do the same in Eclipse 3.6.2 and a tooltip is shown.
It's possible that we're not actually setting the tooltip for the views in Eclipse 4. The tooltip you see for the Package Explorer likely says something like "Workspace" no ? It doesn't appear to me that whether the label is completely visible or not makes a difference (i.e. I don't get a tooltip for the Outline view regardless of how wide the stack is...). I could add the tooltip back, making it only show or not based on whether or not the label gets completely drawn is a fair bit harder... Daniel, check where we actually construct the new MPlaceholder for a newly opening part to see if we're setting the attribute in the model or not. Note that if we go this route we'll also have to update the ModeledPageLayout code to match setting the tooltip on creation...
Hi Eric, Thanks for looking at this. That's really interesting. We have an abstract class for the bulk of our views called ResourcesView. We definitely don't set tooltips on that one, and didn't in the old version of our product based on 3.6.2. Nevertheless, there was a tooltip once the title was truncated (but no tooltip if the title wasn't truncated). I've tried setting the tooltip in the init method of our abstract class in Eclipse 4.2.2 and now we get a tooltip whether or not the title is truncated. This is a useful workaround for us but obviously only applies to the views we have control of.
Bogdan, was the show / no show of the tooltip something that the old CTF handled but not the new one ?
My understanding is that this was handled 'internally' by the CTabFolder implementation. If I'm wrong in this just pass the defect back with comments...
I can replicate this behavior in the 4.3 but I see the same behavior in 3.7.2. (ie. no Outline tooltip). The problem is that no one is setting the tooltip for Outline - for the Package Explorer StackRenderer.createTab sets the tooltip text from the part: cti.setToolTipText(part.getLocalizedTooltip()); I'm think we need to add the "Outline" string to the part and all will be well. Back to you!
(In reply to comment #5) > I can replicate this behavior in the 4.3 but I see the same behavior in > 3.7.2. (ie. no Outline tooltip). > > The problem is that no one is setting the tooltip for Outline - for the > Package Explorer StackRenderer.createTab sets the tooltip text from the part: > > cti.setToolTipText(part.getLocalizedTooltip()); > > I'm think we need to add the "Outline" string to the part and all will be > well. > > Back to you! It works in this way that when tooltip is set to the null value then the SWT handles it internally (like it works in the 3.x i.e. for the 'Outline' view). Currently for the 'Outline' we set not null but empty tooltip (length == 0) and the default SWT behaviour is disabled. It seems to be some regression on our site or the SWT one. However I would skip it as the SWT bug, like Eric suggested - they should consider the null and empty values the same and process the default behaviour for such cases. We can temporarily use workaround for that if you want - http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=34a6b1183be187ca514ee27bb421ceadd7513744 thanks, Daniel
The problem is that we are setting "" instead of null. As per the CTI javadoc, null is what you want to pass to show the default tooltip (which is what you want to get the truncated behavior): * Sets the receiver's tool tip text to the argument, which * may be null indicating that the default tool tip for the * control will be shown. Passing "", means show "" (which is what we are doing). Patch looks OK, could probably inline it.
Pushed a fox to Gerrit: https://git.eclipse.org/r/12890 This just makes the default tooltip null instead of an empty string, allowing the CTF's default behavior to work again...
Is it possible to get this integrated for Eclipse 4.4, please?
Or actually a service refresh of 4.3 would be even better :-)
Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6e4b8757a3fb97f5ad0c076c920988bc185eabd4 PW
Verified in the build: I20130805-2000
We caused an API breakage with this fix, org.eclipse.ui.IWorkbenchPart.getTitleToolTip() says it never returns null PW
(In reply to Paul Webster from comment #13) > We caused an API breakage with this fix, > org.eclipse.ui.IWorkbenchPart.getTitleToolTip() says it never returns null > > PW Reverted the fix with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d5c990436eb4ab341de6b552a592ef9dd43b0525 and fixed it with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ed37f1c040bbbd54e6511dd7b5b09df50a73a488
Update slightly outdated tests. "" in the model tooltip should equal null in the CTabItem tooltip. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=20f1140d9c9690f75122b893d6f11b137d629c4e PW
Verified in I20131030-2000.