Renamed TypeRef to ComplexTypeLink.
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/Issue157_GroupsShouldBeTypes_Test.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/Issue157_GroupsShouldBeTypes_Test.java
index 7aaaf57..d930c88 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/Issue157_GroupsShouldBeTypes_Test.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/Issue157_GroupsShouldBeTypes_Test.java
@@ -54,7 +54,7 @@
   // }
   @Test public void should_treat_groups_as_types() {
     Property p = xtext.find("mygroup", Property.class);
-    IScope scope = provider.scope_TypeRef_type((TypeRef) p.getType(), reference);
+    IScope scope = provider.scope_ComplexTypeLink_target((ComplexTypeLink) p.getType(), reference);
     assertThat(descriptionsIn(scope), contain("Root.MyGroup", "MyGroup"));
   }
 }
diff --git a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_TypeRef_type_Test.java b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_ComplexTypeLink_target_Test.java
similarity index 90%
rename from com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_TypeRef_type_Test.java
rename to com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_ComplexTypeLink_target_Test.java
index 79dd0ea..c9e390e 100644
--- a/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_TypeRef_type_Test.java
+++ b/com.google.eclipse.protobuf.integration.test/src/com/google/eclipse/protobuf/scoping/ProtobufScopeProvider_scope_ComplexTypeLink_target_Test.java
@@ -23,11 +23,11 @@
 import com.google.eclipse.protobuf.protobuf.*;
 
 /**
- * Tests for <code>{@link ProtobufScopeProvider#scope_TypeRef_type(TypeRef, EReference)}</code>
+ * Tests for <code>{@link ProtobufScopeProvider#scope_ComplexTypeLink_target(ComplexTypeLink, EReference)}</code>
  *
  * @author alruiz@google.com (Alex Ruiz)
  */
