Add diff preferences panel to SideBySide2
The diff settings are accessible by the "," key. They are shown on a PopupPanel that is similar to KeyHelpPopup and is placed on top of the CodeMirror on the left. Almost all settings are applied immediately after the control widget has been updated with its new value. Because CodeMirror3 only renders partial content, response time is nearly instant. Intraline differences can be hidden and shown by a trivial CSS class being added or removed, making it very efficient for the user to toggle this on or off. If the intraline data has not been loaded from the server it is first loaded in the background, and then the view is rendered again by updating the relevant markers and widgets. Most other properties (tab size, syntax highlighting, whitespace errors) are easily set on the fly by updating CodeMirror with the new option. Lines of context can now be directly entered by the user, or cleared to view the entire file with no skip bars. The panel respects most of the diff preferences. Changing column width is unlikely to be supported, and skipping of uncommented and deleted files will need a rewrite of PatchValidator. Bug: issue 2165 Inspired-by: Doug Kelly <doug.kelly@garmin.com> Change-Id: I06e2305d723bd95b5f5eafcfe3bd1b827c8d3d9f
This commit is contained in:
@@ -43,6 +43,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.CheckBox;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
import com.google.gwtexpui.globalkey.client.KeyCommand;
|
||||
import com.google.gwtexpui.globalkey.client.KeyCommandSet;
|
||||
import com.google.gwtexpui.safehtml.client.SafeHtml;
|
||||
@@ -218,7 +219,7 @@ class Header extends Composite {
|
||||
return nextPath;
|
||||
}
|
||||
|
||||
void removeNoDiff() {
|
||||
noDiff.removeFromParent();
|
||||
void setNoDiff(boolean visible) {
|
||||
UIObject.setVisible(noDiff, visible);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user