Code cleanup.
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/Messages.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/Messages.java
index 07f30b4..92f36f1 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/Messages.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/Messages.java
@@ -27,6 +27,7 @@
public static String missingFieldNumber;
public static String multiplePackages;
public static String nonProto2;
+ public static String scopingError;
public static String unrecognizedSyntaxIdentifier;
static {
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/Messages.properties b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/Messages.properties
index 1faeb4b..7f8eb32 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/Messages.properties
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/Messages.properties
@@ -5,9 +5,10 @@
expectedTrueOrFalse = Expected "true" or "false".
fieldNumberAlreadyUsed = Field number %d has already been used in \"%s\" by field \"%s\".
fieldNumbersMustBePositive = Field numbers must be positive integers.
-importingNonProto2 = Importing non-proto2 file (directly or indirectly.) This may result in errors related to unresolved references.
+importingNonProto2 = Importing non-proto2 file. This may result in errors related to unresolved references.
importNotFound = Import \"%s\" was not found.
missingFieldNumber = Missing field number.
multiplePackages = Multiple package definitions.
nonProto2 = Deprecated syntax. This parser only recognizes \"proto2\".
+scopingError = It may be caused by an imported non-proto2 file.
unrecognizedSyntaxIdentifier = Unrecognized syntax identifier \"%s\". This parser only recognizes \"proto2\".
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/ProtobufResourceValidator.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/ProtobufResourceValidator.java
index 8b5be54..e16ee7c 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/ProtobufResourceValidator.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/ProtobufResourceValidator.java
@@ -10,7 +10,7 @@
import static com.google.common.collect.Lists.newArrayListWithExpectedSize;
import static com.google.common.collect.Maps.newHashMap;
-import static com.google.eclipse.protobuf.validation.Messages.importingNonProto2;
+import static com.google.eclipse.protobuf.validation.Messages.*;
import static org.eclipse.xtext.diagnostics.Severity.*;
import static org.eclipse.xtext.validation.AbstractInjectableValidator.CURRENT_LANGUAGE_NAME;
import static org.eclipse.xtext.validation.CancelableDiagnostician.CANCEL_INDICATOR;
@@ -72,7 +72,8 @@
severity = WARNING;
ProtobufLinkingDiagnostic d = (ProtobufLinkingDiagnostic) error;
if (!d.getMessage().endsWith(".")) d.appendToMessage(".");
- d.appendToMessage(" It may be caused by a non-proto2 file imported directly or indirectly.");
+ d.appendToMessage(" ");
+ d.appendToMessage(scopingError);
}
issueFromXtextResourceDiagnostic(error, severity, acceptor);
}