Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot tab title * mark(SWTBot tab title * mark)
icon5.gif  SWTBot tab title * mark [message #638145] Wed, 10 November 2010 08:03 Go to next message
benhu Missing name is currently offline benhu Missing nameFriend
Messages: 14
Registered: October 2010
Junior Member

Hello,
It's known that there will be a '*' mark before the title in the tab area when a editor is being edited, and it will disapear after the editor is saved.
Can I get the '*' mark? because I want to use SWTBot to check whether the Editor is in editable status or not.


Thanks,
Ben
Re: SWTBot tab title * mark [message #638150 is a reply to message #638145] Wed, 10 November 2010 08:26 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
On 11/10/10 1:33 PM, benhu wrote:
> Hello,
> It's known that there will be a '*' mark before the title in the tab
> area when a editor is being edited, and it will disapear after the
> editor is saved. Can I get the '*' mark? because I want to use SWTBot to
> check whether the Editor is in editable status or not.
>
> Thanks,
> Ben

The * indicates a dirty editor (one which has been edited after it was
saved). See the isDirty() method on the editor to get the status of this
flag.

--
Ketan
ketan.padegaonkar.name | eclipse.org/swtbot | @ketanpkr
Re: SWTBot tab title * mark [message #638358 is a reply to message #638150] Thu, 11 November 2010 00:54 Go to previous messageGo to next message
benhu Missing name is currently offline benhu Missing nameFriend
Messages: 14
Registered: October 2010
Junior Member

Thank you Ketan.
It means that I can not get a String (* + editor's title) ?
Re: SWTBot tab title * mark [message #638667 is a reply to message #638358] Fri, 12 November 2010 03:49 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
On 11/11/10 6:24 AM, benhu wrote:
> Thank you Ketan.
> It means that I can not get a String (* + editor's title) ?

No you cannot get the '*' as part of the title. It is not a part of the
title, but just an indicator icon if you will. The only way to get the
state is to call editor.isDirty()

--
Ketan
ketan.padegaonkar.name | eclipse.org/swtbot | @ketanpkr
Re: SWTBot tab title * mark [message #642867 is a reply to message #638145] Fri, 03 December 2010 05:59 Go to previous message
benhu Missing name is currently offline benhu Missing nameFriend
Messages: 14
Registered: October 2010
Junior Member

The widget which displays editor's title is a CTabItem widget, so we can use the follow code to check whether a editor's title contain a "*" mark:
SWTBotCTabItem tabItem = bot.cTabItem("*"+name);
Previous Topic:How can I get the context menu of the editor's ruler
Next Topic:How to access nested context menus of the SWT table in SWTBot?
Goto Forum:
  


Current Time: Fri Apr 26 09:10:53 GMT 2024

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

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

Back to the top