Code cleanup.
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Strings_firstCharToLowerCase_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Strings_firstCharToLowerCase_Test.java
deleted file mode 100644
index 8229fe3..0000000
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/util/Strings_firstCharToLowerCase_Test.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2011 Google Inc.
- *
- * All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
- * Public License v1.0 which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package com.google.eclipse.protobuf.util;
-
-import static org.hamcrest.core.IsEqual.equalTo;
-import static org.hamcrest.core.IsNull.nullValue;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-import com.google.eclipse.protobuf.util.Strings;
-
-/**
- * Tests for <code>{@link Strings#firstCharToLowerCase(String)}</code>
- *
- * @author alruiz@google.com (Alex Ruiz)
- */
-public class Strings_firstCharToLowerCase_Test {
-
- @Test public void should_return_null() {
- assertThat(Strings.firstCharToLowerCase(null), nullValue());
- }
-
- @Test public void should_return_empty_String() {
- assertThat(Strings.firstCharToLowerCase(""), equalTo(""));
- }
-
- @Test public void should_return_String_with_first_char_lower_case() {
- assertThat(Strings.firstCharToLowerCase("HElLo"), equalTo("hElLo"));
- }
-}
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/contentassist/ProtobufProposalProvider.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/contentassist/ProtobufProposalProvider.java
index 57b1b1a..d874af1 100644
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/contentassist/ProtobufProposalProvider.java
+++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/contentassist/ProtobufProposalProvider.java
@@ -12,10 +12,10 @@
import static com.google.eclipse.protobuf.protobuf.Modifier.*;
import static com.google.eclipse.protobuf.ui.grammar.CompoundElement.*;
import static com.google.eclipse.protobuf.util.CommonWords.space;
-import static com.google.eclipse.protobuf.util.Strings.firstCharToLowerCase;
import static java.lang.String.valueOf;
import static java.util.Collections.emptyList;
import static org.eclipse.xtext.EcoreUtil2.getAllContentsOfType;
+import static org.eclipse.xtext.util.Strings.toFirstLower;
import java.util.*;
@@ -277,7 +277,7 @@
@Override public void completeProperty_Name(EObject model, Assignment assignment, ContentAssistContext context,
ICompletionProposalAcceptor acceptor) {
- String typeName = firstCharToLowerCase(properties.typeNameOf((Property) model));
+ String typeName = toFirstLower(properties.typeNameOf((Property) model));
int index = 1;
String name = typeName + index;
for (EObject o : model.eContainer().eContents()) {
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/preferences/pages/paths/PathsPreferences.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/preferences/pages/paths/PathsPreferences.java
index cb0127f..bb87b1f 100644
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/preferences/pages/paths/PathsPreferences.java
+++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/preferences/pages/paths/PathsPreferences.java
@@ -9,7 +9,6 @@
package com.google.eclipse.protobuf.ui.preferences.pages.paths;
import static com.google.eclipse.protobuf.ui.preferences.pages.paths.PathResolutionType.*;
-import static com.google.eclipse.protobuf.util.Strings.CSV_PATTERN;
import static java.util.Collections.*;
import java.util.*;
@@ -27,6 +26,8 @@
private final PathResolutionType pathResolutionType;
private final List<DirectoryPath> importRoots;
+ private static final String CSV_PATTERN = "[\\s]*,[\\s]*";
+
PathsPreferences(RawPreferences preferences, IProject project) {
boolean filesInOneDirectoryOnly = preferences.filesInOneDirectoryOnly().value();
pathResolutionType = filesInOneDirectoryOnly ? SINGLE_DIRECTORY : MULTIPLE_DIRECTORIES;
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/util/Strings.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/util/Strings.java
deleted file mode 100644
index b3b079e..0000000
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/util/Strings.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2011 Google Inc.
- *
- * All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
- * Public License v1.0 which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package com.google.eclipse.protobuf.util;
-
-import static java.lang.Character.toLowerCase;
-
-/**
- * Utility methods related to {@code String}.
- *
- * @author alruiz@google.com (Alex Ruiz)
- */
-public class Strings {
-
- /** Pattern to split CSVs. */
- public static final String CSV_PATTERN = "[\\s]*,[\\s]*";
-
- /**
- * Returns a {@code String} with the same content as the given one, but with the first character in lower case.
- * @param s the original {@code String}
- * @return a {@code String} with the same content as the given one, but with the first character in lower case.
- */
- public static String firstCharToLowerCase(String s) {
- if (s == null) return null;
- if (s.length() == 0) return s;
- char[] chars = s.toCharArray();
- chars[0] = toLowerCase(chars[0]);
- return new String(chars);
- }
-
- private Strings() {}
-}