dvdkruk / protobuf-dt

Automatically exported from code.google.com/p/protobuf-dt
0 stars 0 forks source link

Auto format cause bad indent for comment #132

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a proto file:

message MyMessage {

  // Bad
  required string bad = 1;

  // Good
  required string good = 2;
}

2. Press Ctrl+Shift+F

What is the expected output? What do you see instead?

I expect keep the indents.But I see:

message MyMessage {

// Bad
  required string bad = 1;

  // Good
  required string good = 2;
}

What version of the product are you using? On what operating system?
protobuf-dt 1.0.2 on Windows.

Original issue reported on code.google.com by pop.atry@gmail.com on 9 Oct 2011 at 11:48

GoogleCodeExporter commented 9 years ago
Investigated this issue a bit today...

It appears that SL_COMMENT and ML_COMMENT are not handled consistently with 
other keywords in the XText formatter....

This seems like an underlying defect and may be what is described in this forum 
post:
http://www.eclipse.org/forums/index.php/mv/msg/234121/714561/

This issue does not seem to be resolvable through use of the inline DSL for the 
formatter, but can be resolved by intercepting the ITokenStream and modifying 
the output on the fly when comments are being formatted.

This solution is hacky and I don't particularly like it - but it works.  It 
seems there are some other undesirable formatting settings as well, maybe we 
should take a closer look at formatting in general.  I'll swing back around to 
this issue at some point in the future.

Original comment by compuwar...@gmail.com on 12 Oct 2011 at 12:58

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 12 Oct 2011 at 6:05

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 18 Oct 2011 at 7:58

GoogleCodeExporter commented 9 years ago
1.0.12? Well, where can I find version from 1.0.3 to 1.0.11?

Original comment by pop.atry@gmail.com on 19 Oct 2011 at 1:09

GoogleCodeExporter commented 9 years ago
Would you please update update-site to 1.0.11?

Original comment by pop.atry@gmail.com on 19 Oct 2011 at 1:11

GoogleCodeExporter commented 9 years ago
You would have to build from source to obtain those versions as they are not 
public releases.

My understanding is that there are version numbers for 'beta' internal releases 
and so far none of them has stood up to Alex's QA standards for a formal public 
release.

Original comment by compuwar...@gmail.com on 19 Oct 2011 at 1:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Are those version even unstabler than v1.0.2? I would like to try any newer 
version better than v1.0.2 .

Original comment by pop.atry@gmail.com on 19 Oct 2011 at 1:25

GoogleCodeExporter commented 9 years ago
Let's take this discussion over to the group as it is unrelated to this issue 
report.

http://groups.google.com/group/protobuf-dt?pli=1

I will do a build of whatever the current source is for you and post it there 
tomorrow.

Original comment by compuwar...@gmail.com on 19 Oct 2011 at 2:31

GoogleCodeExporter commented 9 years ago
1.0.11 will be released tomorrow. I was going to release 1.0.10 last week, but 
a last-minute show-stopper bug showed up.

Sorry for the versioning confusion. 1.0.11 is really 1.0.3. We decided to unify 
the versioning between the Google-internal and the open source versions.

Original comment by alr...@google.com on 19 Oct 2011 at 2:31

GoogleCodeExporter commented 9 years ago
This report is related to Issue 13
https://code.google.com/p/protobuf-dt/issues/detail?id=13

Original comment by compuwar...@gmail.com on 19 Oct 2011 at 8:09

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 3 Nov 2011 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 13 Jan 2012 at 3:21

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 20 Jan 2012 at 10:30

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 21 Oct 2012 at 9:15