Giuseppe
Giuseppe

Reputation: 1089

Eclipse wont work anymore

Starting this morning, if I try to write in the following method using autocomplete code, Eclipse don't suggest nothing. for example, if I write :

if(view. ..... then the autocomplete code not appear and if I click CTRL + SPACE the eclipse show error :the method must override a superclass method

my JRE is 1.6 already, so I don't know what to do.

Any help?

    mAdapter.setViewBinder(new ViewBinder() {

        @Override
        public boolean setViewValue(View view, Cursor cursor, int columnIndex) {

            final long id = cursor.getLong(cursor.getColumnIndex("_id"));

            if (view.getId() == R.id.checkBox1) {
                CheckBox v = (CheckBox) view;
                v.setOnCheckedChangeListener(RecordsList.this);
                v.setTag(id);
                if (selectedRows.contains(String.valueOf(id))) {
                    v.setChecked(true);
                } else {
                    v.setChecked(false);
                }

                return true;
            }

}

enter image description here

this happend if I use:

mAdapter.setViewBinder(new ViewBinder() {

@Override
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
    v
    return false;
}

});

But if I use the following way, work ok:

      mAdapter.setViewBinder(ViewBinder);
  private ViewBinder ViewBinder = new ViewBinder() {
    @Override
    public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
  }

}

Upvotes: 0

Views: 148

Answers (2)

Ravi
Ravi

Reputation: 553

Worst case scenario, remove the eclipse project and reimport it. If the JDT cache is corrupted, it will be rebuilt.

Upvotes: 2

Dmytro Danylyk
Dmytro Danylyk

Reputation: 19796

Goto

Window - > Preferences -> Java -> Editor -> Content Assist

Check if everything is ok

Window - > Preferences -> General -> Keys 

Type "Content Assist", select it from the 'Command" list, and check if "Binding" is Ctrl + Space

Upvotes: 1

Related Questions