Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBotStyledText#navigateTo, line number vs. line index
SWTBotStyledText#navigateTo, line number vs. line index [message #23501] Fri, 20 February 2009 22:40 Go to next message
Joe Luebker is currently offline Joe LuebkerFriend
Messages: 36
Registered: July 2009
Member
Hello all,

I was using the SWTBotStyledText#navigateTo(line, column) method in a
test and discovered that the line is actually a line index. This is not
indicated in the comment for the method. A suggestion would be to make
this more clear in the comment of the function. The SWT StyledText
widget uses an 'index' argument in many methods to make this clear. See
below for the method in SWTBotStyledText:

/**
* @param line the line numnber.
* @param column the column number.
* @see SWTBotStyledText#navigateTo(int, int)
*/
public void navigateTo(int line, int column) {
styledText.navigateTo(line, column);
}

Also, a minor issue, there is a typo in the description of the line
argument - "numnber".

Thanks,
Joe
Re: SWTBotStyledText#navigateTo, line number vs. line index [message #23544 is a reply to message #23501] Sat, 21 February 2009 01:17 Go to previous messageGo to next message
Ketan Patel is currently offline Ketan PatelFriend
Messages: 68
Registered: July 2009
Member
I agree...I keep meaning to write up a bug about that. I hope you wrote a
bug for it.
Re: SWTBotStyledText#navigateTo, line number vs. line index [message #23586 is a reply to message #23501] Sat, 21 February 2009 16:52 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
If you could attach a patch, that'd be great.

-- Ketan

On 21/2/09 04:10, Joe Luebker wrote:
> Hello all,
>
> I was using the SWTBotStyledText#navigateTo(line, column) method in a
> test and discovered that the line is actually a line index. This is not
> indicated in the comment for the method. A suggestion would be to make
> this more clear in the comment of the function. The SWT StyledText
> widget uses an 'index' argument in many methods to make this clear. See
> below for the method in SWTBotStyledText:
>
> /**
> * @param line the line numnber.
> * @param column the column number.
> * @see SWTBotStyledText#navigateTo(int, int)
> */
> public void navigateTo(int line, int column) {
> styledText.navigateTo(line, column);
> }
>
> Also, a minor issue, there is a typo in the description of the line
> argument - "numnber".
>
> Thanks,
> Joe
Re: SWTBotStyledText#navigateTo, line number vs. line index [message #23713 is a reply to message #23586] Mon, 23 February 2009 16:42 Go to previous messageGo to next message
Joe Luebker is currently offline Joe LuebkerFriend
Messages: 36
Registered: July 2009
Member
I created a bug for this as Ketan Patel suggested,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=265841

I haven't created any patches for Eclipse projects yet. If the scope of
change for this issue is small (because I don't have much familiarity
with SWTBot code base yet) I can attempt to create a patch for this. Can
anyone provide a link to a good overview/guidelines for creating patches?

I have pulled the trunk branch of SWTBot code and have a subversion
plug-in installed that will allow me to create a patch I think. I just
haven't done it yet and don't have a complete SWTBot development
environment setup yet.

Thanks,
Joe

Ketan Padegaonkar wrote:
> If you could attach a patch, that'd be great.
>
> -- Ketan
>
> On 21/2/09 04:10, Joe Luebker wrote:
>> Hello all,
>>
>> I was using the SWTBotStyledText#navigateTo(line, column) method in a
>> test and discovered that the line is actually a line index. This is not
>> indicated in the comment for the method. A suggestion would be to make
>> this more clear in the comment of the function. The SWT StyledText
>> widget uses an 'index' argument in many methods to make this clear. See
>> below for the method in SWTBotStyledText:
>>
>> /**
>> * @param line the line numnber.
>> * @param column the column number.
>> * @see SWTBotStyledText#navigateTo(int, int)
>> */
>> public void navigateTo(int line, int column) {
>> styledText.navigateTo(line, column);
>> }
>>
>> Also, a minor issue, there is a typo in the description of the line
>> argument - "numnber".
>>
>> Thanks,
>> Joe
>
Re: SWTBotStyledText#navigateTo, line number vs. line index [message #23755 is a reply to message #23713] Mon, 23 February 2009 17:03 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
Hi Joe,

Assuming that you have imported the sources into your workspace, and
have everything compiling, you just open up the classes you need to
change, and rightclick on the project explorer>Team>Create Patch, and
upload the file on bugzilla.

If things aren't compiling because of dependencies, then you just need
to install swtbot from the update site, in your eclipse instance.

-- Ketan

On 23/2/09 22:12, Joe Luebker wrote:
> I created a bug for this as Ketan Patel suggested,
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=265841
>
> I haven't created any patches for Eclipse projects yet. If the scope of
> change for this issue is small (because I don't have much familiarity
> with SWTBot code base yet) I can attempt to create a patch for this. Can
> anyone provide a link to a good overview/guidelines for creating patches?
>
> I have pulled the trunk branch of SWTBot code and have a subversion
> plug-in installed that will allow me to create a patch I think. I just
> haven't done it yet and don't have a complete SWTBot development
> environment setup yet.
>
> Thanks,
> Joe
>
> Ketan Padegaonkar wrote:
>> If you could attach a patch, that'd be great.
>>
>> -- Ketan
>>
>> On 21/2/09 04:10, Joe Luebker wrote:
>>> Hello all,
>>>
>>> I was using the SWTBotStyledText#navigateTo(line, column) method in a
>>> test and discovered that the line is actually a line index. This is not
>>> indicated in the comment for the method. A suggestion would be to make
>>> this more clear in the comment of the function. The SWT StyledText
>>> widget uses an 'index' argument in many methods to make this clear. See
>>> below for the method in SWTBotStyledText:
>>>
>>> /**
>>> * @param line the line numnber.
>>> * @param column the column number.
>>> * @see SWTBotStyledText#navigateTo(int, int)
>>> */
>>> public void navigateTo(int line, int column) {
>>> styledText.navigateTo(line, column);
>>> }
>>>
>>> Also, a minor issue, there is a typo in the description of the line
>>> argument - "numnber".
>>>
>>> Thanks,
>>> Joe
>>
Previous Topic:can I both use and modify swtbot
Next Topic:SWTBotTestCase Not Found!
Goto Forum:
  


Current Time: Thu Mar 28 21:25:01 GMT 2024

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

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

Back to the top