Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Changing the displayed name of a View
Changing the displayed name of a View [message #444893] Thu, 23 February 2006 03:57 Go to next message
Antonio Gurisatti is currently offline Antonio GurisattiFriend
Messages: 109
Registered: July 2009
Senior Member
I have a View (extends ViewPart) and want to change its displayed name (the one shown in the tab.

So in the views constructor I added: setPartName("My View");

Nothing happens.

I'd appreciate very much if someone tells my what is going wrong.

Thanks a lot.
Re: Changing the displayed name of a View [message #444894 is a reply to message #444893] Thu, 23 February 2006 04:05 Go to previous messageGo to next message
Rohit Khariwal is currently offline Rohit KhariwalFriend
Messages: 114
Registered: July 2009
Senior Member
hi,
you can change the name in plugin.xml also
<extension
point="org.eclipse.ui.views">
<view
name="My View"
class="Project.View"
id="Project.view">
</view>
</extension>
Re: Changing the displayed name of a View [message #444895 is a reply to message #444893] Thu, 23 February 2006 05:14 Go to previous messageGo to next message
Antonio Gurisatti is currently offline Antonio GurisattiFriend
Messages: 109
Registered: July 2009
Senior Member
Sorry buddy but that is not a solution to my problem. The name of the view depends on other factors (like a selection from a tree) an so it must be changed dynamically.

And the question remains: Wy the instruction "setPartName("My Name") is not working?

Thanks
Re: Changing the displayed name of a View [message #444896 is a reply to message #444895] Thu, 23 February 2006 07:40 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Antonio Gurisatti wrote:
> Sorry buddy but that is not a solution to my problem. The name of the view depends on other factors (like a selection from a tree) an so it must be changed dynamically.
>
> And the question remains: Wy the instruction "setPartName("My Name") is not working?

Hmmh, if you had said "Why is the instruction setPartName("")" not
working, I would have quoted the specs of setPartName, which say, that
this makes the ViewPart assigning a default name. I also use dynamic
part name changes on ViewPart derivatives since Eclipse 3.0 and I never
had any problems with that. But I also never tried to set the name
**before** createPartControl has been finished, as you obviously do.
You should try to set the part name just after this life-cycle boundary
method and if you succeed you could make a request that this behaviour
should have been documented.

Greetings from Bremen,

Daniel Krügler
Re: Changing the displayed name of a View [message #444899 is a reply to message #444893] Thu, 23 February 2006 09:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pverma.gmail.com

Antonio Gurisatti wrote:
> So in the views constructor I added: setPartName("My View");

You say you have added the statement in the constructor. Try adding that
statement in the "createPartControl()" function and it should work.
Re: Changing the displayed name of a View [message #444904 is a reply to message #444899] Thu, 23 February 2006 14:29 Go to previous message
Antonio Gurisatti is currently offline Antonio GurisattiFriend
Messages: 109
Registered: July 2009
Senior Member
You were absolutely right! These statements go in the createPartControl() method.

Thanks a lot for your help
Previous Topic:Rearrange Items in Menu bar
Next Topic:RCP Shapes keyboard shortcuts
Goto Forum:
  


Current Time: Fri Dec 06 14:18:33 GMT 2024

Powered by FUDForum. Page generated in 0.04028 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top