This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 424433 - [EditorMgmt] Missing tool tips (was: Editor switcher dialog doesn't show path any more)
Summary: [EditorMgmt] Missing tool tips (was: Editor switcher dialog doesn't show path...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P2 major (vote)
Target Milestone: 4.4 RC1   Edit
Assignee: Eric Moffatt CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
: 425154 426334 (view as bug list)
Depends on:
Blocks: 387579
  Show dependency tree
 
Reported: 2013-12-19 06:43 EST by Markus Keller CLA
Modified: 2014-05-12 06:50 EDT (History)
6 users (show)

See Also:
pwebster: review+


Attachments
Switch Editor Dialog, no paths (53.36 KB, image/png)
2014-01-21 06:35 EST, Paul Webster CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2013-12-19 06:43:36 EST
The editor switcher dialog (Window > Navigation > Switch to Editor...) doesn't show the path any more.

Got broken somewhere between I20131112-0800 and I20131119-0800.
Comment 1 Markus Keller CLA 2013-12-19 09:08:21 EST
Probably broken by work on bug 387579. It's hard to pinpoint the reason, but http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=5ccbeaf04e4b48154395960c07edda5948523d41 looks suspicious.
Comment 2 Paul Webster CLA 2013-12-19 09:40:00 EST
(In reply to Markus Keller from comment #1)
> Probably broken by work on bug 387579. It's hard to pinpoint the reason, but
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=5ccbeaf04e4b48154395960c07edda5948523d41 looks suspicious.

Yes, that commit changed CompatibilityPart so it started putting the part tooltip in the transient data instead of in the model element, so it's not longer available to the EditorReference (that gets it out of the model data)

PW
Comment 3 Dani Megert CLA 2014-01-13 08:51:17 EST
*** Bug 425154 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2014-01-13 08:52:32 EST
This should be fixed for M5.
Comment 5 Eric Moffatt CLA 2014-01-16 10:57:27 EST
Committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6cc7cccd973320f28579a4446220d708487809b6

This extends the 'getTitle' logic to check for an over-ridden tooltip (??) first.

This seems somewhat odd to me but does appear to work...Dani ??
Comment 6 Paul Webster CLA 2014-01-16 12:43:37 EST
This fix caused at least 2 test failures in UiTestSuite

PW
Comment 7 Paul Webster CLA 2014-01-16 13:17:10 EST
The 2 failing tests:

UI Test Suite-fixed
org.eclipse.ui.tests.UiTestSuite
org.eclipse.ui.tests.api.ApiTestSuite
org.eclipse.ui.tests.api.IWorkbenchPageTest
testOpenEditors1(org.eclipse.ui.tests.api.IWorkbenchPageTest)
junit.framework.ComparisonFailure: expected:<test[]0.txt> but was:<test[OpenEditors/test]0.txt>
	at junit.framework.Assert.assertEquals(Assert.java:100)
	at junit.framework.Assert.assertEquals(Assert.java:107)
	at junit.framework.TestCase.assertEquals(TestCase.java:269)
	at org.eclipse.ui.tests.api.IWorkbenchPageTest.testOpenEditors1(IWorkbenchPageTest.java:2965)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:176)
	at junit.framework.TestCase.runBare(TestCase.java:141)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
	at org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness$1.run(PlatformUITestHarness.java:47)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3746)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3394)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1122)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1006)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:146)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:612)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:565)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
	at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runApp(NonUIThreadTestApplication.java:54)
	at org.eclipse.pde.internal.junit.runtime.UITestApplication.runApp(UITestApplication.java:47)
	at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:48)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

testOpenEditors3(org.eclipse.ui.tests.api.IWorkbenchPageTest)
junit.framework.ComparisonFailure: expected:<test[]1.txt> but was:<test[OpenEditors/test]1.txt>
	at junit.framework.Assert.assertEquals(Assert.java:100)
	at junit.framework.Assert.assertEquals(Assert.java:107)
	at junit.framework.TestCase.assertEquals(TestCase.java:269)
	at org.eclipse.ui.tests.api.IWorkbenchPageTest.testOpenEditors3(IWorkbenchPageTest.java:3014)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:176)
	at junit.framework.TestCase.runBare(TestCase.java:141)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
	at org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness$1.run(PlatformUITestHarness.java:47)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3746)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3394)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1122)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1006)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:146)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:612)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:565)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
	at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runApp(NonUIThreadTestApplication.java:54)
	at org.eclipse.pde.internal.junit.runtime.UITestApplication.runApp(UITestApplication.java:47)
	at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:48)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Comment 8 Eric Moffatt CLA 2014-01-16 14:38:41 EST
