PDA

View Full Version : Code completion in Xcode 3... auto-show pop up list?




tbmw
Mar 24, 2008, 04:05 PM
I'm trying to do what seems like it should be a simple thing... have Xcode 3.0 automatically show the completion list on a member call/access. I can make the list appear by hitting Esc, but that's annoying to constantly do. Inline completion is great, but it only shows one thing at a time, and I like to see the whole list, since I'm still trying to learn the APIs. What do I have to do to make it automatically pop up?



Cromulent
Mar 24, 2008, 04:38 PM
I'm trying to do what seems like it should be a simple thing... have Xcode 3.0 automatically show the completion list on a member call/access. I can make the list appear by hitting Esc, but that's annoying to constantly do. Inline completion is great, but it only shows one thing at a time, and I like to see the whole list, since I'm still trying to learn the APIs. What do I have to do to make it automatically pop up?

Preferences > Code Sense.

tbmw
Mar 24, 2008, 04:52 PM
Preferences > Code Sense.

This was the first place I looked... there are no options that control this behavior, the "Automatically Suggest" pop up controls inline completion, not the completion list. There are options to control what the pop up completion list displays, but not when.

Cromulent
Mar 24, 2008, 05:11 PM
This was the first place I looked... there are no options that control this behavior, the "Automatically Suggest" pop up controls inline completion, not the completion list. There are options to control what the pop up completion list displays, but not when.

Ah. In that case I'm not sure it is possible.

To be honest I'm not that impressed by Xcodes code completion, it is the one area where Visual Studio has a pretty big lead. It is even worse if all you do is straight C coding, you don't even get the popup lists with that.

tbmw
Mar 24, 2008, 06:13 PM
Ah. In that case I'm not sure it is possible.

Yeah, I figured that was probably the case, but I thought there might be a Terminal command or something someone knew. It's frustrating because I think this used to be a feature (I never have used Xcode much), given the Xcode help (which refers to preferences no longer in existence in Xcode 3, making it rather useless).

To be honest I'm not that impressed by Xcodes code completion, it is the one area where Visual Studio has a pretty big lead. It is even worse if all you do is straight C coding, you don't even get the popup lists with that.

I've only started using Xcode the last few days, just to get a feel for it, and so far most of it has failed to impress me... I don't have any experience with Visual Studio, but I have a great deal of experience with Java development in NetBeans/IntelliJ IDEA and accomplishing basic tasks in these seems much easier (don't worry, I haven't been trying to use Xcode for Java, I've heard its atrocious). Xcode is clearly outrageously powerful, but it certainly has a bit of a learning curve...

Monkaaay
Mar 24, 2008, 08:59 PM
This is one area where Visual Studio crushes everyone else. I hope Xcode gets better in the future. I've found it a useful way to learn what you can do with the framework and classes.

reo5th
May 26, 2008, 11:18 AM
I think this is what you're looking for:

http://www.reedolsen.com/?p=16

I'm a huge fan of visual studio as well - I'm just recently trying to get into Xcode.

Sayer
May 26, 2008, 11:35 AM
In Xcode 3.1 at least in the Code Sense preferences there is a popup menu next to "Automatically suggest" that lists Immediate, delayed and never.

Another aspect is that Xcode must build an index of the code in the project and the system frameworks. This takes time to do, with a low priority. If it never comes up you may need to rebuild the indexes by:

1. Get info on the project (the top-most icon in Groups and Files list).

2. In General tab at the bottom click on "Rebuild Code Sense Index" and it should rebuild the indexes (eventually).

If you never get suggestions this should fix it (in past Xcodes this tended to happen a lot for me). You may need to leave your computer running, not asleep, overnight one day to give it a chance to index everything.

I personally find code-completion incredibly annoying because it almost always tries to insert the wrong thing rather than what I actually want.

Soulstorm
May 26, 2008, 12:12 PM
I think there is a misunderstanding here. The author asks for the pop up list to show up. Not just the most probable suggestion (which appears inline).

Actually, that was a feature I enjoyed when using Xcode 2.x. In Xcode 3.0, they replaced it with the inline suggestion. I wish there was some way to go back...

Eraserhead
May 26, 2008, 01:36 PM
Given that Xcode Preferences includes an option: "Show options in popup list" this is a bug.

Enuratique
Jun 28, 2008, 01:52 PM
What I do to get the pop up window (it's not automatic unfortunately, I do think this is a bug) is when it autosuggests something but I haven't hit TAB to complete it (because it's not what I want for example, or the method is overloaded) I hit the ESC key which brings up an Intellisense-like window with more appropriate matches.

HTH,

Enuratique

nfarina
Feb 26, 2010, 12:01 PM
Here is a plugin that attempts to address this issue:

http://code.google.com/p/xcode-auto-assistant/