XtextRule now requires that all embedded proto code specify 'proto2' syntax.
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java index 14340fb..4ab24d0 100644 --- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java +++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java
@@ -74,6 +74,9 @@ IParseResult parseResult = resource.getParseResult(); if (!parseResult.hasSyntaxErrors()) { root = (Protobuf) parseResult.getRootASTElement(); + if (root.getSyntax() == null) { + throw new IllegalStateException("Please specify 'proto2' syntax"); + } return; } StringBuilder builder = new StringBuilder();