Class Twins in Intellisense

Bug reports.
User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Class Twins in Intellisense

Post by testautomator » Wed Jan 29, 2014 5:36 am

Hi,
We have classes in our solution that we have written on our own. No recording is done, at all.
Now, the intellisense is showing 2 times a single class when you type it in. This does not happen in VS Express 2012. We can use any one of the showing classes and there is not problem. Both have same functions.
I have attached a screen shot with comparison.

Here is how one of the classes is structured.
All these classes are in one .cs file. There are other classes in different files but under same namespace.
namespace mynamespace
{
public static class toolstab
{
public static class1 alias2class1 = new class1();
public static class2 alias2class2 = new class2();
static toolstab()
{
// I am a constructor
}
public static function1()
{}
public static function2()
{}
}// Class toolstab ends here

public class class1
{
public login(){}
}
public class class2
{// Inside its got its own constructor and functions}
} // namespace ends here

This is how we use them: toolstab.alias2class1.login();
You do not have the required permissions to view the files attached to this post.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Class Twins in Intellisense

Post by krstcs » Wed Jan 29, 2014 2:36 pm

Have you tried it in SharpDevelop? Ranorex is built on top of SharpDevelop, so testing there would be a better way to determine where the problem is.
Shortcuts usually aren't...

User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Re: Class Twins in Intellisense

Post by testautomator » Thu Jan 30, 2014 5:23 am

I have not. I am using ranorex 4.1. You think I should install the SharpDevelop and then try this?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Class Twins in Intellisense

Post by Support Team » Fri Jan 31, 2014 1:52 pm

Hello testautomator,

In general the intellisense is a feature of SharpDevelop, but I tried to reproduce the issue on my machine using Ranorex and was not able to reproduce it.
Can you please send a source file in order to reproduce the issue? Additionally please tell me the exact version of Ranorex.
Thank you!

Regards,
Bernhard

User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Re: Class Twins in Intellisense

Post by testautomator » Tue Feb 04, 2014 8:30 am

Hi,
I am not sure if I can give you the source file. Have to check with my company. Its not happening in Visual std express 2012 though.
But here is the other info you asked, Rx version: 4.1.4.16685

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Class Twins in Intellisense

Post by Support Team » Wed Feb 05, 2014 4:32 pm

Hi testautomator,

Thank you for the information. In order to analyze the issue we will need your code or an example.
You can also send the project or the sample to [email protected]

Regards,
Bernhard

User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Re: Class Twins in Intellisense

Post by testautomator » Thu Feb 06, 2014 5:26 am

The code exactly the same with different names to classes or functions. I dont think I can give you the code since its not a shop stopper or a major problem. No issues with the functionality of the intellisense though.
Can you tell me any reasons this might be happening?
Here is another information,
The toolstab is in another separate file which is under namespace1
The below code is inside a single file. Where the main testing control moves around.
Do you think it might be due to "using namepsace1;" code?
But again this does not happen in VS. I think this cannot go further without me sending you guys the file.

using namespace1;

namesapce namespace1
{
class sanitytest
{
calling the below function;
}
public void sanitytest_function1()
{
toolstab.alias1.login();
}
}

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Class Twins in Intellisense

Post by krstcs » Fri Feb 07, 2014 2:37 pm

You could remove that using directive and see what happens. It shouldn't be there anyway, and I'm not sure why .NET is even allowing it in the first place.
Shortcuts usually aren't...

User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Re: Class Twins in Intellisense

Post by testautomator » Mon Feb 24, 2014 5:37 am

@krstcs,
Hi, how do you do it? And what is a directive? :(
Also, I tried the same solution on another machine and there also it happens on the Ranorex but not in Visual Studio over there. Its a VM machine. That means its not a coding issue. VS is the showing classes properly.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Class Twins in Intellisense

Post by krstcs » Mon Feb 24, 2014 2:33 pm

The using directive is the part that says "using namespace1;" - you don't need this inside the file that contains namespace1. Just delete the line.

Please try opening the solution in SharpDevelop (not Visual Studio). Ranorex is built on the SharpDevelop framework and opening the solution in SharpDevelop will give a better result than Visual Studio. SharpDevelop is free and open-source, and can be downloaded from http://www.icsharpcode.net/opensource/sd/.


Also, I would highly recommend doing some reading on .NET. You are a .NET developer now (since Ranorex is built on .NET), so you need to learn about it.
Shortcuts usually aren't...

User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Re: Class Twins in Intellisense

Post by testautomator » Tue Feb 25, 2014 6:01 am

Hi krstcs,
Thanks for the tip. I installed the Sharpdev and it dosent happen there. So it looks like its Rx issue. I have attached the screenshot.
Also, please let me know where to start for .NET. I always get confused where to start when you are automating using C#. Because I dont think I can start normally as a developer would. Please help :cry:

Also, one more thing is happening with Rx. I have around 20K lines of code in a single sanity test .cs file. It kinda gets stuck or freezes when scrolling through it. PARTICULARLY when scrolling through a huge commented section. Click on the commented section and start freezing. Happens both at Rx and Sharpdev
You do not have the required permissions to view the files attached to this post.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Class Twins in Intellisense

Post by odklizec » Tue Feb 25, 2014 6:47 am

Hi, the problem is, that current Ranorex version is built on an older version of SharpDevelop. So the problem you are experiencing may very well be a problem of SharpDevelop, which is probably fixed in the standalone version of SD ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Re: Class Twins in Intellisense

Post by testautomator » Wed Feb 26, 2014 5:43 am

@odklizec ,
Quite possible. Hope they get the new one from Sharpdev and both are fixed. But we dont even know if they are bugs.
Also, anybody has experienced the freezing?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Class Twins in Intellisense

Post by Support Team » Fri Feb 28, 2014 12:54 pm

Hi all,

There is already a plan to update to a newer SharpDevelop version, but unfortunately this is a long and tedious task.
We can also try to check if it is possible to overcome the issue without waiting for the new SharpDevelop version. Is it possible to post a small Ranorex Solution in order to help us to reproduce the issue?
Thank you!

Regards,
Bernhard

User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Re: Class Twins in Intellisense

Post by testautomator » Tue Mar 04, 2014 5:30 am

Hi,
Not sure when I can do it. We are busy with completing the test cases and this problem is not a show stopper at all. So it might take time.
If anyone else can help reproduce this, that would be great! :wink: