Inline Edit: Suggest paths to add

Offer a suggestion box completing any known file path in the
repository whose path name contains the letters offered by the user.
E.g. "AddFile" would suggest the first three files of this change.

Instead of loading content into a small primitive text area, load the
file into an EditScreen where CodeMirror is configured.  This makes it
easier to begin editing the file right away and do something useful
with it.

Change-Id: I2d34bdb65b909def24ffc56e8136efd305fec3b1
This commit is contained in:
Shawn Pearce
2015-01-02 22:03:20 -08:00
parent a368744fb4
commit 8ca03a6455
10 changed files with 304 additions and 305 deletions

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<ui:UiBinder
xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:u='urn:import:com.google.gerrit.client.ui'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<ui:with field='res' type='com.google.gerrit.client.change.Resources'/>
<ui:style>
.cancel { float: right; }
</ui:style>
<g:HTMLPanel>
<div class='{res.style.section}'>
<ui:msg>Path: <u:RemoteSuggestBox ui:field='path' visibleLength='86'/></ui:msg>
</div>
<div class='{res.style.section}'>
<g:Button ui:field='open'
title='Open file in editor'
styleName='{res.style.button}'>
<ui:attribute name='title'/>
<div><ui:msg>Open</ui:msg></div>
</g:Button>
<g:Button ui:field='cancel'
styleName='{res.style.button}'
addStyleNames='{style.cancel}'>
<div>Cancel</div>
</g:Button>
</div>
</g:HTMLPanel>
</ui:UiBinder>