Search code examples
androideclipsemethodscontent-assist

Eclipse Content Assist not working with Android


I'm not sure is this is a problem with my installation of Eclipse (Helios) and Android SDK or something else but Eclipse Content Assist doesn't propose Object Methods for Android classes.

For example, if I create a simple program and add a Button btn, when I go to use the btn method setBackgroundResource(int) with Content Assist (Ctrl + Space) or Word Completion (Alt + /) neither of them have any proposals. If I type btn.(Ctrl + Space), Content Assist lists; equals(), getClass(), hasCode(), Notify()...wait(), shows none of the Button methods! Can anyone help?

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;

public class HelloWorld extends Activity {

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    setContentView(R.layout.main);

    Button btn = Button(this);
    btn.(Ctrl + Space)

    }
}

Solution

  • Ah, found the problem, it's down to something going wrong with the workspace, created a new workspace and copied over my projects, all working again!