Problem with TreeTableView and IntelliJ 6

I'm creating a TreeTableView in my plugin. This works find under Intellij 5 but has some problems under Intellij 6, where it works in development, but not when downloaded as a plugin thru the plugin manager.

The error is:

Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(57,132),button=1,modifiers=Button1,clickCount=1] on ###overrideRedirect###: com.intellij.ui.dualView.TreeTableView.getTree()Lcom/intellij/util/ui/Tree;
java.lang.NoSuchMethodError: com.intellij.ui.dualView.TreeTableView.getTree()Lcom/intellij/util/ui/Tree;
at com.rk.jarjuggler.gui.TreeTablePanel.createDetailPanel(

On line 78 I'm trying to attach a TreeSelectionListener to the JTree with this code:
treeTableView.getTree().addTreeSelectionListener(new TreeSelectionListener() {

I know the API slightly changed:
- in 5 getTree() returns a Tree
- in 6 getTree() returns a TreeTableTree

but both subclass JTree where addTreeSelectionListener() is.

Any ideas?


1 comment

Even though this API is source-comaptible between 5.x and 6.0, the binary interface isn't because the method's (TreeTableView.getTree) return type is part of the method signature which the JVM is looking for to call. If you want to maintain compatibility between 5.x and 6.0 you'll have to call getTree() using reflection.


Please sign in to leave a comment.