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

Bug 304196

Summary: [ViewMgmt] Eclipse 3.5.1 destroys editor titles...
Product: [Eclipse Project] Platform Reporter: Daniel Stein <daniel.stein>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: darin.eclipse, emoffatt, prakash, remy.suen
Version: 3.5.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
the mentioned screenshot
none
the defect window none

Description Daniel Stein CLA 2010-03-01 07:18:23 EST
Build Identifier:  M20090917-0800

We migrated our plugins from eclipse 3.4 to eclipse 3.5.  
Since that time sometimes the "title-area"  of one Editor-Part  is overlayed by buttons from one of our views. 

(see attached screenshot:)

The buttons shown changes sometimes, when the rcp restarts.

It looks like a paint-error.  If the active View-Part is changed to the view that contains this button the title-are changes back to normal text. 

What could we do to fix that? 
We're running out of ideas...  :blush: 

Reproducible: Sometimes
Comment 1 Remy Suen CLA 2010-03-01 07:19:53 EST
(In reply to comment #0)
> (see attached screenshot:)

No screenshot has been attached.

Which service pack are you running on?
Comment 2 Daniel Stein CLA 2010-03-01 07:20:02 EST
Created attachment 160471 [details]
the mentioned screenshot
Comment 3 Daniel Stein CLA 2010-03-01 07:24:51 EST
Thanks. 
We are using Eclipse SDK Version: 3.5.1
Comment 4 Remy Suen CLA 2010-03-01 07:27:36 EST
(In reply to comment #2)
> Created an attachment (id=160471) [details]
> the mentioned screenshot

Does the error occur on XP style instead of Win2k/Classic style?

(In reply to comment #3)
> We are using Eclipse SDK Version: 3.5.1

I was referring to your Microsoft Windows XP service pack actually.
Comment 5 Daniel Stein CLA 2010-03-01 07:30:09 EST
(In reply to comment #4)
> (In reply to comment #2)
> > Created an attachment (id=160471) [details] [details]
> > the mentioned screenshot
> 
> Does the error occur on XP style instead of Win2k/Classic style?
> 
> (In reply to comment #3)
> > We are using Eclipse SDK Version: 3.5.1
> 
> I was referring to your Microsoft Windows XP service pack actually.

Our Pc's uses Win XP Service Pack 2
Comment 6 Remy Suen CLA 2010-03-01 17:38:07 EST
(In reply to comment #2)
> Created an attachment (id=160471) [details] [details]
> the mentioned screenshot

Does the error occur on XP style instead of Win2k/Classic style?
Comment 7 Daniel Stein CLA 2010-03-02 01:10:39 EST
(In reply to comment #6)

> Does the error occur on XP style instead of Win2k/Classic style?

What does this mean? How can I change this style?

Thank you so much for your interest and help. 
This problems drives me crazy :-)
Comment 8 Eric Moffatt CLA 2010-04-05 14:19:34 EDT
Daniel, this appears to be a layout issue (i.e. some toolbar is being incorrectly placed on top of the editor's tab)...

Does a resize of the workbench window solve the issue?
What happens when you open another editor? 
Do you use the single editor tab preference?
Comment 9 Daniel Stein CLA 2010-04-06 02:07:31 EDT
(In reply to comment #8)
 
Thanks for your reply.

> Does a resize of the workbench window solve the issue?

No. Opening the view the buttons belong to fix the problem.

> What happens when you open another editor? 
The "defect editor" remains in the same state. The new opened editor shows up normaly.

> Do you use the single editor tab preference?

I don't know. Do you mean this preference? : 

IWorkbenchPreferenceConstants#IWorkbenchPreferenceConstants
Comment 10 Daniel Stein CLA 2010-04-06 02:17:59 EDT
> IWorkbenchPreferenceConstants#IWorkbenchPreferenceConstants

Uups, pasting Error: 

IWorkbenchPreferenceConstants#SHOW_MULTIPLE_EDITOR_TABS
Comment 11 Eric Moffatt CLA 2010-04-07 15:11:40 EDT
Yes, but I think you already answered me indirectly when you said that the second editor opens 'normally' :).

We're just trying to get a handle on where the problem might be. If it were a general issue we'd have been flooded with reports...

Which view was it that supplied the TB you show in the screen cap? What was that view's current state in the UI (not there, in a stack but not on top, in the fast view bar...)?
Comment 12 Daniel Stein CLA 2010-04-08 02:26:48 EDT
> Which view was it that supplied the TB you show in the screen cap? What was
> that view's current state in the UI (not there, in a stack but not on top, in
> the fast view bar...)?

I add a new screenshot (the defect window), that answers your questions. The View (title: Werte) contributes Actions to the Toolbar via  

IToolBarManager toolbar = getViewSite().getActionBars().getToolBarManager();
toolbar.add(myAction)
...
Comment 13 Daniel Stein CLA 2010-04-08 02:27:34 EDT
Created attachment 164169 [details]
the defect window
Comment 14 Daniel Stein CLA 2010-10-04 08:08:33 EDT
Hi, 

I've got further information reagarding the described problem: 

In the view, which contains the buttons that overlays the "title-area" I set the background of the Toolbar to another color via the interface IToolbarManager2.  The buttons in title-area now have the color that I set to the view-Toolbar-Manager. It seems that eclipse paints the view toolbar twice. One time in the view and one time in the editor title-area. 
The big question is why?
Comment 15 Remy Suen CLA 2010-10-04 08:15:21 EDT
(In reply to comment #7)
> > Does the error occur on XP style instead of Win2k/Classic style?
> 
> What does this mean? How can I change this style?

If you access the properties of your desktop, you can change your theme.

The Classic theme is the old flat theme whereas the XP theme is the new look that Microsoft gave to Windows in the XP release.
Comment 16 Daniel Stein CLA 2010-10-04 08:21:49 EDT
(In reply to comment #15)
> (In reply to comment #7)
> > > Does the error occur on XP style instead of Win2k/Classic style?
> > 
> > What does this mean? How can I change this style?
> 
> If you access the properties of your desktop, you can change your theme.
> 
> The Classic theme is the old flat theme whereas the XP theme is the new look
> that Microsoft gave to Windows in the XP release.

In my company we can't change the theme on our work machines. We must live with the old flat theme...
Comment 17 Remy Suen CLA 2010-10-05 20:12:17 EDT
If this problem still occurs on Eclipse 3.6.x, please provide code and steps to reproduce the problem.
Comment 18 Daniel Stein CLA 2010-11-16 07:28:46 EST
(In reply to comment #17)
> If this problem still occurs on Eclipse 3.6.x, please provide code and steps to
> reproduce the problem.


The problem still occurs on Eclipse 3.6.1 but we finally found a workaround by chance: 

We changed the implementation of  our EditorInput (IEditorInput) 
The method #exists() now returns true instead of false and we implemented the Interface IPersistableElement  and return it in the Methode #getPersistable(). Finally we implemented an IElementFactory to recreate the editorInputs. 
Now the problem is gone.  
The advantage of the workaround is also that eclipse now recreates the editors that the user don't close on exit. But the wohle thing is very strange at all...
Comment 19 Remy Suen CLA 2010-12-14 08:33:37 EST
From the screenshots, this bug feels similar to bug 329754.
Comment 20 Daniel Stein CLA 2010-12-14 08:49:32 EST
(In reply to comment #19)
> From the screenshots, this bug feels similar to bug 329754.

Thank you for the hint
Comment 21 Eric Moffatt CLA 2011-01-31 16:03:18 EST
Daniel, just a heads up that I just committed a fix for bug 329754 and it may be worth checking once M6 comes out (or not if you're satisfied with your workaround).

If you do could you please ping on this defect with your results ?
Comment 22 Daniel Stein CLA 2011-02-01 01:17:39 EST
(In reply to comment #21)
> Daniel, just a heads up that I just committed a fix for bug 329754 and it may
> be worth checking once M6 comes out (or not if you're satisfied with your
> workaround).
> 
> If you do could you please ping on this defect with your results ?

Thanks for your work. I'll give M6 a try.
Comment 23 Daniel Stein CLA 2011-02-01 01:18:45 EST
(In reply to comment #22)
> (In reply to comment #21)
> > Daniel, just a heads up that I just committed a fix for bug 329754 and it may
> > be worth checking once M6 comes out (or not if you're satisfied with your
> > workaround).
> > 
> > If you do could you please ping on this defect with your results ?
> 
> Thanks for your work. I'll give M6 a try.

Is there a chance to get the fix for 3.6 ?
Comment 24 Remy Suen CLA 2011-02-01 11:59:28 EST
(In reply to comment #23)
> Is there a chance to get the fix for 3.6 ?

Very unlikely given the low severity of this problem (that being it does not cause Eclipse to crash or cause data loss for example).
Comment 25 Daniel Stein CLA 2011-03-11 02:51:57 EST
(In reply to comment #22)
> (In reply to comment #21)
> > Daniel, just a heads up that I just committed a fix for bug 329754 and it may
> > be worth checking once M6 comes out (or not if you're satisfied with your
> > workaround).
> > 
> > If you do could you please ping on this defect with your results ?
> 
> Thanks for your work. I'll give M6 a try.

M6 fixed the problem. So I wait for 3.7 to come out and then migrate my app to it. 

Thanks!