Remove key_map_type edit preference
The key_map_type preference was only used by CodeMirror in the GWT UI. Since the GWT UI is gone this preference is no longer needed. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I962a3ab57c60a0a2a84e1f3e1992f78f005e5346
This commit is contained in:
		
				
					committed by
					
						
						David Pursehouse
					
				
			
			
				
	
			
			
			
						parent
						
							43217b27f7
						
					
				
				
					commit
					8341b35711
				
			@@ -1518,7 +1518,6 @@ link:#edit-preferences-info[EditPreferencesInfo] entity.
 | 
			
		||||
  )]}'
 | 
			
		||||
  {
 | 
			
		||||
    "theme": "ECLIPSE",
 | 
			
		||||
    "key_map_type": "VIM",
 | 
			
		||||
    "tab_size": 4,
 | 
			
		||||
    "line_length": 80,
 | 
			
		||||
    "indent_unit": 2,
 | 
			
		||||
@@ -1551,7 +1550,6 @@ link:#edit-preferences-info[EditPreferencesInfo] entity.
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    "theme": "ECLIPSE",
 | 
			
		||||
    "key_map_type": "VIM",
 | 
			
		||||
    "tab_size": 4,
 | 
			
		||||
    "line_length": 80,
 | 
			
		||||
    "indent_unit": 2,
 | 
			
		||||
@@ -1579,7 +1577,6 @@ link:#edit-preferences-info[EditPreferencesInfo] entity.
 | 
			
		||||
  )]}'
 | 
			
		||||
  {
 | 
			
		||||
    "theme": "ECLIPSE",
 | 
			
		||||
    "key_map_type": "VIM",
 | 
			
		||||
    "tab_size": 4,
 | 
			
		||||
    "line_length": 80,
 | 
			
		||||
    "cursor_blink_rate": 530,
 | 
			
		||||
@@ -2571,9 +2568,6 @@ preferences of a user.
 | 
			
		||||
|`theme`                       ||
 | 
			
		||||
The CodeMirror theme name in upper case, for example `DEFAULT`. All the themes
 | 
			
		||||
from the CodeMirror release that Gerrit is using are available.
 | 
			
		||||
|`key_map_type`                ||
 | 
			
		||||
The CodeMirror key map. Currently only a subset of key maps are
 | 
			
		||||
supported: `DEFAULT`, `EMACS`, `SUBLIME`, `VIM`.
 | 
			
		||||
|`tab_size`                    ||
 | 
			
		||||
Number of spaces that should be used to display one tab.
 | 
			
		||||
|`line_length`                 ||
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,6 @@ public class EditPreferencesInfo {
 | 
			
		||||
  public Boolean autoCloseBrackets;
 | 
			
		||||
  public Boolean showBase;
 | 
			
		||||
  public Theme theme;
 | 
			
		||||
  public KeyMapType keyMapType;
 | 
			
		||||
 | 
			
		||||
  public static EditPreferencesInfo defaults() {
 | 
			
		||||
    EditPreferencesInfo i = new EditPreferencesInfo();
 | 
			
		||||
@@ -50,7 +49,6 @@ public class EditPreferencesInfo {
 | 
			
		||||
    i.autoCloseBrackets = false;
 | 
			
		||||
    i.showBase = false;
 | 
			
		||||
    i.theme = Theme.DEFAULT;
 | 
			
		||||
    i.keyMapType = KeyMapType.DEFAULT;
 | 
			
		||||
    return i;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
// Copyright (C) 2015 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.
 | 
			
		||||
 | 
			
		||||
package com.google.gerrit.extensions.client;
 | 
			
		||||
 | 
			
		||||
public enum KeyMapType {
 | 
			
		||||
  DEFAULT,
 | 
			
		||||
  EMACS,
 | 
			
		||||
  SUBLIME,
 | 
			
		||||
  VIM
 | 
			
		||||
}
 | 
			
		||||
@@ -19,7 +19,6 @@ import static com.google.common.truth.Truth.assertThat;
 | 
			
		||||
import com.google.gerrit.acceptance.AbstractDaemonTest;
 | 
			
		||||
import com.google.gerrit.acceptance.NoHttpd;
 | 
			
		||||
import com.google.gerrit.extensions.client.EditPreferencesInfo;
 | 
			
		||||
import com.google.gerrit.extensions.client.KeyMapType;
 | 
			
		||||
import com.google.gerrit.extensions.client.Theme;
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
 | 
			
		||||
@@ -44,7 +43,6 @@ public class EditPreferencesIT extends AbstractDaemonTest {
 | 
			
		||||
    assertThat(out.autoCloseBrackets).isNull();
 | 
			
		||||
    assertThat(out.showBase).isNull();
 | 
			
		||||
    assertThat(out.theme).isEqualTo(Theme.DEFAULT);
 | 
			
		||||
    assertThat(out.keyMapType).isEqualTo(KeyMapType.DEFAULT);
 | 
			
		||||
 | 
			
		||||
    // change some default values
 | 
			
		||||
    out.lineLength = 80;
 | 
			
		||||
@@ -62,7 +60,6 @@ public class EditPreferencesIT extends AbstractDaemonTest {
 | 
			
		||||
    out.autoCloseBrackets = true;
 | 
			
		||||
    out.showBase = true;
 | 
			
		||||
    out.theme = Theme.TWILIGHT;
 | 
			
		||||
    out.keyMapType = KeyMapType.EMACS;
 | 
			
		||||
 | 
			
		||||
    EditPreferencesInfo info = gApi.accounts().id(admin.id().toString()).setEditPreferences(out);
 | 
			
		||||
 | 
			
		||||
@@ -95,6 +92,5 @@ public class EditPreferencesIT extends AbstractDaemonTest {
 | 
			
		||||
    assertThat(out.autoCloseBrackets).isEqualTo(in.autoCloseBrackets);
 | 
			
		||||
    assertThat(out.showBase).isEqualTo(in.showBase);
 | 
			
		||||
    assertThat(out.theme).isEqualTo(in.theme);
 | 
			
		||||
    assertThat(out.keyMapType).isEqualTo(in.keyMapType);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user