final FileModel model) {
this.context = context;
this.presenter = presenter;
this.model = model;
ToolBar bar = new ToolBar();
bar.add(new FillToolItem());
charCount = new Status(
GWT.<StatusAppearance> create(BlueBoxStatusAppearance.class));
charCount.setWidth(150);
if (model.getContent() == null)
charCount.setText(0 + " 个字符");
else
charCount.setText(model.getContent().length() + " 个字符");
bar.add(charCount);
bar.add(new LabelToolItem(" "));
status = new Status(
GWT.<StatusAppearance> create(BlueBoxStatusAppearance.class));
status.setText("已保存");
status.setWidth(150);
bar.add(status);
codePanel.add(getCodeMirror(), new VerticalLayoutData(1, 1,
new Margins(5)));
bar.setLayoutData(new VerticalLayoutData(1, -1));
codePanel.add(bar);
setCenterWidget(codePanel, new MarginData(0, 0, 5, 0));
if (model.getName().endsWith(".sh")
|| model.getName().endsWith(".hive") || model.getName().endsWith(".odps")) {