Renamed GlobalScope to Globals, to avoid name conflicts with Xtext's own elements.
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/GlobalScope.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/Globals.java
similarity index 97%
rename from com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/GlobalScope.java
rename to com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/Globals.java
index 0e3dfc2..f7f36e2 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/GlobalScope.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/Globals.java
@@ -35,7 +35,7 @@
* @author alruiz@google.com (Alex Ruiz)
*/
@Singleton
-public class GlobalScope {
+public class Globals {
private Protobuf root;
@@ -45,7 +45,7 @@
@Inject EObjectFinder finder;
- @Inject public GlobalScope(IParser parser) {
+ @Inject public Globals(IParser parser) {
try {
XtextResource resource = new XtextResource(URI.createURI(""));
IParseResult result = parser.parse(new InputStreamReader(globalScopeContents(), "UTF-8"));
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider.java
index 2a32b85..d46c576 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider.java
@@ -34,7 +34,7 @@
private static final boolean DO_NOT_IGNORE_CASE = false;
@Inject private EObjectFinder finder;
- @Inject private GlobalScope globalScope;
+ @Inject private Globals globals;
@SuppressWarnings("unused")
IScope scope_LiteralRef_literal(LiteralRef literalRef, EReference reference) {
@@ -43,8 +43,8 @@
Enum enumType = finder.enumTypeOfProperty((Property) container);
if (enumType != null) return scopeForLiteralsIn(enumType);
}
- if (container instanceof Option && globalScope.isOptimizeForOption((Option) container)) {
- Enum optimizedMode = globalScope.optimizedMode();
+ if (container instanceof Option && globals.isOptimizeForOption((Option) container)) {
+ Enum optimizedMode = globals.optimizedMode();
return scopeForLiteralsIn(optimizedMode);
}
return null;