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 17:40 Go to next message
Joe Luebker is currently offline Joe Luebker
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] Fri, 20 February 2009 20:17 Go to previous messageGo to next message
Ketan Patel is currently offline Ketan Patel
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 11:52 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
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 11:42 Go to previous messageGo to next message
Joe Luebker is currently offline Joe Luebker
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 12:03 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
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: Wed Apr 16 12:17:48 EDT 2014

Powered by FUDForum. Page generated in 0.01822 seconds