Class EMFTextIdEditingSupport<T,V>

java.lang.Object
org.eclipse.jface.viewers.EditingSupport
com.amalgamasimulation.desktop.binding.editingsupports.GenericEditingSupport<T,V>
com.amalgamasimulation.desktop.binding.editingsupports.EMFTextIdEditingSupport<T,V>
Type Parameters:
T - type of row value
V - type of column value (cell value)

public class EMFTextIdEditingSupport<T,V> extends GenericEditingSupport<T,V>
The class is used to edit field IDs in objects. Allows automatic checking of entered values ​​for uniqueness among this type of objects. Used only with EMF (EObject).
Author:
Ionov Ivan
  • Constructor Details

    • EMFTextIdEditingSupport

      public EMFTextIdEditingSupport(org.eclipse.jface.viewers.ColumnViewer viewer, org.eclipse.swt.widgets.Composite parent)
  • Method Details

    • getCellEditorInternal

      protected org.eclipse.jface.viewers.CellEditor getCellEditorInternal(T element)
      Specified by:
      getCellEditorInternal in class GenericEditingSupport<T,V>
    • getValueInternal

      protected Object getValueInternal(T element)
      Specified by:
      getValueInternal in class GenericEditingSupport<T,V>
    • setValueInternal

      protected void setValueInternal(T element, V value)
      Specified by:
      setValueInternal in class GenericEditingSupport<T,V>
    • setIdFeature

      public EMFTextIdEditingSupport<T,V> setIdFeature(org.eclipse.emf.ecore.EStructuralFeature idFeature)
      Set up the id feature
      Parameters:
      idFeature - container reference to id value
      Returns:
      this object
    • setElements

      public EMFTextIdEditingSupport<T,V> setElements(org.eclipse.core.databinding.observable.list.IObservableList<T> elements)
      Set up the value elements
      Parameters:
      elements - List of elements among which the uniqueness of the ID will be checked
      Returns:
      this object
    • setSelectionListener

      public EMFTextIdEditingSupport<T,V> setSelectionListener(BiConsumer<T,V> selectionListener)
      Set up the selectionListener
      Parameters:
      selectionListener - function that will be executed after losing focus on the text editor or after pressing the Enter button
      Returns:
      this object