Code cleanup.
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue161_PackageScoping_Test.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue161_PackageScoping_Test.java
index b9423c3..9fcddc5 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue161_PackageScoping_Test.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue161_PackageScoping_Test.java
@@ -61,7 +61,7 @@
//
// message Summary {
// repeated base.shared.Type type = 1;
- // }
+ // }
@Test public void should_include_package_intersection() {
MessageField field = xtext.find("type", " =", MessageField.class);
IScope scope = provider.scope_ComplexTypeLink_target((ComplexTypeLink) field.getType(), reference);
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue167_PackageScopingWithNestedTypes_Test.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue167_PackageScopingWithNestedTypes_Test.java
index 9fbaf66..311a01e 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue167_PackageScopingWithNestedTypes_Test.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue167_PackageScopingWithNestedTypes_Test.java
@@ -63,7 +63,7 @@
//
// message Summary {
// repeated base.shared.Outer.Type type = 1;
- // }
+ // }
@Test public void should_include_package_intersection() {
MessageField field = xtext.find("type", " =", MessageField.class);
IScope scope = provider.scope_ComplexTypeLink_target((ComplexTypeLink) field.getType(), reference);
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue169_AddSupportForExtendingGroups_Test.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue169_AddSupportForExtendingGroups_Test.java
index a48fa5a..c4215e7 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue169_AddSupportForExtendingGroups_Test.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/bugs/Issue169_AddSupportForExtendingGroups_Test.java
@@ -13,14 +13,14 @@
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;
+import org.junit.*;
+
import com.google.eclipse.protobuf.junit.core.XtextRule;
import com.google.eclipse.protobuf.protobuf.*;
-import org.junit.*;
-
/**
* Tests fix for <a href="http://code.google.com/p/protobuf-dt/issues/detail?id=169">Issue 169</a>.
- *
+ *
* @author alruiz@google.com (Alex Ruiz)
*/
public class Issue169_AddSupportForExtendingGroups_Test {
@@ -36,7 +36,7 @@
// optional group MidGroup = 1 {
// optional group BottomGroup = 2 {}
// }
- // }
+ // }
// syntax = "proto2";
// package com.google.proto.project.shared;
@@ -59,7 +59,7 @@
// message MidMessage {
// optional group BottomGroup = 1 {}
// }
- // }
+ // }
// syntax = "proto2";
// package com.google.proto.project.shared;
@@ -82,7 +82,7 @@
// optional group MidGroup = 1 {
// message BottomMessage {}
// }
- // }
+ // }
// syntax = "proto2";
// package com.google.proto.project.shared;
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/IEObjectDescriptions.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/IEObjectDescriptions.java
index dc824e0..cb1b5ce 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/IEObjectDescriptions.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/IEObjectDescriptions.java
@@ -10,13 +10,13 @@
import static java.util.Collections.unmodifiableSet;
+import java.util.*;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.naming.QualifiedName;
import org.eclipse.xtext.resource.IEObjectDescription;
import org.eclipse.xtext.scoping.IScope;
-import java.util.*;
-
/**
* @author alruiz@google.com (Alex Ruiz)
*/
@@ -29,29 +29,29 @@
public static IEObjectDescriptions descriptions(Iterable<IEObjectDescription> elements) {
return new IEObjectDescriptions(elements);
}
-
+
private final Map<String, IEObjectDescription> descriptions = new LinkedHashMap<String, IEObjectDescription>();
-
+
private IEObjectDescriptions(Iterable<IEObjectDescription> elements) {
for (IEObjectDescription d : elements) {
QualifiedName name = d.getName();
descriptions.put(name.toString(), d);
}
}
-
+
public EObject objectDescribedAs(String name) {
IEObjectDescription d = descriptions.get(name);
return d.getEObjectOrProxy();
}
-
+
public int size() {
return descriptions.size();
}
-
+
public Collection<String> names() {
- return unmodifiableSet(descriptions.keySet());
+ return unmodifiableSet(descriptions.keySet());
}
-
+
@Override public String toString() {
return descriptions.keySet().toString();
}
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllFields.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllFields.java
index b586d29..69253ee 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllFields.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllFields.java
@@ -1,9 +1,9 @@
/*
* 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.junit.matchers;
@@ -14,7 +14,7 @@
import org.hamcrest.*;
import com.google.eclipse.protobuf.junit.IEObjectDescriptions;
-import com.google.eclipse.protobuf.protobuf.*;
+import com.google.eclipse.protobuf.protobuf.MessageField;
/**
* @author alruiz@google.com (Alex Ruiz)
@@ -26,7 +26,7 @@
public static ContainAllFields containAll(Collection<MessageField> fields) {
return new ContainAllFields(fields);
}
-
+
private ContainAllFields(Collection<MessageField> fields) {
this.fields.addAll(fields);
}
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllFieldsInMessage.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllFieldsInMessage.java
index a4b2d55..ac3fa14 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllFieldsInMessage.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllFieldsInMessage.java
@@ -1,9 +1,9 @@
/*
* 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.junit.matchers;
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllLiteralsInEnum.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllLiteralsInEnum.java
index f0ba0a2..7fcad3f 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllLiteralsInEnum.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllLiteralsInEnum.java
@@ -1,9 +1,9 @@
/*
* 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.junit.matchers;
@@ -29,11 +29,11 @@
public static ContainAllLiteralsInEnum containAllLiteralsIn(Enum anEnum) {
return new ContainAllLiteralsInEnum(anEnum);
}
-
+
private ContainAllLiteralsInEnum(Enum anEnum) {
this.anEnum = anEnum;
}
-
+
@Override public boolean matches(Object arg) {
if (!(arg instanceof IEObjectDescriptions)) return false;
IEObjectDescriptions descriptions = (IEObjectDescriptions) arg;
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllNames.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllNames.java
index a5b842a..f40ca20 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllNames.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainAllNames.java
@@ -1,9 +1,9 @@
/*
* 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.junit.matchers;
@@ -24,11 +24,11 @@
public static ContainAllNames containAll(String... names) {
return new ContainAllNames(names);
}
-
+
private ContainAllNames(String... names) {
expectedNames = names;
}
-
+
@Override public boolean matches(Object arg) {
if (!(arg instanceof IEObjectDescriptions)) return false;
IEObjectDescriptions descriptions = (IEObjectDescriptions) arg;
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainNames.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainNames.java
index 4458174..24503f6 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainNames.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/junit/matchers/ContainNames.java
@@ -1,9 +1,9 @@
/*
* 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.junit.matchers;
@@ -26,11 +26,11 @@
public static ContainNames contain(String... names) {
return new ContainNames(names);
}
-
+
private ContainNames(String... names) {
expectedNames = asList(names);
}
-
+
@Override public boolean matches(Object arg) {
if (!(arg instanceof IEObjectDescriptions)) return false;
IEObjectDescriptions descriptions = (IEObjectDescriptions) arg;
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_FieldName_target_with_NormalFieldName_Test.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_FieldName_target_with_NormalFieldName_Test.java
index 75c0205..472e6b1 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_FieldName_target_with_NormalFieldName_Test.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_FieldName_target_with_NormalFieldName_Test.java
@@ -15,16 +15,16 @@
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
-import com.google.eclipse.protobuf.junit.core.XtextRule;
-import com.google.eclipse.protobuf.protobuf.*;
-
import org.eclipse.emf.ecore.EReference;
import org.eclipse.xtext.scoping.IScope;
import org.junit.*;
+import com.google.eclipse.protobuf.junit.core.XtextRule;
+import com.google.eclipse.protobuf.protobuf.*;
+
/**
* Tests for <code>{@link ProtobufScopeProvider#scope_FieldName_target(FieldName, EReference)}</code>
- *
+ *
* @author alruiz@google.com (Alex Ruiz)
*/
public class ProtobufScopeProvider_scope_FieldName_target_with_NormalFieldName_Test {
@@ -65,7 +65,7 @@
Message message = xtext.find("Type", " {", Message.class);
assertThat(descriptionsIn(scope), containAllFieldsIn(message));
}
-
+
// syntax = "proto2";
//
// import "google/protobuf/descriptor.proto";
@@ -105,7 +105,7 @@
// extend google.protobuf.FieldOptions {
// optional Type type = 15478479;
// }
- //
+ //
// message Address {
// optional int target = 1 [(type) = { code: 68 }];
// }
@@ -133,7 +133,7 @@
// extend google.protobuf.FieldOptions {
// optional Type type = 15478479;
// }
- //
+ //
// message Address {
// optional int target = 1 [(type) = { name: { value: 'Address' } }];
// }