Done all.
About that compile error: I really think this is a bug of javac and not eclipse:
see my mail that i send to the eclipse newsgroup:
Take this file:
-------------------------------------------
package test;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
public class A
{
public class AA extends JTable
{
public AA(TableModel model)
{
super(new TestModel());
}
}
public class TestModel extends DefaultTableModel
{
}
}
---------------------------------------------------------
Eclipse compiles fine but
javac:
C:\eclipse\workspace\Test>javac test\A.java
test\A.java:14: cannot reference this before supertype constructor has been call
ed
super(new TestModel());
^
1 error
But i think eclipse is the one that does this right. Because it should be possible to do this
i think this can be generated: (and i think eclipse compiler does this)
public AA(A outer, TableModel model)
{
super(new TestModel(outer));
}
I think javac tries to do this:
public AA(A outer, TableModel model)
{
super(new TestModel(this.A.this));
}
johan
|