OK, I'm truly confused...

a) the defect was about the dialog not showing the full path as queried using EditorReference#getTitle().

b) the tests are failing because EditorReference#getTitle() now returns the full path.

How can the same method be used to get two different results ?
Comment 9 Eric Moffatt CLA 2014-01-16 15:04:04 EST
OK, I looked at 3.8 and finally figured out I fixed the wrong method...

I've reverted the original change and I'll commit the new fix (once the tests finish...;-).
Comment 10 Eric Moffatt CLA 2014-01-16 15:18:11 EST
Committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8f34b54a6719eba7782f465f6a206ea342cd80ec

Which applies the same logic to the WorkbenchPartReference#getTitleToolTip()...
Comment 11 Eric Moffatt CLA 2014-01-16 15:18:34 EST
Marking FIXED (hopefully for good...;-).
Comment 12 Dani Megert CLA 2014-01-17 09:09:57 EST
(In reply to Eric Moffatt from comment #11)
> Marking FIXED (hopefully for good...;-).

Almost :-)

The same change (see comment 3) caused the part tool tips to be broken, see bug 425154, hence I marked it as duplicate of that one. This still doesn't work in N20140116-2000.
Comment 13 Paul Webster CLA 2014-01-21 06:35:42 EST
Created attachment 239172 [details]
Switch Editor Dialog, no paths

Current state in 4.4.0.I20140120-0800.

Open an existing workspace and bring up Switch To Editor dialog.  Most of the path names are not shown.

