Class AbstractDifferenceGroupProvider

    • Field Detail

      • label

        protected String label
        A human-readable label for this group provider. This will be displayed in the EMF Compare UI.
        Since:
        4.1
      • activeByDefault

        protected boolean activeByDefault
        The initial activation state of the group provider.
        Since:
        4.1
    • Constructor Detail

      • AbstractDifferenceGroupProvider

        public AbstractDifferenceGroupProvider()
        Default constructor.
    • Method Detail

      • getLabel

        public String getLabel()
        Since:
        4.1
        See Also:
        org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#getLabel()
      • setLabel

        public void setLabel​(String label)
        Since:
        4.1
        See Also:
        org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#setLabel(java.lang.String)
      • defaultSelected

        public boolean defaultSelected()
        Since:
        4.1
        See Also:
        org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#defaultSelected()
      • setDefaultSelected

        public void setDefaultSelected​(boolean active)
        Since:
        4.1
        See Also:
        org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#setDefaultSelected(boolean)
      • getCrossReferenceAdapter

        protected final ECrossReferenceAdapter getCrossReferenceAdapter()
        Returns the cross reference adapter used by this difference group provider.
        Returns:
        the crossReferenceAdapter the cross reference adapter used by this difference group provider.
      • getTreeNodes

        public List<TreeNode> getTreeNodes​(EObject eObject)
        Returns all TreeNodes that are wrapping the given eObject. It internally use a cross reference adapter.
        Specified by:
        getTreeNodes in interface IDifferenceGroupProvider
        Parameters:
        eObject - the object from which we want inverse reference.
        Returns:
        all TreeNodes targeting the given eObject through TreePackage.Literals.TREE_NODE__DATA.
        See Also:
        org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider#getTreeNodes(java.lang.Object)
      • getGroups

        public Collection<? extends IDifferenceGroup> getGroups​(Comparison aComparison)
        This will be called internally by the grouping actions in order to determine how the differences should be grouped in the structural view.
        Specified by:
        getGroups in interface IDifferenceGroupProvider
        Parameters:
        aComparison - The comparison which is to be displayed in the structural view. By default, its containment tree will be displayed.
        Returns:
        The collection of difference groups that are to be displayed in the structural viewer. An empty group will not be displayed at all. If null, we'll fall back to the default behavior.
        Since:
        4.1
        See Also:
        IDifferenceGroupProvider.getGroups(org.eclipse.emf.compare.Comparison)
      • buildGroups

        protected Collection<? extends IDifferenceGroup> buildGroups​(Comparison aComparison)
        Builds the groups for this comparison. The framework expects that all groups are fully initialized ( their sub tree should be built). Extending IDifferenceGroupProvider2 needs to override this method to provid groups.
        Parameters:
        aComparison - comparison against which the groups will be built.
        Returns:
        Newly built collections of IDifferenceGroup.
        Since:
        4.1
      • getComparison

        protected Comparison getComparison()
        Returns:
        comparison against which the groups has been built.
        Since:
        4.1