Adding unit tests for com.google.eclipse.protobuf. Minor code cleanup.
diff --git a/com.google.eclipse.protobuf.junit/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.junit/META-INF/MANIFEST.MF index 283dcfa..3bb5a1b 100644 --- a/com.google.eclipse.protobuf.junit/META-INF/MANIFEST.MF +++ b/com.google.eclipse.protobuf.junit/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: JUnit support for testing Bundle-SymbolicName: com.google.eclipse.protobuf.junit -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.0.0 Bundle-Vendor: Google Bundle-RequiredExecutionEnvironment: J2SE-1.5 Require-Bundle: org.junit;bundle-version="4.8.1",
diff --git a/com.google.eclipse.protobuf.junit/src/com/google/eclipse/protobuf/junit/Finder.java b/com.google.eclipse.protobuf.junit/src/com/google/eclipse/protobuf/junit/Finder.java index a12d595..50fddba 100644 --- a/com.google.eclipse.protobuf.junit/src/com/google/eclipse/protobuf/junit/Finder.java +++ b/com.google.eclipse.protobuf.junit/src/com/google/eclipse/protobuf/junit/Finder.java
@@ -18,11 +18,10 @@ * @author alruiz@google.com (Alex Ruiz) */ public final class Finder { - - public static Literal findLiteral(String name, Protobuf root) { - List<Literal> literals = getAllContentsOfType(root, Literal.class); - for (Literal literal : literals) - if (name.equals(literal.getName())) return literal; + + public static Message findMessage(String name, Protobuf root) { + for (Message message : getAllContentsOfType(root, Message.class)) + if (name.equals(message.getName())) return message; return null; } @@ -36,5 +35,12 @@ return getAllContentsOfType(root, Property.class); } + public static Literal findLiteral(String name, Protobuf root) { + List<Literal> literals = getAllContentsOfType(root, Literal.class); + for (Literal literal : literals) + if (name.equals(literal.getName())) return literal; + return null; + } + private Finder() {} }
diff --git a/com.google.eclipse.protobuf.ui.test/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.ui.test/META-INF/MANIFEST.MF index 9e92650..e91d7d6 100644 --- a/com.google.eclipse.protobuf.ui.test/META-INF/MANIFEST.MF +++ b/com.google.eclipse.protobuf.ui.test/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Tests for com.google.eclipse.protobuf.ui Bundle-SymbolicName: com.google.eclipse.protobuf.ui.test -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.0.0 Bundle-Vendor: Google Fragment-Host: com.google.eclipse.protobuf.ui;bundle-version="1.0.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5