}
private void replaceTextDocuments() {
TextDocumentId id = tf.getSourceTextDocumentId();
if (id != null) {
TextDocument replacement = (TextDocument) service.getReplacement(id);
if (replacement != null) {
tf.setSourceTextDocumentId(replacement.getID());
tf.setInputStructure(replacement.getDataStructure());
}
}
id = tf.getTargetTextDocumentId();
if (id != null) {
TextDocument replacement = (TextDocument) service.getReplacement(id);
if (replacement != null) {
tf.setTargetTextDocumentId(replacement.getID());
tf.setOutputStructure(replacement.getDataStructure());
}
}
}