Hi

I have downloaded the widget - *org.eclipse.nebula.widgets.ctree* - which is
still in Alpha version. On using the widget , I found out some issues which
are present in the widget.
The widget in its present state seems to be incomplete and there are several
@TODO statements. Many null checks are missing from the methods.

The sample examples from the site -  '
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.nebula/org.eclipse.swt.nebula.snippets/src/org/eclipse/swt/nebula/snippets/ctree/?root=Technology_Project'
-  do not seem to work even.

Below are some of the problems I encountered on further debugging the API :

1. In CTree.java , the implementation of the method  indexOf(CTreeColumn
column) is calling itself only resulting in a loss of memory.

public int indexOf(CTreeColumn column) {
        return *indexOf(column);*
    }


2. In CTreeCell.java, in the method paint(GC gc, Rectangle ebounds), no
implementation has been provided if the SWT platform is not 'gtk'. Cause of
this the cells are not painted on the screen.

if(gtk) {
    paintCell(gc, new Point(-ebounds.x,-ebounds.y));
} else {
      *  // TODO !gtk offset in paint routine*
             }

3.In the same classs CTreeCell.java, child area has not been created. If an
item has child items, they overlap the parent item when expanded.
        public void setOpen(boolean open) {
        if(this.open != open) {
            this.open = open;
            if(hasChild) {
               * // TODO: setOpen - childArea*
                updateVisibility();
            }
            if(!isTreeCell()) layout(open ? SWT.Expand : SWT.Collapse);
        }
    }

Above are only a small list of problems I came across. Apart from these
there were several points where null checks are missing. For eg if you do a
Mouse click where are there are no cells, a Null Pointer is being thrown.

*Please advise if the widget has been upgraded since March 18, 2007. Also if
it is the most recent version, could you please let me know the time frame
when the implementations will be complete. I had downloaded the widget from
the site *-

Link to the new CTree code  :
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.nebula/org.eclipse.nebula.widgets.ctree/?hideattic=1&root=Technology_Project&sortby=rev&sortdir=down&pathrev=MAIN


Regards
Bhavya Arora
_______________________________________________
nebula-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/nebula-dev

Reply via email to