| Summary: | [EditorMgmt] [regression] No indication/decoration for pinned editor | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> | ||||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | alex.panchenko, dannyyoo, eclipse-bugs, eric.woodruff+eclipse, frederic.ebelshaeuser, igraham, Lars.Vogel, loskutov, markus.kell.r, mober.at+eclipse, nobody, rhuddusa, siegmaralber, solf.gm, tsk, walter.brunauer | ||||||
| Version: | 4.2 | ||||||||
| Target Milestone: | 4.5 M6 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=462613 | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 423819, 424433 | ||||||||
| Bug Blocks: | 422676, 422680 | ||||||||
| Attachments: |
|
||||||||
|
Description
Dani Megert
. In addition, the 'Pin the current editor' toolbar button does not show the state of the active editor. Closed wrong bug. *** Bug 390981 has been marked as a duplicate of this bug. *** This is still a problem in 4.3: we're seeing no visual indication whether or not an editor is pinned. We can reproduce this now and there is indeed no afordance provided. Seems odd since we can handle icon changes in the view's (JUnit, Problems...), does the editor use a different mechanism ? Committed: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=5ccbeaf04e4b48154395960c07edda5948523d41 This is a rewrite of how we handle updates to the image and tooltps through overrides. It moves the logic / responsibility for this out from under the CompatibilityParts and the Editor/View references and moves it to the StackRenderer. This is *not* finished: - Check for leaks - We don't manage the overlay images correctly in that they get a white (rather then transparent) background when adorned). - Not sure if we're handling the Tooltips correctly, need to check It complains: Description Resource Path Location Type Missing @since tag on ADORNMENT_PIN IPresentationEngine.java /org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench line 131 @since tag problem PW (In reply to Eric Moffatt from comment #7) > Committed: > > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=5ccbeaf04e4b48154395960c07edda5948523d41 > > This is a rewrite of how we handle updates to the image and tooltps through > overrides. It moves the logic / responsibility for this out from under the > CompatibilityParts and the Editor/View references and moves it to the > StackRenderer. > > This is *not* finished: > > - Check for leaks > - We don't manage the overlay images correctly in that they get a white > (rather then transparent) background when adorned). > - Not sure if we're handling the Tooltips correctly, need to check All pure e4 apps now throw a warning that the pinned_ovr.gif is not found. Stack: http://pastebin.com/5h7w1JMZ We are supposing that the org.eclipse.ui bundle is available always, which is not the case for e4 RCPs. We are also failing two JUnits: UIAllTests org.eclipse.e4.ui.tests.UIAllTests org.eclipse.e4.ui.tests.workbench.InjectionEventTest testEventInjection(org.eclipse.e4.ui.tests.workbench.InjectionEventTest) junit.framework.AssertionFailedError: expected:<1> but was:<0> ... snip JUnit assert calls ... at org.eclipse.e4.ui.tests.workbench.InjectionEventTest.testEventInjection(InjectionEventTest.java:177) testInjectWildCard(org.eclipse.e4.ui.tests.workbench.InjectionEventTest) junit.framework.AssertionFailedError: expected:<1> but was:<0> ... snip JUnit assert calls ... at org.eclipse.e4.ui.tests.workbench.InjectionEventTest.testInjectWildCard(InjectionEventTest.java:248) (In reply to Paul Webster from comment #8) > It complains: > > Description Resource Path Location Type > Missing @since tag on ADORNMENT_PIN IPresentationEngine.java > /org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench line 131 @since > tag problem Fixed this. (In reply to Sopot Cela from comment #9) > All pure e4 apps now throw a warning that the pinned_ovr.gif is not found. > Stack: http://pastebin.com/5h7w1JMZ > > We are supposing that the org.eclipse.ui bundle is available always, which > is not the case for e4 RCPs. Yes, this is a problem: Unable to resolve plug-in "platform:/plugin/org.eclipse.ui/icons/full/ovr16/pinned_ovr.gif". java.io.IOException: Unable to resolve plug-in "platform:/plugin/org.eclipse.ui/icons/full/ovr16/pinned_ovr.gif". Proposed fix for the icon reference, I copied the icon to org.eclipse.e4.ui.workbench.renderers.swt and adjusted the icon reference https://git.eclipse.org/r/#/c/18489/ (In reply to Lars Vogel from comment #12) > Proposed fix for the icon reference, I copied the icon to > org.eclipse.e4.ui.workbench.renderers.swt and adjusted the icon reference > > https://git.eclipse.org/r/#/c/18489/ Sopot testet my fix and it worked OK for him (see Gerrit review). I applied it, as otherwise we are breaking all Eclipse 4 RCP clients. If there is a better way of doing this, please feel free to revert my fix and apply the better solution. (In reply to Lars Vogel from comment #12) > Proposed fix for the icon reference, I copied the icon to > org.eclipse.e4.ui.workbench.renderers.swt and adjusted the icon reference > > https://git.eclipse.org/r/#/c/18489/ Once Bug 421344 is fixed we should remove this one and consume from org.eclipse.ui.images. PW (In reply to Paul Elder from comment #10) > We are also failing two JUnits: Still failing in N20131117-2000. This has also broken the I-build. When a part is disposed and has had an overlay image it's not cleared from the persistent data cache, leading to SWT errors when you re-open the view. To Repro: Close the package explorer then re-open it...(assuming it's only in one perspective. fix coming... http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6640e68957c1e5a8d211bf595d575c7ed2bbb3a8 Safes up the Image handling and adds some j'doc to note the requirement to check for disposed. This still needs some work; the mechanism we currently use to copy the image doesn't preserve the tranparency bits. The original image provided by the part is smaller than 16x16 but in order to adorn the image with a pin we need a 16x16 image. Currently pinning an editor leads to cheese around the original image's background... I suspect the changes from this bug are also responsible for the .log entries (see bug 422680). > This still needs some work;
Some more issues I found while testing it:
- The icon should only be visible if pinning is possible, which is only the
case when 'Close editors automatically' is enabled.
- When an editor is pinned and a file is created, its editor will be unpinned
(correct), but the icon in the toolbar is in enabled state (looks pressed).
NOTE: Works when just opening the editor instead of creating a new file.
M4 is done... (In reply to Eric Moffatt from comment #7) > Committed: > > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=5ccbeaf04e4b48154395960c07edda5948523d41 > > This is a rewrite of how we handle updates to the image and tooltps through > overrides. It moves the logic / responsibility for this out from under the > CompatibilityParts and the Editor/View references and moves it to the > StackRenderer. > > This is *not* finished: This breaks tool tips, see bug 424433 comment 2. CQ:WIND00-WB4-2600 Major remaining issues as of 4.4:
- Pin Editor icon does not appear in toolbar
==> pinning not possible via UI, one has to define a key binding and use
that shortcut
- 'Pin Editor' is not in the tab's context menu
NOTE: When pinning via shortcut, the editor tab *is* decorated, so that part works.
(In reply to Dani Megert from comment #24) > - Pin Editor icon does not appear in toolbar I'm actually glad it's no longer in the toolbar. I think that the action of pinning an editor is not common / frequent enough to justify a toolbar button. Also, contextmenu on the editor's tab is more intuitive IMHO than toolbar button. > ==> pinning not possible via UI, one has to define a key binding and use I would expect a global menu in "Window > Editor > Pin Active Editor" in order to make the action (and possible keyboard shortcut) discoverable. > - 'Pin Editor' is not in the tab's context menu Now that's a big loss IMO, and should be the preferred UI gesture for pinning an editor. But, please, don't re-introduce the toolbar button. I believe it is entirely possible to remove unwanted buttons from the toolbar. So in my opinion -- by all means put it back on the toolbar so if someone (like me) needs it -- they can have it. (In reply to Sergey Olefir from comment #26) > I believe it is entirely possible to remove unwanted buttons from the > toolbar. > > So in my opinion -- by all means put it back on the toolbar so if someone > (like me) needs it -- they can have it. +1 from me. I use it all the time, and there are much less useful buttons around to remove first. If somebody wants to remove it from the toolbar, he can do so anytime anyway. Sorry to pile on, but I'm also +1 for restoring it to the toolbar. I use that button quite frequently. Created attachment 244895 [details]
screenshot of "pin editor" in vs2012
How hard would it be to get a little "pin" control in the editor tab ?
See attached.
(In reply to Martin Oberhuber from comment #29) > Created attachment 244895 [details] > screenshot of "pin editor" in vs2012 > > How hard would it be to get a little "pin" control in the editor tab ? > See attached. This would have to be combined with the current "pin" decoration that we already have. In the end this would probably use more screen real estate than the single toolbar button. Created attachment 245451 [details] I20140722-0800 (In reply to Eric Moffatt from comment #7) > - We don't manage the overlay images correctly in that they get a white > (rather then transparent) background when adorned). Still broken, see screenshot. ResourceUtility#adornImage(..) is too simple. Better use org.eclipse.ui.internal.OverlayIcon or another class using org.eclipse.jface.resource.CompositeImageDescriptor#drawImage(ImageData, int, int). (In reply to Dani Megert from comment #24) > - Pin Editor icon does not appear in toolbar > ==> pinning not possible via UI, one has to define a key binding and use > that shortcut The "Pin Editor" toolbar button actually appears after a restart and then works fine. It just doesn't show/hide when the preference is toggled. *** Bug 436009 has been marked as a duplicate of this bug. *** *** Bug 418231 has been marked as a duplicate of this bug. *** (In reply to Dani Megert from comment #0) > 4.2. > > The indication/decoration for pinned editor is gone in 4.x. 4.5 M6 I20150318-2000: after the fix for bug 445538 the decoration/button appear properly, so we can close this issue... ... BUT as soon as few editors are hidden and the editor list is shown by clicking on the tab chevron, the *entire* icons (not just decorations) of visible *pinned* editors are disposed. I've opened bug 462613 for it. Setting target milestone (In reply to Andrey Loskutov from comment #34) > 4.5 M6 I20150318-2000: after the fix for bug 445538 the decoration/button > appear properly, so we can close this issue... Setting target milestone accordingly to 4.5M6. Remaining issue is tracked in https://bugs.eclipse.org/bugs/show_bug.cgi?id=462613 separately. |