public class EntriesTable extends java.lang.Object implements Printable
EntriesTable
represents a Map of a fully qualified Feature Id
to Entry
list, this will help during applying deltas to
determine the dynamic index of the location where the delta should be applied.
this map contains only Many Structure Features Or (Root feature) that had
more than 1 delta, it does not contain any single features. the Class is
responsible for creating the table, also it will compress the table after
generating it by removing all trivial entriesConstructor and Description |
---|
EntriesTable(org.eclipse.emf.ecore.resource.Resource base,
DeltaContainer[] deltacontainers)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
buildTables()
this method will populate the table contents
|
int |
getCalculatedBaseIndex(ListDelta listDelta)
Returns a calculated index for one location of a delta in the base
resource.
|
int |
getCalculatedBaseIndex(Location location,
Delta delta)
Returns a calculated index for one location of a delta in the base
resource.
|
int |
getCalculatedContributorIndex(ListDelta listDelta,
org.eclipse.emf.ecore.resource.Resource contributor)
Returns a calculated index for one location of a delta in a contributor
resource.
|
int |
getCalculatedContributorIndex(Location location,
Delta delta,
org.eclipse.emf.ecore.resource.Resource contributor)
Returns a calculated index for one location of a delta in a contributor
resource.
|
int |
getCalculatedMergedIndex(ListDelta listDelta)
Returns a calculated index for one location of a delta in the merged
resource.
|
int |
getCalculatedMergedIndex(Location location,
Delta delta)
Returns a calculated index for one location of a delta in the merged
resource.
|
void |
print(java.io.PrintStream out)
Prints a text representation to a stream.
|
public EntriesTable(org.eclipse.emf.ecore.resource.Resource base, DeltaContainer[] deltacontainers)
base
- the base resourcedeltacontainers
- array of delta containerspublic void buildTables()
public int getCalculatedMergedIndex(Location location, Delta delta)
location
- location to consider while calculationdelta
- the delta that owns the locationpublic int getCalculatedBaseIndex(Location location, Delta delta)
location
- location to consider while calculationdelta
- the delta that owns the locationpublic int getCalculatedContributorIndex(Location location, Delta delta, org.eclipse.emf.ecore.resource.Resource contributor)
location
- location to consider while calculationdelta
- the delta that owns the locationcontributor
- a contributor resourcepublic int getCalculatedMergedIndex(ListDelta listDelta)
listDelta
- the delta that owns the locationpublic int getCalculatedBaseIndex(ListDelta listDelta)
listDelta
- the delta that owns the locationpublic int getCalculatedContributorIndex(ListDelta listDelta, org.eclipse.emf.ecore.resource.Resource contributor)
listDelta
- the delta that owns the locationcontributor
- a contributor resource