Bug 137593 - [WorkbenchParts] org.eclipse.ui.part.EditorPart#setPartName(String) doesn't refresh the tab text
Summary: [WorkbenchParts] org.eclipse.ui.part.EditorPart#setPartName(String) doesn't r...
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: All All
: P5 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2006-04-19 16:35 EDT by Julien Ponge CLA
Modified: 2020-08-04 23:24 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Ponge CLA 2006-04-19 16:35:20 EDT
I have built a GEF-based editor. Calling this method does not work as expected if the editor is already opened. The tab text won't change immediatly unless I either derive a new editor from the tab context menu and/or change the active editor by clicking on the tabs. I have verified this behavior on 3 different ports (Win32, OSX/ppc and Gtk/i386), so this has nothing to do with SWT.

My method call is rather laconic:
setPartName(file.getName());

Of course I can check in my code that there is indeed a call and that the file.getName() result is not constant.
Comment 1 Paul Webster CLA 2006-04-25 13:55:12 EDT
In your GEF editor, when you do CTRL+O CTRL+O how many versions of setPartName(*) are visible?

PW
Comment 2 Julien Ponge CLA 2006-04-27 03:47:03 EDT
(In reply to comment #1)

Hi Paul,

> In your GEF editor, when you do CTRL+O CTRL+O how many versions of
> setPartName(*) are visible?

I did just that (launched my editor, renamed my live file, then pressed CTRL+O CTRL+O) and nothing happened. The part name on the tab did not change as well.

JP
Comment 3 Paul Webster CLA 2006-04-27 07:13:24 EDT
Sorry, my bad :-)

I mean in the code for your editor part, do CTRL+O CTRL+O to get up the list of inherited methods.

PW
Comment 4 Julien Ponge CLA 2006-04-27 10:32:49 EDT
(In reply to comment #3)

Ok, there are two inherited setPartName methods:
* org.eclipse.ui.part.EditorPart (my setPartName comes from here)
* org.eclipse.ui.part;WorkbenchPart
Comment 5 Matthias Kirst CLA 2006-05-09 08:40:16 EDT
I have the same problem with a view. The title won't be updated. There are 2 versions of 'setPartName':
 org.eclipse.ui.part.ViewPart
 org.eclipse.ui.part.WorkbenchPart
Comment 6 Paul Webster CLA 2006-09-28 15:17:43 EDT
Is this still a problem in 3.3?

PW
Comment 7 Denis Roy CLA 2007-06-22 09:33:26 EDT
Changes requested on bug 193523
Comment 8 vincent lojou CLA 2012-10-17 06:35:25 EDT
5 years later...

A french engineer wants to rename a tab of a form page after it's loaded.

The method setpartname does her job very well but the display still not refreshed.


Tab text displayed : titre !

System.out.println(getPartName()); => titre !
setPartName(getPartName() + " *");
System.out.println(getPartName()); => titre ! *

Tab text displayed : titre !
Comment 9 Paul Webster CLA 2012-10-17 07:37:51 EDT
(In reply to comment #8)
> 
> Tab text displayed : titre !
> 
> System.out.println(getPartName()); => titre !
> setPartName(getPartName() + " *");
> System.out.println(getPartName()); => titre ! *
> 
> Tab text displayed : titre !

Which build are you using?

PW
Comment 10 vincent lojou CLA 2012-10-17 08:13:15 EDT
Sorry, i forgot this point.

3.6.2 currently
Comment 11 Paul Webster CLA 2012-10-17 08:18:21 EDT
This should be fixed in 4.2 (Juno)

PW
Comment 12 vincent lojou CLA 2012-10-17 08:19:49 EDT
(In reply to comment #11)
> This should be fixed in 4.2 (Juno)
> 
> PW

I am really pleased but i have to use 3.6.2 because of my project's imperative
Comment 13 Paul Webster CLA 2012-10-17 08:21:41 EDT
We no longer create builds for 3.6.2, you would have to create your own fix, patch that plugin, and distribute it with your RCP app (much more difficult if you are a plugin in the IDE)

PW
Comment 14 vincent lojou CLA 2012-10-17 08:27:03 EDT
(In reply to comment #13)
> We no longer create builds for 3.6.2, you would have to create your own fix,
> patch that plugin, and distribute it with your RCP app (much more difficult
> if you are a plugin in the IDE)
> 
> PW

Ok.

Thank's for the answer.

I hoped that it was an other way to do this job.
Comment 15 Eclipse Genie CLA 2019-12-19 14:17:34 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 16 Andrew Obuchowicz CLA 2020-08-04 23:24:10 EDT
I'm having this issue in an e4 rcp application. Is there any known fix? Or should I investigate upstream.