|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.ide.common.blame.MergingLog
public class MergingLog
Stores where file and text fragments within files came from, so the original can be found
later if a subsequent build step outputs an error.
It is implicitly incremental, shards (which correspond to type directories for resource files,
eg. layout-land) are created or loaded only when the output files that they store are changed,
and only the changed files are written when write() is called.
For its use by MergeWriter, it uses ConcurrentMaps internally, so it is safe to perform any log
operation from any thread.
| Constructor Summary | |
|---|---|
MergingLog(java.io.File outputFolder)
|
|
| Method Summary | |
|---|---|
com.android.ide.common.blame.SourceFile |
find(com.android.ide.common.blame.SourceFile mergedFile)
Find the original source file corresponding to an intermediate file. |
com.android.ide.common.blame.SourceFilePosition |
find(com.android.ide.common.blame.SourceFilePosition mergedFilePosition)
Find the original source file and position for a position in an intermediate merged file. |
void |
logCopy(java.io.File source,
java.io.File destination)
Store the source of a file in the merging log. |
void |
logCopy(com.android.ide.common.blame.SourceFile source,
com.android.ide.common.blame.SourceFile destination)
Store the source of a file in the merging log. |
void |
logRemove(com.android.ide.common.blame.SourceFile merged)
Remove a merged file from the merging log. |
void |
logSource(com.android.ide.common.blame.SourceFile mergedFile,
java.util.Map<com.android.ide.common.blame.SourcePosition,com.android.ide.common.blame.SourceFilePosition> map)
Store the source file positions for a merged file. |
void |
write()
Persist the current state of the merging log. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MergingLog(@NonNull
java.io.File outputFolder)
| Method Detail |
|---|
public void logCopy(@NonNull
com.android.ide.common.blame.SourceFile source,
@NonNull
com.android.ide.common.blame.SourceFile destination)
source - the original file.destination - the destination.
public void logCopy(@NonNull
java.io.File source,
@NonNull
java.io.File destination)
source - the original file.destination - the destination.
public void logRemove(@NonNull
com.android.ide.common.blame.SourceFile merged)
public void logSource(@NonNull
com.android.ide.common.blame.SourceFile mergedFile,
@NonNull
java.util.Map<com.android.ide.common.blame.SourcePosition,com.android.ide.common.blame.SourceFilePosition> map)
mergedFile - the destination file.map - the map from positions in the destination file to the SourceFilePosition
that they came from.
@NonNull
public com.android.ide.common.blame.SourceFile find(@NonNull
com.android.ide.common.blame.SourceFile mergedFile)
@NonNull
public com.android.ide.common.blame.SourceFilePosition find(@NonNull
com.android.ide.common.blame.SourceFilePosition mergedFilePosition)
public void write()
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||