Project

General

Profile

Revision f573f946

IDf573f9461c63823c7ea9fefca6603111e26228be
Parent 6a534f27
Child 04ee4c38

Added by Katja Luther about 2 years ago

revert changes in cellEditor of distribution editor

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditingSupportE4.java
19 19
import org.eclipse.jface.viewers.CellEditor;
20 20
import org.eclipse.jface.viewers.ComboBoxViewerCellEditor;
21 21
import org.eclipse.jface.viewers.EditingSupport;
22
import org.eclipse.jface.viewers.ICellEditorListener;
23 22
import org.eclipse.jface.viewers.ISelection;
24 23
import org.eclipse.jface.viewers.ISelectionChangedListener;
25 24
import org.eclipse.jface.viewers.LabelProvider;
......
53 52
//    private final IDescriptionService descriptionService;
54 53
    private final int columnIndex;
55 54

  
55
    private Taxon taxon;
56

  
56 57
    @Inject
57 58
    private ESelectionService selService;
58 59
    private ISelectionChangedListener selectionChangedListener;
......
108 109

  
109 110

  
110 111
        cellEditor.setInput(inputAll);
111
        cellEditor.addListener(new ICellEditorListener() {
112

  
113
            @Override
114
            public void applyEditorValue() {
115
                // TODO Auto-generated method stub
116

  
117
            }
118

  
119
            @Override
120
            public void cancelEditor() {
121
                // TODO Auto-generated method stub
122

  
123
            }
124 112

  
125
            @Override
126
            public void editorValueChanged(boolean oldValidState, boolean newValidState) {
127
                fireStateChanged(cellEditor.getValue());
128

  
129
            }
130

  
131
        });
132 113

  
133 114

  
134 115
    }
......
145 126

  
146 127
    @Override
147 128
    protected PresenceAbsenceTerm getValue(Object element) {
129

  
148 130
        if (element instanceof Taxon) {
149
            Taxon taxon = (Taxon) element;
131
            taxon = (Taxon) element;
150 132
            String result = null;
151 133
            Distribution distributionForColumn = getDistributionForColumn(taxon);
152 134

  
......
164 146

  
165 147

  
166 148

  
167
    protected void fireStateChanged(Object dist) {
168
    	if (dist!= null){
169
	    	ISelection selection = new StructuredSelection(dist);
170
	    	selService.setSelection(selection);
171
    	}
149
    protected void fireStateChanged() {
150
    	ISelection selection = new StructuredSelection(getDistributionForColumn(taxon));
151
	   getViewer().setSelection(selection);
152

  
172 153
    }
173 154

  
174 155
    @Override

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)