Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to remove * in tab but still prompt when user clicks on close button?
How to remove * in tab but still prompt when user clicks on close button? [message #555814] Sat, 28 August 2010 23:51 Go to next message
yuanyun.ken is currently offline yuanyun.ken
Messages: 25
Registered: July 2009
Junior Member
Hi, all:
In our rcp application, one editor means one connection, we want to prompt user when he clicks the editor close button, so we overwrite Editor's isDirty method to return true, and overwrite promptToSaveOnClose method.
However this would add a * to the tab, out stakeholder doesn't like this.
Is there a way to remove * in tab but still prompt when user clicks on close button.

Many thanks for any help and advice? : )
Re: How to remove * in tab but still prompt when user clicks on close button? [message #556028 is a reply to message #555814] Mon, 30 August 2010 11:30 Go to previous messageGo to next message
eshvar60  is currently offline eshvar60
Messages: 51
Registered: March 2010
Member
Eclipse Presentations control how the tabs look. So I believe you would have to extend the presentationFactory point with your own presentation and then create a stack where the * behavior is overwritten. Specifically the createEditorPresentation method will need to have your custom stack in it.

Google away for more help with this.
Re: How to remove * in tab but still prompt when user clicks on close button? [message #556961 is a reply to message #555814] Fri, 03 September 2010 07:26 Go to previous messageGo to next message
yuanyun.ken is currently offline yuanyun.ken
Messages: 25
Registered: July 2009
Junior Member
Hi, eshvar60:
Thanks for your help and reply, I would give it a try : )
Re: How to remove * in tab but still prompt when user clicks on close button? [message #720624 is a reply to message #556961] Tue, 30 August 2011 20:12 Go to previous message
Marco Lopes is currently offline Marco Lopes
Messages: 56
Registered: September 2010
Member
You can hack into the core:
DefaultTabItem.DIRTY_PREFIX="";
Previous Topic:Misplaced view toolbar
Next Topic:Where did logs.zip come from?
Goto Forum:
  


Current Time: Mon Apr 21 03:24:50 EDT 2014

Powered by FUDForum. Page generated in 0.01821 seconds