Changeset 143:42c3056512ba

Show
Ignore:
Timestamp:
08/07/08 16:21:50 (4 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

redirect the jface examples to the new collection wrappers

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • jface/FileTreeViewer.d

    r136 r143  
    4141import tango.util.log.Trace; 
    4242 
    43 import tango.util.collection.model.Seq; 
    44 import tango.util.collection.ArraySeq; 
     43import dwtx.dwtxhelper.Collection; 
    4544import tango.text.convert.Utf; 
    4645 
     
    150149class FileTreeLabelProvider : ILabelProvider { 
    151150 
    152     private Seq!(ILabelProviderListener) listeners; 
     151    private ArrayList listeners; 
    153152 
    154153    private Image file; 
     
    158157 
    159158    public this(){ 
    160         listeners = new ArraySeq!(ILabelProviderListener); 
     159        listeners = new ArrayList(); 
    161160 
    162161        file = new Image( null, new ImageData( new ByteArrayInputStream( cast(byte[])import( "file.png" )))); 
     
    168167        auto event = new LabelProviderChangedEvent(this); 
    169168        for( int i = 0, n = listeners.size(); i < n; i++ ){ 
    170             auto ilpl = listeners.get(i); 
     169            auto ilpl = cast(ILabelProviderListener)listeners.get(i); 
    171170            ilpl.labelProviderChanged(event); 
    172171        } 
     
    193192 
    194193    public void addListener( ILabelProviderListener arg0 ){ 
    195         listeners.append(arg0); 
     194        listeners.add(cast(Object)arg0); 
    196195    } 
    197196 
     
    206205 
    207206    public void removeListener(ILabelProviderListener arg0){ 
    208         listeners.remove(arg0); 
    209     } 
    210 } 
    211  
    212  
    213  
    214  
    215  
    216  
    217  
    218  
    219  
    220  
    221  
    222  
    223  
    224  
     207        listeners.remove(cast(Object)arg0); 
     208    } 
     209} 
     210 
     211 
     212 
     213 
     214 
     215 
     216 
     217 
     218 
     219 
     220 
     221 
     222 
     223 
  • jface/Librarian.d

    r73 r143  
    4747 
    4848import tango.text.convert.Format; 
    49 import tango.util.collection.LinkSeq; 
    5049import tango.io.FilePath; 
    5150import tango.io.File; 
     
    5554import tango.text.stream.LineIterator; 
    5655import tango.util.log.Trace; 
     56import dwtx.dwtxhelper.Collection; 
    5757 
    5858version(JIVE) import jive.stacktrace; 
     
    955955 
    956956    // The books 
    957     private LinkSeq!(Book) books; 
     957    private LinkedList books; 
    958958 
    959959    // The dirty flag 
     
    964964    */ 
    965965    public this() { 
    966         books = new LinkSeq!(Book); 
     966        books = new LinkedList(); 
    967967    } 
    968968 
     
    998998        scope ostr = (new FileOutput(filename)).output; 
    999999        scope printer = new Print!(char)( Format, ostr ); 
    1000         foreach ( book; books ) { 
     1000        foreach ( o; books ) { 
     1001            Book book = cast(Book)o; 
    10011002            printer.formatln( "{}|{}",book.getTitle(), (book.getCheckedOutTo() is null ? "" : book.getCheckedOutTo())); 
    10021003        } 
     
    10131014    */ 
    10141015    public bool add(Book book) { 
    1015         books.append(book); 
     1016        books.add(book); 
    10161017        setDirty(); 
    10171018        return true; 
     
    10331034    * @return Collection 
    10341035    */ 
    1035     public LinkSeq!(Book) getBooks() { 
     1036    public LinkedList getBooks() { 
    10361037        return books; 
    10371038    } 
  • jface/snippets/Snippet001TableViewer.d

    r89 r143  
    2626 
    2727import tango.util.Convert; 
    28 import tango.util.collection.ArraySeq
     28import dwtx.dwtxhelper.Collection
    2929 
    3030/** 
    3131 * A simple TableViewer to demonstrate usage 
    32  *  
     32 * 
    3333 * @author Tom Schindl <tom.schindl@bestsolution.at> 
    3434 * 
     
    4141         */ 
    4242        public Object[] getElements(Object inputElement) { 
    43             return (cast(ArraySeq!(MyModel))inputElement).toArray; 
     43            return (cast(ArrayList)inputElement).toArray; 
    4444        } 
    4545 
     
    4848         */ 
    4949        public void dispose() { 
    50              
     50 
    5151        } 
    5252 
     
    5555         */ 
    5656        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 
    57              
     57 
    5858        } 
    59          
     59 
    6060    } 
    61      
     61 
    6262    public class MyModel { 
    6363        public int counter; 
    64          
     64 
    6565        public this(int counter) { 
    6666            this.counter = counter; 
    6767        } 
    68          
     68 
    6969        public String toString() { 
    7070            return "Item " ~ to!(char[])(this.counter); 
    7171        } 
    7272    } 
    73      
     73 
    7474    public this(Shell shell) { 
    7575        final TableViewer v = new TableViewer(shell); 
    7676        v.setLabelProvider(new LabelProvider()); 
    7777        v.setContentProvider(new MyContentProvider()); 
    78         ArraySeq!(MyModel) model = createModel(); 
     78        ArrayList model = createModel(); 
    7979        v.setInput(model); 
    8080        v.getTable().setLinesVisible(true); 
    8181    } 
    82      
    83     private ArraySeq!(MyModel) createModel() { 
    84         ArraySeq!(MyModel) elements = new ArraySeq!(MyModel); 
    85         elements.capacity  = 10; 
     82 
     83    private ArrayList createModel() { 
     84        ArrayList elements = new ArrayList(10); 
    8685 
    8786        for( int i = 0; i < 10; i++ ) { 
    88             elements ~= new MyModel(i); 
     87            elements.add( new MyModel(i)); 
    8988        } 
    90          
     89 
    9190        return elements; 
    9291    } 
    93      
     92 
    9493} 
    9594 
    96 void main()  
     95void main() 
    9796{ 
    9897    Display display = new Display (); 
     
    101100    new Snippet001TableViewer(shell); 
    102101    shell.open (); 
    103          
     102 
    104103    while (!shell.isDisposed ()) { 
    105104        if (!display.readAndDispatch ()) display.sleep (); 
    106105    } 
    107          
     106 
    108107    display.dispose (); 
    109108 
  • jface/snippets/Snippet004HideSelection.d

    r89 r143  
    2828 
    2929import dwt.dwthelper.utils; 
     30import dwtx.dwtxhelper.Collection; 
    3031 
    3132import tango.util.Convert; 
    32 import tango.util.collection.ArraySeq; 
    3333 
    3434/** 
    3535 * Snippet that hides the selection when nothing is selected. 
    36  *  
     36 * 
    3737 * @author Tom Schindl <tom.schindl@bestsolution.at> 
    3838 * 
    3939 */ 
    4040public class Snippet004HideSelection { 
    41     alias ArraySeq!(MyModel) MyModelArray; 
    4241    private class MyContentProvider : IStructuredContentProvider { 
    4342 
     
    4645         */ 
    4746        public Object[] getElements(Object inputElement) { 
    48             return (cast(MyModelArray)inputElement).toArray; 
     47            return (cast(ArrayList)inputElement).toArray; 
    4948        } 
    5049 
     
    5352         */ 
    5453        public void dispose() { 
    55              
     54 
    5655        } 
    5756 
     
    6059         */ 
    6160        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 
    62              
     61 
    6362        } 
    6463    } 
    65      
     64 
    6665    public class MyModel { 
    6766        public int counter; 
    68          
     67 
    6968        public this(int counter) { 
    7069            this.counter = counter; 
    7170        } 
    72          
     71 
    7372        public String toString() { 
    7473            return "Item " ~ to!(char[])(this.counter); 
    7574        } 
    7675    } 
    77      
     76 
    7877    public this(Shell shell) { 
    7978        final TableViewer v = new TableViewer(shell,DWT.BORDER|DWT.FULL_SELECTION); 
    8079        v.setLabelProvider(new LabelProvider()); 
    8180        v.setContentProvider(new MyContentProvider()); 
    82         MyModelArray model = createModel(); 
     81        ArrayList model = createModel(); 
    8382        v.setInput(model); 
    8483        v.getTable().setLinesVisible(true); 
     
    9796                } 
    9897            } 
    99              
     98 
    10099        }); 
    101100    } 
    102      
    103     private MyModelArray createModel() { 
    104         MyModelArray elements = new MyModelArray; 
    105         elements.capacity = 10; 
     101 
     102    private ArrayList createModel() { 
     103        ArrayList elements = new ArrayList(10); 
    106104        for( int i = 0; i < 10; i++ ) { 
    107             elements ~= new MyModel(i); 
     105            elements.add( new MyModel(i)); 
    108106        } 
    109          
     107 
    110108        return elements; 
    111109    } 
     
    119117    new Snippet004HideSelection(shell); 
    120118    shell.open (); 
    121          
     119 
    122120    while (!shell.isDisposed ()) { 
    123121        if (!display.readAndDispatch ()) display.sleep (); 
    124122    } 
    125          
     123 
    126124    display.dispose (); 
    127125 
  • jface/snippets/Snippet007FullSelection.d

    r89 r143  
    3535 
    3636import tango.util.Convert; 
    37 import tango.util.collection.ArraySeq
     37import dwtx.dwtxhelper.Collection
    3838 
    3939/** 
    4040 * TableViewer: Hide full selection 
    41  *  
     41 * 
    4242 * @author Tom Schindl <tom.schindl@bestsolution.at> 
    4343 * 
    4444 */ 
    4545public class Snippet007FullSelection { 
    46     alias ArraySeq!(MyModel) MyModelArray; 
    4746 
    4847    private class MyContentProvider : IStructuredContentProvider { 
     
    5251         */ 
    5352        public Object[] getElements(Object inputElement) { 
    54             return (cast(MyModelArray)inputElement).toArray; 
     53            return (cast(ArrayList)inputElement).toArray; 
    5554        } 
    5655 
     
    5958         */ 
    6059        public void dispose() { 
    61              
     60 
    6261        } 
    6362 
     
    6665         */ 
    6766        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 
    68              
     67 
    6968        } 
    70          
     69 
    7170    } 
    72      
     71 
    7372    public class MyModel { 
    7473        public int counter; 
    75          
     74 
    7675        public this(int counter) { 
    7776            this.counter = counter; 
    7877        } 
    79          
     78 
    8079        public String toString() { 
    8180            return "Item " ~ to!(char[])(this.counter); 
    8281        } 
    8382    } 
    84      
     83 
    8584    public this(Shell shell) { 
    8685        final TableViewer v = new TableViewer(shell,DWT.BORDER|DWT.FULL_SELECTION); 
     
    105104                v.update(item.getData(), null); 
    106105            } 
    107              
     106 
    108107        }); 
    109108        v.setColumnProperties(["column1", "column2" ]); 
    110109        v.setCellEditors([ new TextCellEditor(v.getTable()),new TextCellEditor(v.getTable()) ]); 
    111          
     110 
    112111        TableColumn column = new TableColumn(v.getTable(),DWT.NONE); 
    113112        column.setWidth(100); 
    114113        column.setText("Column 1"); 
    115          
     114 
    116115        column = new TableColumn(v.getTable(),DWT.NONE); 
    117116        column.setWidth(100); 
    118117        column.setText("Column 2"); 
    119          
    120         MyModelArray model = createModel(); 
     118 
     119        ArrayList model = createModel(); 
    121120        v.setInput(model); 
    122121        v.getTable().setLinesVisible(true); 
    123122        v.getTable().setHeaderVisible(true); 
    124          
     123 
    125124        v.getTable().addListener(DWT.EraseItem, new class Listener { 
    126125 
     
    132131            } 
    133132        }); 
    134          
     133 
    135134    } 
    136      
    137     private MyModelArray createModel() { 
    138         auto elements = new MyModelArray; 
    139         elements.capacity = 10; 
    140          
     135 
     136    private ArrayList createModel() { 
     137        auto elements = new ArrayList(10); 
     138 
    141139        for( int i = 0; i < 10; i++ ) { 
    142             elements ~= new MyModel(i); 
     140            elements.add( new MyModel(i)); 
    143141        } 
    144          
     142 
    145143        return elements; 
    146144    } 
    147      
     145 
    148146} 
    149147 
     
    155153    new Snippet007FullSelection(shell); 
    156154    shell.open (); 
    157          
     155 
    158156    while (!shell.isDisposed ()) { 
    159157        if (!display.readAndDispatch ()) display.sleep (); 
    160158    } 
    161          
     159 
    162160    display.dispose (); 
    163161 
  • jface/snippets/Snippet014TreeViewerNoMandatoryLabelProvider.d

    r140 r143  
    99 *     Tom Schindl - initial API and implementation 
    1010 * Port to the D programming language: 
    11  *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ )  
     11 *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ ) 
    1212 *******************************************************************************/ 
    1313 
     
    3737import tango.util.container.LinkedList; 
    3838 
     39version(JIVE) import jive.stacktrace; 
    3940 
    4041 
     
    5657/** 
    5758 * A simple TreeViewer to demonstrate usage 
    58  *  
     59 * 
    5960 * @author Tom Schindl <tom.schindl@bestsolution.at> 
    60  *  
     61 * 
    6162 */ 
    6263public class Snippet014TreeViewerNoMandatoryLabelProvider { 
    6364    alias  LinkedList!(MyModel) ArrayList; 
    64      
     65 
    6566    private class MyContentProvider : ITreeContentProvider { 
    6667 
    6768        /* 
    6869         * (non-Javadoc) 
    69          *  
     70         * 
    7071         * @see dwtx.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) 
    7172         */ 
     
    7677        /* 
    7778         * (non-Javadoc) 
    78          *  
     79         * 
    7980         * @see dwtx.jface.viewers.IContentProvider#dispose() 
    8081         */ 
     
    8586        /* 
    8687         * (non-Javadoc) 
    87          *  
     88         * 
    8889         * @see dwtx.jface.viewers.IContentProvider#inputChanged(dwtx.jface.viewers.Viewer, 
    8990         *      java.lang.Object, java.lang.Object) 
     
    9596        /* 
    9697         * (non-Javadoc) 
    97          *  
     98         * 
    9899         * @see dwtx.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object) 
    99100         */ 
     
    104105        /* 
    105106         * (non-Javadoc) 
    106          *  
     107         * 
    107108         * @see dwtx.jface.viewers.ITreeContentProvider#getParent(java.lang.Object) 
    108109         */ 
     
    117118        /* 
    118119         * (non-Javadoc) 
    119          *  
     120         * 
    120121         * @see dwtx.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object) 
    121122         */ 
     
    156157        this() 
    157158        { 
    158             registry = new FontRegistry();                     
     159            registry = new FontRegistry(); 
    159160        } 
    160161 
     
    193194    public this(Shell shell) { 
    194195        final TreeViewer v = new TreeViewer(shell); 
    195          
     196 
    196197        TreeColumn column = new TreeColumn(v.getTree(),DWT.NONE); 
    197198        column.setWidth(200); 
    198199        column.setText("Column 1"); 
    199          
     200 
    200201        column = new TreeColumn(v.getTree(),DWT.NONE); 
    201202        column.setWidth(200); 
    202203        column.setText("Column 2"); 
    203          
     204 
    204205        v.setLabelProvider(new MyLabelProvider()); 
    205206        v.setContentProvider(new MyContentProvider()); 
  • jface/snippets/Snippet026TreeViewerTabEditing.d

    r140 r143  
    99 *     Tom Schindl - initial API and implementation 
    1010 * Port to the D programming language: 
    11  *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ )  
     11 *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ ) 
    1212 *******************************************************************************/ 
    1313 
     
    4040 
    4141import dwt.dwthelper.utils; 
     42import dwtx.dwtxhelper.Collection; 
    4243 
    4344import tango.util.Convert; 
    44 import tango.util.container.LinkedList; 
     45 
     46version(JIVE) import jive.stacktrace; 
    4547 
    4648 
     
    6264/** 
    6365 * A simple TreeViewer to demonstrate usage 
    64  *  
     66 * 
    6567 * @author Tom Schindl <tom.schindl@bestsolution.at> 
    66  *  
     68 * 
    6769 */ 
    6870public class Snippet026TreeViewerTabEditing { 
    69     alias  LinkedList!(MyModel) ArrayList;     
    7071    public this(Shell shell) { 
    7172        Button b = new Button(shell,DWT.PUSH); 
     
    8283            } 
    8384            public void widgetDefaultSelected(SelectionEvent e) { 
    84                  
     85 
    8586            } 
    8687 
     
    8889                v.getTree().getColumn(1).dispose(); 
    8990            } 
    90              
    91         }); 
    92                   
     91 
     92        }); 
     93 
    9394        TreeViewerFocusCellManager focusCellManager = new TreeViewerFocusCellManager(v,new FocusCellOwnerDrawHighlighter(v)); 
    9495        ColumnViewerEditorActivationStrategy actSupport = new class(v) ColumnViewerEditorActivationStrategy { 
     
    105106            } 
    106107        }; 
    107          
     108 
    108109        TreeViewerEditor.create(v, focusCellManager, actSupport, ColumnViewerEditor.TABBING_HORIZONTAL 
    109110                | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR 
    110111                | ColumnViewerEditor.TABBING_VERTICAL | ColumnViewerEditor.KEYBOARD_ACTIVATION); 
    111          
     112 
    112113        final TextCellEditor textCellEditor = new TextCellEditor(v.getTree()); 
    113114 
     
    179180            } 
    180181        }); 
    181          
     182 
    182183        column = new TreeViewerColumn(v, DWT.NONE); 
    183184        column.getColumn().setWidth(200); 
     
    212213            } 
    213214        }); 
    214          
     215 
    215216        v.setContentProvider(new MyContentProvider()); 
    216217 
     
    277278            this.parent = parent; 
    278279            this.counter = counter; 
    279             child = new ArrayList();             
     280            child = new ArrayList(); 
    280281        } 
    281282 
  • jface/snippets/Snippet031TableViewerCustomTooltipsMultiSelection.d

    r93 r143  
    99 *     Adam Neal - initial API and implementation 
    1010 * Port to the D programming language: 
    11  *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ )  
     11 *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ ) 
    1212 *******************************************************************************/ 
    1313 
     
    1616// http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet031TableViewerCustomTooltipsMultiSelection.java?view=markup 
    1717 
    18 import tango.util.collection.ArrayBag; 
    19 alias ArrayBag!(MyModel) ArrayList; 
     18import dwtx.dwtxhelper.Collection; 
    2019import tango.util.Convert; 
    2120 
     
    4746 
    4847/** 
    49  * A simple TableViewer to demonstrate how custom tooltips could be created easily while preserving  
     48 * A simple TableViewer to demonstrate how custom tooltips could be created easily while preserving 
    5049 * the multiple selection. 
    51  *  
     50 * 
    5251 * This is a modified example taken from Tom Schindl's Snippet023TreeViewerCustomTooltips.java 
    53  *  
     52 * 
    5453 * This code is for users pre 3.3 others could use newly added tooltip support in {@link CellLabelProvider} 
    5554 * @author Adam Neal <Adam_Neal@ca.ibm.com> 
    56  *  
     55 * 
    5756 */ 
    5857public class Snippet031TableViewerCustomTooltipsMultiSelection { 
     
    6463 
    6564        public String getColumnText(Object element, int columnIndex) { 
    66             //if (element instanceof MyModel) {             
     65            //if (element instanceof MyModel) { 
    6766                switch (columnIndex) { 
    6867                    case 0: return (cast(MyModel)element).col1; 
     
    227226                    TableItem [] newSelection = null; 
    228227                    if (isCTRLDown(event)) { 
    229                         /* We have 2 scenario's.   
     228                        /* We have 2 scenario's. 
    230229                         *  1) We are selecting an already selected element - so remove it from the selected indices 
    231230                         *  2) We are selecting a non-selected element - so add it to the selected indices 
  • jface/snippets/Snippet043NoColumnTreeViewerKeyboardEditing.d

    r140 r143  
    99 *     Tom Schindl - initial API and implementation 
    1010 * Port to the D programming language: 
    11  *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ )  
     11 *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ ) 
    1212 *******************************************************************************/ 
    1313 
     
    4242import tango.util.container.LinkedList; 
    4343 
     44version(JIVE) import jive.stacktrace; 
     45 
    4446 
    4547void main(String[] args) { 
     
    5759    display.dispose(); 
    5860} 
    59      
     61 
    6062/** 
    6163 * Demonstrates how to use keyboard-editing support in a TreeViewer with no column 
    62  *  
     64 * 
    6365 * @author Tom Schindl <tom.schindl@bestsolution.at> 
    64  *  
     66 * 
    6567 */ 
    6668public class Snippet043NoColumnTreeViewerKeyboardEditing { 
     
    7779                this.v = v_; 
    7880            } 
    79              
     81 
    8082            public void widgetDefaultSelected(SelectionEvent e) { 
    8183 
  • jface/snippets/Snippet047VirtualLazyTreeViewer.d

    r140 r143  
    99 *     Tom Schindl - initial API and implementation 
    1010 * Port to the D programming language: 
    11  *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ )  
     11 *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ ) 
    1212 *******************************************************************************/ 
    1313 
     
    2727import tango.util.Convert; 
    2828import tango.util.container.LinkedList; 
     29 
     30version(JIVE) import jive.stacktrace; 
    2931 
    3032 
     
    5052/** 
    5153 * A simple TreeViewer to demonstrate usage of an ILazyContentProvider. 
    52  *  
     54 * 
    5355 */ 
    5456public class Snippet047VirtualLazyTreeViewer { 
    55     alias ArrayWrapperT!(IntermediateNode)  ArrayWrapperIntermediateNode;     
    56     alias ArrayWrapperT!(LeafNode)  ArrayWrapperLeafNode;   
    57      
     57    alias ArrayWrapperT!(IntermediateNode)  ArrayWrapperIntermediateNode; 
     58    alias ArrayWrapperT!(LeafNode)  ArrayWrapperLeafNode; 
     59 
    5860    private class MyContentProvider : ILazyTreeContentProvider { 
    5961        private TreeViewer viewer; 
     
    7577        /* 
    7678         * (non-Javadoc) 
    77          *  
     79         * 
    7880         * @see dwtx.jface.viewers.ILazyTreeContentProvider#getParent(java.lang.Object) 
    7981         */ 
     
    8688        /* 
    8789         * (non-Javadoc) 
    88          *  
     90         * 
    8991         * @see dwtx.jface.viewers.ILazyTreeContentProvider#updateChildCount(java.lang.Object, 
    9092         *      int) 
    9193         */ 
    9294        public void updateChildCount(Object element, int currentChildCount) { 
    93              
     95 
    9496            int length = 0; 
    9597            if (cast(IntermediateNode)element) { 
    9698                IntermediateNode node = cast(IntermediateNode) element; 
    9799                length =  node.children.length; 
    98             }  
     100            } 
    99101            /// TODO: fix me  access violation here 
    100102            if(element !is null && elements !is null && (cast(ArrayWrapperIntermediateNode)element) && (cast(ArrayWrapperIntermediateNode)element).array is elements) 
    101103                length = elements.length; 
    102             viewer.setChildCount(element, length);     
     104            viewer.setChildCount(element, length); 
    103105        } 
    104106 
    105107        /* 
    106108         * (non-Javadoc) 
    107          *  
     109         * 
    108110         * @see dwtx.jface.viewers.ILazyTreeContentProvider#updateElement(java.lang.Object, 
    109111         *      int) 
    110112         */ 
    111113        public void updateElement(Object parent, int index) { 
    112              
     114 
    113115            Object element; 
    114             if (cast(IntermediateNode)parent)  
     116            if (cast(IntermediateNode)parent) 
    115117                element = (cast(IntermediateNode) parent).children[index]; 
    116              
     118 
    117119            else 
    118120                element =  elements[index]; 
    119121            viewer.replace(parent, index, element); 
    120122            updateChildCount(element, -1); 
    121              
     123 
    122124        } 
    123125