PW
Comment 14 Dani Megert CLA 2014-01-21 09:36:28 EST
(In reply to Paul Webster from comment #13)
> Created attachment 239172 [details]
> Switch Editor Dialog, no paths
> 
> Current state in 4.4.0.I20140120-0800.
> 
> Open an existing workspace and bring up Switch To Editor dialog.  Most of
> the path names are not shown.
> 
> PW

Interesting. I just tested again using I20140120-2000 on Windows 7 and it shows all the paths in that dialog (invoked via Ctrl+Shift+E).
Comment 15 Paul Webster CLA 2014-01-21 09:49:36 EST
It seems related to lazy re-creation.  I have to open an existing session with a number of editors, and open the Switch Editor dialog before I've instantiated most of the editors.

PW
Comment 16 Dani Megert CLA 2014-01-21 10:08:55 EST
(In reply to Paul Webster from comment #15)
> It seems related to lazy re-creation. 

That's it! When I restart, I only see the paths for the created editors.
Comment 17 Dani Megert CLA 2014-01-22 06:51:43 EST
*** Bug 426334 has been marked as a duplicate of this bug. ***
Comment 18 Eric Moffatt CLA 2014-01-22 12:22:14 EST
OK, committed 

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1ca53404516f4319297698293327ae287d02c16d

This restores the tooltip from the stored Memento when the EditorReference is created (rather than when it's instantiated...).
Comment 19 Eric Moffatt CLA 2014-01-22 12:49:49 EST
Here's another tweak that causes the initial rendering of the tabs to use the tooltip override if there is one...

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=96e8ea37562ab91f0a8ddb56959334bd429416fe

I'll look into the tests now...
Comment 20 Dani Megert CLA 2014-01-23 03:06:17 EST
The tool tips are still missing. See also comment 12.

1. start new workspace
2. minimize Outline
3. hover over the icon
==> no tool tip
Comment 21 Dani Megert CLA 2014-01-23 03:06:56 EST
*** Bug 426334 has been marked as a duplicate of this bug. ***
Comment 22 Eric Moffatt CLA 2014-01-23 13:48:34 EST
Dani, this will likely have to wait until M6 so we have time to thoroughly review how all these mechanisms fit together.
Comment 23 Eric Moffatt CLA 2014-02-24 16:16:46 EST
Committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d04334827f11a229d0951c3c11d715b5343aeacf

This just ensures that if the override tooltip is "" then we treat it as missing, allowing the regular processing to proceed.
Comment 24 Dani Megert CLA 2014-02-26 06:44:41 EST
(In reply to Eric Moffatt from comment #23)
> Committed:
> 
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=d04334827f11a229d0951c3c11d715b5343aeacf
> 
> This just ensures that if the override tooltip is "" then we treat it as
> missing, allowing the regular processing to proceed.

Verified in N20140225-2000:

Better, at least *a* tool tip is now shown but it's not not correct:
- For fast/minimized views the view name must always be shown. Currently, if
  a view has additional info, like number of errors, the tool tip only shows
  that.
- When starting a workspace where a view is minimized, it does not show the
  detail information. This basically renders the feature to see the number of
  problems useless.

Here's a test case that shows both issues:
1. paste this into 'Package Explorer': public class p {x}
2. make the 'Problems' view a minimized/fast view
4. hover over the icon
   ==> BUG: shows "1 errors, 0 warnings, 0 others"
            instead "Problems (1 errors, 0 warnings, 0 others)"
5. exit
6. start again
7. hover over the icon
   ==> BUG: shows "Problems" only
Comment 25 Eric Moffatt CLA 2014-04-08 14:16:17 EDT
I've just committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=f40d67a1745f601d3fa1e7416dbeccbce482e554

This fixes the problem with the format of the minimized tooltip (step 4 of the repo scenario).

It does not fix the restart issue which may be somewhat deeper since it's connected to the timing of when the model gets rendered vs when the Problems view gets 'CREATE'd... At least now on a restart it'll show "Problems" rather than nothing (there was an empty override toolip which the commit now checks for).

Dani, should I continue or do you think we can move this off to 4.5 ?
Comment 26 Dani Megert CLA 2014-04-09 05:41:47 EDT
(In reply to Eric Moffatt from comment #25)
> I've just committed:
> 
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=f40d67a1745f601d3fa1e7416dbeccbce482e554
> 
> This fixes the problem with the format of the minimized tooltip (step 4 of
> the repo scenario).
> 
> It does not fix the restart issue which may be somewhat deeper since it's
> connected to the timing of when the model gets rendered vs when the Problems
> view gets 'CREATE'd... At least now on a restart it'll show "Problems"
> rather than nothing (there was an empty override toolip which the commit now
> checks for).
> 
> Dani, should I continue or do you think we can move this off to 4.5 ?

Yes, please continue. The fact that I can no longer see the errors and warnings of a minimized Problems view is a major issue and a regression added in 4.4 (works in 4.3.x).
Comment 27 Eric Moffatt CLA 2014-04-09 11:05:18 EDT
OK, I think I've got it...

git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=5a692cb0afee9c33c035eb71843c57ebae549967

The WorkbenchPage wasn't reporting the visibility state when a part was CREATE'd...
Comment 28 Dani Megert CLA 2014-04-10 05:38:07 EDT
(In reply to Eric Moffatt from comment #27)
> OK, I think I've got it...

Nope. Still not working in N20140409-2135 (steps from comment 24).
Comment 29 Eric Moffatt CLA 2014-05-08 15:15:31 EDT
Here's the Gerrit link:

  https://git.eclipse.org/r/26233

Basically the problem was that the 'create' call wasn't taking place because the Problems View had already been rendered during the initial startup so the 'getPart(false) == null' check was failing. Note that calling showView...CREATE on an already rendered part is mostly a no-op but does issue a partHidden event to the part if it's in a minimized stack.
Comment 30 Dani Megert CLA 2014-05-09 05:06:49 EDT
(In reply to Eric Moffatt from comment #29)
> Here's the Gerrit link:
> 
>   https://git.eclipse.org/r/26233
> 
> Basically the problem was that the 'create' call wasn't taking place because
> the Problems View had already been rendered during the initial startup so
> the 'getPart(false) == null' check was failing. Note that calling
> showView...CREATE on an already rendered part is mostly a no-op but does
> issue a partHidden event to the part if it's in a minimized stack.

It works :-)

But too me it looks like a workaround: #viewReference.getPart(false) is specified to return the part or null and if it does return the part, then one can expect that the part is really fully created, hence the tool tip should also work (note that the error indicator is visible). Can you explain why this isn't the case? I.e. I suspect the bug to be somewhere else.

Having said that, I'm fine taking this fix and investigate the real problem in more detail during 4.5.
Comment 31 Paul Webster CLA 2014-05-09 10:07:42 EDT
I created Bug 434506 to look at the startup+event firing for this case.

Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e97c7076d2865c39778e5b7fde9433dd44657f3d

PW
Comment 32 Dani Megert CLA 2014-05-12 06:50:27 EDT
Verified in I20140511-2000.