Class AbstractTreeFactory

java.lang.Object
com.e1c.langtool.ui.tree.AbstractTreeFactory
Direct Known Subclasses:
EditorTreeFactory

public abstract class AbstractTreeFactory extends Object
  • Constructor Details

    • AbstractTreeFactory

      public AbstractTreeFactory()
  • Method Details

    • getMinimalSkipKeySegment

      protected static int getMinimalSkipKeySegment(Collection<FeatureValue> values)
      Gets the minimal skip key segment count.
      Parameters:
      values - the values
      Returns:
      the minimal skip key segment
    • createFeatureTree

      public IFeatureTree createFeatureTree()
      Creates a new IFeatureTree object.
      Returns:
      the feature tree
    • createFeatureValueItem

      public IFeatureValueItem createFeatureValueItem(ITreeItem parent, FeatureValue value, int skipKeySegments)
      Creates a new IFeatureValueItem object.
      Parameters:
      parent - the parent
      value - the value
      skipKeySegments - the skip key segments
      Returns:
      the feature value item
    • createGroupItem

      public GroupItem createGroupItem(ITreeItem parent, int skipKeySegments, FeatureKey key)
      Creates a new GroupItem object.
      Parameters:
      parent - the parent
      skipKeySegments - the skip key segments
      key - the key
      Returns:
      the group item
    • createResourceItem

      public ResourceItem createResourceItem(FeatureValue value)
      Creates a new ResourceItem object.
      Parameters:
      value -
      Returns:
      the resource item
    • fillUpTree

      public void fillUpTree(IFeatureTree tree, Collection<FeatureValue> values, boolean isHierarhical)
      Fills the tree from FeatureValue values.
      Parameters:
      tree - the tree
      values - the values
      isHierarhical - the is hierarhical
    • findParentGroup

      protected ITreeItem findParentGroup(ITreeItemContainer scope, FeatureValue currentValue)
      Find parent group in scope for the current value
      Parameters:
      scope - the scope
      currentValue - the current value
      Returns:
      the tree item