Rename CodeMirrorDemo to SideBySide2

This is no longer a proof of concept.  Follow the pattern of
ChangeScreen2 and rename to SideBySide2.

Rename the ,codemirror view selector to the shorter ,cm string.

Change-Id: I5702707b3c329c8771444bb98f148c0b30a73cce
This commit is contained in:
Shawn Pearce
2013-07-17 08:46:31 -07:00
parent 9c65a00298
commit a48e3d79c4
7 changed files with 14 additions and 14 deletions

View File

@@ -70,7 +70,7 @@ import com.google.gerrit.client.changes.PublishCommentScreen;
import com.google.gerrit.client.changes.QueryScreen;
import com.google.gerrit.client.dashboards.DashboardInfo;
import com.google.gerrit.client.dashboards.DashboardList;
import com.google.gerrit.client.diff.CodeMirrorDemo;
import com.google.gerrit.client.diff.SideBySide2;
import com.google.gerrit.client.groups.GroupApi;
import com.google.gerrit.client.groups.GroupInfo;
import com.google.gerrit.client.patches.PatchScreen;
@@ -591,8 +591,8 @@ public class Dispatcher {
top, //
baseId //
);
} else if ("codemirror".equals(panel)) {
return new CodeMirrorDemo(baseId, id.getParentKey(), id.get());
} else if ("cm".equals(panel)) {
return new SideBySide2(baseId, id.getParentKey(), id.get());
}
}

View File

@@ -119,7 +119,7 @@ class FileTable extends FlowPanel {
p.append(base.get()).append("..");
}
p.append(curr.get()).append('/').append(KeyUtil.encode(info.path()));
p.append(info.binary() ? ",unified" : ",codemirror");
p.append(info.binary() ? ",unified" : "cm");
return p.toString();
}

View File

@@ -48,7 +48,7 @@ abstract class CommentBox extends Composite {
private CommentInfo original;
private PatchSet.Id patchSetId;
private PaddingManager widgetManager;
private CodeMirrorDemo diffView;
private SideBySide2 diffView;
private boolean draft;
private LineWidget selfWidget;
private CodeMirror cm;
@@ -65,7 +65,7 @@ abstract class CommentBox extends Composite {
CommentBoxResources res;
CommentBox(
CodeMirrorDemo host,
SideBySide2 host,
CodeMirror cmInstance,
UiBinder<? extends Widget, CommentBox> binder,
PatchSet.Id id, CommentInfo info, CommentLinkProcessor linkProcessor,
@@ -133,7 +133,7 @@ abstract class CommentBox extends Composite {
return getStyleName().contains(res.style().open());
}
CodeMirrorDemo getDiffView() {
SideBySide2 getDiffView() {
return diffView;
}

View File

@@ -78,7 +78,7 @@ class DraftBox extends CommentBox {
private Timer expandTimer;
DraftBox(
CodeMirrorDemo host,
SideBySide2 host,
CodeMirror cm,
PatchSet.Id id,
CommentInfo info,

View File

@@ -34,7 +34,7 @@ class PublishedBox extends CommentBox {
private DraftBox replyBox;
PublishedBox(
CodeMirrorDemo host,
SideBySide2 host,
CodeMirror cm,
PatchSet.Id id,
CommentInfo info,

View File

@@ -73,8 +73,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CodeMirrorDemo extends Screen {
interface Binder extends UiBinder<HTMLPanel, CodeMirrorDemo> {}
public class SideBySide2 extends Screen {
interface Binder extends UiBinder<HTMLPanel, SideBySide2> {}
private static Binder uiBinder = GWT.create(Binder.class);
private static final int HEADER_FOOTER = 60 + 15 * 2 + 38 + 26 * 2;
@@ -116,7 +116,7 @@ public class CodeMirrorDemo extends Screen {
private KeyCommandSet keysOpenByEnter;
private List<HandlerRegistration> keyHandlers;
public CodeMirrorDemo(
public SideBySide2(
PatchSet.Id base,
PatchSet.Id revision,
String path) {
@@ -179,7 +179,7 @@ public class CodeMirrorDemo extends Screen {
drafts = JsArray.createArray().cast();
}
ConfigInfoCache.get(revision.getParentKey(), group.addFinal(
new ScreenLoadCallback<ConfigInfoCache.Entry>(CodeMirrorDemo.this) {
new ScreenLoadCallback<ConfigInfoCache.Entry>(SideBySide2.this) {
@Override
protected void preDisplay(ConfigInfoCache.Entry result) {
commentLinkProcessor = result.getCommentLinkProcessor();

View File

@@ -16,7 +16,7 @@ package com.google.gerrit.client.diff;
import static org.junit.Assert.assertEquals;
import com.google.gerrit.client.diff.CodeMirrorDemo.EditIterator;
import com.google.gerrit.client.diff.SideBySide2.EditIterator;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayString;