}
}
public void jumpToUser(User jumpTo) {
RemoteEditor activeEditor = remoteEditorManager.getEditorState(jumpTo)
.getActiveEditor();
// you can't follow yourself
if (sarosSession.getLocalUser().equals(jumpTo))
return;
if (activeEditor == null) {
log.info(Utils.prefix(jumpTo.getJID()) + "has no editor open");
// no active editor on target subject
SarosView.showNotification("Following " + jumpTo.getJID().getBase()
+ "!", jumpTo.getJID().getName()
+ " has no shared file opened yet.");
return;
}
IEditorPart newEditor = this.editorAPI.openEditor(activeEditor
.getPath());
if (newEditor == null) {
return;
}
ILineRange viewport = activeEditor.getViewport();
if (viewport == null) {
log.warn(Utils.prefix(jumpTo.getJID())
+ "has no viewport in editor: " + activeEditor.getPath());
return;
}
this.editorAPI.reveal(newEditor, viewport);