Auto-complete showing members of the wrong class

Integrated Development Environment issues like IntelliTips, Resource Editor, and the ClassViewer (with the Tags tab selected in the Workspace Manager).

Auto-complete showing members of the wrong class

Postby bobh » Fri Jun 15, 2007 9:55 pm

I am using UStudio version 6.30. This same problem existed in version 6.20, BTW.

After lots of trial and error, I was finally able to find a way to get auto-complete and function tips activated for the Qt libraries I am using (a project in C++ for a GUI application).

Activated they are, but flaky. I have a class which has a private data member of type QSqlDatabase. When I type a "." after the name in the header file, it shows me the correct members for QSqlDatabase. Also, the ClassView displays them correctly.

But in the CPP file which contains the function implementations, when I type a dot after the name of the QSqlDatabase member, it shows me the members for the QSqlQuery class! :(

So ... :idea: ... I renamed the member variable to something else; for a moment, it showed me the correct members in the CPP file after renaming the variable there -- in one function only! :? But as soon as I finished renaming that variable in all places in the CPP file, the same error occurs again. :x

Does anyone know what's up? :?:
User avatar
bobh
Advanced User
Advanced User
 
Posts: 59
Joined: Tue Dec 28, 2004 12:00 am

Re: Auto-complete showing members of the wrong class

Postby Mofi » Sun Jun 17, 2007 2:06 pm

Has the configuration setting Do not auto-complete structure members (items following "." or "->") at Configuration - Editor - Auto-complete any influence on that problem?
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Auto-complete showing members of the wrong class

Postby bobh » Sun Jun 17, 2007 4:36 pm

Unfortunately, no. I tried both checking and unchecking it. Actually, the auto-complete feature seems to have more serious issues because at times I see garbage in it:

Image
User avatar
bobh
Advanced User
Advanced User
 
Posts: 59
Joined: Tue Dec 28, 2004 12:00 am

Re: Auto-complete showing members of the wrong class

Postby bobh » Fri Jun 22, 2007 8:29 am

In the meantime, I have been in communication with the folks at IDM about this. However, they have had trouble reproducing these events at their office, so I am wondering if some of you might try the following?

Make sure that you have "Show auto-complete dialog automatically" checked in the configuration dialog under "Editor / Auto-complete", and that the first option beginning with "Do not auto-complete ..." is unchecked. Also, in the configuration dialog under "IDE / IntelliTips / Auto-complete", the option "Show symbol list" should be checked; I use a value of 4 characters. All the other options on that page I have unchecked. I think I left all the other options as the default settings.

(1) Create two files called "Test.h" and "Test.cpp" in the same directory:

==== Test.h ====
Code: Select all
#include <string>
#include <vector>

class MyClass
{
public:
    std::string s;
    std::vector<int> v;
};


==== Test.cpp ====
Code: Select all
#include "Test.h"

int main()
{
    MyClass c;
    return 0;
}


(2) Create a new project (I called it "Test") and add the two files to the project;

(3) Compile "Test.cpp" once so that UEStudio builds the "External Dependencies" folder;

(4) In the configuration dialog "Advanced / Configuration / IDE / IntelliTips / Parser", click "Clear Cache". Close and re-open UEStudio;

(5) In "Test.cpp", insert a line between "MyClass c;" and "return 0;". Type the following:

  c.

(that's "c" followed by a dot.) Auto-complete shows the correct members "s" and "v". Continue typing:

  c.s.

Auto-complete shows only the generic C++ keywords. Continue typing:

  c.s.empty

What do you see? Anything like this?

Image

Thanks for trying to help pin this thing down!
User avatar
bobh
Advanced User
Advanced User
 
Posts: 59
Joined: Tue Dec 28, 2004 12:00 am

Re: Auto-complete showing members of the wrong class

Postby bobh » Thu Aug 28, 2008 5:52 am

bump...

Anyone else ever see this strange behavior?
User avatar
bobh
Advanced User
Advanced User
 
Posts: 59
Joined: Tue Dec 28, 2004 12:00 am

Re: Auto-complete showing members of the wrong class

Postby Hawklan » Tue Oct 07, 2008 6:11 am

Hi!

I'm not quite sure wether my problem really fits to the topic of this thread as I am quite a newbie to UEStudio and I might be simply doing something wrong.
I have been using UltraEdit for years now for php development.
Now that the applications i work on get more and more OO Style and my company shortly decided to work with zend framework in the future im am looking for a suitable IDE.
Of course Zend Studio would be one choice but as I love my UE I also wanted to check UEStudio.
UES has some really nice features but now I ran into some troubles with the IntelliTips.

Let me give some example code for demonstration:
Code: Select all
class MyClass{
    public function setSomething($value){
       
    }
}

$myObject = new MyClass();
$myObject->set...

At this point I would expect IntelliTips to propose the "setSomething" function to me for auto-completion.
But what I see is an endless list of php functions startig with "set" (for example "set_magic_quotes_runtime") although most of them do not make any sense in the context of "$myObject->" as they do not belong to this class/object and would produce a parser/syntax error if used after the "->".
Of course "setSomething" is one of the options shown but in a large ZF Project with hundreds of "set..." Functions in hundreds of different classes finding the correct function can be quite difficult.

So my question would be: Is that behavior intended or is it a bug or am I just doing something wrong?
Hawklan
Newbie
 
Posts: 2
Joined: Tue Oct 07, 2008 5:15 am

Re: Auto-complete showing members of the wrong class

Postby Mofi » Wed Oct 08, 2008 12:01 pm

Hi Hawklan,

the auto-completion dialog shows you always all symbols which starts with the same letters as you have already typed. The auto-completion works like in UltraEdit, the only difference is that it uses also the symbols found by the internal symbol parser of UEStudio. The auto-completion dialog does not take dependences into account.

I don't have any PHP project, but I quickly created a PHP file and tested it. If IntelliTips is not disabled it shows you automatically the suitable function of the class while typing the first letters after -> as you can see on the screenshot I have made. If you want to use the function displayed as tip you just have to press RETURN. So in this case after entering 's' I could immediately press RETURN to get "setSomething" inserted into the PHP file.
Attachments
intellitips_for_php.png
IntelliTip for a PHP function
intellitips_for_php.png (1.36 KiB) Viewed 8418 times
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Auto-complete showing members of the wrong class

Postby Hawklan » Tue Oct 14, 2008 7:13 am

Hi Mofi,

thanks for your answer.
Maybe my little example was too simple so UE can handle it somehow.
But still in a large project environment I do get wrong results from the auto-completion function.

The following screenshot I made in a complete zend framework project:

UEStudio_auto_complete.png
IntelliTip for PHP in Zend Framework environment
UEStudio_auto_complete.png (28.96 KiB) Viewed 8374 times

As one can see the IntelliTip List is very long and shows suggestions like set_magic_quotes_runtime that is not a function of one of the classes TestForm1 oder Zend_Form and that would result in a parser error (syntax) if placed after the $this->
Hawklan
Newbie
 
Posts: 2
Joined: Tue Oct 07, 2008 5:15 am

Re: Auto-complete showing members of the wrong class

Postby Mofi » Wed Oct 15, 2008 8:04 am

Hi Hawklan,

you are right. I have captured a quick tip and not the auto-complete dialog. I use UEStudio only for HTML and 'C' projects. So I don't have experience how object-oriented languages like C++ and PHP are supported by UEStudio and if UEStudio is capable to show you in the auto-complete dialog just members and methods available for an object with a specific class after '.' or '->'. Because I don't have any large PHP project, I can't really help you.

Maybe you have to disable first Configuration - Editor - Auto-complete - Show auto-complete dialog automatically which is the auto-complete feature setting of UltraEdit, to have only the auto-complete feature of IntelliTips active which can be configured at Configuration - IDE - IntelliTips - Auto-complete.

If that still produces not the expected result, contact IDM support by email and ask for help on this issue.

According to UEStudio Development Roadmap Update it looks like UEStudio '09 will have some interesting improvements for PHP writers.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Auto-complete showing members of the wrong class

Postby rhapdog » Fri Dec 04, 2009 10:54 pm

UEStudio 09.30.0.1002 still has this issue.
User avatar
rhapdog
Master
Master
 
Posts: 253
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

Re: Auto-complete showing members of the wrong class (PHP)

Postby Marcel Schmitt » Wed Feb 02, 2011 1:38 pm

I have an instance of a class like this:

Code: Select all
class MyClass
{
  public function MyMethod1() { ... }
  public function MyMethod2() { ... }
  public function MyMethod3() { ... }
}

$Foo = new MyClass();

When I type "$Foo->" the IntelliTipps jumps in and shows me a huge list auf php functions, globals, constants and so on.
It's the context of my class, there are only 3 things that can follow now: MyMethod1, MyMethod2, MyMethod3. All the other stuff doesn't make sense.
Why is that? Is there a way to configure the IntelliTips to show only the class methods in that case?
Marcel Schmitt
Newbie
 
Posts: 1
Joined: Wed Feb 02, 2011 1:29 pm

Re: Auto-complete showing members of the wrong class

Postby attaboy » Fri Aug 19, 2011 9:13 pm

I found that auto-complete works improperly with utf-8 mode, it can't recognize variable, parameter, function name, just give me the whole row.
attaboy
Newbie
 
Posts: 1
Joined: Fri Aug 19, 2011 8:57 pm


Return to IDE (ClassViewer, IntelliTips, ...)