Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » Toggle comment behavior in LPG editor
Toggle comment behavior in LPG editor [message #576563] Sat, 12 September 2009 21:37
Brian Payton is currently offline Brian Payton
Messages: 152
Registered: July 2009
Senior Member
Here's a minor fit'n'finish item I came across in the LPG source editor.

In the editor, the "Toggle comment" action (Ctrl+/) adds LPG comments in
a way that is kind of ugly. Let's say you have a rule like this:

col_expr_cl ::=
col_expr_spec
| col_expr_cl , col_expr_spec

The toggle comment action does this:

-- col_expr_cl ::=
-- col_expr_spec
-- | col_expr_cl , col_expr_spec

The equivalent action in the Java editor works a little differently. If
you toggle comments on this:

if (uniqueOpt != null) {
index.setUnique(true);
}

you get this:

// if (uniqueOpt != null) {
// index.setUnique(true);
// }

which I think makes it easier to spot sections of code that are
commented out.
Previous Topic:Missing lpg Fragment
Next Topic:LPG editor text coloring
Goto Forum:
  


Current Time: Wed Aug 27 05:05:41 EDT 2014

Powered by FUDForum. Page generated in 0.01686 seconds