Bug 84314 [Viewers] Need to allow mapping elements to multiple widgets/items
One of the projects I am working on is using an essentially graph structured dependancy model and we use TableTreeViewer for browsing (drilling down) through this graph. The nature of the model is such that the same model element can occur in multiple positions (paths) of the three. Current implementation of the TreeViewer and TableTreeViewer do not support such one-to-many mapping of model elements to widgets, leading to loads of unnecessary overhead to enshure that correct items will get updated. Suggestion: Element -> Item mapper should allow returning of more than one item per model element that is associated with this element.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeEditorImpl.java
boolean newValidState) {
                
            }
            public void cancelEditor() {
                TreeEditorImpl.this.cancelEditing();
            }
            public void applyEditorValue() {
                TreeEditorImpl.this.applyEditorValue();
            }
        };
    }
    /**
     * Return whether or not there is an active cell editor.
     * @return boolean <code>true</code> if there is an active cell editor; otherwise
     * <code>false</code> is returned.
     */
    public boolean isCellEditorActive() {
        return cellEditor != null;
    }
    /**
     * Saves the value of the currently active cell editor,
     * by delegating to the cell modifier.
     */
    private void saveEditorValue(CellEditor cellEditor, Item treeItem) {
        if (cellModifier != null) {
            String property = null;
            if (columnProperties != null
                    && columnNumber < columnProperties.length)
                property = columnProperties[columnNumber];
            cellModifier.modify(treeItem, property, cellEditor.getValue());