Page 1 of 2

Class Twins in Intellisense

Posted: Wed Jan 29, 2014 5:36 am
by testautomator
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();

Re: Class Twins in Intellisense

Posted: Wed Jan 29, 2014 2:36 pm
by krstcs
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.

Re: Class Twins in Intellisense

Posted: Thu Jan 30, 2014 5:23 am
by testautomator
I have not. I am using ranorex 4.1. You think I should install the SharpDevelop and then try this?

Re: Class Twins in Intellisense

Posted: Fri Jan 31, 2014 1:52 pm
by Support Team
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

Re: Class Twins in Intellisense

Posted: Tue Feb 04, 2014 8:30 am
by testautomator
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

Re: Class Twins in Intellisense

Posted: Wed Feb 05, 2014 4:32 pm
by Support Team
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

Re: Class Twins in Intellisense

Posted: Thu Feb 06, 2014 5:26 am
by testautomator
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();
}
}

Re: Class Twins in Intellisense

Posted: Fri Feb 07, 2014 2:37 pm
by krstcs
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.

Re: Class Twins in Intellisense

Posted: Mon Feb 24, 2014 5:37 am
by testautomator
@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.

Re: Class Twins in Intellisense

Posted: Mon Feb 24, 2014 2:33 pm
by krstcs
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.

Re: Class Twins in Intellisense

Posted: Tue Feb 25, 2014 6:01 am
by testautomator
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

Re: Class Twins in Intellisense

Posted: Tue Feb 25, 2014 6:47 am
by odklizec
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 ;)

Re: Class Twins in Intellisense

Posted: Wed Feb 26, 2014 5:43 am
by testautomator
@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?

Re: Class Twins in Intellisense

Posted: Fri Feb 28, 2014 12:54 pm
by Support Team
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

Re: Class Twins in Intellisense

Posted: Tue Mar 04, 2014 5:30 am
by testautomator
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: