org.eclipse.emf.emfstore.internal.client.ui.views.historybrowserview.graph
Class PlotCommitProvider

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.ui.views.historybrowserview.graph.PlotCommitProvider
All Implemented Interfaces:
IPlotCommitProvider

public class PlotCommitProvider
extends Object
implements IPlotCommitProvider

This class manages the creation of PlotCommits from HistoryInfos. See IPlotCommitProvider for interface details. Major parts of graph lane logic taken from org.eclipse.jgit.revplot.PlotCommitList.

Author:
Aumann, Faltermeier

Constructor Summary
PlotCommitProvider()
          Creates a new PlotCommitProvider from a list of HistoryInfo objects.
 
Method Summary
 IPlotCommit getCommitFor(HistoryInfo info, boolean onlyAChildRequest)
          Gets a plot commit for the provided history info.
 void refresh(List<HistoryInfo> newInfos)
          Sets a new list of HistoryInfo objects for the same input.
 void reset(List<HistoryInfo> infos)
          Reset the state of the plot commit provider and refresh it with the given history info.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlotCommitProvider

public PlotCommitProvider()
Creates a new PlotCommitProvider from a list of HistoryInfo objects.

Method Detail

reset

public void reset(List<HistoryInfo> infos)
Reset the state of the plot commit provider and refresh it with the given history info.

Parameters:
infos - the history info which is used to refresh the provider

refresh

public void refresh(List<HistoryInfo> newInfos)
Sets a new list of HistoryInfo objects for the same input. This keeps e.g. branch colors etc.

Specified by:
refresh in interface IPlotCommitProvider
Parameters:
newInfos - The update HistoryInfo list.
See Also:
IPlotCommitProvider.refresh(java.util.List)

getCommitFor

public IPlotCommit getCommitFor(HistoryInfo info,
                                boolean onlyAChildRequest)
Gets a plot commit for the provided history info.

Specified by:
getCommitFor in interface IPlotCommitProvider
Parameters:
info - The history info for which the plot commit shall be retrieved.
onlyAChildRequest - Determines the 'real' status of the returned commit. See IPlotCommit.setIsRealCommit(boolean)
Returns:
The requested plot commit.
See Also:
IPlotCommitProvider.getCommitFor(org.eclipse.emf.emfstore.internal.server.model.versioning.HistoryInfo, boolean)


Copyright © 2015. All Rights Reserved.