diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/formatting/ProtobufFormatter.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/formatting/ProtobufFormatter.java index 66b4f59c..1c0c40c4 100644 --- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/formatting/ProtobufFormatter.java +++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/formatting/ProtobufFormatter.java @@ -69,6 +69,7 @@ protected synchronized FormattingConfig getConfig() { c.setLinewrap(1,2,3).before(g.getMessageRule()); c.setLinewrap(2).after(g.getMessageRule()); c.setLinewrap(1).after(g.getMessageFieldRule()); + c.setLinewrap(2).after(g.getOneOfRule()); c.setLinewrap(1).after(g.getGroupRule()); c.setLinewrap(2).after(g.getEnumRule()); c.setLinewrap(1).after(g.getEnumElementRule()); @@ -135,6 +136,8 @@ public FirstCommentIndentationFixingTokenStream(ITokenStream anOut) { ProtobufGrammarAccess g = (ProtobufGrammarAccess) getGrammarAccess(); openingCurlyBracketRuleCalls.add(g.getMessageAccess().getLeftCurlyBracketKeyword_2()); + openingCurlyBracketRuleCalls.add(g.getOneOfAccess().getLeftCurlyBracketKeyword_3()); + slCommentType = g.getSL_COMMENTRule().getType(); }