1

I'am trying now to develop Android Apps using Eclipse. I have already installed the ADT Plugin and the Android SDK.

Now, I just want to see with the keys CTRL + Space the android classes(android packages) while typing a android method. For Example when i type OnCr and press CTRL + Space, it should show me the methods like onCreate, onCreateContextMenu and so on.But when i press these combination there comes No Default Proposals or something like that.

But if i type "ja" and press CTRL + Space it shows me all the java packages like java, java.awt and so on.

Or if i want to type for example System.out.println and just only type in System and press the CTRL+Space key i see that the System class is in the java.lang package and after a dought i can repeatly choose in the list a underclass of System class like out, in , getproperty and so on.

My question is what i must do in Eclipse so these function works for android packages or android classes whatever too?

I don't want ever type the full methodsnames to develop an application i want to choose it from the Proposals list. The own methods i have created are not a problem , i can see my own methods in the list but i want to see the android methods too.

I have read in many communitys about Content Assist in Preferences section in Eclipse. But i can only tick there some standard things like java proposal or java non-type proposal how to add android?

Or a Suggestion in which another IDE i can do it with these lists for android is acceptable,too.

By the way i am using Eclipse Helios.

Can you help me please

Thx

HaShLo BuRn

jezrael
  • 822,522
  • 95
  • 1,334
  • 1,252
  • Android uses the same classes as java. Whenever I work on an andorid project with eclipse I can always use ctrl space. I read your question 3 times and I don't see what is your problem Eclipse auto clompletion always worked fine for me – Jason Rogers Apr 16 '11 at 14:01
  • ok again, for example i want to write a public void onCreate Method. When i start to typing "onCrea" is it normal that the Proposal list don't appears? I think if i am typing the proposal list automatically must be shown or not? with the methods like onCreate or onCreateContextMenu or onCreateOptions Menu. In my IDE it don't appears this list. And i think you are wrong these Methods are not typical methods in java . These are only for android as far as i know. When i start to type "andr" the list must be shown and show me the packages like android or android.process or android.app and so on? – HaShLo BuRn Apr 16 '11 at 14:11
  • Question answered here: http://stackoverflow.com/questions/908489/eclipse-java-code-completion-not-working – Felipe Barreiros Dec 05 '11 at 20:40

2 Answers2

1

Working solution: I have deleted my Eclipse version. I had the Eclipse for Java Developers version and i replaced it with Eclipse Classic 3.6.2. I didn't have to reinstall the Android SDK.

Then I just install the ADT plugin in Eclipse Classic and link it with the Android SDK and it works.

user
  • 86,916
  • 18
  • 197
  • 190
0

Are you actually starting from onCr... or are you doing public void onCr...? The first will give you auto-complete proposals and the second will not.

Try the following simple example:

package com.example;

import android.app.Activity;

public class AutoComplete extends Activity {
    onCr//CTRL-SPACE here
}

This shows the list of suggestions fine for me in Eclipse 3.4.2 with no additional configuration.

dave.c
  • 10,910
  • 5
  • 39
  • 62
  • i start typing like the first one but no result , if i start tyoing like the second one i don't get a result, too. – HaShLo BuRn Apr 16 '11 at 15:17
  • I have upload an image of my IDE while typing the example: Image Link:http://img59.imageshack.us/img59/8626/eclipsed.png how can i fix this please help. In this topic: http://androidforums.com/developer-101/101413-type-ahead-autocomplete-eclipse.html there is the same problem , the user there use Netbeans instead of Eclipse but it must be possible in Eclipse. I don't wanna change my IDE just because it don't show the list with the examples ... PLEASE HELP – HaShLo BuRn Apr 16 '11 at 15:23