-public class ProtobufScopeProvider_scope_TypeRef_type_Test {
+public class ProtobufScopeProvider_scope_ComplexTypeLink_target_Test {
 
   private static EReference reference;
 
@@ -63,7 +63,7 @@
   // }
   @Test public void should_provide_Types() {
     Property p = xtext.find("type", Property.class);
-    IScope scope = provider.scope_TypeRef_type(typeOf(p), reference);
+    IScope scope = provider.scope_ComplexTypeLink_target(typeOf(p), reference);
     assertThat(descriptionsIn(scope), containAll("Type", "proto.Type", "google.proto.Type", "com.google.proto.Type",
                                                  ".com.google.proto.Type",
                                                  "Address", "proto.Address", "google.proto.Address",
@@ -99,7 +99,7 @@
   // }
   @Test public void should_provide_imported_Types() {
     Property p = xtext.find("type", " =", Property.class);
-    IScope scope = provider.scope_TypeRef_type(typeOf(p), reference);
+    IScope scope = provider.scope_ComplexTypeLink_target(typeOf(p), reference);
     assertThat(descriptionsIn(scope), containAll("test.proto.Type", ".test.proto.Type",
                                                  "test.proto.Address", ".test.proto.Address",
                                                  "Contact", "proto.Contact", "google.proto.Contact",
@@ -133,7 +133,7 @@
   // }
   @Test public void should_provide_imported_Types_with_equal_package() {
     Property p = xtext.find("type", " =", Property.class);
-    IScope scope = provider.scope_TypeRef_type(typeOf(p), reference);
+    IScope scope = provider.scope_ComplexTypeLink_target(typeOf(p), reference);
     assertThat(descriptionsIn(scope), containAll("Type", "proto.Type", "google.proto.Type", "com.google.proto.Type",
                                                  ".com.google.proto.Type",
                                                  "Address", "proto.Address", "google.proto.Address",
@@ -169,7 +169,7 @@
   // }
   @Test public void should_provide_public_imported_Types() {
     Property p = xtext.find("type", " =", Property.class);
-    IScope scope = provider.scope_TypeRef_type(typeOf(p), reference);
+    IScope scope = provider.scope_ComplexTypeLink_target(typeOf(p), reference);
     assertThat(descriptionsIn(scope), containAll("test.proto.Type", ".test.proto.Type",
                                                  "test.proto.Address", ".test.proto.Address",
                                                  "Contact", "proto.Contact", "google.proto.Contact",
@@ -210,14 +210,14 @@
   // }
   @Test public void should_provide_public_imported_Types_with_more_than_one_level() {
     Property p = xtext.find("type", " =", Property.class);
-    IScope scope = provider.scope_TypeRef_type(typeOf(p), reference);
+    IScope scope = provider.scope_ComplexTypeLink_target(typeOf(p), reference);
     assertThat(descriptionsIn(scope), containAll("test.proto.Type", ".test.proto.Type",
                                                  "test.proto.Address", ".test.proto.Address",
                                                  "Contact", "proto.Contact", "google.proto.Contact",
                                                  "com.google.proto.Contact", ".com.google.proto.Contact"));
   }
 
-  private static TypeRef typeOf(Property p) {
-    return (TypeRef) p.getType();
+  private static ComplexTypeLink typeOf(Property p) {
+    return (ComplexTypeLink) p.getType();
   }
 }
\ No newline at end of file
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/matchers/PropertyHasType.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/matchers/PropertyHasType.java
index 0a39c58..a14b23e 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/matchers/PropertyHasType.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/matchers/PropertyHasType.java
@@ -44,8 +44,8 @@
   private String typeNameOf(Property property) {
     AbstractTypeRef r = property.getType();
     if (r instanceof ScalarTypeRef) return ((ScalarTypeRef) r).getScalar().getName();
-    if (r instanceof TypeRef) {
-      ComplexType type = ((TypeRef) r).getType();
+    if (r instanceof ComplexTypeLink) {
+      ComplexType type = ((ComplexTypeLink) r).getTarget();
       return type == null ? null : type.getName();
     }
     return r.toString();
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 7f970ce..a822e15 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
@@ -74,8 +74,8 @@
     proposeAndAccept(proposal, imageHelper.getImage(images.imageFor(Syntax.class)), context, acceptor);
   }
 
-  @Override public void completeTypeRef_Type(EObject model, Assignment assignment, ContentAssistContext context, 
-      ICompletionProposalAcceptor acceptor) {
+  @Override public void completeComplexTypeLink_Target(EObject model, Assignment assignment,
+      ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
     Collection<IEObjectDescription> scope = scoping().findMessageScope(model);
     for (IEObjectDescription d : descriptionChooser.shortestQualifiedNamesIn(scope)) {
       Image image = imageHelper.getImage(images.imageFor(d.getEObjectOrProxy()));
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/syntaxcoloring/ProtobufSemanticHighlightingCalculator.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/syntaxcoloring/ProtobufSemanticHighlightingCalculator.java
index 12bf7aa..2c7bc4a 100644
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/syntaxcoloring/ProtobufSemanticHighlightingCalculator.java
+++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/syntaxcoloring/ProtobufSemanticHighlightingCalculator.java
@@ -151,8 +151,8 @@
 
   private void highlightPropertyType(Property property, IHighlightedPositionAcceptor acceptor) {
     AbstractTypeRef ref = property.getType();
-    if (!(ref instanceof TypeRef)) return;
-    ComplexType type = ((TypeRef) ref).getType();
+    if (!(ref instanceof ComplexTypeLink)) return;
+    ComplexType type = ((ComplexTypeLink) ref).getTarget();
     if (type instanceof Message) {
       highlightFirstFeature(property, PROPERTY__TYPE, acceptor, MESSAGE_ID);
       return;
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext
index 12aafb1..21120e3 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext
@@ -77,7 +77,7 @@
   | repeated;
 
 AbstractTypeRef:
-  ScalarTypeRef | TypeRef;
+  ScalarTypeRef | ComplexTypeLink;
 
 ScalarTypeRef:
   scalar=ScalarType;
@@ -86,8 +86,8 @@
   double | float | int32 | int64 | uint32 | uint64 | sint32 | sint64 | fixed32 | fixed64 | sfixed32 | sfixed64 | bool |
   string | bytes;
 
-TypeRef:
-  type=[ComplexType|QualifiedName];
+ComplexTypeLink:
+  target=[ComplexType|QualifiedName];
 
 ValueRef:
   MessageNotation | SimpleRef;
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/model/util/ModelFinder.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/model/util/ModelFinder.java
index 5339092..7bf76e2 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/model/util/ModelFinder.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/model/util/ModelFinder.java
@@ -87,8 +87,8 @@
    */
   public ComplexType typeOf(Property p) {
     AbstractTypeRef r = p.getType();
-    if (!(r instanceof TypeRef)) return null;
-    return ((TypeRef) r).getType();
+    if (!(r instanceof ComplexTypeLink)) return null;
+    return ((ComplexTypeLink) r).getTarget();
   }
 
   /**
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/model/util/Properties.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/model/util/Properties.java
index 6988d7b..8df03b0 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/model/util/Properties.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/model/util/Properties.java
@@ -86,8 +86,8 @@
   public String typeNameOf(Property p) {
     AbstractTypeRef r = p.getType();
     if (r instanceof ScalarTypeRef) return ((ScalarTypeRef) r).getScalar().getName();
-    if (r instanceof TypeRef) {
-      ComplexType type = ((TypeRef) r).getType();
+    if (r instanceof ComplexTypeLink) {
+      ComplexType type = ((ComplexTypeLink) r).getTarget();
       return type == null ? null : type.getName();
     }
     return r.toString();
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 57cfbe4..fd23681 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
@@ -47,7 +47,7 @@
   @Inject private TypeScopeFinder typeScopeFinder;
 
   @SuppressWarnings("unused")
-  public IScope scope_TypeRef_type(TypeRef t, EReference r) {
+  public IScope scope_ComplexTypeLink_target(ComplexTypeLink t, EReference r) {
     EObject c = t.eContainer();
     if (c instanceof Property) {
       return createScope(findTypeScope(c));